【发布时间】:2021-03-19 18:29:49
【问题描述】:
所以我想要我的不和谐机器人的状态,一个“正在玩”的状态,但不是真正的游戏,我知道你可以做到。在 python 中编写不和谐机器人时,我该怎么做?
编辑:我有这段代码,但它不起作用。
import discord
from discord.ext.commands import Bot
from discord.ext import commands
import asyncio
client = discord.Client()
PREFIX = ("$")
bot = commands.Bot(command_prefix=PREFIX)
@bot.event
async def on_ready():
await bot.change_presence(activity=discord.Game(name="testing this code"))
print("Bot is ready!")
client.run(bot_token)
【问题讨论】:
标签: discord discord.py bots