---
tags: user stories
title: A Karma system
description: A karma bot, designed to track a user's participation in helping others, and not just engagement.
---
# Karma / Reputation System
The system is designed to track a user's participation in helping other members of the discord community through a karma system. Based on karma, we can validate a member's credibility in giving seekers advice, and entrust them with certain exclusive features, such as access to otherwise private channels, and emoji requests.
# User story
## Advice-seeking member's POV
- **An advice-seeking member gets to measure credibility of the person answering their queries.**
- Advice-seeking members may choose to help contribute to the credibility of the person helping them, so when other community members have their queries answered by the same person, they would have some confidence in the *pursuing* the helping member's advice.
- This credibility is measured in `reputation levels`, which is itself calculated using a user's `karma` points.
- `Karma` points aren't shown to members of the community, they're there in the backend, only visible to moderators, if needed.
- Ideally, incrementing the helper's `karma` should be done in an intuitive way, which doesn't disrupt the flow of the conversation taking place in a channel.
- The advice-seeking member shouldn't have to read the documentation for, or know the existence of the karma / reputation system.
## Helper's POV
- Higher a helper's `karma`, higher their `reputation level`.
- So, on gaining `karma`, and thus *leveling up,* the helper essentially gains credibility in the community.
- Once the helper has a high enough `reputation level`, they get exclusive features, such as unlocking otherwise private channels, requesting emojis, and the karma staking system.
## Community's POV
- There's an incentive for regular users to help advice-seeking members.
- There's a *fear of missing out* element for lurkers to start participating.
- Advice-seeking members are ideally more comfortable seeking advice when they have a way to measure the helper's credibility.
- The community has a pipeline to introduce certain exclusive channels to high `reputation level` members before opening them to public.
- Thus, user engagement should be higher.
## Implementation
### How a helper gains karma
- If an advice-seeking member uses a set of trigger words ('Thanks', 'Thank you', 'ty') either in a reply thread, or followed by mentioning the helper's discord tag (@abcxyz#4432, for example), a bot would increment their `karma points` by one.
- If an advice-seeking member, or any other member following a thread, reacts to the helping member's message with a set of pre-defined emojis (such as π andπ), a bot would increment the helper's `karma points` by one for each reaction.
- If and when a helper's karma points go above a bar, their `reputation level` is *leveled up*.
### Checking a user's karma
- If an advice-seeking member, or any member, wants to check another member's reputation level (read: credibility), they can
1. Click on the member's name, and,
2. Check their `reputation level` role on their discord profile popup.
- This is ideal because,
1. The helper wouldn't know someone is checking their karma,
2. This doesn't involve the advice-seeking member needing to head to a bot spam channel, which wouldn't be intuitive, and,
3. Saves the advice-seeking member a few clicks compared to alternative methods.
* Moderators of the community (and only them) should be able to go to a bot spam channel (#testing), and check a user's `karma points` by using a bot command (!karmacheck @abcxyz#4432, for example).
### Retrospective recognition
- While the bot would issue `karma points` in instances where it's triggered after system is in place, it also needs to recognize `karma points` that would have been issued had the system been installed since inception.
- That is, the bot needs to recognize karma points ex-ante, as well as ex-post.
- The bot would need to transverse messages since inception of the server, querying for triggers and issuing `karma points` to helpers accordingly.
- If the above system can't be implemented, a command such as `!ex-post` followed by a user mention, should be available to all members, usable in #testing channel, that queries for triggers and mentions of the specified member.
### Potential for abuse, and how to prevent them
- If any member uses a trigger word followed by their own discord tag, or reacts to their own message with a trigger reaction emoji, the bot should ignore this and **NOT** increment their `karma`.
- If a helper has gained `karma points` from being *thanked* by an advice-seeking member in the past 12 hours, the bot should ignore further increments during that 12-hour period, and NOT increment the member's `karma` by one. In other words, the bot allows only one `karma` increment for a member, by another member, for a 12-hour period.
This is to avoid incrementing a helper's `karma` multiple times in instances where a helper may split their advice into multiple messages unintentionally, which may lead to prompting the advice-seeking member to *thank* them again and again.
# Reputation levels
## Test set
- We've taken a set of members who regularly help beginners in #ask-us-any-question, #general-talk, and #mutual-funds-and-etfs (most active channels), to backtest how much `karma` they would have gained in the study periods.
- We've studied the keywords "thanks" and "thank you".
- We've chosen two durations,
- Late 2020 till April 20, 2021.
- February 2020 till April 20, 2021.
- The resultant set has been shared with the moderators, in private.
## Levels
- Level 1 β Members with `karma points` between `0` and `10` start with this level.
- Level 2 β Members with `karma points` from`10` to `29` get this level.
- Level 3 β Members with `karma points` from `30` to `49` get this level.
- Level 4 β Members with `karma points` from `50` to `99` get this level.
- Level 5 β Members with `karma points` equal to or above `100` get this level.
## Level rewards
### Exclusive channels
The karma / reputation system also serves the community as a filtration system, yielding members with high trust factor, engaging in the community in good faith.
Some exclusive channels, both finance-related, and off-topic, can be opened up to members with high `reputation level`, that otherwise couldn't be tested in open domain.
This gives the community a chance to test out these channels, and helps the moderation team gauge how much, and what kind of moderation, is needed for these subjects. These channels can potentially be opened to all members under the discretion of the moderators, or stay exclusive to high `reputation level` members.
### Emoji requests
As a reward for helping out other community members, helpers can request a new emoji to be added to the community's discord server, provided the moderators give them a green light.
### Karma Staking
# Bot Specifications
- Bot would have to transverse through all messages in all **open** channels to look for the set of trigger words ('Thanks', 'Thank you', 'ty') with either a discord tag (@abcxyz#4432, for example), or in a thread reply message.
- The set of trigger words shouldn't necessarily be followed by a discord tag.
- For example, "*Thanks for your input @abcxyz#4432"* or *"Thanks for the help @abcxyz#4432"* messages should also be able to increment the helper's `karma`.
- The bot should be able to detect more than one discord tags in a message with trigger words, that is, if an advice-seeking member *thanks* two helpers in one message, `karma` should be incremented for both the helpers.
- Bot would have to transverse through all messages in all **open** channels and look for trigger reaction emojis on messages.
# Investigation
Weβre looking at a few existing bots that may be able to fulfill our use case.
## YAGPDB bot
Link: [https://yagpdb.xyz/](https://yagpdb.xyz/)
We test-drived this bot to see if it fits our user stories outlined above.
### What works by default
- Thanking a user using a set of trigger words {'thanks', 'thank', 'ty', 'thank you', 'thx'}, instead of a command, followed by mentioning the user's discord tag. Capitalization isn't an issue with these trigger words.

- Replying on a message thread, with just the trigger word, without mentioning a discord tag.

- The set of trigger words doesn't need to be immediately followed up by a discord tag, there can be characters in between the trigger word, and the user's discord tag.

### Concerns
- Cannot disable bot messages, or restrict them to a bot spam channel. In a busy server, with users frequently thanking each other, these messages can disrupt the flow of conversations.
- Cannot give reputation points to more than one user at once
```
thanks @abc @xyz
```
This leads to only `@abc` receiving reputation points.

However, since YAGPDB is a code-able bot, we were able to implement this.
- Cannot limit to specific channels
We want to disable it in #off-topic and related channels.
- Currently, there is a cooldown that applies to the user using the `giverep` and `takerep` commands, or thanking someone.
We need a cooldown that applies to instances, where one user is thanking another user multiple times in a specified duration. That is, the bot allows only one increment for a member, by another member, for the cooldown period.
- Cannot implement roles for levels, calculated using reputation points, which would be shown on discord profile popups.
### Final call
- Though YADPDB is a code-able bot, the developing team found its customization limited.
- The initial assumption of programming and maintaining our own bot being difficult and monetarily expensive proved to be false.
- Thus, we close our investigation on pre-existing bots for now.