aboutsummaryrefslogtreecommitdiff
path: root/src/commands/moulberry-bush/report.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-09-05 20:24:50 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-09-05 20:24:50 -0400
commitc4c1d9ffeb179e208792c88dd099caea5030581b (patch)
treedc075bda115de5f6cec925c398f3c9547d1bad55 /src/commands/moulberry-bush/report.ts
parentc238b0279c7686ca45506b0909e376f241cf0e30 (diff)
downloadtanzanite-c4c1d9ffeb179e208792c88dd099caea5030581b.tar.gz
tanzanite-c4c1d9ffeb179e208792c88dd099caea5030581b.tar.bz2
tanzanite-c4c1d9ffeb179e208792c88dd099caea5030581b.zip
add moderation logging, fixes, hide modlog, jank
Diffstat (limited to 'src/commands/moulberry-bush/report.ts')
-rw-r--r--src/commands/moulberry-bush/report.ts11
1 files changed, 6 insertions, 5 deletions
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);