Changed admin check
This commit is contained in:
11
cogs/data.py
11
cogs/data.py
@@ -7,6 +7,7 @@ from discord import ApplicationContext, Embed, File, option
|
||||
from discord import utils as ds_utils
|
||||
from discord.commands import SlashCommandGroup
|
||||
from discord.ext import commands
|
||||
from classes.holo_user import HoloUser
|
||||
|
||||
from enums.colors import Color
|
||||
from modules.database import col_users
|
||||
@@ -32,7 +33,10 @@ class Data(commands.Cog):
|
||||
)
|
||||
async def data_export_cmd(self, ctx: ApplicationContext, kind: str):
|
||||
await ctx.defer()
|
||||
if ctx.user.id in await config_get("admins"):
|
||||
holo_user = HoloUser(ctx.author)
|
||||
if (ctx.user.id in await config_get("admins")) or (
|
||||
await holo_user.is_council(ctx.author)
|
||||
):
|
||||
logging.info(
|
||||
f"Moderator {guild_name(ctx.user)} exported current users list"
|
||||
)
|
||||
@@ -94,7 +98,10 @@ class Data(commands.Cog):
|
||||
)
|
||||
async def data_migrate_cmd(self, ctx: ApplicationContext, kind: str):
|
||||
await ctx.defer()
|
||||
if ctx.user.id in await config_get("admins"):
|
||||
holo_user = HoloUser(ctx.author)
|
||||
if (ctx.user.id in await config_get("admins")) or (
|
||||
await holo_user.is_council(ctx.author)
|
||||
):
|
||||
logging.info(
|
||||
f"Moderator {guild_name(ctx.user)} started migration of all members to the database"
|
||||
)
|
||||
|
Reference in New Issue
Block a user