Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
error printing
Browse files
app.py
CHANGED
@@ -69,7 +69,7 @@ async def on_message(message):
|
|
69 |
await bot.process_commands(message)
|
70 |
|
71 |
except Exception as e:
|
72 |
-
print(f"Error: {e}")
|
73 |
|
74 |
# moderation stuff-----------------------------------------------------------------------------------------------------------------------------------------------------
|
75 |
|
@@ -98,7 +98,7 @@ async def on_message_edit(before, after):
|
|
98 |
await bot.log_channel.send(embed=embed)
|
99 |
|
100 |
except Exception as e:
|
101 |
-
print(f"Error: {e}")
|
102 |
|
103 |
@bot.event
|
104 |
async def on_message_delete(message):
|
@@ -124,7 +124,7 @@ async def on_message_delete(message):
|
|
124 |
await bot.log_channel.send(embed=embed)
|
125 |
|
126 |
except Exception as e:
|
127 |
-
print(f"Error: {e}")
|
128 |
|
129 |
# nickname stuff ---------------------------------------------------------------------------------------------------------------------------
|
130 |
@bot.event
|
@@ -146,7 +146,7 @@ async def on_member_update(before, after):
|
|
146 |
await bot.log_channel.send(embed=embed)
|
147 |
|
148 |
except Exception as e:
|
149 |
-
print(f"Error: {e}")
|
150 |
|
151 |
|
152 |
@bot.event
|
@@ -180,7 +180,7 @@ async def on_member_ban(guild, banned_user):
|
|
180 |
await bot.log_channel.send(content=content, embed=embed)
|
181 |
|
182 |
except Exception as e:
|
183 |
-
print(f"Error: {e}")
|
184 |
|
185 |
|
186 |
@bot.event
|
@@ -206,7 +206,7 @@ async def on_member_unban(guild, unbanned_user):
|
|
206 |
await bot.log_channel.send(content=content, embed=embed)
|
207 |
|
208 |
except Exception as e:
|
209 |
-
print(f"Error: {e}")
|
210 |
|
211 |
# admin stuff-----------------------------------------------------------------------------------------------------------------------
|
212 |
|
@@ -224,7 +224,7 @@ async def on_member_join(member):
|
|
224 |
await bot.log_channel.send(embed=embed)
|
225 |
|
226 |
except Exception as e:
|
227 |
-
print(f"Error: {e}")
|
228 |
|
229 |
|
230 |
@bot.event
|
@@ -240,7 +240,7 @@ async def on_member_remove(member):
|
|
240 |
await bot.log_channel.send(embed=embed)
|
241 |
|
242 |
except Exception as e:
|
243 |
-
print(f"Error: {e}")
|
244 |
|
245 |
|
246 |
@bot.event
|
@@ -250,7 +250,7 @@ async def on_guild_channel_create(channel):
|
|
250 |
embed = Embed(description=f'Channel {channel.mention} was created', color=Color.green())
|
251 |
await bot.log_channel.send(embed=embed)
|
252 |
except Exception as e:
|
253 |
-
print(f"Error: {e}")
|
254 |
|
255 |
|
256 |
@bot.event
|
@@ -260,7 +260,7 @@ async def on_guild_channel_delete(channel):
|
|
260 |
embed = Embed(description=f'Channel {channel.name} ({channel.mention}) was deleted', color=Color.red())
|
261 |
await bot.log_channel.send(embed=embed)
|
262 |
except Exception as e:
|
263 |
-
print(f"Error: {e}")
|
264 |
|
265 |
|
266 |
@bot.event
|
@@ -270,7 +270,7 @@ async def on_guild_role_create(role):
|
|
270 |
embed = Embed(description=f'Role {role.mention} was created', color=Color.green())
|
271 |
await bot.log_channel.send(embed=embed)
|
272 |
except Exception as e:
|
273 |
-
print(f"Error: {e}")
|
274 |
|
275 |
|
276 |
@bot.event
|
@@ -280,7 +280,7 @@ async def on_guild_role_delete(role):
|
|
280 |
embed = Embed(description=f'Role {role.name} ({role.mention}) was deleted', color=Color.red())
|
281 |
await bot.log_channel.send(embed=embed)
|
282 |
except Exception as e:
|
283 |
-
print(f"Error: {e}")
|
284 |
|
285 |
|
286 |
@bot.event
|
@@ -297,7 +297,7 @@ async def on_guild_role_update(before, after):
|
|
297 |
embed = Embed(description=f'Role {after.mention} had its administrator permission {"enabled" if after.permissions.administrator else "disabled"}', color=Color.red())
|
298 |
await bot.log_channel.send(content=content, embed=embed)
|
299 |
except Exception as e:
|
300 |
-
print(f"Error: {e}")
|
301 |
|
302 |
|
303 |
@bot.event
|
@@ -313,7 +313,7 @@ async def on_voice_state_update(member, before, after):
|
|
313 |
embed = Embed(description=f'{member} was {"deafened" if after.deaf else "undeafened"} in voice chat', color=Color.orange())
|
314 |
await bot.log_channel.send(embed=embed)
|
315 |
except Exception as e:
|
316 |
-
print(f"Error: {e}")
|
317 |
|
318 |
# github test stuff -------------------------------------------------------------------------------------------------------------------
|
319 |
"""
|
|
|
69 |
await bot.process_commands(message)
|
70 |
|
71 |
except Exception as e:
|
72 |
+
print(f"on_message Error: {e}")
|
73 |
|
74 |
# moderation stuff-----------------------------------------------------------------------------------------------------------------------------------------------------
|
75 |
|
|
|
98 |
await bot.log_channel.send(embed=embed)
|
99 |
|
100 |
except Exception as e:
|
101 |
+
print(f"on_message_edit Error: {e}")
|
102 |
|
103 |
@bot.event
|
104 |
async def on_message_delete(message):
|
|
|
124 |
await bot.log_channel.send(embed=embed)
|
125 |
|
126 |
except Exception as e:
|
127 |
+
print(f"on_message_delete Error: {e}")
|
128 |
|
129 |
# nickname stuff ---------------------------------------------------------------------------------------------------------------------------
|
130 |
@bot.event
|
|
|
146 |
await bot.log_channel.send(embed=embed)
|
147 |
|
148 |
except Exception as e:
|
149 |
+
print(f"on_member_update Error: {e}")
|
150 |
|
151 |
|
152 |
@bot.event
|
|
|
180 |
await bot.log_channel.send(content=content, embed=embed)
|
181 |
|
182 |
except Exception as e:
|
183 |
+
print(f"on_member_ban Error: {e}")
|
184 |
|
185 |
|
186 |
@bot.event
|
|
|
206 |
await bot.log_channel.send(content=content, embed=embed)
|
207 |
|
208 |
except Exception as e:
|
209 |
+
print(f"on_member_unban Error: {e}")
|
210 |
|
211 |
# admin stuff-----------------------------------------------------------------------------------------------------------------------
|
212 |
|
|
|
224 |
await bot.log_channel.send(embed=embed)
|
225 |
|
226 |
except Exception as e:
|
227 |
+
print(f"on_member_join Error: {e}")
|
228 |
|
229 |
|
230 |
@bot.event
|
|
|
240 |
await bot.log_channel.send(embed=embed)
|
241 |
|
242 |
except Exception as e:
|
243 |
+
print(f"on_member_remove Error: {e}")
|
244 |
|
245 |
|
246 |
@bot.event
|
|
|
250 |
embed = Embed(description=f'Channel {channel.mention} was created', color=Color.green())
|
251 |
await bot.log_channel.send(embed=embed)
|
252 |
except Exception as e:
|
253 |
+
print(f"on_guild_channel_create Error: {e}")
|
254 |
|
255 |
|
256 |
@bot.event
|
|
|
260 |
embed = Embed(description=f'Channel {channel.name} ({channel.mention}) was deleted', color=Color.red())
|
261 |
await bot.log_channel.send(embed=embed)
|
262 |
except Exception as e:
|
263 |
+
print(f"on_guild_channel_delete Error: {e}")
|
264 |
|
265 |
|
266 |
@bot.event
|
|
|
270 |
embed = Embed(description=f'Role {role.mention} was created', color=Color.green())
|
271 |
await bot.log_channel.send(embed=embed)
|
272 |
except Exception as e:
|
273 |
+
print(f"on_guild_role_create Error: {e}")
|
274 |
|
275 |
|
276 |
@bot.event
|
|
|
280 |
embed = Embed(description=f'Role {role.name} ({role.mention}) was deleted', color=Color.red())
|
281 |
await bot.log_channel.send(embed=embed)
|
282 |
except Exception as e:
|
283 |
+
print(f"on_guild_role_delete Error: {e}")
|
284 |
|
285 |
|
286 |
@bot.event
|
|
|
297 |
embed = Embed(description=f'Role {after.mention} had its administrator permission {"enabled" if after.permissions.administrator else "disabled"}', color=Color.red())
|
298 |
await bot.log_channel.send(content=content, embed=embed)
|
299 |
except Exception as e:
|
300 |
+
print(f"on_guild_role_update Error: {e}")
|
301 |
|
302 |
|
303 |
@bot.event
|
|
|
313 |
embed = Embed(description=f'{member} was {"deafened" if after.deaf else "undeafened"} in voice chat', color=Color.orange())
|
314 |
await bot.log_channel.send(embed=embed)
|
315 |
except Exception as e:
|
316 |
+
print(f"on_voice_state_update Error: {e}")
|
317 |
|
318 |
# github test stuff -------------------------------------------------------------------------------------------------------------------
|
319 |
"""
|