Fixed db_concon
This commit is contained in:
parent
f7fab22d81
commit
4cd62e1e05
@ -6,7 +6,7 @@ owner_id = 351794468870946827
|
||||
|
||||
|
||||
async def check_admin_role(bot, ctx, member):
|
||||
admin_roles = json.loads(await bot.db_concon.fetchval(f"select admin_roles from guild_config where guild_id = $1",
|
||||
admin_roles = json.loads(await bot.db_con.fetchval(f"select admin_roles from guild_config where guild_id = $1",
|
||||
ctx.guild.id))
|
||||
for role in admin_roles:
|
||||
if discord.utils.get(ctx.guild.roles, id=admin_roles[role]) in member.roles:
|
||||
@ -15,7 +15,7 @@ async def check_admin_role(bot, ctx, member):
|
||||
|
||||
|
||||
async def check_rcon_role(bot, ctx, member):
|
||||
rcon_admin_roles = json.loads(await bot.db_concon.fetchval("select rcon_admin_roles from guild_config "
|
||||
rcon_admin_roles = json.loads(await bot.db_con.fetchval("select rcon_admin_roles from guild_config "
|
||||
"where guild_id = $1", ctx.guild.id))
|
||||
for role in rcon_admin_roles:
|
||||
if discord.utils.get(ctx.guild.roles, id=rcon_admin_roles[role]) in member.roles:
|
||||
@ -24,7 +24,7 @@ async def check_rcon_role(bot, ctx, member):
|
||||
|
||||
|
||||
async def is_admin(bot, ctx):
|
||||
admin_roles = json.loads(await bot.db_concon.fetchval("select admin_roles from guild_config where guild_id = $1",
|
||||
admin_roles = json.loads(await bot.db_con.fetchval("select admin_roles from guild_config where guild_id = $1",
|
||||
ctx.guild.id))
|
||||
for role in admin_roles:
|
||||
if discord.utils.get(ctx.guild.roles, id=admin_roles[role]) in ctx.message.author.roles:
|
||||
@ -39,7 +39,7 @@ async def is_guild_owner(ctx):
|
||||
|
||||
|
||||
async def is_rcon_admin(bot, ctx):
|
||||
rcon_admin_roles = json.loads(await bot.db_concon.fetchval("select rcon_admin_roles from guild_config "
|
||||
rcon_admin_roles = json.loads(await bot.db_con.fetchval("select rcon_admin_roles from guild_config "
|
||||
"where guild_id = $1", ctx.guild.id))
|
||||
for role in rcon_admin_roles:
|
||||
if discord.utils.get(ctx.guild.roles, id=rcon_admin_roles[role]) in ctx.message.author.roles:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user