Moving forceverify to hypixel api
Verify formating changes
This commit is contained in:
@@ -86,10 +86,21 @@ module.exports = {
|
||||
|
||||
const player = hypixelApi + "?key=" + hypixelApiKey + "&uuid=" + userUUID
|
||||
const guild = guildApi + "?key=" + hypixelApiKey + "&player=" + userUUID
|
||||
const head = minotar + ign;
|
||||
|
||||
const hypixelCheck = await fetch(player);
|
||||
|
||||
if (!hypixelCheck.data.player) {
|
||||
interaction.editReply({
|
||||
embeds: [{
|
||||
description: "<a:questionmark_pink:1130206038008803488> That player hasn't played Hypixel before.",
|
||||
color: embedColor
|
||||
}]
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
const guildCheck = await fetch(guild)
|
||||
const head = minotar + ign;
|
||||
|
||||
if (!guildCheck.data.guild) {
|
||||
var responseGuildID = null
|
||||
@@ -97,10 +108,10 @@ module.exports = {
|
||||
var responseGuildID = guildCheck.data.guild._id
|
||||
}
|
||||
|
||||
if (responseGuildID === hypixelGuildID) {
|
||||
const GuildMembers = guildCheck.data.guild.members;
|
||||
const guildRank = GuildMembers.find(member => member.uuid === hypixelCheck.data.player.uuid).rank;
|
||||
|
||||
if (responseGuildID === hypixelGuildID) {
|
||||
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)
|
||||
@@ -153,7 +164,7 @@ module.exports = {
|
||||
await interaction.editReply({
|
||||
embeds: [{
|
||||
title: interaction.guild.name,
|
||||
description: "You have successfully force verified `" + username + "` with the account `" + hypixelCheck.data.displayName + "`.",
|
||||
description: "You have successfully force verified `" + username + "` with the account `" + hypixelCheck.data.player.displayname + "`.",
|
||||
color: embedColor,
|
||||
thumbnail: {
|
||||
url: head
|
||||
|
||||
Reference in New Issue
Block a user