aboutsummaryrefslogtreecommitdiff
path: root/common.js
diff options
context:
space:
mode:
authorElias Fleckenstein <eliasfleckenstein@web.de>2022-03-06 14:09:38 +0100
committerElias Fleckenstein <eliasfleckenstein@web.de>2022-03-06 14:09:38 +0100
commit407a6f66daebca35fb355ead2c0dc65e7c80fc68 (patch)
treed825cb12858027e0affccff01d3cde4c92021ab2 /common.js
parent34d0cf9d14647c088a2683153b92c7d72bb21614 (diff)
downloadfurrybot-discord-407a6f66daebca35fb355ead2c0dc65e7c80fc68.tar.xz
Fully ping proof
Diffstat (limited to 'common.js')
-rw-r--r--common.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/common.js b/common.js
index d06566d..5bb4cff 100644
--- a/common.js
+++ b/common.js
@@ -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, "\@")