multi gamer botting

This commit is contained in:
Hexugory 2023-03-29 00:15:50 -05:00
parent 62920af0e3
commit 6505971fcb

View File

@ -30,7 +30,7 @@ export class CommandClient extends Client {
this.on('messageCreate', async (msg: Message) => { this.on('messageCreate', async (msg: Message) => {
if (!msg.content.startsWith(config.prefix) || msg.author.bot) return; if (!msg.content.startsWith(config.prefix) || msg.author.bot) return;
if (msg.author.id != config.owner && (await BlacklistUsers.findOne({ where: { user_id: msg.author.id } }))) return; if (!config.owners.includes(msg.author.id) && (await BlacklistUsers.findOne({ where: { user_id: msg.author.id } }))) return;
this.parseCommand(msg); this.parseCommand(msg);
}); });
@ -52,7 +52,7 @@ export class CommandClient extends Client {
return; return;
} }
if (command.permission && int.user.id != config.owner) { if (command.permission && !config.owners.includes(int.user.id)) {
if (!(int.channel instanceof GuildChannel)) { if (!(int.channel instanceof GuildChannel)) {
int.reply({ content: strings.command.guildOnly, ephemeral: true }); int.reply({ content: strings.command.guildOnly, ephemeral: true });
return; return;
@ -117,7 +117,7 @@ export class CommandClient extends Client {
return; return;
}; };
if (command.ownerOnly && msg.author.id != config.owner) { if (command.ownerOnly && !config.owners.includes(msg.author.id)) {
msg.reply(strings.command.ownerOnly); msg.reply(strings.command.ownerOnly);
return; return;
} }
@ -125,7 +125,7 @@ export class CommandClient extends Client {
if (msg.channel instanceof GuildChannel) { if (msg.channel instanceof GuildChannel) {
if (!msg.member) throw new Error('Command sending member does not exist'); if (!msg.member) throw new Error('Command sending member does not exist');
if (msg.author.id != config.owner) { if (!config.owners.includes(msg.author.id)) {
if (command.permission) { if (command.permission) {
for (const permission of command.permission) { for (const permission of command.permission) {
if (!msg.member.permissionsIn(msg.channel).has(permission)) { if (!msg.member.permissionsIn(msg.channel).has(permission)) {
@ -169,7 +169,7 @@ export class CommandClient extends Client {
return; return;
} }
if (command.cooldown && msg.author.id != config.owner) { if (command.cooldown && !config.owners.includes(msg.author.id)) {
if (!this.cooldowns.has(command.name)) { if (!this.cooldowns.has(command.name)) {
this.cooldowns.set(command.name, new Collection()); this.cooldowns.set(command.name, new Collection());
} }