Adding first support for functions
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
const { SlashCommandBuilder, EmbedBuilder, PermissionFlagsBits } = require('discord.js');
|
const { SlashCommandBuilder, EmbedBuilder, PermissionFlagsBits } = require('discord.js');
|
||||||
const { bwfdkr, bwstars, bwwins, duelswins, swstars } = require('../config/reqs.json')
|
const { bwfdkr, bwstars, bwwins, duelswins, swstars } = require('../config/reqs.json')
|
||||||
|
const getuuid = require('../utils/functions');
|
||||||
const env = require('dotenv').config();
|
const env = require('dotenv').config();
|
||||||
const hypixelApiKey = process.env.HYPIXELAPI;
|
const hypixelApiKey = process.env.HYPIXELAPI;
|
||||||
const { color } = require('../config/options.json');
|
const { color } = require('../config/options.json');
|
||||||
@@ -36,15 +37,12 @@ module.exports = {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
if (await getuuid(ign) === null) {
|
||||||
await fetch(mojang + ign);
|
await interaction.editReply('That player doesn\'t exist. [Mojang]')
|
||||||
} catch (error) {
|
|
||||||
interaction.editReply('That player doesn\'t exist. [Mojang]')
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const userCheck = await fetch(mojang + ign);
|
const userUUID = await getuuid(ign);
|
||||||
const userUUID = userCheck.data.id;
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await fetch(slothPixel + userUUID);
|
await fetch(slothPixel + userUUID);
|
||||||
|
|||||||
Reference in New Issue
Block a user