From 402f6c19e7650ff523382dd981b67d99f762c4e7 Mon Sep 17 00:00:00 2001 From: palmtree5 <3577255+palmtree5@users.noreply.github.com> Date: Wed, 4 Apr 2018 02:42:10 -0800 Subject: [PATCH] [V3 Core] fix some issues with [p]set and [p]set nickname (#1494) * [V3 Core] fix AttributeError in [p]set * Fix [p]set nickname * Make the nickname param on [p]set nickname optional --- redbot/core/core_commands.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/redbot/core/core_commands.py b/redbot/core/core_commands.py index b58000419..4c869724e 100644 --- a/redbot/core/core_commands.py +++ b/redbot/core/core_commands.py @@ -541,7 +541,8 @@ class Core: "Locale: {}" "".format( ctx.bot.user.name, " ".join(prefixes), - admin_role.name, mod_role.name, locale + admin_role.name if admin_role else "Not set", + mod_role.name if mod_role else "Not set", locale ) ) await ctx.send(box(settings)) @@ -696,10 +697,10 @@ class Core: @_set.command(name="nickname") @checks.admin() @commands.guild_only() - async def _nickname(self, ctx, *, nickname: str): + async def _nickname(self, ctx, *, nickname: str=None): """Sets Red's nickname""" try: - await ctx.bot.user.edit(nick=nickname) + await ctx.guild.me.edit(nick=nickname) except discord.Forbidden: await ctx.send(_("I lack the permissions to change my own " "nickname."))