From a658623ea12fce161f1021a04f426ed805811cf3 Mon Sep 17 00:00:00 2001 From: AnxietyisReal <96593068+AnxietyisReal@users.noreply.github.com> Date: Sun, 26 Feb 2023 11:19:02 -0800 Subject: [PATCH] Update punishments.ts --- src/models/punishments.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/models/punishments.ts b/src/models/punishments.ts index 302bc7a..0147c35 100644 --- a/src/models/punishments.ts +++ b/src/models/punishments.ts @@ -28,6 +28,7 @@ export default class punishments extends Schema { createId = async()=>Math.max(...(await this._content.find({})).map(x=>x.id), 0) + 1; async makeModlogEntry(punishment:Punishment){ // Format data into an embed + const channel = ['kick', 'ban'].includes(punishment.type) ? '1048341961901363352' : this.client.config.mainServer.channels.logs; const embed = new this.client.embed() .setTitle(`${punishment.type[0].toUpperCase() + punishment.type.slice(1)} | Case #${punishment._id}`) .addFields( @@ -43,8 +44,8 @@ export default class punishments extends Schema { embed.addFields({name: '🔹 Overwrites', value: `This case overwrites Case #${cancels.id}\n\`${cancels.reason}\``}) } // Send it off to specific Discord channel. - (this.client.channels.cache.get(this.client.config.mainServer.channels.logs) as Discord.TextChannel).send({embeds:[embed]}); - }// hi tae + (this.client.channels.cache.get(channel) as Discord.TextChannel).send({embeds:[embed]}); + }// hi tae --- hi getTense(type:string){// Get past tense form of punishment type, grammar yes return { ban: 'banned',