aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2020-11-15 17:02:57 +0000
committerGravatar Joe Banks <[email protected]>2020-11-15 17:02:57 +0000
commit1df2d18bbbc2c997e431a00e8c6fc30dba1ef708 (patch)
treea4babdc58dcb17057273f32938fb0789a94f91d5
parentAdd auto-deploy to k8s step (diff)
linting fixes
-rw-r--r--metricity/bot.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/metricity/bot.py b/metricity/bot.py
index d66d3c2..d0dc3bd 100644
--- a/metricity/bot.py
+++ b/metricity/bot.py
@@ -7,9 +7,9 @@ from typing import Any, Generator, List
from asyncpg.exceptions import UniqueViolationError
from discord import (
- CategoryChannel, Guild, Intents, Member,
- Message as DiscordMessage, VoiceChannel,
- RawMessageDeleteEvent
+ CategoryChannel, Guild, Intents,
+ Member, Message as DiscordMessage, RawMessageDeleteEvent,
+ VoiceChannel
)
from discord.abc import Messageable
from discord.ext.commands import Bot, Context
@@ -330,6 +330,9 @@ async def on_message(message: DiscordMessage) -> None:
@bot.event
async def on_raw_message_delete(message: RawMessageDeleteEvent) -> None:
+ """
+ If a message is deleted and we have a record of it set the is_deleted flag.
+ """
if message := await Message.get(str(message.message_id)):
await message.update(is_deleted=True).apply()