The ex-president “spread lies” about the 2020 election which led to the 6 January riot, it is alleged.