base.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:Asurix-bot 作者: Beafantles 项目源码 文件源码
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?)")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号