lunarflu HF Staff commited on
Commit
a95fadf
·
1 Parent(s): f557fb9

[safetychecks] added await ctx.message.add_reaction('❌')

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -72,6 +72,7 @@ async def safetychecks(ctx):
72
  try:
73
  if ctx.author.bot:
74
  print(f"Error: The bot is not allowed to use its own commands.")
 
75
  return False
76
 
77
  #✅✅ check if the bot is offline
@@ -81,6 +82,7 @@ async def safetychecks(ctx):
81
  print(f"Error: {ctx.author} The bot is offline or under maintenance. (Remove the offline-bot role to bring it online)")
82
  thread = await ctx.message.create_thread(name=f'{ctx.author} Offline Error')
83
  await thread.send(f"Error: {ctx.author.mention} The bot is offline or under maintenance. (Remove the offline-bot role to bring it online)")
 
84
  return False
85
 
86
  #✅✅ check if the command is in the allowed channel(s)
@@ -91,6 +93,7 @@ async def safetychecks(ctx):
91
  print(f"{ctx.author}, commands are not permitted in {ctx.channel}")
92
  thread = await ctx.message.create_thread(name=f'{ctx.author} Channel Error')
93
  await thread.send(f"Error: {ctx.author.mention} commands are not permitted in {ctx.channel}")
 
94
  return False
95
 
96
  #✅✅ check if the user has the required role(s)
@@ -109,6 +112,7 @@ async def safetychecks(ctx):
109
  print(f"Error: {ctx.author} does not have any of the required roles to use that command.")
110
  thread = await ctx.message.create_thread(name=f'{ctx.author} Perms Error')
111
  await thread.send(f"Error: {ctx.author.mention} does not have any of the required roles to use that command.")
 
112
  return False
113
 
114
 
@@ -118,6 +122,7 @@ async def safetychecks(ctx):
118
  except Exception as e:
119
  print(f"Error: safetychecks failed somewhere, command will not continue.")
120
  await ctx.message.reply(f"❌ <@811235357663297546> SC failed somewhere ❌") # this will always ping, as long as the bot has access to the channel
 
121
  #----------------------------------------------------------------------------------------------------------------------------------------------
122
  @bot.command()
123
  async def deepfloydifdemo(ctx):
 
72
  try:
73
  if ctx.author.bot:
74
  print(f"Error: The bot is not allowed to use its own commands.")
75
+ await ctx.message.add_reaction('❌')
76
  return False
77
 
78
  #✅✅ check if the bot is offline
 
82
  print(f"Error: {ctx.author} The bot is offline or under maintenance. (Remove the offline-bot role to bring it online)")
83
  thread = await ctx.message.create_thread(name=f'{ctx.author} Offline Error')
84
  await thread.send(f"Error: {ctx.author.mention} The bot is offline or under maintenance. (Remove the offline-bot role to bring it online)")
85
+ await ctx.message.add_reaction('❌')
86
  return False
87
 
88
  #✅✅ check if the command is in the allowed channel(s)
 
93
  print(f"{ctx.author}, commands are not permitted in {ctx.channel}")
94
  thread = await ctx.message.create_thread(name=f'{ctx.author} Channel Error')
95
  await thread.send(f"Error: {ctx.author.mention} commands are not permitted in {ctx.channel}")
96
+ await ctx.message.add_reaction('❌')
97
  return False
98
 
99
  #✅✅ check if the user has the required role(s)
 
112
  print(f"Error: {ctx.author} does not have any of the required roles to use that command.")
113
  thread = await ctx.message.create_thread(name=f'{ctx.author} Perms Error')
114
  await thread.send(f"Error: {ctx.author.mention} does not have any of the required roles to use that command.")
115
+ await ctx.message.add_reaction('❌')
116
  return False
117
 
118
 
 
122
  except Exception as e:
123
  print(f"Error: safetychecks failed somewhere, command will not continue.")
124
  await ctx.message.reply(f"❌ <@811235357663297546> SC failed somewhere ❌") # this will always ping, as long as the bot has access to the channel
125
+ await ctx.message.add_reaction('❌')
126
  #----------------------------------------------------------------------------------------------------------------------------------------------
127
  @bot.command()
128
  async def deepfloydifdemo(ctx):