Skip to content

Commit

Permalink
Catch errors when adding emoji
Browse files Browse the repository at this point in the history
  • Loading branch information
FieryFlames committed Mar 9, 2023
1 parent 2d5ff3a commit c4bbb15
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ui/components/AddToServerRow.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { findByDisplayName, findByProps } from "@vendetta/metro";
import { findByDisplayName, findByProps, findByStoreName } from "@vendetta/metro";
import { showInputAlert } from "@vendetta/ui/alerts";
import { getAssetIDByName } from "@vendetta/ui/assets";
import { Forms } from "@vendetta/ui/components";
Expand Down Expand Up @@ -30,6 +30,8 @@ export default function AddToServerRow({ guild, emojiNode }: { guild: any, emoji
}).then(() => {
// Let user know it was added
showToast(`Added ${emojiNode.alt} to ${guild.name}`, getAssetIDByName("Check"));
}).catch((e) => {
showToast(e.body.message, getAssetIDByName("Small"))
});
});
},
Expand Down

0 comments on commit c4bbb15

Please sign in to comment.