making sure it actually removes just the first part of the message

This commit is contained in:
rhearmas 2019-12-22 23:09:03 -05:00
parent 8d3dbd24d9
commit 631e3daad1

View file

@ -14,7 +14,7 @@ exports.run = async (client, message, args) => {
if(args[0].startsWith('<#') && args[0].endsWith('>')) {
location = args[0].slice(2, -1);
location = guild.channels.find(c => c.id === location);
msg = msg.replace(/[0-9]+/g, "").replace(/[$<#>]+/g, "").slice(1);
msg = msg.slice(args[0].length);
console.log(`msg is ${msg}`)
}