Merge branch 'dev' into 'main'
Added @params to textinputbox events for easier development and typo fix See merge request illegitimate/illegitimate-bot!49
This commit is contained in:
@@ -10,7 +10,7 @@ module.exports = {
|
|||||||
.setType(ApplicationCommandType.Message)
|
.setType(ApplicationCommandType.Message)
|
||||||
.setDefaultMemberPermissions(PermissionFlagsBits.ManageMessages),
|
.setDefaultMemberPermissions(PermissionFlagsBits.ManageMessages),
|
||||||
|
|
||||||
/** @param { import('discord.js').ContextMenuCommandInteraction } interaction */
|
/** @param { import('discord.js').ContextMenuCommandInteraction } interaction */
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ module.exports = {
|
|||||||
.setType(ApplicationCommandType.User)
|
.setType(ApplicationCommandType.User)
|
||||||
.setDefaultMemberPermissions(PermissionFlagsBits.ManageNicknames),
|
.setDefaultMemberPermissions(PermissionFlagsBits.ManageNicknames),
|
||||||
|
|
||||||
/** @param { import('discord.js').ContextMenuCommandInteraction } interaction */
|
/** @param { import('discord.js').ContextMenuCommandInteraction } interaction */
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ module.exports = {
|
|||||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||||
.setDMPermission(false),
|
.setDMPermission(false),
|
||||||
|
|
||||||
/** @param { import('discord.js').ChatInputCommandInteraction } interaction */
|
/** @param { import('discord.js').ChatInputCommandInteraction } interaction */
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ module.exports = {
|
|||||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||||
.setDMPermission(false),
|
.setDMPermission(false),
|
||||||
|
|
||||||
/** @param { import('discord.js').ChatInputCommandInteraction } interaction */
|
/** @param { import('discord.js').ChatInputCommandInteraction } interaction */
|
||||||
|
|
||||||
async execute (interaction) {
|
async execute (interaction) {
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ module.exports = {
|
|||||||
.setRequired(true))
|
.setRequired(true))
|
||||||
.setDMPermission(false),
|
.setDMPermission(false),
|
||||||
|
|
||||||
/** @param { import('discord.js').ChatInputCommandInteraction } interaction */
|
/** @param { import('discord.js').ChatInputCommandInteraction } interaction */
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ module.exports = {
|
|||||||
.setDMPermission(false)
|
.setDMPermission(false)
|
||||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
|
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
|
||||||
|
|
||||||
/** @param { import('discord.js').ChatInputCommandInteraction } interaction */
|
/** @param { import('discord.js').ChatInputCommandInteraction } interaction */
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ module.exports = {
|
|||||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||||
.setDMPermission(false),
|
.setDMPermission(false),
|
||||||
|
|
||||||
/** @param { import('discord.js').ChatInputCommandInteraction } interaction */
|
/** @param { import('discord.js').ChatInputCommandInteraction } interaction */
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ module.exports = {
|
|||||||
.setDMPermission(false)
|
.setDMPermission(false)
|
||||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
|
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
|
||||||
|
|
||||||
/** @param { import('discord.js').ChatInputCommandInteraction } interaction */
|
/** @param { import('discord.js').ChatInputCommandInteraction } interaction */
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
const member1 = interaction.options.getUser('user');
|
const member1 = interaction.options.getUser('user');
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ module.exports = {
|
|||||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||||
.setDMPermission(false),
|
.setDMPermission(false),
|
||||||
|
|
||||||
/** @param { import('discord.js').ChatInputCommandInteraction } interaction */
|
/** @param { import('discord.js').ChatInputCommandInteraction } interaction */
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ module.exports = {
|
|||||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||||
.setDMPermission(false),
|
.setDMPermission(false),
|
||||||
|
|
||||||
/** @param { import('discord.js').ChatInputCommandInteraction } interaction */
|
/** @param { import('discord.js').ChatInputCommandInteraction } interaction */
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ module.exports = {
|
|||||||
.setDescription('Help command')
|
.setDescription('Help command')
|
||||||
.setDMPermission(true),
|
.setDMPermission(true),
|
||||||
|
|
||||||
/** @param { import('discord.js').ChatInputCommandInteraction } interaction */
|
/** @param { import('discord.js').ChatInputCommandInteraction } interaction */
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ module.exports = {
|
|||||||
.setDefaultMemberPermissions(PermissionFlagsBits.KickMembers)
|
.setDefaultMemberPermissions(PermissionFlagsBits.KickMembers)
|
||||||
.setDMPermission(false),
|
.setDMPermission(false),
|
||||||
|
|
||||||
/** @param { import('discord.js').ChatInputCommandInteraction } interaction */
|
/** @param { import('discord.js').ChatInputCommandInteraction } interaction */
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ module.exports = {
|
|||||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||||
.setDMPermission(false),
|
.setDMPermission(false),
|
||||||
|
|
||||||
/** @param { import('discord.js').ChatInputCommandInteraction } interaction */
|
/** @param { import('discord.js').ChatInputCommandInteraction } interaction */
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
const user = interaction.options.getUser('user');
|
const user = interaction.options.getUser('user');
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ module.exports = {
|
|||||||
.setName('reqs')
|
.setName('reqs')
|
||||||
.setDescription('Displays the requirements for the guild.'),
|
.setDescription('Displays the requirements for the guild.'),
|
||||||
|
|
||||||
/** @param { import('discord.js').ChatInputCommandInteraction } interaction */
|
/** @param { import('discord.js').ChatInputCommandInteraction } interaction */
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ module.exports = {
|
|||||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||||
.setDMPermission(false),
|
.setDMPermission(false),
|
||||||
|
|
||||||
/** @param { import('discord.js').ChatInputCommandInteraction } interaction */
|
/** @param { import('discord.js').ChatInputCommandInteraction } interaction */
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ module.exports = {
|
|||||||
.setDefaultMemberPermissions(PermissionFlagsBits.ManageNicknames)
|
.setDefaultMemberPermissions(PermissionFlagsBits.ManageNicknames)
|
||||||
.setDMPermission(false),
|
.setDMPermission(false),
|
||||||
|
|
||||||
/** @param { import('discord.js').ChatInputCommandInteraction } interaction */
|
/** @param { import('discord.js').ChatInputCommandInteraction } interaction */
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
|
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ module.exports = {
|
|||||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||||
.setDMPermission(false),
|
.setDMPermission(false),
|
||||||
|
|
||||||
/** @param { import('discord.js').ChatInputCommandInteraction } interaction */
|
/** @param { import('discord.js').ChatInputCommandInteraction } interaction */
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
const user = interaction.user;
|
const user = interaction.user;
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ module.exports = {
|
|||||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||||
.setDMPermission(false),
|
.setDMPermission(false),
|
||||||
|
|
||||||
/** @param { import('discord.js').ChatInputCommandInteraction } interaction */
|
/** @param { import('discord.js').ChatInputCommandInteraction } interaction */
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ module.exports = {
|
|||||||
.setDescription('Update your guild rank.')
|
.setDescription('Update your guild rank.')
|
||||||
.setDMPermission(false),
|
.setDMPermission(false),
|
||||||
|
|
||||||
/** @param { import('discord.js').ChatInputCommandInteraction } interaction */
|
/** @param { import('discord.js').ChatInputCommandInteraction } interaction */
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ module.exports = {
|
|||||||
.setDescription("Your in-game name."))
|
.setDescription("Your in-game name."))
|
||||||
.setDMPermission(false),
|
.setDMPermission(false),
|
||||||
|
|
||||||
/** @param { import('discord.js').ChatInputCommandInteraction } interaction */
|
/** @param { import('discord.js').ChatInputCommandInteraction } interaction */
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
await interaction.deferReply();
|
await interaction.deferReply();
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ module.exports = {
|
|||||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||||
.setDMPermission(false),
|
.setDMPermission(false),
|
||||||
|
|
||||||
/** @param { import('discord.js').ChatInputCommandInteraction } interaction */
|
/** @param { import('discord.js').ChatInputCommandInteraction } interaction */
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ module.exports = {
|
|||||||
description: 'Check your stats.',
|
description: 'Check your stats.',
|
||||||
type: 'button',
|
type: 'button',
|
||||||
|
|
||||||
|
/** @param {import('discord.js').ButtonInteraction} interaction */
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
|
|
||||||
await interaction.deferReply();
|
await interaction.deferReply();
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ module.exports = {
|
|||||||
description: 'Accept a guild application.',
|
description: 'Accept a guild application.',
|
||||||
type: 'button',
|
type: 'button',
|
||||||
|
|
||||||
|
/** @param {import('discord.js').ButtonInteraction} interaction */
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
|
|
||||||
await interaction.deferReply();
|
await interaction.deferReply();
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ module.exports = {
|
|||||||
description: 'Deny a guild application.',
|
description: 'Deny a guild application.',
|
||||||
type: 'button',
|
type: 'button',
|
||||||
|
|
||||||
|
/** @param {import('discord.js').ButtonInteraction} interaction */
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
|
|
||||||
const modal = new ModalBuilder()
|
const modal = new ModalBuilder()
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ module.exports = {
|
|||||||
description: 'Guild application button.',
|
description: 'Guild application button.',
|
||||||
type: 'button',
|
type: 'button',
|
||||||
|
|
||||||
|
/** @param {import('discord.js').ButtonInteraction} interaction */
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
|
|
||||||
const user = interaction.user;
|
const user = interaction.user;
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ module.exports = {
|
|||||||
description: "Configure the bot.",
|
description: "Configure the bot.",
|
||||||
type: "button",
|
type: "button",
|
||||||
|
|
||||||
|
/** @param {import('discord.js').ButtonInteraction} interaction */
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
const guild = interaction.guild;
|
const guild = interaction.guild;
|
||||||
const user = interaction.user;
|
const user = interaction.user;
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ module.exports = {
|
|||||||
description: "Accept an inactivity application.",
|
description: "Accept an inactivity application.",
|
||||||
type: "button",
|
type: "button",
|
||||||
|
|
||||||
|
/** @param {import('discord.js').ButtonInteraction} interaction */
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
|
|
||||||
await interaction.reply({ content: "This button is currently disabled.", ephemeral: true });
|
await interaction.reply({ content: "This button is currently disabled.", ephemeral: true });
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ module.exports = {
|
|||||||
description: "Denies an inactivity application.",
|
description: "Denies an inactivity application.",
|
||||||
type: "button",
|
type: "button",
|
||||||
|
|
||||||
|
/** @param {import('discord.js').ButtonInteraction} interaction */
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
|
|
||||||
await interaction.reply({ content: "This button is currently disabled.", ephemeral: true });
|
await interaction.reply({ content: "This button is currently disabled.", ephemeral: true });
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ module.exports = {
|
|||||||
description: 'Accept a staff application.',
|
description: 'Accept a staff application.',
|
||||||
type: 'button',
|
type: 'button',
|
||||||
|
|
||||||
|
/** @param {import('discord.js').ButtonInteraction} interaction */
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
|
|
||||||
const user = interaction.user;
|
const user = interaction.user;
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ module.exports = {
|
|||||||
description: 'Deny a guild application.',
|
description: 'Deny a guild application.',
|
||||||
type: 'button',
|
type: 'button',
|
||||||
|
|
||||||
|
/** @param {import('discord.js').ButtonInteraction} interaction */
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
|
|
||||||
const modal = new ModalBuilder()
|
const modal = new ModalBuilder()
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ module.exports = {
|
|||||||
description: 'Apply for the staff team.',
|
description: 'Apply for the staff team.',
|
||||||
type: 'button',
|
type: 'button',
|
||||||
|
|
||||||
|
/** @param {import('discord.js').ButtonInteraction} interaction */
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
|
|
||||||
const user = interaction.user;
|
const user = interaction.user;
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ module.exports = {
|
|||||||
description: 'Configure the bot.',
|
description: 'Configure the bot.',
|
||||||
type: 'button',
|
type: 'button',
|
||||||
|
|
||||||
|
/** @param {import('discord.js').ButtonInteraction} interaction */
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
|
|
||||||
const modal = new ModalBuilder()
|
const modal = new ModalBuilder()
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ module.exports = {
|
|||||||
description: 'Update the waiting list.',
|
description: 'Update the waiting list.',
|
||||||
type: 'button',
|
type: 'button',
|
||||||
|
|
||||||
|
/** @param {import('discord.js').ButtonInteraction} interaction */
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
|
|
||||||
await interaction.deferReply({ ephemeral: true });
|
await interaction.deferReply({ ephemeral: true });
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ module.exports = {
|
|||||||
description: 'Deny reason box.',
|
description: 'Deny reason box.',
|
||||||
type: 'modal',
|
type: 'modal',
|
||||||
|
|
||||||
|
/** @param {import('discord.js').ModalSubmitInteraction} interaction */
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
|
|
||||||
if (interaction.type !== InteractionType.ModalSubmit) return;
|
if (interaction.type !== InteractionType.ModalSubmit) return;
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ module.exports = {
|
|||||||
description: 'Deny reason box.',
|
description: 'Deny reason box.',
|
||||||
type: 'modal',
|
type: 'modal',
|
||||||
|
|
||||||
|
/** @param {import('discord.js').ModalSubmitInteraction} interaction */
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
|
|
||||||
if (interaction.type !== InteractionType.ModalSubmit) return;
|
if (interaction.type !== InteractionType.ModalSubmit) return;
|
||||||
@@ -17,7 +19,6 @@ module.exports = {
|
|||||||
|
|
||||||
interaction.deferReply();
|
interaction.deferReply();
|
||||||
|
|
||||||
const channel = interaction.channel;
|
|
||||||
const guild = interaction.guild;
|
const guild = interaction.guild;
|
||||||
const reason = interaction.fields.fields.get('staffdenyreason').value || "No reason provided";
|
const reason = interaction.fields.fields.get('staffdenyreason').value || "No reason provided";
|
||||||
const embedColor = Number(color.replace("#", "0x"));
|
const embedColor = Number(color.replace("#", "0x"));
|
||||||
|
|||||||
Reference in New Issue
Block a user