Merge pull request #2 from BopItFreak/patch-1

guess it good
This commit is contained in:
Lamp 2020-02-09 15:08:03 -08:00 committed by GitHub
commit 8c887ab79f
1 changed files with 2 additions and 2 deletions

View File

@ -27,11 +27,11 @@ async function messagehandle(data) {
let effect = data.effect || ""; let effect = data.effect || "";
let roomName = data.roomName; let roomName = data.roomName;
let color = data.color; let color = data.color;
let id = data.id; let id = data.sID || data.socketID || data.id;
if (id == client.socket.id) return; if (id == client.socket.id) return;
let c = dClient.channels.get("593943518351982603"); let c = dClient.channels.get("593943518351982603");
let msg; let msg;
(!name && (data.message.startsWith("[i]") || data.message.startsWith("[d]"))) ? msg = `*${escapeDiscordMentions(data.message)}*` : msg = `**${sanitizeName(name)}:** ${escapeDiscordMentions(data.message)}`; (!name && (data.message.startsWith("[i]"))) ? msg = `*${escapeDiscordMentions(data.message.split("[i]")[1])}*` : msg = `**${sanitizeName(name)}:** ${escapeDiscordMentions(data.message)}`;
if (c) c.send(msg); if (c) c.send(msg);
} }
break; break;