diff --git a/notashark/embeds.py b/notashark/embeds.py index 1b4f633..eaaff58 100644 --- a/notashark/embeds.py +++ b/notashark/embeds.py @@ -19,7 +19,7 @@ from notashark import parts import logging from discord import utils, Embed, File -from datetime import datetime +from discord.utils import utcnow log = logging.getLogger(__name__) @@ -39,7 +39,7 @@ def make_server_embed( # Basically - if filename stays the same, sometimes discord decides to show # the older image instead of never. Which cause minimap to never update # This will crash if minimap doesnt exist #TODO - timestamp = datetime.utcnow() + timestamp = utcnow() filename = f"{timestamp.timestamp()}_minimap.png" minimap = File(data.minimap, filename=filename) @@ -95,7 +95,7 @@ def make_server_embed( def make_servers_embed(data: parts.KagServers) -> Embed: """Build embed with summary about all populated kag servers""" - embed = Embed(timestamp=datetime.utcnow()) + embed = Embed(timestamp=utcnow()) embed.colour = 0x3498DB embed_title = "KAG Server List" embed_overview = ( @@ -161,7 +161,7 @@ def make_kagstats_embed(data: parts.KagstatsProfile) -> Embed: weapon_info = f"**{item.weapon}**: {item.kills} kills\n" top_weapons += weapon_info - embed = Embed(timestamp=datetime.utcnow()) + embed = Embed(timestamp=utcnow()) embed.colour = 0x3498DB # if user has no avatar set - this wont do anything embed.set_thumbnail(url=data.avatar) @@ -231,7 +231,7 @@ def make_leaderboard_embed(data: parts.Leaderboard) -> Embed: item.position = position players.append(item) - embed = Embed(timestamp=datetime.utcnow()) + embed = Embed(timestamp=utcnow()) embed.colour = 0x3498DB embed.title = "KAG Stats: Leaderboard" embed.add_field( @@ -263,7 +263,7 @@ def make_leaderboard_embed(data: parts.Leaderboard) -> Embed: def make_about_embed(name: str = "notashark", prefix: str = "!") -> Embed: """Build embed with general info about this bot""" - embed = Embed(timestamp=datetime.utcnow()) + embed = Embed(timestamp=utcnow()) embed.colour = 0x3498DB embed.title = "About Bot" embed.add_field( diff --git a/pyproject.toml b/pyproject.toml index f89db22..f9c4cf0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "notashark" -version = "1.1.0" +version = "1.1.1" description = "notashark - a discord bot for King Arthur's Gold" readme = "README.md" authors = [ diff --git a/setup.py b/setup.py index 73f833e..4ae3923 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name="notashark", - version="1.1.0", + version="1.1.1", description="notashark - a discord bot for King Arthur's Gold", long_description=long_description, long_description_content_type="text/markdown",