Testing what permissions the bot needs in order to function with the modmail system

pull/8/head
sgoudham 4 years ago
parent d301e576ae
commit f6672fd048

@ -7,7 +7,7 @@ import discord
import mariadb import mariadb
from discord import Embed from discord import Embed
from discord import File from discord import File
from discord.ext.commands import bot_has_permissions, has_permissions, Cog, group from discord.ext.commands import has_permissions, Cog, group, bot_has_permissions
import db import db
from settings import enso_embedmod_colours, blank_space from settings import enso_embedmod_colours, blank_space
@ -156,15 +156,15 @@ class Modmail(Cog):
print(f"{self.__class__.__name__} Cog has been loaded\n-----") print(f"{self.__class__.__name__} Cog has been loaded\n-----")
@group(invoke_without_command=True, usage="`[argument...]`") @group(invoke_without_command=True, usage="`[argument...]`")
@has_permissions(manage_guild=True) @has_permissions(administrator=True)
@bot_has_permissions(administrator=True) @bot_has_permissions(embed_links=True, add_reactions=True, manage_channels=True)
async def modmail(self, ctx): async def modmail(self, ctx):
"""Setup/Update/Delete Modmail System""" """Setup/Update/Delete Modmail System"""
pass pass
@modmail.command() @modmail.command()
@has_permissions(manage_guild=True) @has_permissions(administrator=True)
@bot_has_permissions(administrator=True) @bot_has_permissions(embed_links=True, add_reactions=True, manage_channels=True)
async def setup(self, ctx, channelID: int): async def setup(self, ctx, channelID: int):
""" """
Setup Modmail System Setup Modmail System
@ -265,8 +265,8 @@ class Modmail(Cog):
return return
@modmail.command() @modmail.command()
@has_permissions(manage_guild=True) @has_permissions(administrator=True)
@bot_has_permissions(administrator=True) @bot_has_permissions(embed_links=True, add_reactions=True, manage_channels=True)
async def update(self, ctx, channelID: int): async def update(self, ctx, channelID: int):
""" """
Update the Channel that the Modmail is logged to Update the Channel that the Modmail is logged to
@ -327,8 +327,8 @@ class Modmail(Cog):
return return
@modmail.command() @modmail.command()
@has_permissions(manage_guild=True) @has_permissions(administrator=True)
@bot_has_permissions(administrator=True) @bot_has_permissions(embed_links=True, add_reactions=True, manage_channels=True)
async def delete(self, ctx): async def delete(self, ctx):
"""Delete the Entire Modmail System from the Guild""" """Delete the Entire Modmail System from the Guild"""

Loading…
Cancel
Save