Make code a tiny bit cleaner

This commit is contained in:
SileNce5k 2021-07-04 13:17:45 +02:00
parent 8b1a43e1bc
commit 453bf35803
No known key found for this signature in database
GPG key ID: C507260E7F2583AD

View file

@ -1,10 +1,7 @@
module.exports = function (text, guild) {
let id = "";
let isMention = false;
if (
text.substring(0, 2) == "<@" &&
text.substring(text.length - 1, text.length) == ">"
) {
if (text.substring(0, 2) == "<@" && text.substring(text.length - 1, text.length) == ">") {
let start = 2;
if (text.substring(0, 3) == "<@!") start = 3;
id = text.substring(start, text.length - 1);