]> git.lizzy.rs Git - furrybot-discord.git/blobdiff - common.js
Fully ping proof
[furrybot-discord.git] / common.js
index d06566d212406b3b34097f73eb33b9ac5b201b1d..5bb4cff5badbfe47f3bb2a39ad2c7278c0d722de 100644 (file)
--- 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, "\@")