Попытка фикса рандомных ошибок от сервера с эмодзи

This commit is contained in:
JonnyBro 2022-02-13 16:50:44 +05:00
parent f1d47c730f
commit ad56892994
5 changed files with 9 additions and 0 deletions

View file

@ -66,6 +66,7 @@ module.exports.load = async(client) => {
.use(CheckAuth, function(err, req, res) { .use(CheckAuth, function(err, req, res) {
console.error(err.stack); console.error(err.stack);
if (!req.user) return res.redirect("/"); if (!req.user) return res.redirect("/");
res.status(500).render("500", { res.status(500).render("500", {
user: req.userInfos, user: req.userInfos,
translate: req.translate, translate: req.translate,

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 (oldMember.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