diff options
author | Elias Fleckenstein <eliasfleckenstein@web.de> | 2022-03-06 14:09:38 +0100 |
---|---|---|
committer | Elias Fleckenstein <eliasfleckenstein@web.de> | 2022-03-06 14:09:38 +0100 |
commit | 407a6f66daebca35fb355ead2c0dc65e7c80fc68 (patch) | |
tree | d825cb12858027e0affccff01d3cde4c92021ab2 /common.js | |
parent | 34d0cf9d14647c088a2683153b92c7d72bb21614 (diff) | |
download | furrybot-discord-407a6f66daebca35fb355ead2c0dc65e7c80fc68.tar.xz |
Fully ping proof
Diffstat (limited to 'common.js')
-rw-r--r-- | common.js | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -2,8 +2,8 @@ const fs = require("fs") const google_images = require("free-google-images") const getPing = module.exports.getPing = (msg, ping, allowSelf) => { - if (ping && ping.startsWith("<@!") && ping.endsWith(">")) { - const id = ping.slice("<@!".length, -">".length) + if (ping && ping.startsWith("<\\@!") && ping.endsWith(">")) { + const id = ping.slice("<\\@!".length, -">".length) if (!allowSelf && id == msg.author.id) { msg.reply("Please mention a user other than yourself") @@ -104,5 +104,3 @@ module.exports.listChangeCommand = (action, list, status) => new Object({ } } }) - -module.exports.stripPings = str => str.replace(/@/g, "\@") |