aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/utilities/emoji.py
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2023-05-06 16:12:32 +0100
committerGravatar Chris Lovering <[email protected]>2023-05-09 15:41:50 +0100
commit613840ebcf303e84048d48ace37fb001c1afe687 (patch)
tree9acaf0bae0527fe8389483a419b44e06997ca060 /bot/exts/utilities/emoji.py
parentMigrate to ruff (diff)
Apply fixes for ruff linting
Co-authored-by: wookie184 <[email protected]> Co-authored-by: Amrou Bellalouna <[email protected]>
Diffstat (limited to 'bot/exts/utilities/emoji.py')
-rw-r--r--bot/exts/utilities/emoji.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/bot/exts/utilities/emoji.py b/bot/exts/utilities/emoji.py
index ec40be01..ce352fe2 100644
--- a/bot/exts/utilities/emoji.py
+++ b/bot/exts/utilities/emoji.py
@@ -2,8 +2,7 @@ import logging
import random
import textwrap
from collections import defaultdict
-from datetime import datetime
-from typing import Optional
+from datetime import UTC, datetime
from discord import Color, Embed, Emoji
from discord.ext import commands
@@ -28,7 +27,7 @@ class Emojis(commands.Cog):
embed = Embed(
color=Colours.orange,
title="Emoji Count",
- timestamp=datetime.utcnow()
+ timestamp=datetime.now(tz=UTC)
)
msg = []
@@ -71,7 +70,7 @@ class Emojis(commands.Cog):
return embed, msg
@commands.group(name="emoji", invoke_without_command=True)
- async def emoji_group(self, ctx: commands.Context, emoji: Optional[Emoji]) -> None:
+ async def emoji_group(self, ctx: commands.Context, emoji: Emoji | None) -> None:
"""A group of commands related to emojis."""
if emoji is not None:
await ctx.invoke(self.info_command, emoji)