mirror of
https://github.com/JonnyBro/JaBa.git
synced 2025-01-19 17:03:47 +05:00
feat: added support to giveaways manager
This commit is contained in:
parent
0327e8069f
commit
4272ae63b0
1 changed files with 12 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
|||
import { Client, ClientOptions } from "discord.js";
|
||||
import { GiveawaysManager } from "discord-giveaways";
|
||||
import { TOptionsBase } from "i18next";
|
||||
import { Handlers } from "@/handlers/index.js";
|
||||
import MongooseAdapter from "@/adapters/database/MongooseAdapter.js";
|
||||
|
@ -23,6 +24,17 @@ export class ExtendedClient extends Client<true> {
|
|||
},
|
||||
) => string;
|
||||
|
||||
// @ts-ignore - because ExtendedClient != Client<boolean> from discord.js
|
||||
giveaways = new GiveawaysManager(this, {
|
||||
storage: "../../giveaways.json",
|
||||
default: {
|
||||
botsCanWin: false,
|
||||
embedColor: this.configService.get("embed.color"),
|
||||
embedColorEnd: "#FF0000",
|
||||
reaction: "🎉",
|
||||
},
|
||||
});
|
||||
|
||||
constructor(options: ClientOptions) {
|
||||
if (SUPER_CONTEXT.getStore()) {
|
||||
return SUPER_CONTEXT.getStore() as ExtendedClient;
|
||||
|
|
Loading…
Reference in a new issue