Skip to content

Commit

Permalink
feat: add global logs
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperchupuDev committed Oct 9, 2021
1 parent e93d945 commit c1dfc77
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"scopes": ["bot", "applications.commands"]
},
"guildLogs": "854374012667166750",
"globalLogs": "805472059790589974",
"support": "https://discord.gg/AbUw9fh",
"gasServer": "https://discord.gg/qs9QDW5M5J",
"docs": "https://h-projects.github.io/docs/bots/gas",
Expand Down
19 changes: 19 additions & 0 deletions detector/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,23 @@ module.exports = async ({ client, message, member, reaction, type }) => {
}
}]
});

if (logs === client.config.globalLogs) {
return;
}

fields.splice(1, 0, { name: 'Server', value: `${member.guild} (${member.guild.id})` });

const globalLogs = client.channels.cache.get(client.config.globalLogs);
globalLogs.send({
embeds: [{
title: 'G Removal',
url: 'https://h-projects.github.io/app/fuck-g/',
color: client.config.color,
fields,
thumbnail: {
url: member.displayAvatarURL({ dynamic: true })
}
}]
});
};

0 comments on commit c1dfc77

Please sign in to comment.