Browse Source

Merge pull request #34 from lucyyyyyyy/patch-10

Add modmail
main
Nichole Mattera 9 months ago
committed by GitHub
parent
commit
0c3e0918d4
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 2 deletions
  1. +1
    -1
      README.md
  2. +11
    -1
      cogs/basic.py
  3. +1
    -0
      config_template.py

+ 1
- 1
README.md View File

@ -79,7 +79,6 @@ The main goal of this project, to get Robocop functionality done, is complete.
Secondary goal is adding new features:
- [ ] New feature: Modmail
- [ ] New feature: Submiterr (relies on modmail)
- [ ] Feature creep: Shortlink completion (gl/ao/etc)
- [ ] New moderation feature: timelock (channel lockdown with time, relies on robocronp)
@ -105,6 +104,7 @@ Secondary goal is adding new features:
- [x] New self-moderation feature: .mywarns
- [x] New feature: Highlights (problematic words automatically get posted to modmail channel, relies on modmail)
- [x] Purge: On purge, send logs in form of txt file to server logs
- [x] New feature: Modmail
</p>
</details>


+ 11
- 1
cogs/basic.py View File

@ -49,7 +49,7 @@ class Basic(Cog):
await ctx.send(f"{ctx.guild.name} has "
f"{ctx.guild.member_count} members!")
@commands.command(aliases=["robocopng", "robocop-ng"])
@commands.command(aliases=["robocopng", "robocop-ng", "komet", "komet-cl"])
async def robocop(self, ctx):
"""Shows a quick embed with bot info."""
embed = discord.Embed(title="Komet",
@ -78,6 +78,16 @@ 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))

+ 1
- 0
config_template.py View File

@ -59,6 +59,7 @@ welcome_channel = 326416669058662401 # newcomers channel in ReSwitched
rules_channel = 567353505367719947 # rules channel in AtlasNX
support_faq_channel = 628596855470555167 # support-faq channel in AtlasNX
list_files_channel = 680792242188845079 # Used for uploading raw text files for list editing.
modmail_channel = 0 # Modlog channel in AtlasNX
# These channel entries are used to determine which roles will be given
# access when we unmute on them


Loading…
Cancel
Save