This repository was archived by the owner on Oct 9, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -71,15 +71,15 @@ export default {
7171 await sendInFirst ( guild , { embeds : [ embed ] , components : [ buttons ] } ) . catch ( ( ) => null ) ;
7272 }
7373
74- const goalChannel = guild . client . channels . cache . get ( constants . channel . goal ) as TextChannel ;
74+ const goalChannel = guild . client . channels . cache . get ( constants . channel . goal ) as TextChannel | undefined ;
7575 const guildOwner = await guild . fetchOwner ( ) ;
7676
77- goalChannel . send ( {
77+ goalChannel ? .send ( {
7878 embeds : [
7979 new EmbedBuilder ( )
8080 . setTitle ( 'I have joined a new server! 🙌' )
8181 . setDescription ( stripIndents `
82- **${ 800 - guild . client . guilds . cache . size } ** servers more to go! ${ tada }
82+ **${ 900 - guild . client . guilds . cache . size } ** servers more to go! ${ tada }
8383
8484 **Server Name:** ${ guild . name } (${ guild . id } )
8585 **Owner:** ${ guildOwner . user . tag } (${ guildOwner ?. id } )
Original file line number Diff line number Diff line change @@ -8,18 +8,19 @@ import { captureException } from '@sentry/node';
88export default {
99 name : 'guildDelete' ,
1010 async execute ( guild : Guild ) {
11+ if ( ! guild . available ) return ;
1112 const database = getDb ( ) ;
1213 await database . setup . deleteMany ( { where : { guildId : guild . id } } ) ;
1314 disconnect ( { serverId : guild . id } ) ;
1415
15- const goalChannel = guild . client . channels . cache . get ( constants . channel . goal ) as TextChannel ;
16+ const goalChannel = guild . client . channels . cache . get ( constants . channel . goal ) as TextChannel | undefined ;
1617
17- goalChannel . send ( {
18+ goalChannel ? .send ( {
1819 embeds : [
1920 new EmbedBuilder ( )
2021 . setTitle ( 'I have been kicked from a server 😢' )
2122 . setDescription ( stripIndents `
22- **${ 800 - guild . client . guilds . cache . size } ** servers more to go! 💪
23+ **${ 900 - guild . client . guilds . cache . size } ** servers more to go! 💪
2324
2425 **Server Name:** ${ guild . name } (${ guild . id } )
2526 **Member Count:** ${ guild . memberCount }
You can’t perform that action at this time.
0 commit comments