diff --git a/README.md b/README.md index 4c84ea5..909bfe3 100755 --- a/README.md +++ b/README.md @@ -32,8 +32,8 @@ Based on https://gitlab.com/ao/dpybotbase - [ ] Moderation: mute-unmute - [ ] Moderation: mutetime - [x] Moderation: playing -- [ ] Moderation: botnickname -- [ ] Moderation: nickname +- [x] Moderation: botnickname +- [x] Moderation: nickname - [ ] Moderation: clear/purge - [ ] Moderation: probate-unprobate - [ ] Moderation: watch-unwatch (using log module from akbbot) @@ -42,6 +42,7 @@ Based on https://gitlab.com/ao/dpybotbase - [ ] Warns: listwarns-listwarnsid - [ ] Warns: clearwarns-clearwarnsid - [ ] Modmail +- [ ] Submiterr - [ ] Moderation: User notes - [x] .serr and .err - [x] Meme commands and pegaswitch (honestly the easiest part) diff --git a/cogs/mod.py b/cogs/mod.py index a9847e5..f515bc9 100644 --- a/cogs/mod.py +++ b/cogs/mod.py @@ -142,7 +142,7 @@ class ModCog: @commands.check(check_if_staff) @commands.command(aliases=["setplaying", "setgame"]) async def playing(self, ctx, *, game: str = ""): - """Sets the currently played game name, staff only. + """Sets the bot's currently played game name, staff only. Just send .playing to wipe the playing state.""" if game: @@ -150,6 +150,32 @@ class ModCog: else: await self.bot.change_presence(activity=None) + @commands.guild_only() + @commands.check(check_if_staff) + @commands.command(aliases=["setbotnick", "botnick", "robotnick"]) + async def botnickname(self, ctx, *, nick: str = ""): + """Sets the bot's nickname, staff only. + + Just send .botnickname to wipe the nickname.""" + + if nick: + await ctx.guild.me.edit(nick=nick, reason=str(ctx.author)) + else: + await ctx.guild.me.edit(nick=None, reason=str(ctx.author)) + + @commands.guild_only() + @commands.check(check_if_staff) + @commands.command(aliases=["setnick", "nick"]) + async def nickname(self, ctx, target: discord.Member, *, nick: str = ""): + """Sets a user's nickname, staff only. + + Just send .nickname to wipe the nickname.""" + + if nick: + await target.edit(nick=nick, reason=str(ctx.author)) + else: + await target.edit(nick=None, reason=str(ctx.author)) + def setup(bot): bot.add_cog(ModCog(bot))