Compare commits

..

No commits in common. "09836797c2feee65a74a2aec9f4f5a443a219371" and "9f657f9bd02ae0e3be48a989eb7c9a1efd573c97" have entirely different histories.

@ -2,13 +2,13 @@ const { SlashCommandBuilder } = require('@discordjs/builders');
const { parse } = require("csv-parse/sync");
const fs = require('node:fs');
const noblox = require("noblox.js");
const axios = require("axios").default;
const axios = require("axios").default
async function robloxUserFromDiscord(id) {
if (isNaN(id)) return undefined;
try {
const res = await axios.get(`https://api.fiveman1.net/v1/users/${id}`);
return res.data.result.robloxId;
const res = await axios.get(`https://verify.eryn.io/api/user/${id}`)
return res.data.robloxId
} catch (error) {
return undefined;
}
@ -17,17 +17,17 @@ async function robloxUserFromDiscord(id) {
async function robloxUsernameFromId(id) {
if (isNaN(id)) return undefined;
try {
const res = await axios.get(`https://users.roblox.com/v1/users/${id}`);
return res.data.name;
const res = await axios.get(`https://users.roblox.com/v1/users/${id}`)
return res.data.name
} catch (error) {
return undefined;
}
}
async function execute(interaction) {
const userId = await robloxUserFromDiscord(interaction.user.id);
const userId = await robloxUserFromDiscord(interaction.user.id)
if (!userId) {
const msg = "You don't have a Roblox account linked with your Discord account. Use !link with rbhop dog to link your account.";
const msg = "You don't have a Roblox account linked with your Discord account. Visit https://verify.eryn.io/";
await interaction.reply({content: msg, ephemeral: true});
return;
}