@@ -67,7 +67,7 @@ class GiveawaysManager extends EventEmitter {
67
67
if ( ! giveaway . options . langfile ) {
68
68
giveaway . options . langfile = require ( `../lang/${ giveaway . lang } .json` ) ;
69
69
}
70
- if ( giveaway . options . shardID !== this . client . shard . ids [ 0 ] ) return ;
70
+ if ( ! this . client . guilds . cache . get ( giveaway . guildID ) ) return ;
71
71
await this . _markAsEnded ( giveaway . messageID ) ;
72
72
var requirements = "" ;
73
73
if ( giveaway . options . IsRequiredRole === true ) {
@@ -265,7 +265,7 @@ class GiveawaysManager extends EventEmitter {
265
265
if ( ! giveaway . ended ) {
266
266
return reject ( `GiveawayNotEnded` ) ;
267
267
}
268
- if ( giveaway . options . shardID !== this . client . shard . ids [ 0 ] ) return ;
268
+ if ( ! this . client . guilds . cache . get ( giveaway . guildID ) ) return ;
269
269
if ( ! giveaway . channel ) {
270
270
return reject ( `GiveawayUnknownChannel` ) ;
271
271
}
@@ -304,7 +304,7 @@ class GiveawaysManager extends EventEmitter {
304
304
if ( giveaway . ended ) {
305
305
return reject ( `GiveawayAlreadyEnded` ) ;
306
306
}
307
- if ( giveaway . options . shardID !== this . client . shard . ids [ 0 ] ) return ;
307
+ if ( ! this . client . guilds . cache . get ( giveaway . guildID ) ) return ;
308
308
if ( ! giveaway . channel ) {
309
309
return reject ( `GiveawayUnknownChannel` ) ;
310
310
}
@@ -438,7 +438,7 @@ class GiveawaysManager extends EventEmitter {
438
438
if ( giveaway . options . shardID === undefined ) {
439
439
giveawayData . shardID = 0
440
440
}
441
- if ( giveawayData . shardID !== this . client . shard . ids [ 0 ] ) return ;
441
+ if ( ! this . client . guilds . cache . get ( giveaway . guildID ) ) return ;
442
442
await this . giveaways . push ( giveawayData ) ;
443
443
await db . set ( "giveaways" , this . giveaways ) ;
444
444
await this . _checkGiveaway ( )
0 commit comments