【发布时间】:2020-07-23 22:53:35
【问题描述】:
discord.py - Send messages though console - 这个问题已经过时了,所以我将尝试重新提问,因为那里提供的解决方案不起作用。
我希望我的 discord 机器人通过控制台中的输入向特定频道发送消息。我的代码如下:
channel_entry = 614001879831150605
msg_entry = 'test'
@client.event
async def send2():
channel = client.get_channel(channel_entry.get)
await channel.send(msg_entry)
我收到以下错误:
AttributeError: 'NoneType' object has no attribute 'send'
感谢任何帮助。
【问题讨论】:
标签: python discord.py