aboutsummaryrefslogtreecommitdiff
path: root/src/commands/moulberry-bush/report.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-08-17 12:31:09 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-08-17 12:31:09 -0400
commitd40527d0a2d9f209905750258f71bedff1cdf089 (patch)
treee017fd844c2135bfc85228d00ef2617d24ce0a3f /src/commands/moulberry-bush/report.ts
parentd431ad00754f3f250103deedea495b9bcee73fc0 (diff)
downloadtanzanite-d40527d0a2d9f209905750258f71bedff1cdf089.tar.gz
tanzanite-d40527d0a2d9f209905750258f71bedff1cdf089.tar.bz2
tanzanite-d40527d0a2d9f209905750258f71bedff1cdf089.zip
turned on ts strict option
Diffstat (limited to 'src/commands/moulberry-bush/report.ts')
-rw-r--r--src/commands/moulberry-bush/report.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/commands/moulberry-bush/report.ts b/src/commands/moulberry-bush/report.ts
index e91420b..878337b 100644
--- a/src/commands/moulberry-bush/report.ts
+++ b/src/commands/moulberry-bush/report.ts
@@ -59,7 +59,7 @@ export default class ReportCommand extends BushCommand {
message: BushMessage,
{ member, evidence }: { member: GuildMember; evidence: string }
): Promise<unknown> {
- if (message.guild.id != client.consts.mappings.guilds.bush)
+ if (message.guild!.id != client.consts.mappings.guilds.bush)
return await message.util.reply(`${util.emojis.error} This command can only be run in Moulberry's bush.`);
if (!member) return await message.util.reply(`${util.emojis.error} Choose someone to report`);
if (member.user.id === '322862723090219008')
@@ -76,14 +76,14 @@ export default class ReportCommand extends BushCommand {
const reportEmbed = new MessageEmbed()
.setFooter(`Reporter ID: ${message.author.id} Reported ID: ${member.user.id}`)
.setTimestamp()
- .setAuthor(`Report From: ${message.author.tag}`, message.author.avatarURL({ dynamic: true }))
+ .setAuthor(`Report From: ${message.author.tag}`, message.author.avatarURL({ dynamic: true }) ?? undefined)
.setTitle('New Report')
.setColor(util.colors.red)
.setDescription(evidence)
.addField(
'Reporter',
`**Name:**${message.author.tag} <@${message.author.id}>\n**Joined:** ${moment(
- message.member.joinedTimestamp
+ message.member!.joinedTimestamp
).fromNow()}\n**Created:** ${moment(message.author.createdTimestamp).fromNow()}\n**Sent From**: <#${
message.channel.id
}> [Jump to context](${message.url})`,
@@ -99,11 +99,11 @@ export default class ReportCommand extends BushCommand {
//reusing code pog
if (message.attachments.size > 0) {
- const fileName = message.attachments.first().name.toLowerCase();
+ const fileName = message.attachments.first()!.name!.toLowerCase();
if (fileName.endsWith('.png') || fileName.endsWith('.jpg') || fileName.endsWith('.gif') || fileName.endsWith('.webp')) {
- reportEmbed.setImage(message.attachments.first().url);
+ reportEmbed.setImage(message.attachments.first()!.url);
} else {
- reportEmbed.addField('Attachment', message.attachments.first().url);
+ reportEmbed.addField('Attachment', message.attachments.first()!.url);
}
}
const reportChannel = client.channels.cache.get('782972723654688848') as unknown as BushTextChannel;