1 |
import { BanOptions, CommandInteraction, EmojiIdentifierResolvable, GuildMember, Interaction, Message, TextChannel, User } from 'discord.js'; |
import { BanOptions, CommandInteraction, EmojiIdentifierResolvable, GuildMember, Interaction, Message, TextChannel, User } from 'discord.js'; |
2 |
import BaseCommand from '../../utils/structures/BaseCommand'; |
import BaseCommand from '../../utils/structures/BaseCommand'; |
3 |
import DiscordClient from '../../client/Client'; |
import DiscordClient from '../../client/Client'; |
|
import CommandOptions from '../../types/CommandOptions'; |
|
4 |
import InteractionOptions from '../../types/InteractionOptions'; |
import InteractionOptions from '../../types/InteractionOptions'; |
|
import MessageEmbed from '../../client/MessageEmbed'; |
|
|
import getUser from '../../utils/getUser'; |
|
|
import getMember from '../../utils/getMember'; |
|
|
import History from '../../automod/History'; |
|
|
import { fetchEmoji } from '../../utils/Emoji'; |
|
5 |
import { Modal, ModalSubmitInteraction, showModal, TextInputComponent } from 'discord-modals'; |
import { Modal, ModalSubmitInteraction, showModal, TextInputComponent } from 'discord-modals'; |
6 |
import PunishmentAppeal from '../../models/PunishmentAppeal'; |
import PunishmentAppeal from '../../models/PunishmentAppeal'; |
7 |
|
|
20 |
await PunishmentAppeal.create({ |
await PunishmentAppeal.create({ |
21 |
user_id: interaction.member.id, |
user_id: interaction.member.id, |
22 |
guild_id: interaction.guild!.id, |
guild_id: interaction.guild!.id, |
23 |
content |
content, |
24 |
|
createdAt: new Date() |
25 |
}); |
}); |
26 |
|
|
27 |
await interaction.reply({ |
await interaction.reply({ |
33 |
|
|
34 |
async run(client: DiscordClient, interaction: CommandInteraction, options: InteractionOptions) { |
async run(client: DiscordClient, interaction: CommandInteraction, options: InteractionOptions) { |
35 |
const existingData = await PunishmentAppeal.findOne({ |
const existingData = await PunishmentAppeal.findOne({ |
36 |
where: { |
user_id: interaction.member!.user.id, |
37 |
user_id: interaction.member!.user.id, |
guild_id: interaction.guild!.id |
|
guild_id: interaction.guild!.id |
|
|
} |
|
38 |
}); |
}); |
39 |
|
|
40 |
if (!existingData) { |
if (!existingData) { |