2018-12-27 10:56:24 +00:00
|
|
|
import discord
|
|
|
|
from discord.ext import commands
|
2019-02-28 22:10:30 +00:00
|
|
|
from discord.ext.commands import Cog
|
2018-12-27 10:56:24 +00:00
|
|
|
from helpers.checks import check_if_staff
|
|
|
|
from helpers.userlogs import userlog
|
|
|
|
|
|
|
|
|
2019-02-28 22:10:30 +00:00
|
|
|
class ModNote(Cog):
|
2018-12-27 10:56:24 +00:00
|
|
|
def __init__(self, bot):
|
|
|
|
self.bot = bot
|
|
|
|
|
|
|
|
@commands.guild_only()
|
|
|
|
@commands.check(check_if_staff)
|
|
|
|
@commands.command(aliases=["addnote"])
|
|
|
|
async def note(self, ctx, target: discord.Member, *, note: str = ""):
|
|
|
|
"""Adds a note to a user, staff only."""
|
|
|
|
userlog(target.id, ctx.author, note,
|
|
|
|
"notes", target.name)
|
2018-12-27 21:36:18 +00:00
|
|
|
await ctx.send(f"{ctx.author.mention}: noted!")
|
2018-12-27 10:56:24 +00:00
|
|
|
|
|
|
|
@commands.guild_only()
|
|
|
|
@commands.check(check_if_staff)
|
|
|
|
@commands.command(aliases=["addnoteid"])
|
|
|
|
async def noteid(self, ctx, target: int, *, note: str = ""):
|
|
|
|
"""Adds a note to a user by userid, staff only."""
|
|
|
|
userlog(target, ctx.author, note,
|
|
|
|
"notes")
|
2020-02-03 17:18:30 +00:00
|
|
|
await ctx.send(f"{ctx.author.mention}: noted!")
|
2018-12-27 10:56:24 +00:00
|
|
|
|
|
|
|
|
|
|
|
def setup(bot):
|
|
|
|
bot.add_cog(ModNote(bot))
|