@client.eventasync def on_message_delete(message): content = message.content author = message.author await message.channel.send("{}: {}".format(author, content))我搜索了它,但找不到任何結(jié)果。我嘗試使用 client.get_channel("id") 它給出了typerror 我嘗試將其轉(zhuǎn)換為 int 但仍然不起作用。 你能幫我嗎?
1 回答

開心每一天1111
TA貢獻(xiàn)1836條經(jīng)驗(yàn) 獲得超13個贊
將檢索到的數(shù)據(jù)發(fā)送到特定的公會和頻道
specific_guild = client.get_guild( guild_id )#guild_id must be a integer
specific_channel = specific_guild.get_channel( channel_id )#channel_id must be a integer
await specific_channel.send("{}: {}".format(author, content))
將檢索到的數(shù)據(jù)發(fā)送到同一行會的特定頻道
specific_channel = message.guild.get_channel( channel_id )#channel_id must be a integer
await specific_channel.send("{}: {}".format(author, content))
添加回答
舉報(bào)
0/150
提交
取消