【发布时间】:2017-05-14 11:30:47
【问题描述】:
from discord.ext.commands import Bot
import secrets
from time import sleep
discordBot = Bot(command_prefix = ".")
listStrings = ['add a reaction', 'adnd']
@discordBot.event
async def on_read():
print('Client logged in')
@discordBot.command()
async def s(*args):
return await discordBot.say (" ".join(args))
@discordBot.command()
async def close():
quit()
discordBot.run(secrets.token)
我想说“.s(文本)”并且机器人说文本(已经有效)但删除了您的消息,我该怎么做?我得到了 on_message 的部分工作:
@discordbot.event
async def on_message(message):
await discordBot.delete_message(message)
最好的方法是什么?提前致谢。
【问题讨论】:
标签: python-3.x discord.py