/[sudobot]/trunk/src/commands/moderation/HistoryCommand.ts
ViewVC logotype

Diff of /trunk/src/commands/moderation/HistoryCommand.ts

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 86 by rakin, Mon Jul 29 17:28:32 2024 UTC revision 106 by rakin, Mon Jul 29 17:28:37 2024 UTC
# Line 41  export default class HistoryCommand exte Line 41  export default class HistoryCommand exte
41              switch (type) {              switch (type) {
42                  case PunishmentType.BAN:                  case PunishmentType.BAN:
43                      return 'Ban';                      return 'Ban';
44                    case PunishmentType.SOFTBAN:
45                        return 'Soft Ban';
46                    case PunishmentType.TEMPBAN:
47                        return 'Temporary Ban';
48                  case PunishmentType.BEAN:                  case PunishmentType.BEAN:
49                      return 'Bean';                      return 'Bean';
50                  case PunishmentType.MUTE:                  case PunishmentType.MUTE:
51                      return 'Mute';                      return 'Mute';
52                    case PunishmentType.HARDMUTE:
53                        return 'Hardmute';
54                  case PunishmentType.KICK:                  case PunishmentType.KICK:
55                      return 'Kick';                      return 'Kick';
56                  case PunishmentType.WARNING:                  case PunishmentType.WARNING:
# Line 85  export default class HistoryCommand exte Line 91  export default class HistoryCommand exte
91              // }              // }
92    
93              if (log.get().meta) {              if (log.get().meta) {
94                  const json = JSON.parse(log.get().meta);                  const json = typeof log.get().meta === 'string' ? JSON.parse(log.get().meta) : log.get().meta;
95    
96                  if (Object.keys(json).length > 0) {                  if (Object.keys(json).length > 0) {
97                      str += "Additional Attributes:\n```\n";                      str += "Additional Attributes:\n```\n";

Legend:
Removed from v.86  
changed lines
  Added in v.106

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26