Compare commits
3 Commits
f88e14b34a
...
b83da1f86b
Author | SHA1 | Date | |
---|---|---|---|
b83da1f86b | |||
67afb2bf27 | |||
6a7544409b |
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,5 +3,4 @@ node_modules
|
|||||||
.env
|
.env
|
||||||
.env.*
|
.env.*
|
||||||
!.env.example
|
!.env.example
|
||||||
commands/examples
|
|
||||||
docs
|
docs
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
|
|
||||||
- Create a new repository from this template.
|
- Create a new repository from this template.
|
||||||
- Remove example commands:
|
- Remove example commands:
|
||||||
- Either permanently delete directory `commands/examples/`
|
- Either permanently delete directory `commands/examples/`
|
||||||
- Or move `commands/examples/` elsewhere, commit deletion, add to [`.gitignore`](.gitignore) and move back in
|
- Or move `commands/examples/` elsewhere, commit deletion, add to [`.gitignore`](.gitignore) and move back in
|
||||||
- Look through, copy and/or modify the [examples](commands/examples/).
|
- Look through, copy and/or modify the [examples](commands/examples/).
|
||||||
- Either read a [guide](https://discordjs.guide/)!
|
- Either read a [guide](https://discordjs.guide/)!
|
||||||
- Or read the [docs](https://discord.js.org/docs)!
|
- Or read the [docs](https://discord.js.org/docs)!
|
||||||
|
@ -9,9 +9,11 @@ import {
|
|||||||
export const data = new SlashCommandBuilder()
|
export const data = new SlashCommandBuilder()
|
||||||
.setName('login')
|
.setName('login')
|
||||||
.setDescription('Opens a login pop-up.');
|
.setDescription('Opens a login pop-up.');
|
||||||
|
/** @param {ModalSubmitInteraction} interaction */
|
||||||
export async function modalSubmit(interaction) {
|
export async function modalSubmit(interaction) {
|
||||||
await interaction.reply({ content: 'Successfully submitted Form!', ephemeral: true });
|
await interaction.reply({ content: 'Successfully submitted Form!', ephemeral: true });
|
||||||
}
|
}
|
||||||
|
/** @param {ChatInputCommandInteraction} interaction */
|
||||||
export async function execute(interaction) {
|
export async function execute(interaction) {
|
||||||
const modal = new ModalBuilder().setCustomId('login-modal').setTitle('Login Form');
|
const modal = new ModalBuilder().setCustomId('login-modal').setTitle('Login Form');
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { SlashCommandBuilder } from 'discord.js';
|
import { SlashCommandBuilder } from 'discord.js';
|
||||||
|
|
||||||
export const data = new SlashCommandBuilder().setName('ping').setDescription('Replies with Pong!');
|
export const data = new SlashCommandBuilder().setName('ping').setDescription('Replies with Pong!');
|
||||||
|
/** @param {ChatInputCommandInteraction} interaction */
|
||||||
export async function execute(interaction) {
|
export async function execute(interaction) {
|
||||||
await interaction.reply({ content: 'Pong!', ephemeral: true });
|
await interaction.reply({ content: 'Pong!', ephemeral: true });
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import {
|
import {
|
||||||
|
ChatInputCommandInteraction,
|
||||||
ActionRowBuilder,
|
ActionRowBuilder,
|
||||||
ComponentType,
|
ComponentType,
|
||||||
RoleSelectMenuBuilder,
|
RoleSelectMenuBuilder,
|
||||||
@ -9,6 +10,7 @@ export const data = new SlashCommandBuilder()
|
|||||||
.setName('role')
|
.setName('role')
|
||||||
.setDMPermission(false)
|
.setDMPermission(false)
|
||||||
.setDescription('Provides a role selector.');
|
.setDescription('Provides a role selector.');
|
||||||
|
/** @param {ChatInputCommandInteraction} interaction */
|
||||||
export async function execute(interaction) {
|
export async function execute(interaction) {
|
||||||
const roles = await interaction.guild.roles.fetch();
|
const roles = await interaction.guild.roles.fetch();
|
||||||
const choices = roles.filter((r) => r.name.startsWith('test')).map((r) => r.id);
|
const choices = roles.filter((r) => r.name.startsWith('test')).map((r) => r.id);
|
||||||
|
Loading…
Reference in New Issue
Block a user