diff --git a/src/discord/commands/global/d.help.ts b/src/discord/commands/global/d.help.ts index 5ca83aba8..5f5df6391 100644 --- a/src/discord/commands/global/d.help.ts +++ b/src/discord/commands/global/d.help.ts @@ -93,7 +93,7 @@ const selectMenuOptions = new ActionRowBuilder().addCom ]), ]); -async function startPage():Promise { +export async function startPage():Promise { return { embeds: [ embedTemplate() @@ -120,7 +120,7 @@ async function startPage():Promise { }; } -async function hrPage():Promise { +export async function hrPage():Promise { return { embeds: [ embedTemplate() @@ -244,7 +244,7 @@ async function hrPage():Promise { }; } -async function funPage():Promise { +export async function funPage():Promise { return { embeds: [ embedTemplate() @@ -339,7 +339,7 @@ async function funPage():Promise { }; } -async function sessionsPage():Promise { +export async function sessionsPage():Promise { return { embeds: [embedTemplate() .setColor(Colors.Purple) @@ -351,7 +351,7 @@ async function sessionsPage():Promise { }; } -async function experiencePage():Promise { +export async function experiencePage():Promise { return { embeds: [embedTemplate() .setColor(Colors.Purple) @@ -363,7 +363,7 @@ async function experiencePage():Promise { }; } -async function systemsPage():Promise { +export async function systemsPage():Promise { return { embeds: [embedTemplate() .setColor(Colors.Purple) @@ -398,7 +398,7 @@ async function systemsPage():Promise { }; } -async function tripsitPage():Promise { +export async function tripsitPage():Promise { return { embeds: [ embedTemplate() @@ -476,7 +476,7 @@ async function tripsitPage():Promise { }; } -async function donatePage():Promise { +export async function donatePage():Promise { return { embeds: [embedTemplate() .setColor(Colors.Purple) @@ -511,7 +511,7 @@ async function donatePage():Promise { }; } -async function creditsPage():Promise { +export async function creditsPage():Promise { return { embeds: [embedTemplate() .setColor(Colors.Orange) @@ -522,7 +522,7 @@ async function creditsPage():Promise { }; } -async function feedbackPage():Promise { +export async function feedbackPage():Promise { return { embeds: [embedTemplate() .setColor(Colors.Green) @@ -545,7 +545,7 @@ async function feedbackPage():Promise { }; } -async function invitePage():Promise { +export async function invitePage():Promise { return { embeds: [embedTemplate() .setColor(Colors.Yellow) diff --git a/src/discord/commands/guild/d.donate.ts b/src/discord/commands/guild/d.donate.ts new file mode 100644 index 000000000..c54de152f --- /dev/null +++ b/src/discord/commands/guild/d.donate.ts @@ -0,0 +1,24 @@ +import { + SlashCommandBuilder, +} from 'discord.js'; +import { SlashCommand } from '../../@types/commandDef'; +import commandContext from '../../utils/context'; +import { donatePage } from '../global/d.help'; + +const F = f(__filename); + +export const dDonate: SlashCommand = { + data: new SlashCommandBuilder() + .setName('donate') + .setDescription('Get information on supporting TripSit') + .addBooleanOption(option => option.setName('ephemeral') + .setDescription('Set to "True" to show the response only to you')), + async execute(interaction) { + log.info(F, await commandContext(interaction)); + await interaction.deferReply({ ephemeral: (interaction.options.getBoolean('ephemeral') === true) }); + await interaction.editReply(await donatePage()); + return true; + }, +}; + +export default dDonate;