Skip to content

Commit

Permalink
fix test modules
Browse files Browse the repository at this point in the history
  • Loading branch information
catplvsplus committed Dec 10, 2023
1 parent 522e1fb commit 1e62dd0
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 20 deletions.
8 changes: 4 additions & 4 deletions test/modules/button-pagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) {
Expand Down Expand Up @@ -58,7 +58,7 @@ export default {
}
}
],
async onStart(client) {
async onStart() {
return true;
}
}
12 changes: 6 additions & 6 deletions test/modules/giveaways.js
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -9,7 +9,7 @@ import { fileURLToPath } from "url";
// @ts-check

export class Giveaways {
versions = '^7';
versions = '^8';
/**
* @type {GiveawayManager<MongodbDatabaseAdapter>|null}
*/
Expand Down Expand Up @@ -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({
Expand All @@ -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();
Expand Down
6 changes: 3 additions & 3 deletions test/modules/meme.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) => {
Expand Down
6 changes: 3 additions & 3 deletions test/modules/reaction-pagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) {
Expand Down
8 changes: 4 additions & 4 deletions test/modules/scam-links.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 1e62dd0

Please sign in to comment.