forked from Galactic/galactic-bot
add points tally to history command
This commit is contained in:
parent
606423d74e
commit
d1da5b1629
@ -107,6 +107,25 @@ class HistoryCommand extends SlashCommand {
|
||||
color: invoker.guild.me.roles.highest.color
|
||||
};
|
||||
|
||||
if (invoker.guild._settings.modpoints.enabled) {
|
||||
const [result] = await infractions.aggregate([{
|
||||
$match: {
|
||||
...query,
|
||||
$or: [{ expiration: { $gt: Date.now() } }, { expiration: null }],
|
||||
resolved: false
|
||||
}
|
||||
}, {
|
||||
$group: {
|
||||
_id: null,
|
||||
points: {
|
||||
$sum: '$points'
|
||||
}
|
||||
}
|
||||
}]);
|
||||
const { points } = result;
|
||||
embed.footer.text += ` | ${points} Points`;
|
||||
}
|
||||
|
||||
let long = false;
|
||||
const handleReason = (text) => {
|
||||
const MaxCharacters = Constants[verbose?.value ? 'MaxCharactersVerbose' : 'MaxCharacters'];
|
||||
|
Loading…
Reference in New Issue
Block a user