mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
[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
This commit is contained in:
parent
84b0df0437
commit
402f6c19e7
@ -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."))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user