How does one retrieve the URL of a webhook?

This is the code I have, pretty basic. From what I can pull from webhook, how can I get the URL so I can store it in a database?
client.channels.cache.get(channel.value).createWebhook({
name: 'Some-webhook',
avatar: 'https://i.imgur.com/AfFp7pu.png',
}).then(webhook => { console.log(webhook);
}).catch(console.error);
client.channels.cache.get(channel.value).createWebhook({
name: 'Some-webhook',
avatar: 'https://i.imgur.com/AfFp7pu.png',
}).then(webhook => { console.log(webhook);
}).catch(console.error);
The console displays all of this but without the URL. I need to store the webhook so I can make a call to it later.
Webhook {
name: 'Some-username',
avatar: '7c558ffbf6c9ca5840dcfdf8715f2e67',
id: '1038769295196438591',
type: 1,
guildId: '903730923739156580',
channelId: '903995260810694677',
owner: ClientUser {
id: '829856436367654982',
bot: true,
system: false,
flags: UserFlagsBitField { bitfield: 0 },
username: 'THP Development',
discriminator: '5358',
avatar: 'b0626e4b0f1387edd9bb5cf4c46f5cfd',
banner: undefined,
accentColor: undefined,
verified: true,
mfaEnabled: true
},
applicationId: '829856436367654982',
sourceGuild: null,
sourceChannel: null
}
Webhook {
name: 'Some-username',
avatar: '7c558ffbf6c9ca5840dcfdf8715f2e67',
id: '1038769295196438591',
type: 1,
guildId: '903730923739156580',
channelId: '903995260810694677',
owner: ClientUser {
id: '829856436367654982',
bot: true,
system: false,
flags: UserFlagsBitField { bitfield: 0 },
username: 'THP Development',
discriminator: '5358',
avatar: 'b0626e4b0f1387edd9bb5cf4c46f5cfd',
banner: undefined,
accentColor: undefined,
verified: true,
mfaEnabled: true
},
applicationId: '829856436367654982',
sourceGuild: null,
sourceChannel: null
}
2 Replies
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
AJ
AJOP3y ago
Ah so things are hidden? Why is that? ah fair enough makes sense cheers
Want results from more Discord servers?
Add your server