Merge branch 'dev' into 'main'
Dev See merge request illegitimate/illegitimate-bot!310
This commit is contained in:
@@ -24,7 +24,7 @@ export default {
|
||||
.setContexts(InteractionContextType.Guild),
|
||||
|
||||
async execute({ interaction }) {
|
||||
await interaction.deferReply({})
|
||||
await interaction.deferReply()
|
||||
|
||||
const ign = interaction.options.getString("ign")!
|
||||
|
||||
@@ -39,7 +39,7 @@ export default {
|
||||
if (!uuid) {
|
||||
interaction.editReply({
|
||||
embeds: [{
|
||||
description: "That player doesn't exist.",
|
||||
description: "<a:questionmark_pink:1130206038008803488> That player does not exist.",
|
||||
color: embedColor
|
||||
}]
|
||||
})
|
||||
@@ -58,7 +58,7 @@ export default {
|
||||
if (!player) {
|
||||
interaction.editReply({
|
||||
embeds: [{
|
||||
description: "That player hasn't played Hypixel before.",
|
||||
description: "<a:questionmark_pink:1130206038008803488> That player hasn't played Hypixel before.",
|
||||
color: embedColor
|
||||
}]
|
||||
})
|
||||
|
||||
@@ -20,11 +20,13 @@ export default {
|
||||
option
|
||||
.setName("user")
|
||||
.setDescription("The user to force verify.")
|
||||
.setRequired(true)
|
||||
)
|
||||
.addStringOption(option =>
|
||||
option
|
||||
.setName("ign")
|
||||
.setDescription("The user's in-game name.")
|
||||
.setRequired(true)
|
||||
)
|
||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||
.setContexts(InteractionContextType.Guild),
|
||||
@@ -32,8 +34,8 @@ export default {
|
||||
async execute({ interaction }) {
|
||||
await interaction.deferReply()
|
||||
|
||||
const user = interaction.options.getMember("user") as GuildMember
|
||||
const ign = interaction.options.getString("ign")
|
||||
const user = interaction.options.getMember("user")! as GuildMember
|
||||
const ign = interaction.options.getString("ign")!
|
||||
const mod = interaction.user
|
||||
|
||||
const verifyData = await db.query.verifies.findFirst({
|
||||
@@ -44,19 +46,6 @@ export default {
|
||||
return
|
||||
}
|
||||
|
||||
if (!user) {
|
||||
interaction.editReply(
|
||||
"Please provide a user to force verify.\n" +
|
||||
"This can also mean the user is not in the server."
|
||||
)
|
||||
return
|
||||
}
|
||||
|
||||
if (!ign) {
|
||||
interaction.editReply("Please provide a player's IGN.")
|
||||
return
|
||||
}
|
||||
|
||||
const username = user.user.username
|
||||
const modName = mod.username
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ export default async function guildInfo(interaction: ChatInputCommandInteraction
|
||||
if (!uuid) {
|
||||
interaction.editReply({
|
||||
embeds: [{
|
||||
description: "That player doen't exist!",
|
||||
description: "<a:questionmark_pink:1130206038008803488> That player does not exist.",
|
||||
color: embedColor
|
||||
}]
|
||||
})
|
||||
@@ -41,7 +41,7 @@ export default async function guildInfo(interaction: ChatInputCommandInteraction
|
||||
if (!player) {
|
||||
interaction.editReply({
|
||||
embeds: [{
|
||||
description: "That player has never joined the server!",
|
||||
description: "<a:questionmark_pink:1130206038008803488> That player hasn't played Hypixel before.",
|
||||
color: embedColor
|
||||
}]
|
||||
})
|
||||
|
||||
@@ -19,7 +19,7 @@ export default async function guildMember(interaction: ChatInputCommandInteracti
|
||||
if (!uuid) {
|
||||
interaction.editReply({
|
||||
embeds: [{
|
||||
description: "This user does not exist",
|
||||
description: "<a:questionmark_pink:1130206038008803488> That player does not exist.",
|
||||
color: embedColor
|
||||
}]
|
||||
})
|
||||
@@ -38,7 +38,7 @@ export default async function guildMember(interaction: ChatInputCommandInteracti
|
||||
if (!player) {
|
||||
await interaction.editReply({
|
||||
embeds: [{
|
||||
description: "This user never logged on to hypixel",
|
||||
description: "<a:questionmark_pink:1130206038008803488> That player hasn't played Hypixel before.",
|
||||
color: embedColor,
|
||||
thumbnail: {
|
||||
url: head!
|
||||
|
||||
@@ -25,7 +25,7 @@ export default async function guildTop(interaction: ChatInputCommandInteraction)
|
||||
if (!uuid) {
|
||||
interaction.editReply({
|
||||
embeds: [{
|
||||
description: "That player doen't exist!",
|
||||
description: "<a:questionmark_pink:1130206038008803488> That player does not exist.",
|
||||
color: embedColor
|
||||
}]
|
||||
})
|
||||
@@ -43,7 +43,7 @@ export default async function guildTop(interaction: ChatInputCommandInteraction)
|
||||
if (!player) {
|
||||
interaction.editReply({
|
||||
embeds: [{
|
||||
description: "That player has never joined the server!",
|
||||
description: "<a:questionmark_pink:1130206038008803488> That player hasn't played Hypixel before.",
|
||||
color: embedColor
|
||||
}]
|
||||
})
|
||||
|
||||
@@ -26,7 +26,6 @@ export default {
|
||||
option
|
||||
.setName("reason")
|
||||
.setDescription("The reason for removing the user.")
|
||||
.setRequired(false)
|
||||
)
|
||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||
.setContexts(InteractionContextType.Guild),
|
||||
|
||||
@@ -8,11 +8,6 @@ export default async function beast(interaction: ChatInputCommandInteraction): P
|
||||
|
||||
const ign = interaction.options.getString("ign")!
|
||||
|
||||
if (!ign) {
|
||||
await interaction.editReply("Please provide a player's IGN.")
|
||||
return
|
||||
}
|
||||
|
||||
await interaction.editReply({
|
||||
embeds: [{
|
||||
description: "Fetching your uuid...",
|
||||
@@ -24,7 +19,7 @@ export default async function beast(interaction: ChatInputCommandInteraction): P
|
||||
if (!uuid) {
|
||||
interaction.editReply({
|
||||
embeds: [{
|
||||
description: "That player doesn't exist.",
|
||||
description: "<a:questionmark_pink:1130206038008803488> That player does not exist.",
|
||||
color: embedColor
|
||||
}]
|
||||
})
|
||||
@@ -43,7 +38,7 @@ export default async function beast(interaction: ChatInputCommandInteraction): P
|
||||
if (!player) {
|
||||
interaction.editReply({
|
||||
embeds: [{
|
||||
description: "That player hasn't played Hypixel before.",
|
||||
description: "<a:questionmark_pink:1130206038008803488> That player hasn't played Hypixel before.",
|
||||
color: embedColor
|
||||
}]
|
||||
})
|
||||
|
||||
@@ -35,7 +35,7 @@ export default async function removeGuildRoles(interaction: ChatInputCommandInte
|
||||
|
||||
const hypixelGuildMembers = guildData.members.map(gmember => gmember.uuid)
|
||||
|
||||
const verifiedUsers = await db.query.verifies.findMany({})
|
||||
const verifiedUsers = await db.query.verifies.findMany()
|
||||
|
||||
for (const gmember of guildMembers) {
|
||||
const gmemberuuid = verifiedUsers.find(user => user.userID === gmember.id)?.uuid
|
||||
|
||||
@@ -31,7 +31,7 @@ export default {
|
||||
if (!uuid) {
|
||||
interaction.editReply({
|
||||
embeds: [{
|
||||
description: "That player doesn't exist!",
|
||||
description: "<a:questionmark_pink:1130206038008803488> That player does not exist.",
|
||||
color: embedColor
|
||||
}]
|
||||
})
|
||||
|
||||
@@ -41,16 +41,6 @@ export default {
|
||||
return
|
||||
}
|
||||
|
||||
if (!ign) {
|
||||
interaction.editReply({
|
||||
embeds: [{
|
||||
description: "<a:cross_a:1087808606897983539> Please provide your in-game name.",
|
||||
color: embedColor
|
||||
}]
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
await interaction.editReply({
|
||||
embeds: [{
|
||||
description: "Fetching your uuid...",
|
||||
|
||||
@@ -23,7 +23,7 @@ export default {
|
||||
if (!player) {
|
||||
interaction.editReply({
|
||||
embeds: [{
|
||||
description: "That player hasn't played Hypixel before.",
|
||||
description: "<a:questionmark_pink:1130206038008803488> That player hasn't played Hypixel before.",
|
||||
color: embedColor
|
||||
}]
|
||||
})
|
||||
|
||||
@@ -50,7 +50,7 @@ export default async function autoDeployCommands(fileType: FileType, client: Ext
|
||||
|
||||
client.on("ready", async (c) => {
|
||||
const guildclient = c.guilds.cache.get(env.dev.guildid)!
|
||||
const currentCommands = await guildclient.commands.fetch({})
|
||||
const currentCommands = await guildclient.commands.fetch()
|
||||
if (!currentCommands) return
|
||||
|
||||
const currentCommandsData = currentCommands.map(command => {
|
||||
|
||||
@@ -59,7 +59,7 @@ export default async function applicationQuestions(
|
||||
if (!uuid) {
|
||||
await user.send({
|
||||
embeds: [{
|
||||
description: "That is not a valid Minecraft username.\n" +
|
||||
description: "<a:questionmark_pink:1130206038008803488> That player does not exist." +
|
||||
"Application cancelled.",
|
||||
color: embedColor
|
||||
}]
|
||||
|
||||
Reference in New Issue
Block a user