mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Support sending reports to a specific channel in the home guild
This commit is contained in:
@@ -4,6 +4,7 @@ const { list } = require('../../util/Util');
|
||||
const reasons = ['bug', 'feedback', 'suggestion'];
|
||||
const reasonColors = ['RED', 'GREEN', 'YELLOW'];
|
||||
const displayReasons = ['🐛 Bug Report', '📬 Feedback', '❓ Suggestion'];
|
||||
const { HOME_GUILD_ID, REPORT_CHANNEL_ID } = process.env;
|
||||
|
||||
module.exports = class ReportCommand extends Command {
|
||||
constructor(client) {
|
||||
@@ -39,6 +40,9 @@ module.exports = class ReportCommand extends Command {
|
||||
.setFooter(`ID: ${msg.author.id}`)
|
||||
.setTimestamp()
|
||||
.setColor(reasonColors[reason]);
|
||||
if (HOME_GUILD_ID && REPORT_CHANNEL_ID) {
|
||||
await this.client.guilds.cache.get(HOME_GUILD_ID).channels.cache.get(REPORT_CHANNEL_ID).send({ embed });
|
||||
}
|
||||
for (const owner of this.client.owners) {
|
||||
try {
|
||||
await owner.send({ embed });
|
||||
|
||||
Reference in New Issue
Block a user