This commit is contained in:
st committed 2026-06-28 21:55:39 -05:00
commit 105dd2dc4d
16 files changed
+1393 -34498

No files matched your search

+1 -43
View File
@@ -48,7 +48,7 @@ module.exports = {
name: 'rbx',
description: `various commands related to roblox`,
aliases: ['roblox'],
usage: `rbx user <username>\n${env.PREFIX}rbx item <item id>\n${env.PREFIX}rbx group <group id>\n${env.PREFIX}rbx game <game id>\n${env.PREFIX}rbx avatar <username>`,
usage: 'rbx user <username>\n.rbx item <item id>\n.rbx group <group id>\n.rbx game <game id>',
async execute(client, message) {
var embed = {};
@@ -206,48 +206,6 @@ module.exports = {
timestamp: new Date(),
}
}
} else if (subcommand === 'avatar') {
try {
const user = data.data[0];
const a_res = await fetch(`https://thumbnails.roproxy.com/v1/users/avatar?userIds=${user.id}&size=720x720&format=Png&isCircular=false`, {
method: 'GET',
headers: { 'Content-Type': 'application/json' }
});
const a_data = await a_res.json();
logger.debug(`[rbx] fetched avatar for "${argument}": ${JSON.stringify(a_data)}`);
embed = {
color: 0x8aa2b3,
author: {
name: message.author.username,
icon_url: message.author.displayAvatarURL(),
},
description: `**${user.displayName}**'s avatar`,
footer: {
text: `twitter @ ${message.guild.name}`,
icon_url: client.user.displayAvatarURL(),
},
image: {
url: `${a_data.data[0].imageUrl}`
},
timestamp: new Date(),
};
} catch (err) {
logger.error(`[rbx] failed to fetch avatar for user id "${argument}":`, err);
embed = {
color: 0x8aa2b3,
author: {
name: message.author.username,
icon_url: message.author.displayAvatarURL(),
},
description: `<:no:1481811955592466492> could not fetch avatar data for user "${argument}"!`,
footer: {
text: `twitter @ ${message.guild.name}`,
icon_url: client.user.displayAvatarURL(),
},
timestamp: new Date(),
};
}
} else if (subcommand === 'item') {
try {
const res = await fetch(`https://economy.roproxy.com/v2/assets/${argument}/details`, {