def set_game(self, *game):
"""Sets bot's game
Parameters:
*game: The game you want to set for the bot
Leaving this blank will remove bot's game
Example: [p]set_game with fire!"""
try:
if game:
await self.bot.change_presence(game=discord.Game(\
name=" ".join(game), type=0))
else:
await self.bot.change_presence(game=None)
await self.bot.say("Done! :ok_hand:")
except discord.InvalidArgument:
await self.bot.say("Wrong game name format (too long?)")
评论列表
文章目录