簡體   English   中英

更改嵌入的頁腳

[英]changing the embed's footer

我有這段代碼可以更改嵌入的頁腳並將其重新發送到日志通道,但現在由於某種原因它不再工作了

這是代碼:

if message.channel == bot_commands_channel:
    for em in message.embeds:
      em.set_footer('''new footer''')
      await log_channel.send(embed=em)
      return

這是我得到的錯誤:

File "main.py", line 297, in on_message
    em.set_footer('''new footer''')
TypeError: set_footer() takes 1 positional argument but 2 were given

set_footer的參數僅是關鍵字:

embed.set_footer(text='''new footer''')  # note the `text=...`

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM