Moved to using an object for execute args
This commit is contained in:
@@ -11,7 +11,7 @@ export = {
|
||||
.setType(ApplicationCommandType.Message)
|
||||
.setDefaultMemberPermissions(PermissionFlagsBits.ManageMessages),
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
const { targetId } = interaction
|
||||
const message = await interaction.channel!.messages.fetch(targetId)
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ export = {
|
||||
.setType(ApplicationCommandType.User)
|
||||
.setDefaultMemberPermissions(PermissionFlagsBits.ManageNicknames),
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
const { targetId } = interaction
|
||||
const target = await interaction.guild!.members.fetch(targetId)
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ export = {
|
||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||
.setDMPermission(false),
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
await interaction.deferReply({ ephemeral: true })
|
||||
|
||||
const targetId = interaction.targetId
|
||||
|
||||
@@ -22,7 +22,7 @@ export = {
|
||||
)
|
||||
.setDMPermission(false),
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
await interaction.deferReply()
|
||||
const query = interaction.options.getString("query")!
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ export = {
|
||||
.setDefaultMemberPermissions(PermissionFlagsBits.BanMembers)
|
||||
.setDMPermission(false),
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
await interaction.deferReply()
|
||||
|
||||
const member = interaction.options.getMember("user") as GuildMember | null
|
||||
|
||||
@@ -17,7 +17,7 @@ export = {
|
||||
.setDescription("Get information about the bot")
|
||||
.setDMPermission(false),
|
||||
|
||||
async execute(interaction, client) {
|
||||
async execute({ interaction, client }) {
|
||||
const { default: prettyMs } = await import("pretty-ms")
|
||||
const castedDeps = dependencies as { [key: string]: string }
|
||||
const castedDevDeps = devDependencies as { [key: string]: string }
|
||||
|
||||
@@ -23,7 +23,7 @@ export = {
|
||||
)
|
||||
.setDMPermission(false),
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
await interaction.deferReply({})
|
||||
|
||||
const ign = interaction.options.getString("ign")!
|
||||
|
||||
@@ -22,7 +22,7 @@ export = {
|
||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||
.setDMPermission(false),
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
await interaction.deferReply({ ephemeral: true })
|
||||
|
||||
const amount = interaction.options.getInteger("amount")!
|
||||
|
||||
@@ -32,7 +32,7 @@ export = {
|
||||
.setDMPermission(false)
|
||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
await interaction.deferReply()
|
||||
|
||||
const setting = interaction.options.getString("setting")
|
||||
|
||||
@@ -39,7 +39,7 @@ export = {
|
||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||
.setDMPermission(false),
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
const subcommand = interaction.options.getSubcommand()
|
||||
|
||||
if (subcommand === "ban") {
|
||||
|
||||
@@ -22,7 +22,7 @@ export = {
|
||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||
.setDMPermission(false),
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
await interaction.deferReply()
|
||||
|
||||
const ign = interaction.options.getString("ign")!
|
||||
|
||||
@@ -25,7 +25,7 @@ export = {
|
||||
.setDMPermission(false)
|
||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
const member = interaction.options.getMember("user") as GuildMember
|
||||
const verifiedUser = await verify.findOne({ userID: member.user.id })
|
||||
const mod = interaction.user
|
||||
|
||||
@@ -25,7 +25,7 @@ export = {
|
||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||
.setDMPermission(false),
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
await interaction.deferReply()
|
||||
|
||||
const user = interaction.options.getMember("user") as GuildMember
|
||||
|
||||
@@ -30,7 +30,7 @@ export = {
|
||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||
.setDMPermission(false),
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
await interaction.deferReply()
|
||||
|
||||
const user = interaction.options.getMember("user") as GuildMember
|
||||
|
||||
@@ -77,7 +77,7 @@ export = {
|
||||
)
|
||||
.setDMPermission(false),
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
const subcommand = interaction.options.getSubcommand()
|
||||
|
||||
if (subcommand === "member") {
|
||||
|
||||
@@ -13,7 +13,7 @@ export = {
|
||||
.setDescription("List's all commands usable by a member")
|
||||
.setDMPermission(false),
|
||||
|
||||
async execute(interaction, client) {
|
||||
async execute({ interaction, client }) {
|
||||
await interaction.deferReply({ ephemeral: true })
|
||||
|
||||
type CommandList = {
|
||||
|
||||
@@ -14,7 +14,7 @@ export = {
|
||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||
.setDMPermission(false),
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
await interaction.reply({
|
||||
embeds: [{
|
||||
title: "Verification",
|
||||
|
||||
@@ -28,7 +28,7 @@ export = {
|
||||
.setDefaultMemberPermissions(PermissionFlagsBits.KickMembers)
|
||||
.setDMPermission(false),
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
await interaction.deferReply()
|
||||
|
||||
const member = interaction.options.getMember("member") as GuildMember
|
||||
|
||||
@@ -71,7 +71,7 @@ export = {
|
||||
.setDMPermission(false)
|
||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
const subcommand = interaction.options.getSubcommand()
|
||||
|
||||
if (subcommand === "play") {
|
||||
|
||||
@@ -13,7 +13,7 @@ export = {
|
||||
.setDescription("Get's the bot's ping.")
|
||||
.setDMPermission(false),
|
||||
|
||||
async execute(interaction, client) {
|
||||
async execute({ interaction, client }) {
|
||||
await interaction.deferReply()
|
||||
await interaction.editReply({
|
||||
embeds: [{
|
||||
|
||||
@@ -20,7 +20,7 @@ export = {
|
||||
)
|
||||
.setDMPermission(false),
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
const user = (interaction.options.getUser("user") || interaction.user) as User
|
||||
let size: number
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ export = {
|
||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||
.setDMPermission(false),
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
await interaction.deferReply()
|
||||
|
||||
const member = interaction.options.getMember("user") as GuildMember
|
||||
|
||||
@@ -14,7 +14,7 @@ export = {
|
||||
.setDescription("Displays the requirements for the guild.")
|
||||
.setDMPermission(false),
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
await interaction.reply({
|
||||
embeds: [{
|
||||
title: "Requirements",
|
||||
|
||||
@@ -26,7 +26,7 @@ export = {
|
||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||
.setDMPermission(false),
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
await interaction.deferReply({ ephemeral: true })
|
||||
|
||||
const message = interaction.options.getString("message")!
|
||||
|
||||
@@ -28,7 +28,7 @@ export = {
|
||||
.setDefaultMemberPermissions(PermissionFlagsBits.ManageNicknames)
|
||||
.setDMPermission(false),
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
const member = interaction.options.getMember("user") as GuildMember
|
||||
const nickname = interaction.options.getString("nickname")
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ export = {
|
||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||
.setDMPermission(false),
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
const subcommand = interaction.options.getSubcommand()
|
||||
const channel = interaction.options.getChannel("channel") as TextChannel
|
||||
let title = ""
|
||||
|
||||
@@ -27,7 +27,7 @@ export = {
|
||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||
.setDMPermission(false),
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
await interaction.deferReply({ ephemeral: true })
|
||||
|
||||
const seconds = interaction.options.getInteger("seconds") ?? 5
|
||||
|
||||
@@ -51,7 +51,7 @@ export = {
|
||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||
.setDMPermission(false),
|
||||
|
||||
async execute(interaction, client) {
|
||||
async execute({ interaction, client }) {
|
||||
const subcommand = interaction.options.getSubcommand()
|
||||
|
||||
if (subcommand === "help") {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { SlashCommandBuilder, PermissionFlagsBits, userMention, ChatInputCommandInteraction, GuildMember } from "discord.js"
|
||||
import { SlashCommandBuilder, PermissionFlagsBits, userMention, GuildMember } from "discord.js"
|
||||
import { embedColor, devMessage } from "config/options"
|
||||
import { ICommand } from "interfaces"
|
||||
import ms from "ms"
|
||||
@@ -34,7 +34,7 @@ export = {
|
||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||
.setDMPermission(false),
|
||||
|
||||
async execute(interaction: ChatInputCommandInteraction) {
|
||||
async execute({ interaction }) {
|
||||
await interaction.deferReply()
|
||||
|
||||
const target = interaction.options.getMember("user")! as GuildMember
|
||||
|
||||
@@ -29,7 +29,7 @@ export = {
|
||||
.setDefaultMemberPermissions(PermissionFlagsBits.BanMembers)
|
||||
.setDMPermission(false),
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
await interaction.deferReply()
|
||||
|
||||
const userid = interaction.options.getString("user")!
|
||||
|
||||
@@ -18,7 +18,7 @@ export = {
|
||||
.setDescription("Update your discord roles.")
|
||||
.setDMPermission(false),
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
await interaction.deferReply()
|
||||
|
||||
const user = interaction.member as GuildMember
|
||||
|
||||
@@ -22,7 +22,7 @@ export = {
|
||||
)
|
||||
.setDMPermission(false),
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
await interaction.deferReply()
|
||||
|
||||
const ign = interaction.options.getString("ign")!
|
||||
|
||||
@@ -27,7 +27,7 @@ export = {
|
||||
)
|
||||
.setDMPermission(false),
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
await interaction.deferReply()
|
||||
|
||||
const user = interaction.member! as GuildMember
|
||||
|
||||
@@ -15,7 +15,7 @@ export = {
|
||||
.setDescription("Get your user info")
|
||||
.setDMPermission(false),
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
await interaction.deferReply()
|
||||
|
||||
const user = interaction.user
|
||||
|
||||
@@ -22,7 +22,7 @@ export = {
|
||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||
.setDMPermission(false),
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
await interaction.deferReply()
|
||||
|
||||
const user = interaction.options.getUser("user")!
|
||||
|
||||
@@ -5,7 +5,7 @@ export = {
|
||||
name: "music",
|
||||
description: "Music",
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
const focusedOption = interaction.options.getFocused(true)
|
||||
if (interaction.options.getSubcommand() !== "play" && focusedOption.name !== "query") return
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ export = {
|
||||
name: "unban",
|
||||
description: "Unban a user from the server",
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
const focusedOption = interaction.options.getFocused(true)
|
||||
if (focusedOption.name !== "user") return
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ export = {
|
||||
name: "checkstats",
|
||||
description: "Check your stats.",
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
await interaction.deferReply()
|
||||
|
||||
const message = interaction.message
|
||||
|
||||
@@ -12,7 +12,7 @@ export = {
|
||||
name: "guildapplicationaccept",
|
||||
description: "Accept a guild application.",
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
await interaction.deferReply()
|
||||
|
||||
const user = interaction.user
|
||||
|
||||
@@ -5,7 +5,7 @@ export = {
|
||||
name: "guildapplicationdeny",
|
||||
description: "Deny a guild application.",
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
const modal = new ModalBuilder()
|
||||
.setTitle("Deny Reason")
|
||||
.setCustomId("denyreasonbox")
|
||||
|
||||
@@ -12,7 +12,7 @@ export = {
|
||||
name: "guildapply",
|
||||
description: "Guild application button.",
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
await interaction.deferReply({ ephemeral: true })
|
||||
const user = interaction.member as GuildMember
|
||||
const guild = interaction.guild!
|
||||
|
||||
@@ -11,7 +11,7 @@ export = {
|
||||
name: "guildinactivitylog",
|
||||
description: "Configure the bot.",
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
const guild = interaction.guild!
|
||||
const user = interaction.member as GuildMember
|
||||
const userRoles = user.roles.cache
|
||||
|
||||
@@ -4,7 +4,7 @@ export = {
|
||||
name: "inactiveapplicationaccept",
|
||||
description: "Accept an inactivity application.",
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
await interaction.reply({
|
||||
content: "This button is currently disabled.",
|
||||
ephemeral: true
|
||||
|
||||
@@ -4,7 +4,7 @@ export = {
|
||||
name: "inactiveapplicationdeny",
|
||||
description: "Denies an inactivity application.",
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
await interaction.reply({
|
||||
content: "This button is currently disabled.",
|
||||
ephemeral: true
|
||||
|
||||
@@ -7,7 +7,7 @@ export = {
|
||||
name: "staffapplicationaccept",
|
||||
description: "Accept a staff application.",
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
await interaction.deferReply()
|
||||
|
||||
const user = interaction.user
|
||||
|
||||
@@ -5,7 +5,7 @@ export = {
|
||||
name: "staffapplicationdeny",
|
||||
description: "Deny a guild application.",
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
const modal = new ModalBuilder()
|
||||
.setTitle("Deny Reason")
|
||||
.setCustomId("staffdenyreasonbox")
|
||||
|
||||
@@ -14,7 +14,7 @@ export = {
|
||||
name: "staffapply",
|
||||
description: "Apply for the staff team.",
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
const user = interaction.member as GuildMember
|
||||
const guild = interaction.guild!
|
||||
const userRoles = user.roles.cache
|
||||
|
||||
@@ -5,7 +5,7 @@ export = {
|
||||
name: "verify",
|
||||
description: "Configure the bot.",
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
const modal = new ModalBuilder()
|
||||
.setTitle("Verification")
|
||||
.setCustomId("verifybox")
|
||||
|
||||
@@ -7,7 +7,7 @@ export = {
|
||||
name: "waitinglistupdate",
|
||||
description: "Update the waiting list.",
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
await interaction.deferReply({ ephemeral: true })
|
||||
|
||||
const user = interaction.user
|
||||
|
||||
@@ -7,7 +7,7 @@ export = {
|
||||
name: "denyreasonbox",
|
||||
description: "Deny reason box.",
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
await interaction.deferReply()
|
||||
|
||||
const guild = interaction.guild!
|
||||
|
||||
@@ -7,7 +7,7 @@ export = {
|
||||
name: "staffdenyreasonbox",
|
||||
description: "Deny reason box.",
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
await interaction.deferReply()
|
||||
|
||||
const guild = interaction.guild
|
||||
|
||||
@@ -10,7 +10,7 @@ export = {
|
||||
name: "verifybox",
|
||||
description: "Verify box.",
|
||||
|
||||
async execute(interaction) {
|
||||
async execute({ interaction }) {
|
||||
await interaction.deferReply({ ephemeral: true })
|
||||
|
||||
const user = interaction.member as GuildMember
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
import { AutocompleteInteraction } from "discord.js"
|
||||
import { ExtendedClient } from "utils/Client"
|
||||
|
||||
export default interface IAutocomplete {
|
||||
name: string
|
||||
description: string
|
||||
execute: (interacion: AutocompleteInteraction) => Promise<void>
|
||||
execute: (arg: { interaction: AutocompleteInteraction, client :ExtendedClient }) => Promise<void>
|
||||
}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
import { ButtonInteraction } from "discord.js"
|
||||
import { ExtendedClient } from "utils/Client"
|
||||
|
||||
export default interface IButton {
|
||||
name: string
|
||||
description: string
|
||||
execute: (interaction: ButtonInteraction) => Promise<void>
|
||||
execute: (arg: { interaction: ButtonInteraction, client: ExtendedClient }) => Promise<void>
|
||||
}
|
||||
|
||||
@@ -9,5 +9,5 @@ export default interface ICommand {
|
||||
public: boolean
|
||||
subcommands?: boolean
|
||||
data: SlashCommandBuilder
|
||||
execute: (interaction: ChatInputCommandInteraction, client: Client) => Promise<void>
|
||||
execute: (arg: { interaction: ChatInputCommandInteraction, client: Client }) => Promise<void>
|
||||
}
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
import {
|
||||
ContextMenuCommandInteraction,
|
||||
ContextMenuCommandBuilder
|
||||
} from "discord.js"
|
||||
import { ContextMenuCommandInteraction, ContextMenuCommandBuilder } from "discord.js"
|
||||
import { ExtendedClient } from "utils/Client"
|
||||
|
||||
export default interface IContextMenu {
|
||||
name: string
|
||||
description: string
|
||||
dev?: boolean
|
||||
data: ContextMenuCommandBuilder
|
||||
execute: (interaction: ContextMenuCommandInteraction) => Promise<void>
|
||||
execute: (arg: { interaction: ContextMenuCommandInteraction, client: ExtendedClient }) => Promise<void>
|
||||
}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
import { ModalSubmitInteraction } from "discord.js"
|
||||
import { ExtendedClient } from "utils/Client"
|
||||
|
||||
export default interface IModal {
|
||||
name: string
|
||||
description: string
|
||||
execute: (interaction: ModalSubmitInteraction) => Promise<void>
|
||||
execute: (arg: { interaction: ModalSubmitInteraction, client: ExtendedClient }) => Promise<void>
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ export default function loadAutocompleteEvents(client: Client, ft: FileType) {
|
||||
}
|
||||
|
||||
try {
|
||||
await autocomplete.execute(interaction)
|
||||
await autocomplete.execute({ interaction, client })
|
||||
} catch (error) {
|
||||
if (process.env.NODE_ENV !== "dev") {
|
||||
await logToChannel("error", {
|
||||
|
||||
@@ -40,7 +40,7 @@ export default function loadButtonEvents(client: Client, ft: FileType) {
|
||||
}
|
||||
|
||||
try {
|
||||
await button.execute(interaction)
|
||||
await button.execute({ interaction, client })
|
||||
} catch (error) {
|
||||
if (process.env.NODE_ENV !== "dev") {
|
||||
await logToChannel("error", {
|
||||
|
||||
@@ -43,7 +43,7 @@ export default function loadSlashCommandsEvents(client: Client, ft: FileType) {
|
||||
}
|
||||
|
||||
try {
|
||||
await command.execute(interaction, client)
|
||||
await command.execute({ interaction, client })
|
||||
} catch (error) {
|
||||
if (process.env.NODE_ENV !== "dev") {
|
||||
await logToChannel("error", {
|
||||
|
||||
@@ -41,7 +41,7 @@ export default function loadContextMenuEvents(client: Client, ft: FileType) {
|
||||
}
|
||||
|
||||
try {
|
||||
await command.execute(interaction)
|
||||
await command.execute({ interaction, client })
|
||||
} catch (error) {
|
||||
if (process.env.NODE_ENV !== "dev") {
|
||||
await logToChannel("error", {
|
||||
|
||||
@@ -40,7 +40,7 @@ export default function loadModalEvents(client: Client, ft: FileType) {
|
||||
}
|
||||
|
||||
try {
|
||||
await modal.execute(interaction)
|
||||
await modal.execute({ interaction, client })
|
||||
} catch (error) {
|
||||
if (process.env.NODE_ENV !== "dev") {
|
||||
await logToChannel("error", {
|
||||
|
||||
Reference in New Issue
Block a user