除了我创建的send_message函数外,整个bot都可以工作
@client.event
async def send_winners():
img = Image.open("placement_temp.jpg")
send_winners = json.loads(open('send_message.json').read())
if send_winners == True:
channel = 686026687145705505 #648365930639785985
await message.channel.send(channel, "<@&684816171316412458> And the Winners of this week are:", img) # Error happening here
send_winners = no
with open("winner_send.json", "w") as fp:
json.dump(send_winners, fp)
await asyncio.sleep(10)
试试这个:
相关问题 更多 >
编程相关推荐