It's giving me an error. It says that:
Property 'getAllGiveaways' in type 'giveawayManager' is not assignable to the same property in base type 'GiveawaysManager<any>'.
When I run the bot this I get this error:
D:\dirname\node_modules\discord-giveaways\src\Manager.js:685
rawGiveaways.forEach((giveaway) => this.giveaways.push(new Giveaway(this, giveaway)));
^
TypeError: Cannot read properties of undefined (reading 'forEach')
at giveawayManager._init (D:\dirname\node_modules\discord-giveaways\src\Manager.js:685:22)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
How do I solve this error? Any help would be appreciated. Thanks!
Here's my code:
Giveaways Model/Schema code
```ts import { Schema, model, SchemaTypes } from "mongoose"; import { ModelWithCache } from "cache-mongodb"; const GiveawaySchema = new Schema( { messageId: String, channelId: String, guildId: String, startAt: Number, endAt: Number, ended: Boolean, winnerCount: Number, prize: String, messages: { giveaway: String, giveawayEnded: String, title: String, inviteToParticipate: String, drawing: String, dropMessage: String, winMessage: SchemaTypes.Mixed, embedFooter: SchemaTypes.Mixed, noWinner: String, winners: String, endedAt: String, hostedBy: String }, thumbnail: String, image: String, hostedBy: String, winnerIds: { type: [String], default: undefined }, reaction: SchemaTypes.Mixed, botsCanWin: Boolean, embedColor: SchemaTypes.Mixed, embedColorEnd: SchemaTypes.Mixed, exemptPermissions: { type: [], default: undefined }, exemptMembers: String, bonusEntries: String, extraData: SchemaTypes.Mixed, lastChance: { enabled: Boolean, content: String, threshold: Number, embedColor: SchemaTypes.Mixed }, pauseOptions: { isPaused: Boolean, content: String, unPauseAfter: Number, embedColor: SchemaTypes.Mixed, durationAfterPause: Number, infiniteDurationText: String }, isDrop: Boolean, allowedMentions: { parse: { type: [String], default: undefined }, users: { type: [String], default: undefined }, roles: { type: [String], default: undefined } } }, { id: false } ) const giveawayModel = model("giveaway", GiveawaySchema) export default new ModelWithCache(giveawayModel) ```It's giving me an error. It says that:
Property 'getAllGiveaways' in type 'giveawayManager' is not assignable to the same property in base type 'GiveawaysManager<any>'.
When I run the bot this I get this error:
How do I solve this error? Any help would be appreciated. Thanks!