This commit is contained in:
st committed 2026-06-28 21:55:39 -05:00
commit 105dd2dc4d
6 files changed
+108 -33213

No files matched your search

+3 -1
View File
@@ -141,4 +141,6 @@ dist
# Vite logs files # Vite logs files
vite.config.js.timestamp-* vite.config.js.timestamp-*
vite.config.ts.timestamp-*
items.json
db.json
-11
View File
@@ -1,11 +0,0 @@
{
"autoroles": {
"1133441692196950101": "1192595134026616894"
},
"autobans": {
"1133441692196950101": "1264634623950848158"
},
"prefixes": {
"1362160460253761536": "*"
}
}
-33156
View File
File diff suppressed because it is too large. Load diff
+1 -43
View File
@@ -48,7 +48,7 @@ module.exports = {
name: 'rbx', name: 'rbx',
description: `various commands related to roblox`, description: `various commands related to roblox`,
aliases: ['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) { async execute(client, message) {
var embed = {}; var embed = {};
@@ -206,48 +206,6 @@ module.exports = {
timestamp: new Date(), 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') { } else if (subcommand === 'item') {
try { try {
const res = await fetch(`https://economy.roproxy.com/v2/assets/${argument}/details`, { const res = await fetch(`https://economy.roproxy.com/v2/assets/${argument}/details`, {
+102
View File
@@ -100,3 +100,105 @@ module.exports = {
} }
}, },
}; };
'use strict';
const { time } = require("discord.js");
const fs = require('fs');
const path = require('path');
module.exports = {
name: 'autoban',
description: `automatically ban a user if they join the server`,
aliases: ['ab', 'banish'],
usage: 'ban <user> [reason] [duration]',
async execute(client, message, args) {
if (!message.member.permissions.has('BanMembers')) {
return message.reply({
content: null, embeds: [{
color: 0x8aa2b3,
author: {
name: message.author.username,
icon_url: message.author.displayAvatarURL(),
},
description: '<:no:1481811955592466492> you do not have permission to use this command!',
footer: {
text: `twitter @ ${message.guild.name}`,
icon_url: client.user.displayAvatarURL(),
},
timestamp: new Date(),
}]
});
}
const user = message.mentions.users.first() || await client.users.fetch(args[0]).catch(() => null);
if (!user) {
return message.reply({
content: null, embeds: [{
color: 0x8aa2b3,
author: {
name: message.author.username,
icon_url: message.author.displayAvatarURL(),
},
description: '<:no:1481811955592466492> please specify a user to autoban!',
footer: {
text: `twitter @ ${message.guild.name}`,
icon_url: client.user.displayAvatarURL(),
},
timestamp: new Date(),
}]
});
}
const reason = args.slice(1).join(' ') || 'autobanned (twitter)';
const dbPath = path.join(__dirname, '..', '..', '..', 'db.json');
let db = {};
if (fs.existsSync(dbPath)) {
db = JSON.parse(fs.readFileSync(dbPath, 'utf8'));
}
if (!db.autobans) {
db.autobans = {};
}
db.autobans[message.guild.id] = user.id;
try {
await fs.writeFileSync(dbPath, JSON.stringify(db, null, 2));
message.reply({
content: null, embeds: [{
color: 0x8aa2b3,
author: {
name: message.author.username,
icon_url: message.author.displayAvatarURL(),
},
description: `<:check:1481811973447356496> ${user.username} has been added to the autoban list!`,
footer: {
text: `twitter @ ${message.guild.name}`,
icon_url: client.user.displayAvatarURL(),
},
timestamp: new Date(),
}]
});
} catch (error) {
console.error(error);
message.reply({
content: null, embeds: [{
color: 0x8aa2b3,
author: {
name: message.author.username,
icon_url: message.author.displayAvatarURL(),
},
description: '<:no:1481811955592466492> an error occurred while trying to add the user to the autoban list!',
footer: {
text: `twitter @ ${message.guild.name}`,
icon_url: client.user.displayAvatarURL(),
},
timestamp: new Date(),
}]
});
}
},
};
+2 -2
View File
@@ -5,8 +5,8 @@ const { time } = require("discord.js");
module.exports = { module.exports = {
name: 'ban', name: 'ban',
description: `ban a user from the current server`, description: `ban a user from the current server`,
aliases: ['b'], aliases: ['banish'],
usage: 'ban <user> [reason]', usage: 'ban <user> [reason] [duration]',
async execute(client, message, args) { async execute(client, message, args) {
if (!message.member.permissions.has('BanMembers')) { if (!message.member.permissions.has('BanMembers')) {