diff options
Diffstat (limited to 'src/plugins/nitroBypass.ts')
-rw-r--r-- | src/plugins/nitroBypass.ts | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/plugins/nitroBypass.ts b/src/plugins/nitroBypass.ts index d96ff0d..c5d69a4 100644 --- a/src/plugins/nitroBypass.ts +++ b/src/plugins/nitroBypass.ts @@ -1,8 +1,8 @@ -import { addPreSendListener, addPreEditListener, SendListener, removePreSendListener, removePreEditListener } from '../api/MessageEvents'; +import { addPreSendListener, addPreEditListener, removePreSendListener, removePreEditListener } from "../api/MessageEvents"; import { findByProps } from "../webpack"; import definePlugin from "../utils/types"; -import { Devs } from '../utils/constants'; -import { UserStore } from '../webpack/common'; +import { Devs } from "../utils/constants"; +import { UserStore } from "../webpack/common"; export default definePlugin({ name: "NitroBypass", @@ -11,7 +11,7 @@ export default definePlugin({ dependencies: ["MessageEventsAPI"], patches: [ { - find: `canUseAnimatedEmojis:function`, + find: "canUseAnimatedEmojis:function", replacement: [ "canUseAnimatedEmojis", "canUseEmojisEverywhere", @@ -58,8 +58,8 @@ export default definePlugin({ if (!emoji.require_colons) continue; if (emoji.guildId === guildId && !emoji.animated) continue; - const emojiString = `<${emoji.animated ? 'a' : ''}:${emoji.originalName || emoji.name}:${emoji.id}>`; - const url = emoji.url.replace(/\?size=[0-9]+/, `?size=48`); + const emojiString = `<${emoji.animated ? "a" : ""}:${emoji.originalName || emoji.name}:${emoji.id}>`; + const url = emoji.url.replace(/\?size=[0-9]+/, "?size=48"); messageObj.content = messageObj.content.replace(emojiString, (match, offset, origStr) => { return `${getWordBoundary(origStr, offset - 1)}${url}${getWordBoundary(origStr, offset + match.length)}`; }); @@ -74,7 +74,7 @@ export default definePlugin({ if (emoji == null || (emoji.guildId === guildId && !emoji.animated)) continue; if (!emoji.require_colons) continue; - const url = emoji.url.replace(/\?size=[0-9]+/, `?size=48`); + const url = emoji.url.replace(/\?size=[0-9]+/, "?size=48"); messageObj.content = messageObj.content.replace(emojiStr, (match, offset, origStr) => { return `${getWordBoundary(origStr, offset - 1)}${url}${getWordBoundary(origStr, offset + match.length)}`; }); |