diff --git a/redbot/core/core_commands.py b/redbot/core/core_commands.py index 8a037535c..918af1235 100644 --- a/redbot/core/core_commands.py +++ b/redbot/core/core_commands.py @@ -1077,13 +1077,21 @@ class Core(commands.Cog, CoreLogic): async def _game(self, ctx: commands.Context, *, game: str = None): """Sets [botname]'s playing status""" - if game: - game = discord.Game(name=game) + if len(game) > 128: + await ctx.send("The maximum length of game descriptions is 128 characters.") else: - game = None - status = ctx.bot.guilds[0].me.status if len(ctx.bot.guilds) > 0 else discord.Status.online - await ctx.bot.change_presence(status=status, activity=game) - await ctx.send(_("Game set.")) + if game: + game = discord.Game(name=game) + else: + game = None + status = ( + ctx.bot.guilds[0].me.status if len(ctx.bot.guilds) > 0 else discord.Status.online + ) + await ctx.bot.change_presence(status=status, activity=game) + if game: + await ctx.send(_(f"Status set to ``Playing {game.name}``.")) + else: + await ctx.send(_("Game cleared.")) @_set.command(name="listening") @checks.bot_in_a_guild() @@ -1097,7 +1105,10 @@ class Core(commands.Cog, CoreLogic): else: activity = None await ctx.bot.change_presence(status=status, activity=activity) - await ctx.send(_("Listening set.")) + if activity: + await ctx.send(_(f"Status set to ``Listening to {listening}``.")) + else: + await ctx.send(_("Listening cleared.")) @_set.command(name="watching") @checks.bot_in_a_guild() @@ -1111,7 +1122,10 @@ class Core(commands.Cog, CoreLogic): else: activity = None await ctx.bot.change_presence(status=status, activity=activity) - await ctx.send(_("Watching set.")) + if activity: + await ctx.send(_(f"Status set to ``Watching {watching}``.")) + else: + await ctx.send(_("Watching cleared.")) @_set.command() @checks.bot_in_a_guild()