From 407a6f66daebca35fb355ead2c0dc65e7c80fc68 Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Sun, 6 Mar 2022 14:09:38 +0100 Subject: Fully ping proof --- common.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'common.js') 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, "\@") -- cgit v1.2.3