mirror of
https://github.com/kirameki-cafe/Yumi.git
synced 2026-09-14 03:09:59 +00:00
No longer crash if unable to login to VRChat
This commit is contained in:
@@ -22,12 +22,6 @@ const EMBEDS = {
|
||||
user: data.getUser()
|
||||
});
|
||||
},
|
||||
NOT_INITIALIZED: (data: HybridInteractionMessage) => {
|
||||
return makeErrorEmbed({
|
||||
title: `VRChat feature is disabled`,
|
||||
user: data.getUser()
|
||||
});
|
||||
},
|
||||
ERROR: (data: HybridInteractionMessage) => {
|
||||
return makeErrorEmbed({
|
||||
title: `Something went wrong while connecting to VRChat`,
|
||||
|
||||
@@ -63,7 +63,7 @@ export default class VRChat extends DiscordModule {
|
||||
const Guild = await Prisma.client.guild.findFirst({ where: { id: data.getGuild()!.id } });
|
||||
if (!Guild) return;
|
||||
|
||||
if (!VRChatAPI.client)
|
||||
if (!VRChatAPI.isReady())
|
||||
return await sendHybridInteractionMessageResponse(data, {
|
||||
embeds: [EMBEDS.NOT_INITIALIZED(data)]
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user