aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2020-10-18 19:26:07 +0100
committerGravatar Joe Banks <[email protected]>2020-10-18 19:26:07 +0100
commitaa7cd969719d41b2e905407bf73ff000065df960 (patch)
treec87f33268a34b328e19c2d8d75b388e70cbfbd84
parentTrack deleted messages being deleted (diff)
fix code linting
-rw-r--r--metricity/bot.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/metricity/bot.py b/metricity/bot.py
index a2f0241..d66d3c2 100644
--- a/metricity/bot.py
+++ b/metricity/bot.py
@@ -8,7 +8,8 @@ from typing import Any, Generator, List
from asyncpg.exceptions import UniqueViolationError
from discord import (
CategoryChannel, Guild, Intents, Member,
- Message as DiscordMessage, VoiceChannel
+ Message as DiscordMessage, VoiceChannel,
+ RawMessageDeleteEvent
)
from discord.abc import Messageable
from discord.ext.commands import Bot, Context
@@ -326,11 +327,13 @@ async def on_message(message: DiscordMessage) -> None:
created_at=message.created_at
)
+
@bot.event
-async def on_raw_message_delete(message):
+async def on_raw_message_delete(message: RawMessageDeleteEvent) -> None:
if message := await Message.get(str(message.message_id)):
await message.update(is_deleted=True).apply()
+
@bot.command()
async def opt_in(ctx: Context) -> None:
"""Opt-in to the server analytics system."""