fixed /user tracks & /settings tracks. Added presets to /server buttons
diff --git a/src/utils/getEmojiByName.ts b/src/utils/getEmojiByName.ts
index 99d1215..9bbf61f 100644
--- a/src/utils/getEmojiByName.ts
+++ b/src/utils/getEmojiByName.ts
@@ -1,7 +1,6 @@
import emojis from "../config/emojis.json" assert { type: "json" };
-import lodash from "lodash";
+import _ from "lodash";
-const isArray = lodash.isArray;
interface EmojisIndex {
[key: string]: string | EmojisIndex | EmojisIndex[];
}
@@ -14,7 +13,7 @@
if (typeof id === "string" || id === undefined) {
throw new Error(`Emoji ${name} not found`);
}
- if (isArray(id)) {
+ if (_.isArray(id)) {
id = id[parseInt(part)];
} else {
id = id[part];
@@ -34,9 +33,9 @@
if (id === undefined) {
return "";
} else if (id.toString().startsWith("a")) {
- return `<a:_:${id.toString().slice(1, id.toString().length)}>`;
+ return `<a:N:${id.toString().slice(1, id.toString().length)}>`;
}
- return `<:_:${id}>`;
+ return `<:N:${id}>`;
}
export default getEmojiByName;