Add userinfo, extend TODO
This commit is contained in:
parent
0539c195bd
commit
b787589ef7
3 changed files with 64 additions and 6 deletions
36
README.md
36
README.md
|
@ -12,13 +12,37 @@ Based on https://gitlab.com/ao/dpybotbase
|
|||
- [x] .py configs
|
||||
- [x] membercount command
|
||||
- [ ] Verification (and reset)
|
||||
- [ ] Logging joins, leaves, role changes, deletes, bans, kicks
|
||||
- [ ] Moderation commands (ban, kick, userinfo, approve-revoke, addhacker-removehacker, lock-softlock-timelock-unlock, mute-mutetime-unmute, playing, botnickname, nickname, clear, probate-unprobate)
|
||||
- [ ] Warns system (warn, delwarnid-delwarn, listwarns-listwarnsid, clearwarns-clearwarnsid)
|
||||
- [ ] User notes
|
||||
- [x] Meme commands and pegaswitch (honestly the easiest part)
|
||||
- [ ] Logging: joins
|
||||
- [ ] Logging: leaves
|
||||
- [ ] Logging: role changes
|
||||
- [ ] Logging: message edits
|
||||
- [ ] Logging: message deletes
|
||||
- [ ] Logging: bans
|
||||
- [ ] Logging: kicks
|
||||
- [ ] Moderation: ban
|
||||
- [ ] Moderation: kick
|
||||
- [x] Moderation: userinfo
|
||||
- [ ] Moderation: approve-revoke (community)
|
||||
- [ ] Moderation: addhacker-removehacker
|
||||
- [ ] Moderation: lock-soft-unlock (channel lockdown)
|
||||
- [ ] Moderation: timelock (channel lockdown with time)
|
||||
- [ ] Moderation: mute-unmute
|
||||
- [ ] Moderation: mutetime
|
||||
- [ ] Moderation: playing
|
||||
- [ ] Moderation: botnickname
|
||||
- [ ] Moderation: nickname
|
||||
- [ ] Moderation: clear/purge
|
||||
- [ ] Moderation: probate-unprobate
|
||||
- [ ] Moderation: watch-unwatch
|
||||
- [ ] Warns: warn
|
||||
- [ ] Warns: delwarnid-delwarn
|
||||
- [ ] Warns: listwarns-listwarnsid
|
||||
- [ ] Warns: clearwarns-clearwarnsid
|
||||
- [ ] Modmail
|
||||
- [ ] Moderation: User notes
|
||||
- [ ] .serr and .err
|
||||
- [x] Meme commands and pegaswitch (honestly the easiest part)
|
||||
- [x] source command
|
||||
- [ ] robocop command
|
||||
- [ ] eval and sh might need to be removed
|
||||
- [ ] eval and sh might need to be removed at end of development
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@ initial_extensions = ['cogs.common',
|
|||
'cogs.admin',
|
||||
'cogs.basic',
|
||||
'cogs.links',
|
||||
'cogs.mod',
|
||||
'cogs.meme']
|
||||
|
||||
bot = commands.Bot(command_prefix=get_prefix,
|
||||
|
|
33
cogs/mod.py
Normal file
33
cogs/mod.py
Normal file
|
@ -0,0 +1,33 @@
|
|||
import discord
|
||||
from discord.ext import commands
|
||||
import config
|
||||
|
||||
|
||||
class AdminCog:
|
||||
def __init__(self, bot):
|
||||
self.bot = bot
|
||||
|
||||
def check_if_staff(ctx):
|
||||
return any(r.id in config.staff_role_ids for r in ctx.author.roles)
|
||||
|
||||
@commands.check(check_if_staff)
|
||||
@commands.command()
|
||||
async def userinfo(self, ctx, *, user: discord.Member):
|
||||
"""Gets user info, staff only."""
|
||||
role = user.top_role.name
|
||||
if role == "@everyone":
|
||||
role = "@ everyone"
|
||||
await ctx.send(f"user = {user}\n"
|
||||
f"id = {user.id}\n"
|
||||
f"avatar = {user.avatar_url}\n"
|
||||
f"bot = {user.bot}\n"
|
||||
f"created_at = {user.created_at}\n"
|
||||
f"display_name = {user.display_name}\n"
|
||||
f"joined_at = {user.joined_at}\n"
|
||||
f"activities = `{user.activities}`\n"
|
||||
f"color = {user.colour}\n"
|
||||
f"top_role = {role}\n")
|
||||
|
||||
|
||||
def setup(bot):
|
||||
bot.add_cog(AdminCog(bot))
|
Loading…
Reference in a new issue