From 1e62dd02e53a510d4c9db1b86eb04a9d61c89aa8 Mon Sep 17 00:00:00 2001 From: Cat++ <69035887+NotGhex@users.noreply.github.com> Date: Sun, 10 Dec 2023 21:44:48 +0800 Subject: [PATCH] fix test modules --- test/modules/button-pagination.js | 8 ++++---- test/modules/giveaways.js | 12 ++++++------ test/modules/meme.js | 6 +++--- test/modules/reaction-pagination.js | 6 +++--- test/modules/scam-links.js | 8 ++++---- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/test/modules/button-pagination.js b/test/modules/button-pagination.js index 860a6b0..454b590 100644 --- a/test/modules/button-pagination.js +++ b/test/modules/button-pagination.js @@ -10,13 +10,13 @@ import { CommandType } from "reciple"; export const pages = ['Page1', new EmbedBuilder().setTitle('Page2').setColor('Random'), { content: 'Page3', embeds: [{ title: 'This is page 3' }] }]; /** - * @type {import("reciple").RecipleModuleScript} + * @type {import("reciple").RecipleModuleData} */ export default { - versions: ['^7'], + versions: ['^8'], commands: [ { - commandType: CommandType.SlashCommand, + command_type: CommandType.SlashCommand, name: 'pagination', description: 'Button pagination testing', async execute({ interaction }) { @@ -58,7 +58,7 @@ export default { } } ], - async onStart(client) { + async onStart() { return true; } } \ No newline at end of file diff --git a/test/modules/giveaways.js b/test/modules/giveaways.js index 2cc6bf1..67abc2f 100644 --- a/test/modules/giveaways.js +++ b/test/modules/giveaways.js @@ -1,5 +1,5 @@ import ms from "ms"; -import { RecipleClient, SlashCommandBuilder } from "reciple"; +import { SlashCommandBuilder } from "reciple"; import { GiveawayManager, MongodbDatabaseAdapter, Sqlite3DatabaseAdapter } from '@falloutstudios/djs-giveaways'; import { ChatInputCommandInteraction, userMention } from "discord.js"; import { InteractionListenerType } from "reciple-interaction-events"; @@ -9,7 +9,7 @@ import { fileURLToPath } from "url"; // @ts-check export class Giveaways { - versions = '^7'; + versions = '^8'; /** * @type {GiveawayManager|null} */ @@ -99,9 +99,9 @@ export class Giveaways { /** * - * @param {RecipleClient} client + * @param {import("reciple").RecipleModuleStartData} param0 */ - onStart(client) { + onStart({ client }) { this.giveaways = new GiveawayManager({ client, databaseAdapter: new Sqlite3DatabaseAdapter({ @@ -114,9 +114,9 @@ export class Giveaways { /** * - * @param {RecipleClient} client + * @param {import("reciple").RecipleModuleLoadData} param0 */ - async onLoad(client) { + async onLoad({ client }) { this.giveaways.on('error', console.log); await this.giveaways.start(); diff --git a/test/modules/meme.js b/test/modules/meme.js index 700f898..a4af6f0 100644 --- a/test/modules/meme.js +++ b/test/modules/meme.js @@ -4,13 +4,13 @@ import { ButtonStyle, ComponentType, EmbedBuilder } from "discord.js"; import { CommandType } from "reciple"; /** - * @type {import("reciple").RecipleModuleScript} + * @type {import("reciple").RecipleModuleData} */ export default { - versions: ['^7'], + versions: ['^8'], commands: [ { - commandType: CommandType.SlashCommand, + command_type: CommandType.SlashCommand, name: 'meme', description: 'Some random memes from the internet', execute: async ({ interaction }) => { diff --git a/test/modules/reaction-pagination.js b/test/modules/reaction-pagination.js index 2f89790..c041682 100644 --- a/test/modules/reaction-pagination.js +++ b/test/modules/reaction-pagination.js @@ -4,13 +4,13 @@ import { pages } from "./button-pagination.js"; import { ReactionPaginationBuilder } from "@falloutstudios/djs-pagination"; /** - * @type {import("reciple").RecipleModuleScript} + * @type {import("reciple").RecipleModuleData} */ export default { - versions: ['^7'], + versions: ['^8'], commands: [ { - commandType: CommandType.MessageCommand, + command_type: CommandType.MessageCommand, name: 'pagination', description: 'Reaction pagination', async execute({ message }) { diff --git a/test/modules/scam-links.js b/test/modules/scam-links.js index 880eb1d..97494ad 100644 --- a/test/modules/scam-links.js +++ b/test/modules/scam-links.js @@ -3,17 +3,17 @@ import { DiscordScamLinks } from '@falloutstudios/djs-scam-links'; import { codeBlock } from 'discord.js'; /** - * @type {import('reciple').RecipleModuleScript & { links: DiscordScamLinks }} + * @type {import('reciple').RecipleModuleData & { links: DiscordScamLinks }} */ export default { - versions: ['^7'], + versions: ['^8'], links: new DiscordScamLinks(), - async onStart(client) { + async onStart({ client }) { return true; }, - async onLoad(client) { + async onLoad({ client }) { client.on('messageCreate', async message => { if (message.author.bot || message.author.system || !message.content) return;