abstract class PrivateParlorXT::Statistics
- PrivateParlorXT::Statistics
- Reference
- Object
Overview
A base class statistics module used for calculating and recording data about messages and users
Direct Known Subclasses
Defined in:
private-parlor-xt/statistics/statistics.crInstance Method Summary
-
#config_screen(services : Services) : String
Returns a formatted
Stringcontaining information about the bot and its toggles -
#configuration_details(services : Services) : Hash(BotInfo, String)
Returns a hash of
BotInfotoString, containing information about configuration data and toggles -
#full_users_screen(services : Services) : String
Returns a formatted
Stringcontaining user counts -
#increment_downvotes : Nil
Increment the number of downvotes given
-
#increment_messages(type : Messages) : Nil
Increment the message count according to the given type and increment the total number of messages in general
-
#increment_unoriginal_media : Nil
Increment the number of unoriginal media messages encountered
-
#increment_unoriginal_text : Nil
Increment the number of unoriginal text messages encountered
-
#increment_upvotes : Nil
Increment the number of upvotes given
-
#karma_counts : Hash(Karma, Int32)
Returns a hash of
Karmato `Int32 , containing the total number of karma given or lost, and daily, weekly, and monthly totals -
#karma_level_count(start_value : Int32, end_value : Int32) : Int32
Returns an
Int32total of users whose karma lie between start_value and end_value -
#karma_levels_screen(services : Services) : String
Returns a formatted
Stringcontaining karma level counts -
#karma_screen(services : Services) : String
Returns a formatted
Stringcontaining karma counts -
#keyboard_markup(next_screen : StatScreens, services : Services) : Tourmaline::InlineKeyboardMarkup
Returns the
Tourmaline::InlineKeyboardMarkupfor the given next_screen. -
#message_counts : Hash(Messages, Int32)
Returns a hash of
MessagestoInt32, containing the total number of message for each type and daily, weekly, and monthly totals -
#messages_screen(services : Services) : String
Returns a formatted
Stringcontaining messages counts -
#percent_change(initial : Int32, final : Int32) : Float64
Returns a
Float64containing the percent change from initial to final -
#robot9000_counts : Hash(Robot9000, Int32)
Returns a hash of
Robot9000toInt32, containing the total number of unique and unoriginal messages for texts and media types -
#robot9000_screen(services : Services) : String
Returns a formatted
Stringcontaining Robot9000 counts -
#start_date : String
Returns a
Stringcontaining the date at which the statistics module was initialized -
#start_time : Time
Get the
Timethe module was initialized, which should coincide closely with the time the bot was started. -
#statistic_screen(next_screen : StatScreens, services : Services) : String
Returns a
Stringof the formatted statistics screen based on the given next_screen -
#uptime : Time::Span
Returns a
Time::Spancontaining the amount of time the bot has been running -
#user_counts : Hash(Users, Int32)
Returns a hash of
UserstoInt32, containing the total number of each kind of user and daily, weekly, and monthly totals -
#users_screen(services : Services) : String
Returns a formatted
Stringcontaining a counts of user totals
Instance Method Detail
Returns a formatted String containing information about the bot and its toggles
Returns a hash of BotInfo to String, containing information about configuration data and toggles
Returns a formatted String containing user counts
Increment the message count according to the given type and increment the total number of messages in general
Increment the number of unoriginal media messages encountered
Increment the number of unoriginal text messages encountered
Returns a hash of Karma to `Int32 , containing the total number of karma given or lost, and daily, weekly, and monthly totals
Returns an Int32 total of users whose karma lie between start_value and end_value
Returns a formatted String containing karma level counts
Returns a formatted String containing karma counts
Returns the Tourmaline::InlineKeyboardMarkup for the given next_screen.
Keyboard buttons are localized and displayed in rows of 3 buttons.
Returns a hash of Messages to Int32, containing the total number of message for each type and daily, weekly, and monthly totals
Returns a formatted String containing messages counts
Returns a Float64 containing the percent change from initial to final
Returns a hash of Robot9000 to Int32, containing the total number of unique and unoriginal messages for texts and media types
Returns a formatted String containing Robot9000 counts
Returns a String containing the date at which the statistics module was initialized
Get the Time the module was initialized, which should coincide closely with the time the bot was started.
Used to calculate uptime.
Returns a String of the formatted statistics screen based on the given next_screen
Returns a Time::Span containing the amount of time the bot has been running
Returns a hash of Users to Int32, containing the total number of each kind of user and daily, weekly, and monthly totals
Returns a formatted String containing a counts of user totals