Updated check command

This commit is contained in:
2023-03-13 11:48:24 +01:00
parent 3deec40feb
commit 6ee2af1972

View File

@@ -1,6 +1,7 @@
const { SlashCommandBuilder, EmbedBuilder, PermissionFlagsBits } = require('discord.js'); const { SlashCommandBuilder, EmbedBuilder, PermissionFlagsBits } = require('discord.js');
const { hypixelApiKey, dev } = require('../config.json'); const { hypixelApiKey } = require('../config.json');
const { color } = require('../options.json'); const { color } = require('../options.json');
const fetch = require('axios')
module.exports = { module.exports = {
name: 'check', name: 'check',
@@ -23,18 +24,12 @@ module.exports = {
const mojang = "https://api.mojang.com/users/profiles/minecraft/" const mojang = "https://api.mojang.com/users/profiles/minecraft/"
const slothPixel = "https://api.slothpixel.me/api/players/"; const slothPixel = "https://api.slothpixel.me/api/players/";
const minotar = "https://minotar.net/helm/"; const minotar = "https://minotar.net/helm/";
const fetch = require('axios');
const embedColor = Number(color.replace("#", "0x")); const embedColor = Number(color.replace("#", "0x"));
const userCheck = await fetch(mojang + ign); const userCheck = await fetch(mojang + ign);
const stats = await fetch(slothPixel + ign); const stats = await fetch(slothPixel + ign);
const head = minotar + ign; const head = minotar + ign;
if (interaction.user.id !== dev) {
interaction.reply('This command is currently under development.')
return
}
if (!ign) { if (!ign) {
interaction.reply('Please provide a player\'s IGN.') interaction.reply('Please provide a player\'s IGN.')
return return
@@ -50,9 +45,6 @@ module.exports = {
return return
} }
const level = stats.data.stats.SkyWars.level;
await interaction.reply({ await interaction.reply({
embeds: [{ embeds: [{
title: stats.data.username, title: stats.data.username,