Skip to content

Commit

Permalink
show proper action count on bot actions
Browse files Browse the repository at this point in the history
  • Loading branch information
3vorp committed Mar 20, 2024
1 parent 3b176f8 commit a3ee558
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/helpers/functions/handleError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export const constructLogFile = (
logTemplate
.replace("%date%", new Date().toUTCString())
.replace("%stack%", reason.stack || JSON.stringify(reason))
.replace("%actionCount%", String(client.logs.length))
.replace("%randomSentence%", sentence)
.replace("%randomSentenceUnderline%", "-".repeat(sentence.length))
.split("%templateStart%")[0] +
Expand All @@ -40,7 +41,7 @@ export const constructLogFile = (
(acc, log, index) =>
acc +
template
.replace("%templateIndex%", String(index))
.replace("%templateIndex%", String(index + 1))
.replace("%templateType%", formatLogType(log))
.replace(
"%templateCreatedTimestamp%",
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/functions/logTemplate.log
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Date: %date%
%stack%

Actions:
> last 50 bot actions: slash commands, chat messages, etc...
> last %actionCount% bot actions: slash commands, chat messages, etc...

%templateStart%
INDEX : %templateIndex%
Expand Down

0 comments on commit a3ee558

Please sign in to comment.