From d376aa47dc2fd0da8b66a474ee9d016721a2d059 Mon Sep 17 00:00:00 2001 From: LunaUrsa <1836049+LunaUrsa@users.noreply.github.com> Date: Sat, 21 Oct 2023 17:40:14 -0500 Subject: [PATCH] Update testkit info --- src/discord/commands/global/d.testkits.ts | 8 ++--- src/global/commands/g.testkits.ts | 39 ++++++++++------------- src/jest/__tests__/testkits.test.ts | 2 +- 3 files changed, 21 insertions(+), 28 deletions(-) diff --git a/src/discord/commands/global/d.testkits.ts b/src/discord/commands/global/d.testkits.ts index 4e69e483c..f1e04c184 100644 --- a/src/discord/commands/global/d.testkits.ts +++ b/src/discord/commands/global/d.testkits.ts @@ -4,13 +4,13 @@ import { import { stripIndents } from 'common-tags'; import { SlashCommand } from '../../@types/commandDef'; import { embedTemplate } from '../../utils/embedTemplate'; -import { testkits } from '../../../global/commands/g.testkits'; +import testkits from '../../../global/commands/g.testkits'; import commandContext from '../../utils/context'; // import log from '../../../global/utils/log'; const F = f(__filename); -export const dTestkits: SlashCommand = { +export default { data: new SlashCommandBuilder() .setName('drug_testkits') .setDescription('Information on how to get a test kit') @@ -46,6 +46,4 @@ export const dTestkits: SlashCommand = { await interaction.editReply({ embeds: [embed] }); return true; }, -}; - -export default dTestkits; +} as SlashCommand; diff --git a/src/global/commands/g.testkits.ts b/src/global/commands/g.testkits.ts index 53b484e74..04db89bbc 100644 --- a/src/global/commands/g.testkits.ts +++ b/src/global/commands/g.testkits.ts @@ -1,12 +1,16 @@ -/* eslint-disable max-len */ - -export default testkits; +type HelpResource = { + name: string; + country: string; + website: string; + description: string; +}; /** * Information about contacting the team! * @return {any} an object with information about the bot */ -export async function testkits():Promise { + +export default async function testkits():Promise { return [ { name: 'DanceSafe', @@ -18,13 +22,13 @@ export async function testkits():Promise { name: 'Dosetest', country: 'Worldwide', website: 'https://dosetest.com/tripsit', - description: '20% off test kits with code TripSit (Affiliate link)', + description: '20% off with code TripSit (Affiliate link)', }, { name: 'Protest', country: 'Europe', website: 'https://protestkit.eu/shop/?coupon_code=tripsit', - description: '10% off test kits with code TripSit! (Affiliate code)', + description: '10% off with code TripSit (Affiliate code)', }, { name: 'ReagentTests UK', @@ -36,22 +40,13 @@ export async function testkits():Promise { name: 'EZ Test', country: 'Australia', website: 'http://ez-test.com.au/', - description: '10% off TripsitAusOct\n15% off with TripsitAusNov', + description: '10% off with TripsitAusOct\n15% off with TripsitAusNov', + }, + { + name: 'Test Drogue', + country: 'France', + website: 'https://www.testdrogue.fr/', + description: '', }, ]; } - -type HelpResource = { - name: string; - country: string; - website: string; - description: string; -}; - -const template = // eslint-disable-line -{ - name: '', - country: '', - website: '', - description: '', -}; diff --git a/src/jest/__tests__/testkits.test.ts b/src/jest/__tests__/testkits.test.ts index ab72c7a40..332b38b7a 100644 --- a/src/jest/__tests__/testkits.test.ts +++ b/src/jest/__tests__/testkits.test.ts @@ -2,7 +2,7 @@ import { Colors, } from 'discord.js'; import { stripIndents } from 'common-tags'; -import { dTestkits } from '../../discord/commands/global/d.testkits'; +import dTestkits from '../../discord/commands/global/d.testkits'; import { executeCommandAndSpyEditReply, embedContaining, getParsedCommand } from '../utils/testutils'; const slashCommand = dTestkits;