Skip to content

Commit

Permalink
Update testkit info
Browse files Browse the repository at this point in the history
  • Loading branch information
LunaUrsa committed Oct 21, 2023
1 parent 27049a1 commit d376aa4
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 28 deletions.
8 changes: 3 additions & 5 deletions src/discord/commands/global/d.testkits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -46,6 +46,4 @@ export const dTestkits: SlashCommand = {
await interaction.editReply({ embeds: [embed] });
return true;
},
};

export default dTestkits;
} as SlashCommand;
39 changes: 17 additions & 22 deletions src/global/commands/g.testkits.ts
Original file line number Diff line number Diff line change
@@ -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<HelpResource[]> {

export default async function testkits():Promise<HelpResource[]> {
return [
{
name: 'DanceSafe',
Expand All @@ -18,13 +22,13 @@ export async function testkits():Promise<HelpResource[]> {
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',
Expand All @@ -36,22 +40,13 @@ export async function testkits():Promise<HelpResource[]> {
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: '',
};
2 changes: 1 addition & 1 deletion src/jest/__tests__/testkits.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d376aa4

Please sign in to comment.