Compare commits

..

3 Commits

Author SHA1 Message Date
b83da1f86b proper JSDoc typing in examples 2024-03-25 02:14:08 +01:00
67afb2bf27 bugfix: don't ignore examples in template 2024-03-25 01:57:12 +01:00
6a7544409b refactor: auto format 2024-03-25 01:55:46 +01:00
5 changed files with 7 additions and 3 deletions

1
.gitignore vendored
View File

@ -3,5 +3,4 @@ node_modules
.env
.env.*
!.env.example
commands/examples
docs

View File

@ -9,9 +9,11 @@ import {
export const data = new SlashCommandBuilder()
.setName('login')
.setDescription('Opens a login pop-up.');
/** @param {ModalSubmitInteraction} interaction */
export async function modalSubmit(interaction) {
await interaction.reply({ content: 'Successfully submitted Form!', ephemeral: true });
}
/** @param {ChatInputCommandInteraction} interaction */
export async function execute(interaction) {
const modal = new ModalBuilder().setCustomId('login-modal').setTitle('Login Form');

View File

@ -1,6 +1,7 @@
import { SlashCommandBuilder } from 'discord.js';
export const data = new SlashCommandBuilder().setName('ping').setDescription('Replies with Pong!');
/** @param {ChatInputCommandInteraction} interaction */
export async function execute(interaction) {
await interaction.reply({ content: 'Pong!', ephemeral: true });
}

View File

@ -1,4 +1,5 @@
import {
ChatInputCommandInteraction,
ActionRowBuilder,
ComponentType,
RoleSelectMenuBuilder,
@ -9,6 +10,7 @@ export const data = new SlashCommandBuilder()
.setName('role')
.setDMPermission(false)
.setDescription('Provides a role selector.');
/** @param {ChatInputCommandInteraction} interaction */
export async function execute(interaction) {
const roles = await interaction.guild.roles.fetch();
const choices = roles.filter((r) => r.name.startsWith('test')).map((r) => r.id);