【发布时间】:2020-07-09 09:39:05
【问题描述】:
我在处理 discord.py 时遇到了错误 AttributeError: 'NoneType' object has no attribute 'send'
这里是代码
import discord
from discord.ext import commands
pybot=commands.Bot(command_prefix="#", description="I love it",case_insensitive=True)
log_channel_id=674175630916583445
@pybot.event
async def on_ready():
print(f"Logged in as{pybot.user}")
channel = pybot.get_user(log_channel_id)
await channel.send('????')
pybot.run(TOKEN, bot=True, reconnect=True)
【问题讨论】:
标签: python discord.py