【发布时间】:2020-06-19 20:32:23
【问题描述】:
我想要一个像$status idle 这样的命令,它会执行以下操作
variblething = 'I am idle'
activity = discord.Game(name=variblething)
await client.change_presence(status=discord.Status.idle, activity=activity)
然后他们可以做$message write what you want the status to be
那么它将改变活动消息的内容。我希望这一切都有意义。我当前的代码如下
import discord
client = discord.Client()
@client.event
async def on_ready():
print('We have logged in as {0.user}'.format(client))
@client.event
async def on_message(message):
if message.author == client.user:
return
if message.content.startswith('$helloThere'):
await message.channel.send('General Kenobi')
【问题讨论】:
标签: python python-3.x discord.py discord.py-rewrite