@@ -10,7 +10,7 @@ import { ModerationComponent, parse_duration } from "./moderation-common.js";
1010import { moderation_entry } from "./schemata.js" ;
1111import { CommandSetBuilder } from "../../../../command-abstractions/command-set-builder.js" ;
1212import { colors } from "../../../../common.js" ;
13- import Modlogs from "./modlogs.js" ;
13+ import Modlogs , { staff_moderation_display_options , public_moderation_display_options } from "./modlogs.js" ;
1414import {
1515 EarlyReplyMode ,
1616 TextBasedCommandBuilder ,
@@ -150,17 +150,21 @@ export default class ModerationControl extends BotComponent {
150150 await this . reply_with_success ( command , "Reason updated" ) ;
151151 await this . staff_action_log . send ( {
152152 embeds : [
153- Modlogs . case_summary ( res , await this . wheatley . client . users . fetch ( res . user ) , true ) . setTitle (
154- `Case ${ res . case_number } reason updated` ,
155- ) ,
153+ Modlogs . case_summary (
154+ res ,
155+ await this . wheatley . client . users . fetch ( res . user ) ,
156+ staff_moderation_display_options ,
157+ ) . setTitle ( `Case ${ res . case_number } reason updated` ) ,
156158 ] ,
157159 } ) ;
158160 if ( res . type !== "note" ) {
159161 await this . public_action_log . send ( {
160162 embeds : [
161- Modlogs . case_summary ( res , await this . wheatley . client . users . fetch ( res . user ) , false ) . setTitle (
162- `Case ${ res . case_number } reason updated` ,
163- ) ,
163+ Modlogs . case_summary (
164+ res ,
165+ await this . wheatley . client . users . fetch ( res . user ) ,
166+ public_moderation_display_options ,
167+ ) . setTitle ( `Case ${ res . case_number } reason updated` ) ,
164168 ] ,
165169 } ) ;
166170 await this . notify_user ( res . user , case_number , `**Reason:** ${ reason } ` ) ;
@@ -186,9 +190,11 @@ export default class ModerationControl extends BotComponent {
186190 await this . reply_with_success ( command , "Context updated" ) ;
187191 await this . staff_action_log . send ( {
188192 embeds : [
189- Modlogs . case_summary ( res , await this . wheatley . client . users . fetch ( res . user ) , true ) . setTitle (
190- `Case ${ res . case_number } context updated` ,
191- ) ,
193+ Modlogs . case_summary (
194+ res ,
195+ await this . wheatley . client . users . fetch ( res . user ) ,
196+ staff_moderation_display_options ,
197+ ) . setTitle ( `Case ${ res . case_number } context updated` ) ,
192198 ] ,
193199 } ) ;
194200 } else {
@@ -224,17 +230,21 @@ export default class ModerationControl extends BotComponent {
224230 this . wheatley . event_hub . emit ( "update_moderation" , res ) ;
225231 await this . staff_action_log . send ( {
226232 embeds : [
227- Modlogs . case_summary ( res , await this . wheatley . client . users . fetch ( res . user ) , true ) . setTitle (
228- `Case ${ res . case_number } duration updated` ,
229- ) ,
233+ Modlogs . case_summary (
234+ res ,
235+ await this . wheatley . client . users . fetch ( res . user ) ,
236+ staff_moderation_display_options ,
237+ ) . setTitle ( `Case ${ res . case_number } duration updated` ) ,
230238 ] ,
231239 } ) ;
232240 if ( res . type !== "note" ) {
233241 await this . public_action_log . send ( {
234242 embeds : [
235- Modlogs . case_summary ( res , await this . wheatley . client . users . fetch ( res . user ) , false ) . setTitle (
236- `Case ${ res . case_number } duration updated` ,
237- ) ,
243+ Modlogs . case_summary (
244+ res ,
245+ await this . wheatley . client . users . fetch ( res . user ) ,
246+ public_moderation_display_options ,
247+ ) . setTitle ( `Case ${ res . case_number } duration updated` ) ,
238248 ] ,
239249 } ) ;
240250 const duration_str = res . duration ? time_to_human ( res . duration ) : "Permanent" ;
@@ -267,17 +277,21 @@ export default class ModerationControl extends BotComponent {
267277 this . wheatley . event_hub . emit ( "update_moderation" , res ) ;
268278 await this . staff_action_log . send ( {
269279 embeds : [
270- Modlogs . case_summary ( res , await this . wheatley . client . users . fetch ( res . user ) , true ) . setTitle (
271- `Case ${ res . case_number } expunged` ,
272- ) ,
280+ Modlogs . case_summary (
281+ res ,
282+ await this . wheatley . client . users . fetch ( res . user ) ,
283+ staff_moderation_display_options ,
284+ ) . setTitle ( `Case ${ res . case_number } expunged` ) ,
273285 ] ,
274286 } ) ;
275287 if ( res . type !== "note" ) {
276288 await this . public_action_log . send ( {
277289 embeds : [
278- Modlogs . case_summary ( res , await this . wheatley . client . users . fetch ( res . user ) , false ) . setTitle (
279- `Case ${ res . case_number } expunged` ,
280- ) ,
290+ Modlogs . case_summary (
291+ res ,
292+ await this . wheatley . client . users . fetch ( res . user ) ,
293+ public_moderation_display_options ,
294+ ) . setTitle ( `Case ${ res . case_number } expunged` ) ,
281295 ] ,
282296 } ) ;
283297 await this . notify_user ( res . user , case_number , `**Expunged:** ${ reason ?? "No reason provided" } ` ) ;
0 commit comments