Check platform to change format string
This commit is contained in:
parent
ace64e9ad9
commit
43ff9fce5d
1 changed files with 6 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
|||
"""J.A.R.V.I.S. Utility Cog."""
|
||||
import platform
|
||||
import re
|
||||
import secrets
|
||||
import string
|
||||
|
@ -179,15 +180,18 @@ class UtilCog(Scale):
|
|||
user_roles = user.roles
|
||||
if user_roles:
|
||||
user_roles = sorted(user.roles, key=lambda x: -x.position)
|
||||
format_string = "%a, %b %-d, %Y %-I:%M %p"
|
||||
if platform.system() == "Windows":
|
||||
format_string = "%a, %b %#d, %Y %#I:%M %p"
|
||||
|
||||
fields = [
|
||||
EmbedField(
|
||||
name="Joined",
|
||||
value=user.joined_at.strftime("%a, %b %#d, %Y %#I:%M %p"),
|
||||
value=user.joined_at.strftime(format_string),
|
||||
),
|
||||
EmbedField(
|
||||
name="Registered",
|
||||
value=user.created_at.strftime("%a, %b %#d, %Y %#I:%M %p"),
|
||||
value=user.created_at.strftime(format_string),
|
||||
),
|
||||
EmbedField(
|
||||
name=f"Roles [{len(user_roles)}]",
|
||||
|
|
Loading…
Add table
Reference in a new issue