Fixed formatting on all command files
This commit is contained in:
@@ -1,9 +1,4 @@
|
||||
import {
|
||||
SlashCommandBuilder,
|
||||
PermissionFlagsBits,
|
||||
userMention,
|
||||
GuildMember
|
||||
} from "discord.js"
|
||||
import { SlashCommandBuilder, PermissionFlagsBits, userMention, GuildMember } from "discord.js"
|
||||
import { admin, helper } from "config/roles.json"
|
||||
import { color, devMessage } from "config/options.json"
|
||||
import { Command } from "interfaces"
|
||||
@@ -36,8 +31,7 @@ export = {
|
||||
await interaction.deferReply()
|
||||
|
||||
const member = interaction.options.getMember("member") as GuildMember
|
||||
const reason =
|
||||
interaction.options.getString("reason") ?? "No reason provided."
|
||||
const reason = interaction.options.getString("reason") ?? "No reason provided."
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
const mod = await interaction.guild!.members.fetch(interaction.user.id)
|
||||
@@ -45,9 +39,7 @@ export = {
|
||||
const modRoles = mod.roles.cache.map(role => role.id)
|
||||
|
||||
if (!modRoles.includes(helper) && !modRoles.includes(admin)) {
|
||||
await interaction.editReply(
|
||||
"You do not have permission to use this command."
|
||||
)
|
||||
await interaction.editReply("You do not have permission to use this command.")
|
||||
return
|
||||
}
|
||||
|
||||
@@ -79,54 +71,44 @@ export = {
|
||||
await member.kick(reason + ` - ${mod.user.username}`)
|
||||
|
||||
await logToChannel("mod", {
|
||||
embeds: [
|
||||
{
|
||||
author: {
|
||||
name: mod.user.username,
|
||||
icon_url: mod.user.avatarURL() || undefined
|
||||
},
|
||||
title: "Member Kicked",
|
||||
description: `
|
||||
embeds: [{
|
||||
author: {
|
||||
name: mod.user.username,
|
||||
icon_url: mod.user.avatarURL() || undefined
|
||||
},
|
||||
title: "Member Kicked",
|
||||
description: `
|
||||
**User:** ${userMention(member.user.id)}
|
||||
**Mod:** ${userMention(mod.user.id)}
|
||||
**Reason:** ${reason}
|
||||
`,
|
||||
color: embedColor,
|
||||
thumbnail: {
|
||||
url: mod.user.avatarURL() || ""
|
||||
},
|
||||
footer: {
|
||||
text: "ID: " + member.user.id,
|
||||
icon_url: member.user.avatarURL() || undefined
|
||||
},
|
||||
timestamp: new Date().toISOString()
|
||||
}
|
||||
]
|
||||
color: embedColor,
|
||||
thumbnail: {
|
||||
url: mod.user.avatarURL() || ""
|
||||
},
|
||||
footer: {
|
||||
text: "ID: " + member.user.id,
|
||||
icon_url: member.user.avatarURL() || undefined
|
||||
},
|
||||
timestamp: new Date().toISOString()
|
||||
}]
|
||||
})
|
||||
|
||||
await interaction.editReply({
|
||||
embeds: [
|
||||
{
|
||||
title: "Member Kicked",
|
||||
description:
|
||||
"**User:** " +
|
||||
userMention(member.user.id) +
|
||||
"\n" +
|
||||
"**Reason:** " +
|
||||
reason +
|
||||
"\n" +
|
||||
"**Moderator:** " +
|
||||
mod.user.username,
|
||||
color: embedColor,
|
||||
thumbnail: {
|
||||
url: member.user.avatarURL() || ""
|
||||
},
|
||||
footer: {
|
||||
icon_url: interaction.guild!.iconURL() || undefined,
|
||||
text: interaction.guild!.name + " | " + devMessage
|
||||
}
|
||||
embeds: [{
|
||||
title: "Member Kicked",
|
||||
description: "**User:** " + userMention(member.user.id) + "\n" +
|
||||
"**Reason:** " + reason + "\n" +
|
||||
"**Moderator:** " + mod.user.username,
|
||||
color: embedColor,
|
||||
thumbnail: {
|
||||
url: member.user.avatarURL() || ""
|
||||
},
|
||||
footer: {
|
||||
icon_url: interaction.guild!.iconURL() || undefined,
|
||||
text: interaction.guild!.name + " | " + devMessage
|
||||
}
|
||||
]
|
||||
}]
|
||||
})
|
||||
}
|
||||
} as Command
|
||||
|
||||
Reference in New Issue
Block a user