Merge pull request #254 from JoeZwet/version-2
fix: prevent discord mention exploit
This commit is contained in:
@@ -4,6 +4,10 @@ export default function sendWebhook({webhookURL, message, options}){
|
|||||||
let urlArray = webhookURL.split('/');
|
let urlArray = webhookURL.split('/');
|
||||||
let token = urlArray.pop();
|
let token = urlArray.pop();
|
||||||
let id = urlArray.pop();
|
let id = urlArray.pop();
|
||||||
|
|
||||||
|
// prevent discord mention exploit
|
||||||
|
options.disableMentions = 'all';
|
||||||
|
|
||||||
const hook = new Discord.WebhookClient(id, token);
|
const hook = new Discord.WebhookClient(id, token);
|
||||||
// Send a message using the webhook
|
// Send a message using the webhook
|
||||||
hook.send(message, options)
|
hook.send(message, options)
|
||||||
|
|||||||
Reference in New Issue
Block a user