Use message.cleanContent for webhooks to not ping
This commit is contained in:
parent
1855a59468
commit
5cc091085c
2
index.js
2
index.js
@ -144,7 +144,7 @@ function createOWOPbridge(owopWorld, configDiscordChannels, password) {
|
||||
let username = message.member && message.member.displayName || message.author.username;
|
||||
if (message.guild) username += ' @ ' + message.guild.name;
|
||||
if (username.length > 32) username = username.substring(0, 31) + '…';
|
||||
discordChannel.webhook.send(message.content, {username, avatarURL: message.author.avatarURL})
|
||||
discordChannel.webhook.send(message.cleanContent, {username, avatarURL: message.author.avatarURL})
|
||||
.catch(error => {
|
||||
console.error(`Failed to send Discord broadcast via webhook to discordChannel ${[discordChannel.id, '#'+discordChannel.name, discordChannel.guild.name]}:`, error.message);
|
||||
// fallback to embed if webhook fails
|
||||
|
Loading…
x
Reference in New Issue
Block a user