Skip to content

Commit

Permalink
Remove karma leaderboards
Browse files Browse the repository at this point in the history
  • Loading branch information
nb1701 committed Sep 25, 2024
1 parent c1725b1 commit 3b340a7
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions scripts/karma.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,28 +222,6 @@ module.exports = {
}
})

app.message(/^!\s*karma\s?(top|best)?$/i, async ({context}) => {
let messages = ['The Most Karmically Awesome']
let top_karma = top(5)
let rank = 1
for (const [subject, karma] of top_karma) {
messages.push(`${rank}. ${subject}: ${karma}`)
rank++
}
await context.say(messages.join('\n'))
})

app.message(/^!\s*karma (bottom|worst)$/i, async ({context}) => {
let messages = ['The Most Karmically Challenged']
let top_karma = bottom(5)
let rank = 1
for (const [subject, karma] of top_karma) {
messages.push(`${rank}. ${subject}: ${karma}`)
rank++
}
await context.say(messages.join('\n'))
})

app.message(/^!\s*karma (clear|reset) ([\s\S]+)$/, async ({context}) => {
let subject = context.matches[2].trim()
if (subject.match(/^<@(\S+)>$/) || userNameExists(subject)) {
Expand Down

0 comments on commit 3b340a7

Please sign in to comment.