Added small patches
This commit is contained in:
@@ -56,7 +56,7 @@ module.exports = {
|
||||
await channel.send({
|
||||
embeds: [{
|
||||
title: 'Guild Application',
|
||||
description: "You can apply for the staff team by clicking the button below.",
|
||||
description: "You can apply for guild by clicking the button below.",
|
||||
color: embedColor,
|
||||
footer: {
|
||||
text: interaction.guild.name + " | Developed by @Taken#0002",
|
||||
@@ -86,7 +86,7 @@ module.exports = {
|
||||
await channel.send({
|
||||
embeds: [{
|
||||
title: 'Staff Application',
|
||||
description: "You can apply for the guild by clicking the button below.",
|
||||
description: "You can apply for the staff team by clicking the button below.",
|
||||
color: embedColor,
|
||||
footer: {
|
||||
text: interaction.guild.name + " | Developed by @Taken#0002",
|
||||
|
||||
@@ -4,7 +4,7 @@ const fetch = require('axios');
|
||||
const verify = require('../schemas/verifySchema.js')
|
||||
const mongoose = require('mongoose');
|
||||
const { color, hypixelGuildID } = require('../config/options.json');
|
||||
const { gm, manager, moderator, beast, member, trialmember, guildRole, guildStaff } = require('../config/roles.json');
|
||||
const { gm, manager, moderator, beast, member, trialmember, guildRole, guildStaff, defaultMember } = require('../config/roles.json');
|
||||
|
||||
module.exports = {
|
||||
name: 'update',
|
||||
@@ -20,6 +20,8 @@ module.exports = {
|
||||
|
||||
await interaction.deferReply();
|
||||
|
||||
const user1 = interaction.user;
|
||||
const user = interaction.guild.members.cache.get(user1.id);
|
||||
const verifyData = await verify.findOne({ userID: user.id })
|
||||
const memberRoles = interaction.member.roles.cache;
|
||||
const roleManage = interaction.member.roles;
|
||||
@@ -29,8 +31,6 @@ module.exports = {
|
||||
return
|
||||
}
|
||||
|
||||
const user1 = interaction.options.getUser('user');
|
||||
const user = interaction.guild.members.cache.get(user1.id);
|
||||
const slothPixel = "https://api.slothpixel.me/api/players/";
|
||||
const guildAPI = "https://api.slothpixel.me/api/guilds/"
|
||||
const mojangAPI = "https://api.mojang.com/user/profile/"
|
||||
@@ -46,7 +46,7 @@ module.exports = {
|
||||
const guildRank = GuildMembers.find(member => member.uuid === verifyData.uuid).rank;
|
||||
|
||||
if (guildCheck.data.id !== hypixelGuildID) {
|
||||
interaction.reply({
|
||||
interaction.editReply({
|
||||
embeds: [{
|
||||
description: "Updating is only available for members of the guild.",
|
||||
color: embedColor,
|
||||
@@ -63,13 +63,14 @@ module.exports = {
|
||||
}
|
||||
|
||||
if (guildRank === 'Guild Master') {
|
||||
await roleManage.remove(gm || manager || moderator || beast || member || trialmember || guildRole || guildStaff)
|
||||
await roleManage.remove(gm || manager || moderator || beast || member || trialmember || guildRole || guildStaff || defaultMember)
|
||||
await roleManage.add(guildRole)
|
||||
await roleManage.add(guildStaff)
|
||||
await roleManage.add(gm)
|
||||
await roleManage.add(defaultMember)
|
||||
|
||||
await verify.findOneAndUpdate({ userID: user.id })
|
||||
interaction.reply({
|
||||
interaction.editReply({
|
||||
embeds: [{
|
||||
description: "Your rank has been updated to `Guild Master`",
|
||||
color: embedColor,
|
||||
@@ -89,9 +90,10 @@ module.exports = {
|
||||
await roleManage.add(guildRole)
|
||||
await roleManage.add(guildStaff)
|
||||
await roleManage.add(manager)
|
||||
await roleManage.add(defaultMember)
|
||||
|
||||
await verify.findOneAndUpdate({ userID: user.id })
|
||||
interaction.reply({
|
||||
interaction.editReply({
|
||||
embeds: [{
|
||||
description: "Your rank has been updated to `Manager`",
|
||||
color: embedColor,
|
||||
@@ -111,9 +113,10 @@ module.exports = {
|
||||
await roleManage.add(guildRole)
|
||||
await roleManage.add(guildStaff)
|
||||
await roleManage.add(moderator)
|
||||
await roleManage.add(defaultMember)
|
||||
|
||||
await verify.findOneAndUpdate({ userID: user.id })
|
||||
interaction.reply({
|
||||
interaction.editReply({
|
||||
embeds: [{
|
||||
description: "Your rank has been updated to `Moderator`",
|
||||
color: embedColor,
|
||||
@@ -133,9 +136,10 @@ module.exports = {
|
||||
await roleManage.remove(gm || manager || moderator || beast || member || trialmember || guildRole)
|
||||
await roleManage.add(guildRole)
|
||||
await roleManage.add(beast)
|
||||
await roleManage.add(defaultMember)
|
||||
|
||||
await verify.findOneAndUpdate({ userID: user.id })
|
||||
interaction.reply({
|
||||
interaction.editReply({
|
||||
embeds: [{
|
||||
description: "Your rank has been updated to `Beast`.",
|
||||
color: embedColor,
|
||||
@@ -155,9 +159,10 @@ module.exports = {
|
||||
await roleManage.remove(gm || manager || moderator || beast || member || trialmember || guildRole)
|
||||
await roleManage.add(guildRole)
|
||||
await roleManage.add(member)
|
||||
await roleManage.add(defaultMember)
|
||||
|
||||
await verify.findOneAndUpdate({ userID: user.id })
|
||||
interaction.reply({
|
||||
interaction.editReply({
|
||||
embeds: [{
|
||||
description: "Your rank has been updated to `Member`.",
|
||||
color: embedColor,
|
||||
@@ -177,9 +182,10 @@ module.exports = {
|
||||
await roleManage.remove(gm || manager || moderator || beast || member || trialmember || guildRole)
|
||||
await roleManage.add(guildRole)
|
||||
await roleManage.add(trialmember)
|
||||
await roleManage.add(defaultMember)
|
||||
|
||||
await verify.findOneAndUpdate({ userID: user.id })
|
||||
interaction.reply({
|
||||
interaction.editReply({
|
||||
embeds: [{
|
||||
description: "Your rank has been updated to `Trial Member`.",
|
||||
color: embedColor,
|
||||
|
||||
@@ -25,9 +25,10 @@ module.exports = {
|
||||
|
||||
await interaction.deferReply();
|
||||
|
||||
const user1 = interaction.options.getUser('user');
|
||||
const user = interaction.guild.members.cache.get(user1.id);
|
||||
const fullUsername = user1.username + "#" + user1.discriminator
|
||||
const user1 = interaction.user;
|
||||
const user = await interaction.guild.members.fetch(user1.id);
|
||||
|
||||
const fullUsername = user.user.username + "#" + user.user.discriminator
|
||||
const ign = interaction.options.getString('ign');
|
||||
const mojang = "https://api.mojang.com/users/profiles/minecraft/"
|
||||
const slothPixel = "https://api.slothpixel.me/api/players/";
|
||||
@@ -46,29 +47,29 @@ module.exports = {
|
||||
const guildRank = GuildMembers.find(member => member.uuid === hypixelCheck.data.uuid).rank;
|
||||
|
||||
if (!ign) {
|
||||
interaction.reply('Please provide a player\'s IGN.')
|
||||
interaction.editReply('Please provide a player\'s IGN.')
|
||||
return
|
||||
}
|
||||
|
||||
if (!userUUID) {
|
||||
interaction.reply('That player doesn\'t exist. [Mojang]')
|
||||
interaction.editReply('That player doesn\'t exist. [Mojang]')
|
||||
return
|
||||
}
|
||||
|
||||
if (!hypixelCheck.data.uuid) {
|
||||
interaction.reply('That player doesn\'t exist. [Hypixel]')
|
||||
interaction.editReply('That player doesn\'t exist. [Hypixel]')
|
||||
return
|
||||
}
|
||||
|
||||
if (hypixelCheck.data.links.DISCORD !== fullUsername) {
|
||||
interaction.reply('Your Discord tag does not match your in-game tag.')
|
||||
interaction.editReply('Your Discord tag does not match your in-game tag.')
|
||||
return
|
||||
}
|
||||
|
||||
const verifyData = await verify.findOne({ userID: user.id })
|
||||
|
||||
if (verifyData) {
|
||||
interaction.reply('You are already verified.')
|
||||
interaction.editReply('You are already verified.')
|
||||
return
|
||||
}
|
||||
|
||||
@@ -115,7 +116,7 @@ module.exports = {
|
||||
|
||||
await newVerify.save()
|
||||
|
||||
await interaction.reply({
|
||||
await interaction.editReply({
|
||||
embeds: [{
|
||||
title: interaction.guild.name,
|
||||
description: "You have successfully verified `" + fullUsername + "` with the account `" + hypixelCheck.data.username + "`.",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"color": "#eeaadb",
|
||||
"applicationsCategory": "568796159997509653",
|
||||
"applicationsChannel": "776705352456470550",
|
||||
"hypixelGuildID": "5a353a170cf2e529044f2935"
|
||||
}
|
||||
@@ -2,7 +2,7 @@ const { REST, Routes } = require('discord.js');
|
||||
const { clientId, realguildId, testguildId, token } = require('./config.json');
|
||||
const fs = require('node:fs');
|
||||
|
||||
const guildId = testguildId;
|
||||
const guildId = realguildId;
|
||||
|
||||
const commands = [];
|
||||
// Grab all the command files from the commands directory you created earlier
|
||||
|
||||
Reference in New Issue
Block a user