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