SoundboardLogger: Fix Find
This commit is contained in:
parent
ebc5c975dc
commit
40e62074a0
1 changed files with 4 additions and 5 deletions
|
|
@ -6,11 +6,10 @@
|
|||
|
||||
import { playAudio } from "@api/AudioPlayer";
|
||||
import { classNameFactory } from "@utils/css";
|
||||
import { proxyLazy } from "@utils/lazy";
|
||||
import { LazyComponent } from "@utils/react";
|
||||
import { saveFile } from "@utils/web";
|
||||
import type { User } from "@vencord/discord-types";
|
||||
import { findByCode, findByProps, findByPropsLazy } from "@webpack";
|
||||
import { findByCode, findByPropsLazy } from "@webpack";
|
||||
|
||||
import settings from "./settings";
|
||||
|
||||
|
|
@ -32,11 +31,11 @@ export interface SoundLogEntry extends SoundEvent {
|
|||
}
|
||||
|
||||
export const cl = classNameFactory("vc-soundlog-");
|
||||
const EmojiManager = findByPropsLazy("getEmojiColors", "getURL");
|
||||
|
||||
export function getEmojiUrl(emoji) {
|
||||
const { getURL } = proxyLazy(() => findByProps("getEmojiColors", "getURL"));
|
||||
if (!emoji) return getURL("❓"); // If the sound doesn't have a related emoji
|
||||
return emoji.id ? `https://cdn.discordapp.com/emojis/${emoji.id}.png?size=32` : getURL(emoji.name);
|
||||
if (!emoji) return EmojiManager.getURL("❓"); // If the sound doesn't have a related emoji
|
||||
return emoji.id ? `https://cdn.discordapp.com/emojis/${emoji.id}.png?size=32` : EmojiManager.getURL(emoji.name);
|
||||
}
|
||||
|
||||
export const playSound = id => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue