Skip to content

Commit

Permalink
Update send.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtanisTheOne committed Jan 22, 2021
1 parent 9f7af83 commit 091787b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/core/send.js
Original file line number Diff line number Diff line change
Expand Up @@ -478,10 +478,16 @@ const embedOff = function(data)
{
// You can rename 'Webhook' to the name of your bot if you like, people will see if under the webhooks tab of the channel.
existingWebhook = webhooks.find(x => x.name === webHookName);
webHookURL = "https://ritabot.org/index/images/favicon.png"
if (!data.bot.icon_url){
webHookURL = "https://ritabot.org/index/images/favicon.png"
} else {
webHookURL = data.bot.icon_url
};

if (!existingWebhook)
{
channel.createWebhook(webHookName, data.bot.icon_url || "https://ritabot.org/index/images/favicon.png")
channel.createWebhook(webHookName, webHookURL)
.then(newWebhook =>
{
// Finally send the webhook
Expand Down

0 comments on commit 091787b

Please sign in to comment.