when my bot joins another guild and fires the guildCreate event
24 Replies
Empty strings are not valid urls.
for setThumbnail(
${newGuild.iconURL({ dynamic: true }) || ''}
) if you dont have an empty string and the guild doesnt have an icon it errors outUnknown User•3y ago
Message Not Public
Sign In & Join Server To View
hmm maybe theyve changed it in v14, in 13 if you didnt have the empty string it would error out
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
removed the empty string and now its erroring as
null
Can you show the new error?
fullError: https://sourceb.in/ukpl6jlilL
Can you show the rest of the error too?
wouldnt let me upload the error here directly so had to put it on sourcebin
This looks like the string
'null'
now, which is not null
.the guild im trying to add it to doesnt have a server icon so i normally added the empty string for the thumbnail
You can just remove the fallback and it should work.
didnt work
error: https://sourceb.in/Q64NsRwQgi
Can you show the code for that?
first post, all i did was take out the || '' from the .setThumbnail
I don't see how the string
'null'
would end up there then.
You probably are not running that code then.the webhook client at the bottom sends the embed when the guildCreate event is fired
Looks like it
if i take out the .setThumbnail and the iconURL from the footer it works perfectly fine
can a webhook send back a guilds icon when it enters a guild?
Sure
im at a loss at why its going null
It's not going null, it's 'null'.
Oh
Now I see it
Remove the template literals
`` <-
Just pass
newGuild.iconURL(...)
oh right cause im not passing the empty string now
its now working, thanks for the help