Skip to content

Activity levels #135

@purrplingcat

Description

@purrplingcat

Plugin: Wordcounter

User story

Bot can counting levels from a words or messages. When user got that threshold, then level up. Example:

Level up!
User123 levelled up to level 27

Every level can haves own emoticon (user configurable). If some level(s) has not defined emoticon, then it will be used emoticon for the closest lower level of level without emoticon.

Score & Rewards

Maybe later at customer's request. It will by resolve as standalone issue.

Assigment

WHAT WE ALREADY CAN:
PurrplingBot can counting words and messages via plugin Wordcounter. Every recieved message is counted to their author and added words count to user's wordcounter.

Task: Extend the Wordcounter plugin by activity level counter from counted words/messages

Second task: Rewrite Wordcounter plugin to new Plugin API (see issue #136)

Implementation

Bot counts levels from one of two factors (user configurable)

  • WORDS
  • MESSAGES (Level building is some harder)

Bot activity level counter has 3 difficulties:

  • EASY Math.round(Math.log2(counter)) + 1;
  • MEDIUM Math.round(Math.log1p(counter));
  • HARD Math.round(Math.log10(counter)) + 1;

Configuration

Wordcounter:
  activityLevelsEnabled: yes # yes or no
  activityBasedOn: 'words' # words, messages
  activityDifficulty: 'medium' # easy, medium, hard

TODO: Write implementation analysis

Source: Arwenka

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions