Commit 2c7b429 1 parent c8e9c16 commit 2c7b429 Copy full SHA for 2c7b429
File tree 4 files changed +20
-12
lines changed
4 files changed +20
-12
lines changed Original file line number Diff line number Diff line change 1
1
module . exports = {
2
2
// BOT VERSION //
3
- botVersion : "BETA-v1.2.0 " ,
3
+ botVersion : "BETA-v1.2.1 " ,
4
4
5
5
// BOT INFO //
6
6
prefix : "t?" , // Default prefix
Original file line number Diff line number Diff line change @@ -11,18 +11,26 @@ module.exports = {
11
11
12
12
client . logs . info ( `[SCHEMAS] Started loading schemas...` ) ;
13
13
14
- if ( ! mongodbURL ) return ;
14
+ if ( ! mongodbURL ) {
15
+ client . logs . error ( '[DATABASE] No MongoDB URL has been provided. Double check your .env file and make sure it is correct.' ) ;
16
+ return ;
17
+ }
15
18
16
- mongoose . set ( "strictQuery" , false ) ;
17
- await mongoose . connect ( mongodbURL || `` , {
18
- keepAlive : true ,
19
- useNewUrlParser : true ,
20
- useUnifiedTopology : true ,
21
- serverSelectionTimeoutMS : 10000 ,
22
- } ) ;
19
+ try {
20
+ mongoose . set ( "strictQuery" , false ) ;
21
+ await mongoose . connect ( mongodbURL || `` , {
22
+ keepAlive : true ,
23
+ useNewUrlParser : true ,
24
+ useUnifiedTopology : true ,
25
+ serverSelectionTimeoutMS : 10000 ,
26
+ } ) ;
27
+ } catch ( err ) {
28
+ client . logs . error ( `[DATABASE] Error connecting to the database: ${ err } ` ) ;
29
+ return ;
30
+ }
23
31
24
32
folderLoader ( client ) ;
25
33
asciiText ( client )
26
- require ( 'events' ) . EventEmitter . defaultMaxListeners = config . eventListeners ;
34
+ require ( 'events' ) . EventEmitter . setMaxListeners = config . eventListeners ;
27
35
} ,
28
36
} ;
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ module.exports = (client) => {
35
35
}
36
36
}
37
37
38
- console . log ( `${ color . blue } ${ table . toString ( ) } \n[${ getTimestamp ( ) } ] ${ color . reset } [COMMANDS] Loaded ${ client . commands . size } SlashCommands.` ) ;
38
+ console . log ( `${ color . blue } ${ table . toString ( ) } \n[${ getTimestamp ( ) } ] ${ color . reset } [COMMANDS] Found ${ client . commands . size } SlashCommands.` ) ;
39
39
40
40
const rest = new REST ( {
41
41
version : '9'
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ module.exports = (client) => {
32
32
33
33
client . logs . info ( `[PREFIX_COMMANDS] Started refreshing prefix (?) commands.` ) ;
34
34
35
- console . log ( `${ color . orange } ${ table . toString ( ) } \n[${ getTimestamp ( ) } ] ${ color . reset } [PREFIX_COMMANDS] Loaded ${ client . pcommands . size } PrefixCommands.` ) ;
35
+ console . log ( `${ color . orange } ${ table . toString ( ) } \n[${ getTimestamp ( ) } ] ${ color . reset } [PREFIX_COMMANDS] Found ${ client . pcommands . size } PrefixCommands.` ) ;
36
36
37
37
( async ( ) => {
38
38
try {
You can’t perform that action at this time.
0 commit comments