Skip to content

Commit 66efc1e

Browse files
authored
Merge pull request #213 from Josh-Cena/trunc-history
fix: display 10 entries per page in rep history
2 parents e107fb1 + b88966f commit 66efc1e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/modules/rep.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -181,19 +181,19 @@ export class RepModule extends Module {
181181
rg.amount
182182
} ${emoji}** on [message](${messageLink}) (<@${
183183
rg.initialGiver
184-
}>${rg.amount > 1 ? ' et al.' : ''}) at <t:${
185-
(+new Date(rg.date) / 1000) | 0
186-
}>`;
184+
}>${rg.amount > 1 ? ' et al.' : ''}) at <t:${Math.floor(
185+
+new Date(rg.date) / 1000,
186+
)}>`;
187187
});
188188
if (!records.length) records.push('[no reputation history]');
189-
const recordsPerPage = 30;
189+
const recordsPerPage = 10;
190190
const pages = records
191-
.reduce((acc, cur, index) => {
191+
.reduce<string[][]>((acc, cur, index) => {
192192
const curChunk = Math.floor(index / recordsPerPage);
193193
acc[curChunk] ??= [];
194194
acc[curChunk].push(cur);
195195
return acc;
196-
}, [] as string[][])
196+
}, [])
197197
.map(page => page.join('\n'));
198198
const embed = new MessageEmbed()
199199
.setColor(TS_BLUE)

0 commit comments

Comments
 (0)