Игнорирование сервера со смайлами, фиксы

This commit is contained in:
JonnyBro 2022-01-31 20:25:57 +05:00
parent 460f1d6c01
commit 9bf142dd08
5 changed files with 8 additions and 7 deletions

View file

@ -6,13 +6,6 @@ module.exports = class {
} }
async run(guild) { async run(guild) {
if (this.client.config.proMode) {
if ((!this.client.config.proUsers.includes(guild.ownerId) || this.guilds.filter((g) => g.ownerId === guild.ownerId) > 1) && guild.ownerId !== this.client.config.owner.id) {
this.client.logger.log(`${guild.ownerId} tried to invite JaBa on its server.`);
return guild.leave();
}
}
const messageOptions = {}; const messageOptions = {};
const userData = await this.client.findOrCreateUser({ const userData = await this.client.findOrCreateUser({

View file

@ -21,6 +21,8 @@ module.exports = class {
} }
async run(member) { async run(member) {
if (member.guild.id === "568120814776614924") return;
await member.guild.members.fetch(); await member.guild.members.fetch();
const guildData = await this.client.findOrCreateGuild({ const guildData = await this.client.findOrCreateGuild({

View file

@ -21,6 +21,8 @@ module.exports = class {
} }
async run(member) { async run(member) {
if (member.guild.id === "568120814776614924") return;
await member.guild.members.fetch(); await member.guild.members.fetch();
const guildData = await this.client.findOrCreateGuild({ const guildData = await this.client.findOrCreateGuild({

View file

@ -4,6 +4,8 @@ module.exports = class {
} }
async run(oldMember, newMember) { async run(oldMember, newMember) {
if (newMember.guild.id === "568120814776614924") return;
if (oldMember.guild.id !== this.client.config.support.id) return; if (oldMember.guild.id !== this.client.config.support.id) return;
if (oldMember.roles.cache.some((r) => r.name === "Поддержавшие JaBa")) return; if (oldMember.roles.cache.some((r) => r.name === "Поддержавшие JaBa")) return;
if (newMember.roles.cache.some((r) => r.name === "Поддержавшие JaBa")) { if (newMember.roles.cache.some((r) => r.name === "Поддержавшие JaBa")) {

View file

@ -8,6 +8,8 @@ module.exports = class {
} }
async run(message) { async run(message) {
if (message.guild.id === "568120814776614924") return;
const data = {}; const data = {};
// If the message author is a bot // If the message author is a bot