#Check for if a user with a specific id exists
1 messages · Page 1 of 1 (latest)
for the record, try/catch blocks don't seem to work. I think it's because the callable methods queue a request to discord.
wdym
ah, okay
provided an id, how would I check whether a user with that id exists? I'm attempting to guard crashes when attempting to unban a user
what error are you getting?
404 Unknown User
I've been testing the unbanning function with a non-existent user id
oop
you said try catching doesn't work, that sounds strange, it should afaik
okay, it works now
I had to add await to my unbanMember method.
[25/07/2024 11:42:47 pm] INFO BOT > Attempting to unban user: 1249012409.
[25/07/2024 11:42:47 pm] ERROR BOT > Could not unban user 1249012409 from guild Greenhouse Modding
👍
thanks for the help, it was just my code
I think warn might be better here
try/catch without an await goes out of scope of the try so you don't get the error catch afaik