不和谐的自我机器人慢

时间:2020-10-10 23:25:52

标签: discord

from discord.ext.commands import Bot
from discord.ext import commands
import asyncio

#TOKEN
TOKEN = "token"

client = discord.Client()
b = Bot(command_prefix = "!")

@b.event
async def on_ready():
    print("on")

@b.event
async def on_message(message):
    if "here" in message.content: 
        try:
            await message.author.dm_channel.send("Message I choose")
        except:
            print('The DM could not be send due to privacy permissions')

b.run(TOKEN, bot = False)

所以我有这个自我机器人。基本上,它只是检查服务器上的人何时说“ @here”,它会自动以我选择的消息对他们进行dm处理。我只想知道如果有人说@here的速度更快,我将如何使这个自我机器人检查。

0 个答案:

没有答案