Pushing check js

This commit is contained in:
2023-03-19 22:52:00 +01:00
parent 9b03075b9d
commit 4b1e7afd7c

View File

@@ -20,6 +20,9 @@ module.exports = {
async execute(interaction) { async execute(interaction) {
await interaction.reply({ content: 'This command is currently under development.', ephemeral: true })
return
await interaction.deferReply(); await interaction.deferReply();
const ign = interaction.options.getString('ign'); const ign = interaction.options.getString('ign');
@@ -32,16 +35,20 @@ module.exports = {
const userCheck = await fetch(mojang + ign); const userCheck = await fetch(mojang + ign);
const userUUID = userCheck.data.id; const userUUID = userCheck.data.id;
console.log(userCheck)
const stats = await fetch(slothPixel + userUUID); const stats = await fetch(slothPixel + userUUID);
const guildCheck = await fetch(guildAPI + userUUID); const guildCheck = await fetch(guildAPI + userUUID);
const head = minotar + ign; const head = minotar + ign;
if (!ign) { if (!ign) {
interaction.reply('Please provide a player\'s IGN.') interaction.editReply('Please provide a player\'s IGN.')
return return
} }
if (!userUUID) { try {
await fetch(mojang + ign)
} catch (error) {
interaction.reply('That player doesn\'t exist. [Mojang]') interaction.reply('That player doesn\'t exist. [Mojang]')
return return
} }