Version Estable
This commit is contained in:
22
src/components/buttons/prefixSettings.ts
Normal file
22
src/components/buttons/prefixSettings.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import type {ButtonInteraction} from "discord.js";
|
||||
//@ts-ignore
|
||||
import { ActionRowBuilder, Events, ModalBuilder, TextInputBuilder, TextInputStyle } from 'discord.js'
|
||||
|
||||
export default {
|
||||
customId: "prefixsettings",
|
||||
run: async(interaction: ButtonInteraction) => {
|
||||
const modal = new ModalBuilder()
|
||||
.setCustomId('prefixsettingsmodal')
|
||||
.setTitle('Prefix');
|
||||
|
||||
const prefixInput = new TextInputBuilder()
|
||||
.setCustomId('prefixInput')
|
||||
.setLabel("Change Prefix")
|
||||
.setStyle(TextInputStyle.Short);
|
||||
|
||||
const secondActionRow = new ActionRowBuilder().addComponents(prefixInput);
|
||||
modal.addComponents(secondActionRow);
|
||||
|
||||
await interaction.showModal(modal);
|
||||
}
|
||||
}
|
||||
10
src/components/modals/prefixSettingsModal.ts
Normal file
10
src/components/modals/prefixSettingsModal.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import {ModalSubmitInteraction} from "discord.js";
|
||||
|
||||
export default {
|
||||
customId: "prefixsettingsmodal",
|
||||
run: async (interaction: ModalSubmitInteraction) => {
|
||||
const newPrefix = interaction.fields.getTextInputValue("prefixInput")
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user