@client.eventasync def on_message_delete(message): content = message.content author = message.author await message.channel.send("{}: {}".format(author, content))我搜索了它,但找不到任何结果。我尝试使用 client.get_channel("id") 它给出了typerror 我尝试将其转换为 int 但仍然不起作用。 你能帮我吗?
1 回答
![?](http://img1.sycdn.imooc.com/5458472300015f4702200220-100-100.jpg)
开心每一天1111
TA贡献1836条经验 获得超13个赞
将检索到的数据发送到特定的公会和频道
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))
将检索到的数据发送到同一行会的特定频道
specific_channel = message.guild.get_channel( channel_id )#channel_id must be a integer
await specific_channel.send("{}: {}".format(author, content))
添加回答
举报
0/150
提交
取消