diff --git a/src/ui/toasts.ts b/src/ui/toasts.ts index c39a0a0..7af3d8e 100644 --- a/src/ui/toasts.ts +++ b/src/ui/toasts.ts @@ -1,6 +1,13 @@ +import { findByProps } from "@metro/filters"; import { toasts } from "@metro/common"; +const { uuid4 } = findByProps("uuid4"); + export const showToast = (content: string, asset?: number) => toasts.open({ + //? In build 182205/44707, Discord changed their toasts, source is no longer used, rather icon, and a key is needed. + // TODO: We could probably have the developer specify a key themselves, but this works to fix toasts + key: `vd-toast-${uuid4()}`, content: content, source: asset, + icon: asset, }); \ No newline at end of file