fix incorrect timestamp parse string
This commit is contained in:
parent
d929dc875d
commit
d02794709c
@ -129,7 +129,7 @@ class PlayersCog(commands.Cog):
|
|||||||
|
|
||||||
player, created = await Player.get_or_create(username=re_match.group("username"))
|
player, created = await Player.get_or_create(username=re_match.group("username"))
|
||||||
await player.open_session(
|
await player.open_session(
|
||||||
timestamp=datetime.strptime(re_match.group("timestamp"), "%m-%d-%y %H:%M:%S.%f"),
|
timestamp=datetime.strptime(re_match.group("timestamp"), "%d-%m-%y %H:%M:%S.%f"),
|
||||||
coord_x=re_match.group("x"),
|
coord_x=re_match.group("x"),
|
||||||
coord_y=re_match.group("y"),
|
coord_y=re_match.group("y"),
|
||||||
coord_z=re_match.group("z")
|
coord_z=re_match.group("z")
|
||||||
@ -154,7 +154,7 @@ class PlayersCog(commands.Cog):
|
|||||||
embed.title = "Player Has Connected"
|
embed.title = "Player Has Connected"
|
||||||
embed.colour = Colour.brand_green()
|
embed.colour = Colour.brand_green()
|
||||||
|
|
||||||
# await channel.send(embed=embed)
|
await channel.send(embed=embed)
|
||||||
|
|
||||||
async def process_disconnected_player(self, line: str, alert: bool = False):
|
async def process_disconnected_player(self, line: str, alert: bool = False):
|
||||||
"""
|
"""
|
||||||
@ -169,7 +169,7 @@ class PlayersCog(commands.Cog):
|
|||||||
|
|
||||||
player, created = await Player.get_or_create(username=re_match.group("username"))
|
player, created = await Player.get_or_create(username=re_match.group("username"))
|
||||||
await player.close_session(
|
await player.close_session(
|
||||||
timestamp=datetime.strptime(re_match.group("timestamp"), "%m-%d-%y %H:%M:%S.%f"),
|
timestamp=datetime.strptime(re_match.group("timestamp"), "%d-%m-%y %H:%M:%S.%f"),
|
||||||
coord_x=re_match.group("x"),
|
coord_x=re_match.group("x"),
|
||||||
coord_y=re_match.group("y"),
|
coord_y=re_match.group("y"),
|
||||||
coord_z=re_match.group("z")
|
coord_z=re_match.group("z")
|
||||||
@ -188,7 +188,7 @@ class PlayersCog(commands.Cog):
|
|||||||
embed.title = "Player Has Disconnected"
|
embed.title = "Player Has Disconnected"
|
||||||
embed.colour = Colour.brand_red()
|
embed.colour = Colour.brand_red()
|
||||||
|
|
||||||
# await channel.send(embed=embed)
|
await channel.send(embed=embed)
|
||||||
|
|
||||||
|
|
||||||
async def setup(bot: commands.Bot):
|
async def setup(bot: commands.Bot):
|
||||||
|
Reference in New Issue
Block a user