mirror of
https://github.com/kirameki-cafe/Yumi.git
synced 2026-09-13 10:49:20 +00:00
Fix error handling
This commit is contained in:
@@ -416,7 +416,13 @@ export default class MembershipScreening {
|
|||||||
if(Guild.MembershipScreening_ApprovalChannel === null) return;
|
if(Guild.MembershipScreening_ApprovalChannel === null) return;
|
||||||
if(Guild.MembershipScreening_GivenRole === null) return;
|
if(Guild.MembershipScreening_GivenRole === null) return;
|
||||||
|
|
||||||
const channel = await DiscordProvider.client.channels.fetch(Guild.MembershipScreening_ApprovalChannel) as TextChannel;
|
let channel = undefined;
|
||||||
|
try {
|
||||||
|
channel = await DiscordProvider.client.channels.fetch(Guild.MembershipScreening_ApprovalChannel) as TextChannel;
|
||||||
|
} catch (err) {
|
||||||
|
// TODO: Handle channel not found error
|
||||||
|
return;
|
||||||
|
}
|
||||||
if(!channel) return;
|
if(!channel) return;
|
||||||
|
|
||||||
const embed = makeInfoEmbed ({
|
const embed = makeInfoEmbed ({
|
||||||
|
|||||||
Reference in New Issue
Block a user