i have this code that would change an embed’s footer and resend it to the log channel, but now it doesn’t work anymore for somereason
this is the code:
JavaScript
x
6
1
if message.channel == bot_commands_channel:
2
for em in message.embeds:
3
em.set_footer('''new footer''')
4
await log_channel.send(embed=em)
5
return
6
and this is the error i get:
JavaScript
1
4
1
File "main.py", line 297, in on_message
2
em.set_footer('''new footer''')
3
TypeError: set_footer() takes 1 positional argument but 2 were given
4
Advertisement
Answer
The argument for set_footer
is keyword-only:
JavaScript
1
2
1
embed.set_footer(text='''new footer''') # note the `text=...`
2