[V3 Core] allow set game to unset the game (#1146)

This commit is contained in:
palmtree5 2017-12-07 06:17:47 -09:00 committed by Kowlin
parent d8bb18c07d
commit 878d10a1e2

View File

@ -313,10 +313,13 @@ class Core:
@_set.command(name="game") @_set.command(name="game")
@checks.is_owner() @checks.is_owner()
@commands.guild_only() @commands.guild_only()
async def _game(self, ctx, *, game: str): async def _game(self, ctx, *, game: str=None):
"""Sets Red's playing status""" """Sets Red's playing status"""
status = ctx.me.status status = ctx.me.status
game = discord.Game(name=game) if game:
game = discord.Game(name=game)
else:
game = None
await ctx.bot.change_presence(status=status, game=game) await ctx.bot.change_presence(status=status, game=game)
await ctx.send(_("Game set.")) await ctx.send(_("Game set."))