Browse Source

Moved to it's own cog.

main
Nichole Mattera 9 months ago
parent
commit
563e9b50fb
3 changed files with 25 additions and 10 deletions
  1. +1
    -0
      Robocop.py
  2. +0
    -10
      cogs/basic.py
  3. +24
    -0
      cogs/mod_mail.py

+ 1
- 0
Robocop.py View File

@ -46,6 +46,7 @@ wanted_jsons = ["data/restrictions.json",
initial_extensions = ['cogs.common',
'cogs.admin',
'cogs.mod',
'cogs.mod_mail',
'cogs.mod_note',
'cogs.mod_reacts',
'cogs.mod_stats',


+ 0
- 10
cogs/basic.py View File

@ -78,16 +78,6 @@ class Basic(Cog):
self.bot.log.info(message_text)
await tmp.edit(content=message_text)
@commands.command(aliases=['creport'])
async def modmail(self, ctx, *, body: str = ""):
"""Sends a modmail"""
modmail_channel = self.bot.get_channel(config.modmail_channel)
embed = discord.Embed(title=f"New modmail from {ctx.author.name}!",
description=f"**Content:** {body}")
embed.set_thumbnail(url=ctx.author.avatar_url)
await modmail_channel.send(embed=embed)
def setup(bot):
bot.add_cog(Basic(bot))

+ 24
- 0
cogs/mod_mail.py View File

@ -0,0 +1,24 @@
import config
import discord
from discord.ext import commands
from discord.ext.commands import Cog
class ModMail(Cog):
def __init__(self, bot):
self.bot = bot
@commands.command(aliases=['creport'])
async def modmail(self, ctx, *, body: str = ""):
"""Sends a modmail"""
modmail_channel = self.bot.get_channel(config.modmail_channel)
embed = discord.Embed(title=f"New modmail from {ctx.author.name}!",
description=f"**Content:** {body}")
embed.set_thumbnail(url=ctx.author.avatar_url)
await modmail_channel.send(embed=embed)
def setup(bot):
bot.add_cog(ModMail(bot))

Loading…
Cancel
Save