mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-01 03:18:06 +03:00
Add proper error handling.
This commit is contained in:
@@ -25,7 +25,12 @@ const command: SlashCommand = {
|
||||
return `Invalid userID. Can't query this!`;
|
||||
}
|
||||
|
||||
const userDoc = await GetUserInfo(userID);
|
||||
let userDoc;
|
||||
try {
|
||||
userDoc = await GetUserInfo(userID);
|
||||
} catch (err) {
|
||||
return `This user does not exist.`;
|
||||
}
|
||||
|
||||
const { game, playtype } = ParseGPT(interaction.options.getString("game", true));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user