From c4c1d9ffeb179e208792c88dd099caea5030581b Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Sun, 5 Sep 2021 20:24:50 -0400 Subject: add moderation logging, fixes, hide modlog, jank --- src/commands/moulberry-bush/report.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/commands/moulberry-bush/report.ts') diff --git a/src/commands/moulberry-bush/report.ts b/src/commands/moulberry-bush/report.ts index e387e7d..a5c4cb2 100644 --- a/src/commands/moulberry-bush/report.ts +++ b/src/commands/moulberry-bush/report.ts @@ -1,6 +1,6 @@ import { GuildMember, MessageEmbed } from 'discord.js'; import moment from 'moment'; -import { AllowedMentions, BushCommand, BushMessage, BushTextChannel } from '../../lib'; +import { AllowedMentions, BushCommand, BushMessage } from '../../lib'; export default class ReportCommand extends BushCommand { public constructor() { @@ -71,9 +71,11 @@ export default class ReportCommand extends BushCommand { if (member.user.bot) return await message.util.reply(`${util.emojis.error} You cannot report a bot <:WeirdChamp:756283321301860382>.`); - const reportChannelId = (await message.guild.getSetting('logChannels')).report; - if (!reportChannelId) - return await message.util.reply(`${util.emojis.error} This server has not setup a report logging channel.`); + const reportChannel = await message.guild.getLogChannel('report'); + if (!reportChannel) + return await message.util.reply( + `${util.emojis.error} This server has not setup a report logging channel or the channel no longer exists.` + ); //The formatting of the report is mostly copied from carl since it is pretty good when it actually works const reportEmbed = new MessageEmbed() @@ -109,7 +111,6 @@ export default class ReportCommand extends BushCommand { reportEmbed.addField('Attachment', message.attachments.first()!.url); } } - const reportChannel = client.channels.cache.get(reportChannelId) as unknown as BushTextChannel; await reportChannel.send({ embeds: [reportEmbed] }).then(async (ReportMessage) => { try { await ReportMessage.react(util.emojis.check); -- cgit