10秒钟后如何为不和谐的Python发送消息

时间:2020-09-22 21:28:10

标签: python-3.x

import discord
import datetime
from discord.ext import commands, tasks

TOKEN = 'token'

client = discord.Client()

    @tasks.loop(seconds=10)
    channel = client.get_channel('channel id')
    async def sendmessage():
         await channel.send("hello")

    sendmessage.start()


    client.run(TOKEN)

所以这是我当前的程序,我不明白为什么当前不起作用

0 个答案:

没有答案