[safetychecks] fix
Browse files
app.py
CHANGED
@@ -48,20 +48,23 @@ async def safetychecks(ctx):
|
|
48 |
|
49 |
# check if the bot is offline
|
50 |
offline_bot_role_id = 1103676632667017266
|
51 |
-
|
|
|
52 |
return False
|
53 |
|
54 |
# check if the command is in the allowed channel(s)
|
55 |
-
|
56 |
-
if channel != 1100458786826747945:
|
57 |
return False
|
58 |
|
59 |
# check if the user has the required role(s)
|
60 |
-
|
61 |
required_role_id = 900063512829755413 # @verified for now
|
|
|
62 |
required_role = guild.get_role(required_role_id)
|
63 |
if required_role not in ctx.author.roles:
|
64 |
return False
|
|
|
65 |
return True
|
66 |
#----------------------------------------------------------------------------------------------------------------------------------------------
|
67 |
# jojo
|
|
|
48 |
|
49 |
# check if the bot is offline
|
50 |
offline_bot_role_id = 1103676632667017266
|
51 |
+
bot_member = ctx.guild.get_member(bot.user.id)
|
52 |
+
if any(role.id == offline_bot_role_id for role in bot_member.roles):
|
53 |
return False
|
54 |
|
55 |
# check if the command is in the allowed channel(s)
|
56 |
+
channel_id = 1100458786826747945
|
57 |
+
if ctx.channel.id != 1100458786826747945:
|
58 |
return False
|
59 |
|
60 |
# check if the user has the required role(s)
|
61 |
+
guild_id = 879548962464493619
|
62 |
required_role_id = 900063512829755413 # @verified for now
|
63 |
+
guild = bot.get_guild(guild_id)
|
64 |
required_role = guild.get_role(required_role_id)
|
65 |
if required_role not in ctx.author.roles:
|
66 |
return False
|
67 |
+
|
68 |
return True
|
69 |
#----------------------------------------------------------------------------------------------------------------------------------------------
|
70 |
# jojo
|