我得到以下命令:
@client.command()
async def send(ctx, channel, *, content):
channel = client.get_channel(id)
await channel.send(content)
设置channel=None不会改变任何东西和错误:
'NoneType' object has no attribute 'send'
async def send(ctx, channel=None, *, content):(不改变任何东西 - 错误保持不变)
示例:我想向我通过 ID 选择的频道发送消息。
图片是命令的截图。
阿晨1998
相关分类