Closed almostDemoPy closed 1 week ago
Yeah, I wasn't too sure about the check = None either
ok! ty for the advice, and I didn't want to use the id attr, since guild member objects (through message create events) don't provide the user's id, but i'll edit that, and today, i'm coming back to the lib after a long break
i'll probably do this on mine too but you can utilize the joined_at
ISO 8601 timestamp and convert it into a UNIX timestamp, and use the UNIX timestamp to query from your cache ( assuming the one in your cache will also have a non-empty user
attribute )
member.user : User = cache.query(joined_at = datetime.fromisoformat(joined_at)).user
References :
datetime.datetime.fromisoformat()
i'll probably do this on mine too but you can utilize the
joined_at
ISO 8601 timestamp and convert it into a UNIX timestamp, and use the UNIX timestamp to query from your cache ( assuming the one in your cache will also have a non-emptyuser
attribute )member.user : User = cache.query(joined_at = datetime.fromisoformat(joined_at)).user
References :
datetime.datetime.fromisoformat()
thank you for the help! I'll use it when i am working on guild members that actually have User attributes.
by the way. i cloned the repository yesterday to test something out for your behalf, and I received an error regarding types.py
file. It seems, that on my end, I may have another global types
module, resulting in a circular import. Though I've fixed this by just basically renaming it toenums.py
( similar to what I had in mine )
Also the header text for an error message is too long and quite unnecessary
discmoji/bot.py | Lines 70 - 78
so this is both cache and API call ?
check
variable is redundant here.return
keyword exterminates the function's process and returns the value from whatever in the statement is. so this can be done with just :discmoji/guild.py | Line 10
a guild object will have an
Invoked
object ? assuming yourInvoke
command has aguild
attribute, this is blunderdiscmoji/guild.py | Line 41
nick
attribute can be different, no ?discmoji/http.py | Lines 22 - 51
what i had in mine was another enum lmao, but this one's good too. what i have is :
this allows me to just pass the variables and return the endpoint together with the variables, i don't have to type long :P
discmoji/types.py | Line 102
just use bitwise left shifts lol ( or
2 ** n
)