lunarflu HF staff commited on
Commit
94c4b1f
1 Parent(s): ff9e9a0
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -199,11 +199,10 @@ async def on_raw_message_delete(payload):
199
  try:
200
  message_id = payload.message_id
201
  channel_id = payload.channel_id
202
-
203
- cached_message = message_cache.pop(message_id, None)
204
-
205
- if cached_message:
206
- if cached_message.author == bot.user:
207
  return
208
 
209
  embed = Embed(color=Color.red())
 
199
  try:
200
  message_id = payload.message_id
201
  channel_id = payload.channel_id
202
+ message = message_cache.pop(message_id, None)
203
+
204
+ if message:
205
+ if message.author == bot.user:
 
206
  return
207
 
208
  embed = Embed(color=Color.red())