mirror of
https://github.com/Ryujinx/ryuko-ng.git
synced 2024-12-23 00:55:38 +00:00
botnickname/nickname: added
This commit is contained in:
parent
b2a907babf
commit
a5a5a2f876
|
@ -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)
|
||||
|
|
28
cogs/mod.py
28
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 <user> 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))
|
||||
|
|
Loading…
Reference in a new issue