1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-09-29 12:30:58 -04:00

Update punishments.ts

This commit is contained in:
TÆMBØ 2023-02-26 11:19:02 -08:00
parent ca871c21ad
commit 0d88cf9267

View File

@ -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',