diff options
author | 2023-05-09 16:01:01 +0100 | |
---|---|---|
committer | 2023-05-09 16:01:01 +0100 | |
commit | c3e23e60278d34658f801bd7d7ed721d5a272637 (patch) | |
tree | e159a0fae7850d706d713cf2b49dfed2140ce655 /bot/exts/utilities/emoji.py | |
parent | Bump sentry-sdk from 1.21.1 to 1.22.1 (#1273) (diff) | |
parent | Move unshared contants inside modules (diff) |
Merge pull request #1270 from python-discord/migrate-to-ruff
Migrate to ruff
Diffstat (limited to 'bot/exts/utilities/emoji.py')
-rw-r--r-- | bot/exts/utilities/emoji.py | 7 |
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) |