Skip to content

Commit ec16719

Browse files
committed
change formatting of time period in leaderboard command
1 parent ef6965b commit ec16719

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

src/modules/rep.ts

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -207,36 +207,30 @@ export class RepModule extends Module {
207207
})
208208
async leaderboard(msg: Message, @optional period: string = 'month') {
209209
let periods = {
210-
'rolling-hour': [
211-
'Within the Last Hour',
212-
Date.now() - 60 * 60 * 1000,
213-
],
214-
'rolling-day': [
215-
'Within the Last 24 Hours',
216-
Date.now() - 24 * 60 * 60 * 1000,
217-
],
210+
'rolling-hour': ['(past hour)', Date.now() - 60 * 60 * 1000],
211+
'rolling-day': ['(past day)', Date.now() - 24 * 60 * 60 * 1000],
218212
'rolling-month': [
219-
'Within the Last 30 Days',
213+
'(past 30 days)',
220214
Date.now() - 30 * 24 * 60 * 60 * 1000,
221215
],
222216
'rolling-year': [
223-
'Within the Last Year',
217+
'(past year)',
224218
Date.now() - 365 * 24 * 60 * 60 * 1000,
225219
],
226220
day: [
227-
'Today',
221+
'(today)',
228222
+new Date(
229223
new Date().getFullYear(),
230224
new Date().getMonth(),
231225
new Date().getDate(),
232226
),
233227
],
234228
month: [
235-
'This Month',
229+
'(this month)',
236230
+new Date(new Date().getFullYear(), new Date().getMonth()),
237231
] as const,
238-
year: ['This Year', +new Date(new Date().getFullYear())],
239-
all: ['All-Time', 0],
232+
year: ['(this year)', +new Date(new Date().getFullYear())],
233+
all: ['(all time)', 0],
240234
} as const;
241235
if (!(period in periods))
242236
return await sendWithMessageOwnership(

0 commit comments

Comments
 (0)