Formatted all files using clang

This commit is contained in:
2023-09-01 06:53:45 +02:00
parent dc3525a524
commit 9787b0e14a
37 changed files with 1708 additions and 1717 deletions

View File

@@ -7,63 +7,63 @@ const fetch = require("axios");
const { getExactLevel, skywarsLevel, getLevelForExp } = require("../utils/functions.js");
module.exports = {
name: "check",
description: "Check a player's stats.",
type: "slash",
name: "check",
description: "Check a player's stats.",
type: "slash",
data: new SlashCommandBuilder()
.setName("check")
.setDescription("Check a player's stats.")
.addStringOption((option) => option.setName("ign")
.setDescription("The player's IGN.")
.setRequired(true))
.setDMPermission(false),
data: new SlashCommandBuilder()
.setName("check")
.setDescription("Check a player's stats.")
.addStringOption((option) => option.setName("ign")
.setDescription("The player's IGN.")
.setRequired(true))
.setDMPermission(false),
async execute(interaction) {
await interaction.deferReply({});
async execute(interaction) {
await interaction.deferReply({});
const ign = interaction.options.getString("ign");
const mojang = "https://api.mojang.com/users/profiles/minecraft/";
const hypixel = "https://api.hypixel.net/player"
const guildAPI = "https://api.hypixel.net/guild"
const minotar = "https://minotar.net/helm/";
const embedColor = Number(color.replace("#", "0x"));
const head = minotar + ign;
const ign = interaction.options.getString("ign");
const mojang = "https://api.mojang.com/users/profiles/minecraft/";
const hypixel = "https://api.hypixel.net/player"
const guildAPI = "https://api.hypixel.net/guild"
const minotar = "https://minotar.net/helm/";
const embedColor = Number(color.replace("#", "0x"));
const head = minotar + ign;
if (!ign) {
await interaction.editReply("Please provide a player's IGN.");
return;
}
if (!ign) {
await interaction.editReply("Please provide a player's IGN.");
return;
}
try {
await fetch(mojang + ign);
} catch (error) {
interaction.editReply({
embeds: [
{ description: "That player doesn't exist.", color: embedColor }
]
});
return;
}
try {
await fetch(mojang + ign);
} catch (error) {
interaction.editReply({
embeds: [
{ description: "That player doesn't exist.", color: embedColor }
]
});
return;
}
const userCheck = await fetch(mojang + ign);
const uuid = userCheck.data.id;
const userCheck = await fetch(mojang + ign);
const uuid = userCheck.data.id;
const player = hypixel + "?key=" + hypixelApiKey + "&uuid=" + uuid
const stats = await fetch(player);
const player = hypixel + "?key=" + hypixelApiKey + "&uuid=" + uuid
const stats = await fetch(player);
if (!stats.data.player) {
interaction.editReply({
embeds: [{
description: "That player hasn't played Hypixel before.",
color: embedColor
}]
});
return;
}
if (!stats.data.player) {
interaction.editReply({
embeds: [{
description: "That player hasn't played Hypixel before.",
color: embedColor
}]
});
return;
}
const rank2 = stats.data.player.newPackageRank;
const monthlyRank = stats.data.player.monthlyPackageRank;
const rank2 = stats.data.player.newPackageRank;
const monthlyRank = stats.data.player.monthlyPackageRank;
if (rank2 === 'VIP') {
var rank = "[VIP] "
@@ -77,128 +77,128 @@ module.exports = {
var rank = "[MVP++] "
}
const guild = guildAPI + "?key=" + hypixelApiKey + "&player=" + uuid
const guildCheck = await fetch(guild);
const guild = guildAPI + "?key=" + hypixelApiKey + "&player=" + uuid
const guildCheck = await fetch(guild);
if (!guildCheck.data.guild) {
var guildName = "None";
} else {
var guildName = guildCheck.data.guild.name;
}
if (!guildCheck.data.guild) {
var guildName = "None";
} else {
var guildName = guildCheck.data.guild.name;
}
if (!guildCheck.data.guild) {
var guildTag = ""
} else if (!guildCheck.data.guild.tag) {
var guildTag = ""
} else {
var guildTag = " [" + guildCheck.data.guild.tag + "]"
}
if (!guildCheck.data.guild) {
var guildTag = ""
} else if (!guildCheck.data.guild.tag) {
var guildTag = ""
} else {
var guildTag = " [" + guildCheck.data.guild.tag + "]"
}
//bedwars level
const hsbwexp = stats.data.player.stats.Bedwars.Experience;
const hsbwstars = getLevelForExp(hsbwexp);
// bedwars fkdr
const hsbwfk = stats.data.player.stats.Bedwars.final_kills_bedwars;
const hsbwfd = stats.data.player.stats.Bedwars.final_deaths_bedwars;
const hsbwfkdr = hsbwfk / hsbwfd;
// bedwars wins
const hsbwwins = stats.data.player.stats.Bedwars.wins_bedwars;
// skywars level
const hsswexp = stats.data.player.stats.SkyWars.skywars_experience;
const hsswstars = skywarsLevel(hsswexp);
// skywars kdr
const hsswkills = stats.data.player.stats.SkyWars.kills;
const hsswdeaths = stats.data.player.stats.SkyWars.deaths;
const hsswkd = hsswkills / hsswdeaths;
//skywars wins
const hsswwins = stats.data.player.stats.SkyWars.wins;
// dueks kdr
const hsduelskills = stats.data.player.stats.Duels.kills
const hsduelsdeaths = stats.data.player.stats.Duels.deaths
const hsduelskd = hsduelskills / hsduelsdeaths
// duels wins
const hsduelswins = stats.data.player.stats.Duels.wins;
// duels wlr
const hsduelslosses = stats.data.player.stats.Duels.losses;
const hsduelswlr = hsduelswins / hsduelslosses;
// network level
const hypixelExp = stats.data.player.networkExp;
const level = getExactLevel(hypixelExp);
if (hsbwstars < bwstars || hsbwfkdr < bwfkdr || hsbwwins < bwwins) {
var bwtitle =
"<a:cross_a:1087808606897983539> This player does not meet the BedWars requirements.";
} else {
var bwtitle =
"<a:check_a:1087808632172847134> This player meets the BedWars requirements.";
}
//bedwars level
const hsbwexp = stats.data.player.stats.Bedwars.Experience;
const hsbwstars = getLevelForExp(hsbwexp);
// bedwars fkdr
const hsbwfk = stats.data.player.stats.Bedwars.final_kills_bedwars;
const hsbwfd = stats.data.player.stats.Bedwars.final_deaths_bedwars;
const hsbwfkdr = hsbwfk / hsbwfd;
// bedwars wins
const hsbwwins = stats.data.player.stats.Bedwars.wins_bedwars;
// skywars level
const hsswexp = stats.data.player.stats.SkyWars.skywars_experience;
const hsswstars = skywarsLevel(hsswexp);
// skywars kdr
const hsswkills = stats.data.player.stats.SkyWars.kills;
const hsswdeaths = stats.data.player.stats.SkyWars.deaths;
const hsswkd = hsswkills / hsswdeaths;
//skywars wins
const hsswwins = stats.data.player.stats.SkyWars.wins;
// dueks kdr
const hsduelskills = stats.data.player.stats.Duels.kills
const hsduelsdeaths = stats.data.player.stats.Duels.deaths
const hsduelskd = hsduelskills / hsduelsdeaths
// duels wins
const hsduelswins = stats.data.player.stats.Duels.wins;
// duels wlr
const hsduelslosses = stats.data.player.stats.Duels.losses;
const hsduelswlr = hsduelswins / hsduelslosses;
// network level
const hypixelExp = stats.data.player.networkExp;
const level = getExactLevel(hypixelExp);
if (hsswstars < swstars) {
var swtitle =
"<a:cross_a:1087808606897983539> This player does not meet the SkyWars requirements.";
} else {
var swtitle =
"<a:check_a:1087808632172847134> This player meets the SkyWars requirements.";
}
if (hsbwstars < bwstars || hsbwfkdr < bwfkdr || hsbwwins < bwwins) {
var bwtitle =
"<a:cross_a:1087808606897983539> This player does not meet the BedWars requirements.";
} else {
var bwtitle =
"<a:check_a:1087808632172847134> This player meets the BedWars requirements.";
}
if (hsduelswins < duelswins || hsduelswlr < duelswlr) {
var duelstitle =
"<a:cross_a:1087808606897983539> This player does not meet the Duels requirements.";
} else {
var duelstitle =
"<a:check_a:1087808632172847134> This player meets the Duels requirements.";
}
if (hsswstars < swstars) {
var swtitle =
"<a:cross_a:1087808606897983539> This player does not meet the SkyWars requirements.";
} else {
var swtitle =
"<a:check_a:1087808632172847134> This player meets the SkyWars requirements.";
}
await interaction.editReply({
embeds: [{
title: rank + stats.data.player.displayname + guildTag,
description: "**Network Level:** `" +
level.toFixed(2).toString() + "`\n" +
"**Current Guild:** `" + guildName + "`",
color: embedColor,
thumbnail: { url: head },
footer: {
text: interaction.guild.name + " | Developed by @Taken#0002",
icon_url: interaction.guild.iconURL()
},
fields: [
{
name: bwtitle,
value: "**➺ Stars:** `" +
hsbwstars.toFixed(2).toString() + " / " +
bwstars.toString() + "`\n" +
"**➺ FKDR:** `" +
hsbwfkdr.toFixed(2).toString() +
" / " + bwfkdr.toString() + "`\n" +
"**➺ Wins:** `" +
hsbwwins.toString() + " / " +
bwwins.toString() + "`"
},
{
name: swtitle,
value:
"**➺ Stars:** `" +
hsswstars.toFixed(2).toString() +
" / " + swstars.toString() + "`\n" +
"**➺ KDR:** `" +
hsswkd.toFixed(2).toString() +
"`\n" +
"**➺ Wins:** `" +
hsswwins.toString() + "`"
},
{
name: duelstitle,
value: "**➺ Wins:** `" +
hsduelswins.toString() +
" / " + duelswins.toString() + "`\n" +
if (hsduelswins < duelswins || hsduelswlr < duelswlr) {
var duelstitle =
"<a:cross_a:1087808606897983539> This player does not meet the Duels requirements.";
} else {
var duelstitle =
"<a:check_a:1087808632172847134> This player meets the Duels requirements.";
}
await interaction.editReply({
embeds: [{
title: rank + stats.data.player.displayname + guildTag,
description: "**Network Level:** `" +
level.toFixed(2).toString() + "`\n" +
"**Current Guild:** `" + guildName + "`",
color: embedColor,
thumbnail: { url: head },
footer: {
text: interaction.guild.name + " | Developed by @Taken#0002",
icon_url: interaction.guild.iconURL()
},
fields: [
{
name: bwtitle,
value: "**➺ Stars:** `" +
hsbwstars.toFixed(2).toString() + " / " +
bwstars.toString() + "`\n" +
"**➺ FKDR:** `" +
hsbwfkdr.toFixed(2).toString() +
" / " + bwfkdr.toString() + "`\n" +
"**➺ Wins:** `" +
hsbwwins.toString() + " / " +
bwwins.toString() + "`"
},
{
name: swtitle,
value:
"**➺ Stars:** `" +
hsswstars.toFixed(2).toString() +
" / " + swstars.toString() + "`\n" +
"**➺ KDR:** `" +
hsswkd.toFixed(2).toString() +
"`\n" +
"**➺ Wins:** `" +
hsswwins.toString() + "`"
},
{
name: duelstitle,
value: "**➺ Wins:** `" +
hsduelswins.toString() +
" / " + duelswins.toString() + "`\n" +
"**➺ WLR:** `" +
hsduelswlr.toFixed(2).toString() +
hsduelswlr.toFixed(2).toString() +
" / " + duelswlr.toString() + "`\n" +
"**➺ KDR:** `" +
hsduelskd.toFixed(2).toString() + "`"
}
]
}]
});
}
hsduelskd.toFixed(2).toString() + "`"
}
]
}]
});
}
};

View File

@@ -2,218 +2,218 @@ const { SlashCommandBuilder, PermissionFlagsBits, ButtonBuilder, ActionRowBuilde
const { color } = require("../config/options.json");
module.exports = {
name: "config",
description: "Configure the bot.",
type: "slash",
name: "config",
description: "Configure the bot.",
type: "slash",
data: new SlashCommandBuilder()
.setName("config")
.setDescription("Configure the bot.")
.addSubcommand((subcommand) =>
subcommand
.setName("sendguildapplication")
.setDescription("Send the application message to a channel.")
.addChannelOption((option) =>
option
.setName("channel")
.setDescription("The channel to send the application to.")
.setRequired(true))
)
.addSubcommand((subcommand) =>
subcommand
.setName("sendstaffapplication")
.setDescription("Send the application message to a channel.")
.addChannelOption((option) =>
option
.setName("channel")
.setDescription("The channel to send the application to.")
.setRequired(true)))
.addSubcommand((subcommand) =>
data: new SlashCommandBuilder()
.setName("config")
.setDescription("Configure the bot.")
.addSubcommand((subcommand) =>
subcommand
.setName("sendverfiymessage")
.setDescription("Send the verfiy message to a channel.")
.addChannelOption((option) =>
.setName("sendguildapplication")
.setDescription("Send the application message to a channel.")
.addChannelOption((option) =>
option
.setName("channel")
.setDescription("The channel to send the verfiy message to.")
.setRequired(true)))
.addSubcommand((subcommand) =>
.setName("channel")
.setDescription("The channel to send the application to.")
.setRequired(true))
)
.addSubcommand((subcommand) =>
subcommand
.setName("sendwaitinglistmessage")
.setDescription("Send the waiting list message to a channel.")
.addChannelOption((option) =>
.setName("sendstaffapplication")
.setDescription("Send the application message to a channel.")
.addChannelOption((option) =>
option
.setName("channel")
.setDescription("The channel to send the waiting list message to.")
.setRequired(true)))
.addSubcommand((subcommand) =>
subcommand
.setName("sendinactivityapplication")
.setDescription("Send the application message to a channel.")
.addChannelOption((option) =>
option
.setName("channel")
.setDescription("The channel to send the application to.")
.setRequired(true)))
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
.setDMPermission(false),
.setName("channel")
.setDescription("The channel to send the application to.")
.setRequired(true)))
.addSubcommand((subcommand) =>
subcommand
.setName("sendverfiymessage")
.setDescription("Send the verfiy message to a channel.")
.addChannelOption((option) =>
option
.setName("channel")
.setDescription("The channel to send the verfiy message to.")
.setRequired(true)))
.addSubcommand((subcommand) =>
subcommand
.setName("sendwaitinglistmessage")
.setDescription("Send the waiting list message to a channel.")
.addChannelOption((option) =>
option
.setName("channel")
.setDescription("The channel to send the waiting list message to.")
.setRequired(true)))
.addSubcommand((subcommand) =>
subcommand
.setName("sendinactivityapplication")
.setDescription("Send the application message to a channel.")
.addChannelOption((option) =>
option
.setName("channel")
.setDescription("The channel to send the application to.")
.setRequired(true)))
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
.setDMPermission(false),
async execute(interaction) {
const user = interaction.user;
const guild = interaction.guild;
const subcommand = interaction.options.getSubcommand();
const embedColor = Number(color.replace("#", "0x"));
async execute(interaction) {
const user = interaction.user;
const guild = interaction.guild;
const subcommand = interaction.options.getSubcommand();
const embedColor = Number(color.replace("#", "0x"));
if (subcommand === "sendguildapplication") {
const channel = interaction.options.getChannel("channel");
if (subcommand === "sendguildapplication") {
const channel = interaction.options.getChannel("channel");
await channel.send({
embeds: [
{
title: "Guild Application",
description: "You can apply for the guild by clicking the button below.",
color: embedColor,
footer: {
text: interaction.guild.name + " | Developed by @Taken#0002",
iconURL: interaction.guild.iconURL({ dynamic: true })
},
thumbnail: {
url: interaction.guild.iconURL({ dynamic: true })
}
}
],
components: [
new ActionRowBuilder()
.addComponents(new ButtonBuilder()
.setCustomId("guildapply")
.setLabel("Apply")
.setStyle(ButtonStyle.Primary)
.setEmoji({ name: "✅" }))
]
});
await interaction.reply({ content: "Message sent", ephemeral: true });
}
await channel.send({
embeds: [
{
title: "Guild Application",
description: "You can apply for the guild by clicking the button below.",
color: embedColor,
footer: {
text: interaction.guild.name + " | Developed by @Taken#0002",
iconURL: interaction.guild.iconURL({ dynamic: true })
},
thumbnail: {
url: interaction.guild.iconURL({ dynamic: true })
}
}
],
components: [
new ActionRowBuilder()
.addComponents(new ButtonBuilder()
.setCustomId("guildapply")
.setLabel("Apply")
.setStyle(ButtonStyle.Primary)
.setEmoji({ name: "✅" }))
]
});
await interaction.reply({ content: "Message sent", ephemeral: true });
}
if (subcommand === "sendstaffapplication") {
const channel = interaction.options.getChannel("channel");
if (subcommand === "sendstaffapplication") {
const channel = interaction.options.getChannel("channel");
await channel.send({
embeds: [
{
title: "Staff Application",
description: "You can apply for the staff team by clicking the button below.",
color: embedColor,
footer: {
text: interaction.guild.name + " | Developed by @Taken#0002",
iconURL: interaction.guild.iconURL({ dynamic: true })
},
thumbnail: {
url: interaction.guild.iconURL({ dynamic: true })
}
}
],
components: [
new ActionRowBuilder()
.addComponents(new ButtonBuilder()
.setCustomId("staffapply")
.setLabel("Apply")
.setStyle(ButtonStyle.Primary)
.setEmoji({ name: "✅" }))
]
});
await channel.send({
embeds: [
{
title: "Staff Application",
description: "You can apply for the staff team by clicking the button below.",
color: embedColor,
footer: {
text: interaction.guild.name + " | Developed by @Taken#0002",
iconURL: interaction.guild.iconURL({ dynamic: true })
},
thumbnail: {
url: interaction.guild.iconURL({ dynamic: true })
}
}
],
components: [
new ActionRowBuilder()
.addComponents(new ButtonBuilder()
.setCustomId("staffapply")
.setLabel("Apply")
.setStyle(ButtonStyle.Primary)
.setEmoji({ name: "✅" }))
]
});
await interaction.reply({ content: "Message sent", ephemeral: true });
}
await interaction.reply({ content: "Message sent", ephemeral: true });
}
if (subcommand === "sendinactivityapplication") {
const channel = interaction.options.getChannel("channel");
if (subcommand === "sendinactivityapplication") {
const channel = interaction.options.getChannel("channel");
await channel.send({
embeds: [
{
title: "Inactivity Log",
description: "You can send an inactivity log by clicking the button below.",
color: embedColor,
footer: {
text: interaction.guild.name + " | Developed by @Taken#0002",
iconURL: interaction.guild.iconURL({ dynamic: true })
},
thumbnail: {
url: interaction.guild.iconURL({ dynamic: true })
}
}
],
components: [
new ActionRowBuilder()
.addComponents(new ButtonBuilder()
.setCustomId("guildinactivitylog")
.setLabel("Submit")
.setStyle(ButtonStyle.Primary)
.setEmoji({ name: "✅" }))
]
});
await channel.send({
embeds: [
{
title: "Inactivity Log",
description: "You can send an inactivity log by clicking the button below.",
color: embedColor,
footer: {
text: interaction.guild.name + " | Developed by @Taken#0002",
iconURL: interaction.guild.iconURL({ dynamic: true })
},
thumbnail: {
url: interaction.guild.iconURL({ dynamic: true })
}
}
],
components: [
new ActionRowBuilder()
.addComponents(new ButtonBuilder()
.setCustomId("guildinactivitylog")
.setLabel("Submit")
.setStyle(ButtonStyle.Primary)
.setEmoji({ name: "✅" }))
]
});
await interaction.reply({ content: "Message sent", ephemeral: true });
}
await interaction.reply({ content: "Message sent", ephemeral: true });
}
if (subcommand === "sendverfiymessage") {
const channel = interaction.options.getChannel("channel");
await channel.send({
embeds: [{
title: "Verification",
description: "You can verify by clicking the button below.",
color: embedColor,
footer: {
text: interaction.guild.name + " | Developed by @Taken#0002",
iconURL: interaction.guild.iconURL({ dynamic: true })
},
thumbnail: {
url: interaction.guild.iconURL({ dynamic: true })
}
}],
components: [
new ActionRowBuilder()
.addComponents(new ButtonBuilder()
.setCustomId("verifybutton")
.setLabel("Verify")
.setStyle(ButtonStyle.Primary)
.setEmoji({ name: "✅" }))
]
});
await interaction.reply({ content: "Message sent", ephemeral: true });
await channel.send({
embeds: [{
title: "Verification",
description: "You can verify by clicking the button below.",
color: embedColor,
footer: {
text: interaction.guild.name + " | Developed by @Taken#0002",
iconURL: interaction.guild.iconURL({ dynamic: true })
},
thumbnail: {
url: interaction.guild.iconURL({ dynamic: true })
}
}],
components: [
new ActionRowBuilder()
.addComponents(new ButtonBuilder()
.setCustomId("verifybutton")
.setLabel("Verify")
.setStyle(ButtonStyle.Primary)
.setEmoji({ name: "✅" }))
]
});
await interaction.reply({ content: "Message sent", ephemeral: true });
}
if (subcommand === "sendwaitinglistmessage") {
const channel = interaction.options.getChannel("channel");
if (subcommand === "sendwaitinglistmessage") {
const channel = interaction.options.getChannel("channel");
await channel.send({
embeds: [{
title: "Waiting List",
description: "The people below were accepted into the guild\n" +
"Try to invite them in order.",
color: embedColor,
footer: {
text: interaction.guild.name + " | Developed by @Taken#0002",
iconURL: interaction.guild.iconURL({ dynamic: true })
},
thumbnail: {
url: interaction.guild.iconURL({ dynamic: true })
}
}],
components: [
new ActionRowBuilder()
.addComponents(new ButtonBuilder()
.setCustomId("waitinglistupdate")
.setLabel("Update")
.setStyle(ButtonStyle.Primary)
.setEmoji({ name: "🔄" }))
]
});
await interaction.reply({ content: "Message sent", ephemeral: true });
}
await channel.send({
embeds: [{
title: "Waiting List",
description: "The people below were accepted into the guild\n" +
"Try to invite them in order.",
color: embedColor,
footer: {
text: interaction.guild.name + " | Developed by @Taken#0002",
iconURL: interaction.guild.iconURL({ dynamic: true })
},
thumbnail: {
url: interaction.guild.iconURL({ dynamic: true })
}
}],
components: [
new ActionRowBuilder()
.addComponents(new ButtonBuilder()
.setCustomId("waitinglistupdate")
.setLabel("Update")
.setStyle(ButtonStyle.Primary)
.setEmoji({ name: "🔄" }))
]
});
await interaction.reply({ content: "Message sent", ephemeral: true });
}
}
};
}
};

View File

@@ -104,4 +104,4 @@ module.exports = {
}
}
};
};

View File

@@ -3,7 +3,7 @@ const { color } = require("../config/options.json");
const verify = require("../schemas/verifySchema.js");
const mongoose = require("mongoose");
const { gm, manager, moderator, beast, member, trialmember, guildRole, guildStaff, defaultMember } = require("../config/roles.json");
const removeThese = [ gm, manager, moderator, beast, member, trialmember, guildRole, guildStaff, defaultMember ]
const removeThese = [gm, manager, moderator, beast, member, trialmember, guildRole, guildStaff, defaultMember]
module.exports = {
name: "forceunverify",
@@ -38,7 +38,7 @@ module.exports = {
}
await verify.findOneAndDelete({ userID: member1.id })
await member.roles.remove(removeThese)
await interaction.reply({

View File

@@ -15,7 +15,7 @@ module.exports = {
data: new SlashCommandBuilder()
.setName('forceupdate')
.setDescription('Force update the user')
.addUserOption(option =>
.addUserOption(option =>
option
.setName('user')
.setDescription('The user to force update')
@@ -53,236 +53,236 @@ module.exports = {
}
const mojangAPI = "https://api.mojang.com/user/profile/"
const guildlAPI = "https://api.hypixel.net/guild"
const guildlAPI = "https://api.hypixel.net/guild"
const minotar = "https://minotar.net/helm/";
const guild = guildlAPI + "?key=" + hypixelAPIKey + "&player=" + verifyData.uuid;
const guild = guildlAPI + "?key=" + hypixelAPIKey + "&player=" + verifyData.uuid;
const userCheck = await fetch(mojangAPI + verifyData.uuid);
const guildCheck = await fetch(guild);
const head = minotar + userCheck.data.name;
if (!guildCheck.data.guild) {
var responseGuildID = null
} else {
var responseGuildID = guildCheck.data.guild._id
}
if (!guildCheck.data.guild) {
var responseGuildID = null
} else {
var responseGuildID = guildCheck.data.guild._id
}
if (responseGuildID !== hypixelGuildID) {
for (let i = 0; i < removeThese.length; i++) {
await roleManage.remove(removeThese[i], "Auto role removal. (Force Update)")
}
for (let i = 0; i < removeThese.length; i++) {
await roleManage.remove(removeThese[i], "Auto role removal. (Force Update)")
}
await interaction.editReply({
embeds: [{
description: usermentioned + " was given the the Default Member role.",
color: embedColor,
thumbnail: {
url: head
},
footer: {
text: interaction.guild.name + " | Developed by @Taken#0002",
icon_url: interaction.guild.iconURL({ dynamic: true })
}
}]
})
await roleManage.add(defaultMember)
return
}
await interaction.editReply({
embeds: [{
description: usermentioned + " was given the the Default Member role.",
color: embedColor,
thumbnail: {
url: head
},
footer: {
text: interaction.guild.name + " | Developed by @Taken#0002",
icon_url: interaction.guild.iconURL({ dynamic: true })
}
}]
})
await roleManage.add(defaultMember)
return
}
if (responseGuildID === hypixelGuildID) {
if (responseGuildID === hypixelGuildID) {
const GuildMembers = guildCheck.data.guild.members;
const guildRank = GuildMembers.find(member => member.uuid === verifyData.uuid).rank;
const GuildMembers = guildCheck.data.guild.members;
const guildRank = GuildMembers.find(member => member.uuid === verifyData.uuid).rank;
if (guildRank === 'Guild Master') {
if (guildRank === 'Guild Master') {
for (let i = 0; i < removeThese.length; i++) {
await roleManage.remove(removeThese[i], "Auto role removal. (Force Update)")
}
for (let i = 0; i < removeThese.length; i++) {
await roleManage.remove(removeThese[i], "Auto role removal. (Force Update)")
}
await roleManage.add(guildRole, "User was force updated.")
await roleManage.add(guildStaff, "User was force updated.")
await roleManage.add(gm, "User was force updated.")
await roleManage.add(defaultMember, "User was force updated.")
await roleManage.add(guildRole, "User was force updated.")
await roleManage.add(guildStaff, "User was force updated.")
await roleManage.add(gm, "User was force updated.")
await roleManage.add(defaultMember, "User was force updated.")
await interaction.editReply({
embeds: [{
description: usermentioned + "'s rank has been updated to `Guild Master`",
color: embedColor,
thumbnail: {
url: head
},
footer: {
text: interaction.guild.name + " | Developed by @Taken#0002",
icon_url: interaction.guild.iconURL({ dynamic: true })
}
}]
})
}
await interaction.editReply({
embeds: [{
description: usermentioned + "'s rank has been updated to `Guild Master`",
color: embedColor,
thumbnail: {
url: head
},
footer: {
text: interaction.guild.name + " | Developed by @Taken#0002",
icon_url: interaction.guild.iconURL({ dynamic: true })
}
}]
})
}
if (guildRank === 'Manager') {
if (guildRank === 'Manager') {
for (let i = 0; i < removeThese.length; i++) {
await roleManage.remove(removeThese[i], "Auto role removal. (Force Update)")
}
for (let i = 0; i < removeThese.length; i++) {
await roleManage.remove(removeThese[i], "Auto role removal. (Force Update)")
}
await roleManage.add(guildRole, "User was force updated.")
await roleManage.add(guildStaff, "User was force updated.")
await roleManage.add(manager, "User was force updated.")
await roleManage.add(defaultMember, "User was force updated.")
await roleManage.add(guildRole, "User was force updated.")
await roleManage.add(guildStaff, "User was force updated.")
await roleManage.add(manager, "User was force updated.")
await roleManage.add(defaultMember, "User was force updated.")
await interaction.editReply({
embeds: [{
description: usermentioned + "'s rank has been updated to `Manager`",
color: embedColor,
thumbnail: {
url: head
},
footer: {
text: interaction.guild.name + " | Developed by @Taken#0002",
icon_url: interaction.guild.iconURL({ dynamic: true })
}
}]
})
}
await interaction.editReply({
embeds: [{
description: usermentioned + "'s rank has been updated to `Manager`",
color: embedColor,
thumbnail: {
url: head
},
footer: {
text: interaction.guild.name + " | Developed by @Taken#0002",
icon_url: interaction.guild.iconURL({ dynamic: true })
}
}]
})
}
if (guildRank === 'Moderator') {
if (guildRank === 'Moderator') {
for (let i = 0; i < removeThese.length; i++) {
await roleManage.remove(removeThese[i], "Auto role removal. (Force Update)")
}
for (let i = 0; i < removeThese.length; i++) {
await roleManage.remove(removeThese[i], "Auto role removal. (Force Update)")
}
await roleManage.add(guildRole, "User was force updated.")
await roleManage.add(guildStaff, "User was force updated.")
await roleManage.add(moderator, "User was force updated.")
await roleManage.add(defaultMember, "User was force updated.")
await roleManage.add(guildRole, "User was force updated.")
await roleManage.add(guildStaff, "User was force updated.")
await roleManage.add(moderator, "User was force updated.")
await roleManage.add(defaultMember, "User was force updated.")
await interaction.editReply({
embeds: [{
description: usermentioned + "'s rank has been updated to `Moderator`",
color: embedColor,
thumbnail: {
url: head
},
footer: {
text: interaction.guild.name + " | Developed by @Taken#0002",
icon_url: interaction.guild.iconURL({ dynamic: true })
}
}]
})
await interaction.editReply({
embeds: [{
description: usermentioned + "'s rank has been updated to `Moderator`",
color: embedColor,
thumbnail: {
url: head
},
footer: {
text: interaction.guild.name + " | Developed by @Taken#0002",
icon_url: interaction.guild.iconURL({ dynamic: true })
}
}]
})
}
}
if (guildRank === 'Beast') {
if (guildRank === 'Beast') {
for (let i = 0; i < removeThese.length; i++) {
await roleManage.remove(removeThese[i], "Auto role removal. (Force Update)")
}
for (let i = 0; i < removeThese.length; i++) {
await roleManage.remove(removeThese[i], "Auto role removal. (Force Update)")
}
await roleManage.add(guildRole, "User was force updated.")
await roleManage.add(beast, "User was force updated.")
await roleManage.add(defaultMember, "User was force updated.")
await roleManage.add(guildRole, "User was force updated.")
await roleManage.add(beast, "User was force updated.")
await roleManage.add(defaultMember, "User was force updated.")
await interaction.editReply({
embeds: [{
description: usermentioned + "'s rank has been updated to `Beast`.",
color: embedColor,
thumbnail: {
url: head
},
footer: {
text: interaction.guild.name + " | Developed by @Taken#0002",
icon_url: interaction.guild.iconURL({ dynamic: true })
}
}]
})
return
}
await interaction.editReply({
embeds: [{
description: usermentioned + "'s rank has been updated to `Beast`.",
color: embedColor,
thumbnail: {
url: head
},
footer: {
text: interaction.guild.name + " | Developed by @Taken#0002",
icon_url: interaction.guild.iconURL({ dynamic: true })
}
}]
})
return
}
if (guildRank === 'Elite') {
if (guildRank === 'Elite') {
for (let i = 0; i < removeThese.length; i++) {
await roleManage.remove(removeThese[i], "Auto role removal. (Force Update)")
}
for (let i = 0; i < removeThese.length; i++) {
await roleManage.remove(removeThese[i], "Auto role removal. (Force Update)")
}
await roleManage.add(guildRole, "User was force updated.")
await roleManage.add(elite, "User was force updated.")
await roleManage.add(defaultMember, "User was force updated.")
await roleManage.add(guildRole, "User was force updated.")
await roleManage.add(elite, "User was force updated.")
await roleManage.add(defaultMember, "User was force updated.")
await interaction.editReply({
embeds: [{
description: usermentioned + "'s rank has been updated to `Elite`.",
color: embedColor,
thumbnail: {
url: head
},
footer: {
text: interaction.guild.name + " | Developed by @Taken#0002",
icon_url: interaction.guild.iconURL({ dynamic: true })
}
}]
})
return
}
await interaction.editReply({
embeds: [{
description: usermentioned + "'s rank has been updated to `Elite`.",
color: embedColor,
thumbnail: {
url: head
},
footer: {
text: interaction.guild.name + " | Developed by @Taken#0002",
icon_url: interaction.guild.iconURL({ dynamic: true })
}
}]
})
return
}
if (guildRank === 'Member') {
if (guildRank === 'Member') {
for (let i = 0; i < removeThese.length; i++) {
await roleManage.remove(removeThese[i], "Auto role removal. (Force Update)")
}
for (let i = 0; i < removeThese.length; i++) {
await roleManage.remove(removeThese[i], "Auto role removal. (Force Update)")
}
await roleManage.add(guildRole, "User was force updated.")
await roleManage.add(member, "User was force updated.")
await roleManage.add(defaultMember, "User was force updated.")
await roleManage.add(guildRole, "User was force updated.")
await roleManage.add(member, "User was force updated.")
await roleManage.add(defaultMember, "User was force updated.")
await interaction.editReply({
embeds: [{
description: usermentioned + "'s rank has been updated to `Member`.",
color: embedColor,
thumbnail: {
url: head
},
footer: {
text: interaction.guild.name + " | Developed by @Taken#0002",
icon_url: interaction.guild.iconURL({ dynamic: true })
}
}]
})
return
}
await interaction.editReply({
embeds: [{
description: usermentioned + "'s rank has been updated to `Member`.",
color: embedColor,
thumbnail: {
url: head
},
footer: {
text: interaction.guild.name + " | Developed by @Taken#0002",
icon_url: interaction.guild.iconURL({ dynamic: true })
}
}]
})
return
}
if (guildRank === 'Trial Member') {
if (guildRank === 'Trial Member') {
for (let i = 0; i < removeThese.length; i++) {
await roleManage.remove(removeThese[i], "Auto role removal. (Force Update)")
}
for (let i = 0; i < removeThese.length; i++) {
await roleManage.remove(removeThese[i], "Auto role removal. (Force Update)")
}
await roleManage.add(guildRole, "User was force updated.")
await roleManage.add(trialmember, "User was force updated.")
await roleManage.add(defaultMember, "User was force updated.")
await roleManage.add(guildRole, "User was force updated.")
await roleManage.add(trialmember, "User was force updated.")
await roleManage.add(defaultMember, "User was force updated.")
await interaction.editReply({
embeds: [{
description: usermentioned + "'s rank has been updated to `Trial Member`.",
color: embedColor,
thumbnail: {
url: head
},
footer: {
text: interaction.guild.name + " | Developed by @Taken#0002",
icon_url: interaction.guild.iconURL({ dynamic: true })
}
}]
})
return
}
}
await interaction.editReply({
embeds: [{
description: usermentioned + "'s rank has been updated to `Trial Member`.",
color: embedColor,
thumbnail: {
url: head
},
footer: {
text: interaction.guild.name + " | Developed by @Taken#0002",
icon_url: interaction.guild.iconURL({ dynamic: true })
}
}]
})
return
}
}
}
}
}

View File

@@ -4,7 +4,7 @@ const hypixelApiKey = process.env.HYPIXELAPIKEY;
const fetch = require('axios');
const { color, hypixelGuildID } = require('../config/options.json');
const verify = require('../schemas/verifySchema.js')
const {mongoose} = require('mongoose');
const { mongoose } = require('mongoose');
const { gm, manager, moderator, beast, elite, member, trialmember, guildRole, guildStaff, defaultMember } = require('../config/roles.json');
@@ -16,7 +16,7 @@ module.exports = {
data: new SlashCommandBuilder()
.setName('forceverify')
.setDescription('Force verify a user.')
.addUserOption(option =>
.addUserOption(option =>
option
.setName('user')
.setDescription('The user to force verify.'))
@@ -26,7 +26,7 @@ module.exports = {
.setDescription('The user\'s in-game name.'))
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
.setDMPermission(false),
async execute(interaction) {
await interaction.deferReply();
@@ -35,7 +35,7 @@ module.exports = {
const user = interaction.guild.members.cache.get(user1.id);
const ign = interaction.options.getString('ign');
const mod = interaction.user
// const slothPixel = "https://api.slothpixel.me/api/players/";
// const guildAPI = "https://api.slothpixel.me/api/guilds/"
@@ -90,7 +90,7 @@ module.exports = {
const hypixelCheck = await fetch(player);
if (!hypixelCheck.data.player) {
if (!hypixelCheck.data.player) {
interaction.editReply({
embeds: [{
description: "<a:questionmark_pink:1130206038008803488> That player hasn't played Hypixel before.",
@@ -98,7 +98,7 @@ module.exports = {
}]
});
return;
}
}
const guildCheck = await fetch(guild)
@@ -109,50 +109,50 @@ module.exports = {
}
if (responseGuildID === hypixelGuildID) {
const GuildMembers = guildCheck.data.guild.members;
const guildRank = GuildMembers.find(member => member.uuid === hypixelCheck.data.player.uuid).rank;
const GuildMembers = guildCheck.data.guild.members;
const guildRank = GuildMembers.find(member => member.uuid === hypixelCheck.data.player.uuid).rank;
if (guildRank === "Guild Master") {
await user.roles.add(gm, "User was force verified by " + modName);
await user.roles.add(guildRole, "User was force verified by " + modName)
await user.roles.add(guildStaff, "User was force verified by " + modName)
}
if (guildRank === "Guild Master") {
await user.roles.add(gm, "User was force verified by " + modName);
await user.roles.add(guildRole, "User was force verified by " + modName)
await user.roles.add(guildStaff, "User was force verified by " + modName)
}
if (guildRank === "Manager") {
await user.roles.add(manager, "User was force verified by " + modName);
await user.roles.add(guildRole, "User was force verified by " + modName)
await user.roles.add(guildStaff, "User was force verified by " + modName)
}
if (guildRank === "Manager") {
await user.roles.add(manager, "User was force verified by " + modName);
await user.roles.add(guildRole, "User was force verified by " + modName)
await user.roles.add(guildStaff, "User was force verified by " + modName)
}
if (guildRank === "Moderator") {
await user.roles.add(moderator, "User was force verified by " + modName);
await user.roles.add(guildRole, "User was force verified by " + modName)
await user.roles.add(guildStaff, "User was force verified by " + modName)
}
if (guildRank === "Moderator") {
await user.roles.add(moderator, "User was force verified by " + modName);
await user.roles.add(guildRole, "User was force verified by " + modName)
await user.roles.add(guildStaff, "User was force verified by " + modName)
}
if (guildRank === "Beast") {
await user.roles.add(beast, "User was force verified by " + modName);
await user.roles.add(guildRole, "User was force verified by " + modName)
}
if (guildRank === "Beast") {
await user.roles.add(beast, "User was force verified by " + modName);
await user.roles.add(guildRole, "User was force verified by " + modName)
}
if (guildRank === "Elite") {
await user.roles.add(elite, "User was force verified by " + modName);
await user.roles.add(guildRole, "User was force verified by " + modName)
}
if (guildRank === "Elite") {
await user.roles.add(elite, "User was force verified by " + modName);
await user.roles.add(guildRole, "User was force verified by " + modName)
}
if (guildRank === "Member") {
await user.roles.add(member, "User was force verified by " + modName);
await user.roles.add(guildRole, "User was force verified by " + modName)
}
if (guildRank === "Member") {
await user.roles.add(member, "User was force verified by " + modName);
await user.roles.add(guildRole, "User was force verified by " + modName)
}
if (guildRank === "Trial Member") {
await user.roles.add(trialmember, "User was force verified by " + modName);
await user.roles.add(guildRole, "User was force verified by " + modName)
}
}
if (guildRank === "Trial Member") {
await user.roles.add(trialmember, "User was force verified by " + modName);
await user.roles.add(guildRole, "User was force verified by " + modName)
}
}
await user.roles.add(defaultMember, "User was force verified by " + modName);
const newVerify = new verify({
_id: new mongoose.Types.ObjectId(),
userID: user.id,
@@ -177,4 +177,4 @@ module.exports = {
});
}
};
};

View File

@@ -5,7 +5,7 @@ module.exports = {
name: 'help',
description: 'Help command',
type: 'slash',
data: new SlashCommandBuilder()
.setName('help')
.setDescription('Help command')
@@ -47,8 +47,8 @@ module.exports = {
icon_url: interaction.guild.iconURL({ dynamic: true }),
text: interaction.guild.name + ' | Developed by: @Taken#0001'
}
}]
}]
});
}
};
};

View File

@@ -27,9 +27,9 @@ module.exports = {
fields: [
{
name: '**Bedwars**',
value: '**Stars:** `' + bwstars.toString() +
'`\n**Wins:** `' + bwwins.toString() +
'`\n**FKDR:** `' + bwfkdr.toString() + '`'
value: '**Stars:** `' + bwstars.toString() +
'`\n**Wins:** `' + bwwins.toString() +
'`\n**FKDR:** `' + bwfkdr.toString() + '`'
},
{
name: '**Skywars**',
@@ -38,7 +38,7 @@ module.exports = {
{
name: '**Duels**',
value: '**Wins:** `' + duelswins.toString() +
'`\n**WLR:** `' + duelswlr.toString() + '`'
'`\n**WLR:** `' + duelswlr.toString() + '`'
}
],
footer: {

View File

@@ -9,17 +9,17 @@ module.exports = {
data: new SlashCommandBuilder()
.setName('send')
.setDescription('Send a message to a channel.')
.addStringOption(option =>
.addStringOption(option =>
option
.setName('message')
.setDescription('The message to send.'))
.addChannelOption(option =>
.addChannelOption(option =>
option
.setName('channel')
.setDescription('The channel to send the message to.'))
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
.setDMPermission(false),
async execute(interaction) {
await interaction.deferReply({ ephemeral: true });
@@ -54,4 +54,4 @@ module.exports = {
]
});
}
};
};

View File

@@ -8,7 +8,7 @@ module.exports = {
data: new SlashCommandBuilder()
.setName('setnick')
.setDescription('Set your nickname')
.addUserOption(option =>
.addUserOption(option =>
option
.setName('user')
.setDescription('The user to set the nickname for')
@@ -36,4 +36,4 @@ module.exports = {
await interaction.reply({ content: "Set the nickname of " + userMention(member.id) + " to " + nickname, ephemeral: true });
}
}
}

View File

@@ -56,4 +56,4 @@ module.exports = {
await channel.setRateLimitPerUser(seconds)
}
}
}

View File

@@ -13,9 +13,9 @@ module.exports = {
type: 'slash',
data: new SlashCommandBuilder()
.setName('update')
.setDescription('Update your guild rank.')
.setDMPermission(false),
.setName('update')
.setDescription('Update your guild rank.')
.setDMPermission(false),
async execute(interaction) {
@@ -82,200 +82,200 @@ module.exports = {
return
}
if (guildID === hypixelGuildID) {
if (guildID === hypixelGuildID) {
const GuildMembers = guildCheck.data.guild.members;
const guildRank = GuildMembers.find(member => member.uuid === verifyData.uuid).rank;
const GuildMembers = guildCheck.data.guild.members;
const guildRank = GuildMembers.find(member => member.uuid === verifyData.uuid).rank;
if (guildRank === 'Guild Master') {
if (guildRank === 'Guild Master') {
for (let i = 0; i < removeThese.length; i++) {
await roleManage.remove(removeThese[i], "Auto role removal. (Update)")
}
for (let i = 0; i < removeThese.length; i++) {
await roleManage.remove(removeThese[i], "Auto role removal. (Update)")
}
await roleManage.add(guildRole, "User used the update command")
await roleManage.add(guildStaff, "User used the update command")
await roleManage.add(gm, "User used the update command")
await roleManage.add(defaultMember, "User used the update command")
await roleManage.add(guildRole, "User used the update command")
await roleManage.add(guildStaff, "User used the update command")
await roleManage.add(gm, "User used the update command")
await roleManage.add(defaultMember, "User used the update command")
await interaction.editReply({
embeds: [{
description: "Your rank has been updated to `Guild Master`",
color: embedColor,
thumbnail: {
url: head
},
footer: {
text: interaction.guild.name + " | Developed by @Taken#0002",
icon_url: interaction.guild.iconURL({ dynamic: true })
}
}]
})
}
await interaction.editReply({
embeds: [{
description: "Your rank has been updated to `Guild Master`",
color: embedColor,
thumbnail: {
url: head
},
footer: {
text: interaction.guild.name + " | Developed by @Taken#0002",
icon_url: interaction.guild.iconURL({ dynamic: true })
}
}]
})
}
if (guildRank === 'Manager') {
if (guildRank === 'Manager') {
for (let i = 0; i < removeThese.length; i++) {
await roleManage.remove(removeThese[i], "Auto role removal. (Update)")
}
for (let i = 0; i < removeThese.length; i++) {
await roleManage.remove(removeThese[i], "Auto role removal. (Update)")
}
await roleManage.add(guildRole, "User used the update command")
await roleManage.add(guildStaff, "User used the update command")
await roleManage.add(manager, "User used the update command")
await roleManage.add(defaultMember, "User used the update command")
await roleManage.add(guildRole, "User used the update command")
await roleManage.add(guildStaff, "User used the update command")
await roleManage.add(manager, "User used the update command")
await roleManage.add(defaultMember, "User used the update command")
await interaction.editReply({
embeds: [{
description: "Your rank has been updated to `Manager`",
color: embedColor,
thumbnail: {
url: head
},
footer: {
text: interaction.guild.name + " | Developed by @Taken#0002",
icon_url: interaction.guild.iconURL({ dynamic: true })
}
}]
})
}
await interaction.editReply({
embeds: [{
description: "Your rank has been updated to `Manager`",
color: embedColor,
thumbnail: {
url: head
},
footer: {
text: interaction.guild.name + " | Developed by @Taken#0002",
icon_url: interaction.guild.iconURL({ dynamic: true })
}
}]
})
}
if (guildRank === 'Moderator') {
if (guildRank === 'Moderator') {
for (let i = 0; i < removeThese.length; i++) {
await roleManage.remove(removeThese[i], "Auto role removal. (Update)")
}
for (let i = 0; i < removeThese.length; i++) {
await roleManage.remove(removeThese[i], "Auto role removal. (Update)")
}
await roleManage.add(guildRole, "User used the update command")
await roleManage.add(guildStaff, "User used the update command")
await roleManage.add(moderator, "User used the update command")
await roleManage.add(defaultMember, "User used the update command")
await roleManage.add(guildRole, "User used the update command")
await roleManage.add(guildStaff, "User used the update command")
await roleManage.add(moderator, "User used the update command")
await roleManage.add(defaultMember, "User used the update command")
await interaction.editReply({
embeds: [{
description: "Your rank has been updated to `Moderator`",
color: embedColor,
thumbnail: {
url: head
},
footer: {
text: interaction.guild.name + " | Developed by @Taken#0002",
icon_url: interaction.guild.iconURL({ dynamic: true })
}
}]
})
await interaction.editReply({
embeds: [{
description: "Your rank has been updated to `Moderator`",
color: embedColor,
thumbnail: {
url: head
},
footer: {
text: interaction.guild.name + " | Developed by @Taken#0002",
icon_url: interaction.guild.iconURL({ dynamic: true })
}
}]
})
}
}
if (guildRank === 'Beast') {
if (guildRank === 'Beast') {
for (let i = 0; i < removeThese.length; i++) {
await roleManage.remove(removeThese[i], "Auto role removal. (Update)")
}
for (let i = 0; i < removeThese.length; i++) {
await roleManage.remove(removeThese[i], "Auto role removal. (Update)")
}
await roleManage.add(guildRole, "User used the update command")
await roleManage.add(beast, "User used the update command")
await roleManage.add(defaultMember, "User used the update command")
await roleManage.add(guildRole, "User used the update command")
await roleManage.add(beast, "User used the update command")
await roleManage.add(defaultMember, "User used the update command")
await interaction.editReply({
embeds: [{
description: "Your rank has been updated to `Beast`.",
color: embedColor,
thumbnail: {
url: head
},
footer: {
text: interaction.guild.name + " | Developed by @Taken#0002",
icon_url: interaction.guild.iconURL({ dynamic: true })
}
}]
})
return
}
await interaction.editReply({
embeds: [{
description: "Your rank has been updated to `Beast`.",
color: embedColor,
thumbnail: {
url: head
},
footer: {
text: interaction.guild.name + " | Developed by @Taken#0002",
icon_url: interaction.guild.iconURL({ dynamic: true })
}
}]
})
return
}
if (guildRank === 'Elite') {
if (guildRank === 'Elite') {
for (let i = 0; i < removeThese.length; i++) {
await roleManage.remove(removeThese[i], "Auto role removal. (Update)")
}
for (let i = 0; i < removeThese.length; i++) {
await roleManage.remove(removeThese[i], "Auto role removal. (Update)")
}
await roleManage.add(guildRole, "User used the update command")
await roleManage.add(elite, "User used the update command")
await roleManage.add(defaultMember, "User used the update command")
await roleManage.add(guildRole, "User used the update command")
await roleManage.add(elite, "User used the update command")
await roleManage.add(defaultMember, "User used the update command")
await interaction.editReply({
embeds: [{
description: "Your rank has been updated to `Elite`.",
color: embedColor,
thumbnail: {
url: head
},
footer: {
text: interaction.guild.name + " | Developed by @Taken#0002",
icon_url: interaction.guild.iconURL({ dynamic: true })
}
}]
})
return
}
await interaction.editReply({
embeds: [{
description: "Your rank has been updated to `Elite`.",
color: embedColor,
thumbnail: {
url: head
},
footer: {
text: interaction.guild.name + " | Developed by @Taken#0002",
icon_url: interaction.guild.iconURL({ dynamic: true })
}
}]
})
return
}
if (guildRank === 'Member') {
if (guildRank === 'Member') {
for (let i = 0; i < removeThese.length; i++) {
await roleManage.remove(removeThese[i], "Auto role removal. (Update)")
}
for (let i = 0; i < removeThese.length; i++) {
await roleManage.remove(removeThese[i], "Auto role removal. (Update)")
}
await roleManage.add(guildRole, "User used the update command")
await roleManage.add(member, "User used the update command")
await roleManage.add(defaultMember, "User used the update command")
await roleManage.add(guildRole, "User used the update command")
await roleManage.add(member, "User used the update command")
await roleManage.add(defaultMember, "User used the update command")
await interaction.editReply({
embeds: [{
description: "Your rank has been updated to `Member`.",
color: embedColor,
thumbnail: {
url: head
},
footer: {
text: interaction.guild.name + " | Developed by @Taken#0002",
icon_url: interaction.guild.iconURL({ dynamic: true })
}
}]
})
return
}
await interaction.editReply({
embeds: [{
description: "Your rank has been updated to `Member`.",
color: embedColor,
thumbnail: {
url: head
},
footer: {
text: interaction.guild.name + " | Developed by @Taken#0002",
icon_url: interaction.guild.iconURL({ dynamic: true })
}
}]
})
return
}
if (guildRank === 'Trial Member') {
if (guildRank === 'Trial Member') {
for (let i = 0; i < removeThese.length; i++) {
await roleManage.remove(removeThese[i], "Auto role removal. (Update)")
}
for (let i = 0; i < removeThese.length; i++) {
await roleManage.remove(removeThese[i], "Auto role removal. (Update)")
}
await roleManage.add(guildRole, "User used the update command")
await roleManage.add(trialmember, "User used the update command")
await roleManage.add(defaultMember, "User used the update command")
await roleManage.add(guildRole, "User used the update command")
await roleManage.add(trialmember, "User used the update command")
await roleManage.add(defaultMember, "User used the update command")
await interaction.editReply({
embeds: [{
description: "Your rank has been updated to `Trial Member`.",
color: embedColor,
thumbnail: {
url: head
},
footer: {
text: interaction.guild.name + " | Developed by @Taken#0002",
icon_url: interaction.guild.iconURL({ dynamic: true })
}
}]
})
return
}
}
await interaction.editReply({
embeds: [{
description: "Your rank has been updated to `Trial Member`.",
color: embedColor,
thumbnail: {
url: head
},
footer: {
text: interaction.guild.name + " | Developed by @Taken#0002",
icon_url: interaction.guild.iconURL({ dynamic: true })
}
}]
})
return
}
}
}
};
};

View File

@@ -98,7 +98,7 @@ module.exports = {
return;
}
const linkedDiscord = stats.data.player.socialMedia.links.DISCORD
const linkedDiscord = stats.data.player.socialMedia.links.DISCORD
if (linkedDiscord !== username) {
interaction.editReply({
@@ -122,48 +122,48 @@ module.exports = {
var guildID = guildCheck.data.guild._id
}
if (guildID === hypixelGuildID) {
const GuildMembers = guildCheck.data.guild.members
const guildRank = GuildMembers.find((member) => member.uuid === stats.data.player.uuid).rank;
if (guildID === hypixelGuildID) {
const GuildMembers = guildCheck.data.guild.members
const guildRank = GuildMembers.find((member) => member.uuid === stats.data.player.uuid).rank;
if (guildRank === "Guild Master" && guildID === hypixelGuildID) {
await user.roles.add(gm, "Verification");
await user.roles.add(guildRole, "Verification");
await user.roles.add(guildStaff, "Verification");
}
if (guildRank === "Guild Master" && guildID === hypixelGuildID) {
await user.roles.add(gm, "Verification");
await user.roles.add(guildRole, "Verification");
await user.roles.add(guildStaff, "Verification");
}
if (guildRank === "Manager" && guildID === hypixelGuildID) {
await user.roles.add(manager, "Verification");
await user.roles.add(guildRole, "Verification");
await user.roles.add(guildStaff, "Verification");
}
if (guildRank === "Manager" && guildID === hypixelGuildID) {
await user.roles.add(manager, "Verification");
await user.roles.add(guildRole, "Verification");
await user.roles.add(guildStaff, "Verification");
}
if (guildRank === "Moderator" && guildID === hypixelGuildID) {
await user.roles.add(moderator, "Verification");
await user.roles.add(guildRole, "Verification");
await user.roles.add(guildStaff, "Verification");
}
if (guildRank === "Moderator" && guildID === hypixelGuildID) {
await user.roles.add(moderator, "Verification");
await user.roles.add(guildRole, "Verification");
await user.roles.add(guildStaff, "Verification");
}
if (guildRank === "Beast" && guildID === hypixelGuildID) {
await user.roles.add(beast, "Verification");
await user.roles.add(guildRole, "Verification");
}
if (guildRank === "Beast" && guildID === hypixelGuildID) {
await user.roles.add(beast, "Verification");
await user.roles.add(guildRole, "Verification");
}
if (guildRank === "Elite" && guildID === hypixelGuildID) {
await user.roles.add(elite, "Verification");
await user.roles.add(guildRole, "Verification");
}
if (guildRank === "Elite" && guildID === hypixelGuildID) {
await user.roles.add(elite, "Verification");
await user.roles.add(guildRole, "Verification");
}
if (guildRank === "Member" && guildID === hypixelGuildID) {
await user.roles.add(member, "Verification");
await user.roles.add(guildRole, "Verification");
}
if (guildRank === "Member" && guildID === hypixelGuildID) {
await user.roles.add(member, "Verification");
await user.roles.add(guildRole, "Verification");
}
if (guildRank === "Trial Member" && guildID === hypixelGuildID) {
await user.roles.add(trialmember, "Verification");
await user.roles.add(guildRole, "Verification");
}
}
if (guildRank === "Trial Member" && guildID === hypixelGuildID) {
await user.roles.add(trialmember, "Verification");
await user.roles.add(guildRole, "Verification");
}
}
await user.roles.add(defaultMember, "Verification");
@@ -192,4 +192,4 @@ module.exports = {
]
});
}
};
};

View File

@@ -55,4 +55,4 @@ module.exports = {
})
}
};
};