class PrivateParlorXT::HandlerConfig

Overview

Contains a limited set of Config variables that are needed for handlers

Defined in:

private-parlor-xt/config/handler_config.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(config : Config) #

Creates a new instance of `HandlerConfig``


[View source]

Instance Method Detail

def allow_effects : Bool | Nil #

Whether or not to allow users to send messages with a message effect animation


[View source]
def allow_spoilers : Bool | Nil #

Whether or not to allow users to send photos, videos, or GIFs with a spoiler overlay


[View source]
def blacklist_contact : String | Nil #

Returns the contact string shown to blacklisted users


[View source]
def cooldown_base : Int32 #

The base integer for which cooldown times are computed from


[View source]
def default_rank : Int32 #

The value of the Rank a user will be set to when joining for the first time or getting demoted


[View source]
def downvote_limit_interval : Int32 #

Limit a user's usage of DownvoteHandler for once every interval (in seconds)


[View source]
def entity_types : Array(String) #

An array of String referring to entity types that will be removed from all messages


[View source]
def flag_signatures : Bool | Nil #

Whether or not to replace tripcodes with a flag or emoji signature


[View source]
def karma_levels : Hash(Range(Int32, Int32), String) #

A hash of Range(Int32, Int32) => String mapping a range of possible User karma values to the name of the karma level that is defined by that range


[View source]
def karma_reasons : Bool | Nil #

Whether or not to allow users to attach a reason to their upvote/downvote messages


[View source]
def linked_network : Hash(String, String) #

A hash of String => String mapping the name of a chat to the chat's username


[View source]
def media_limit_period : Time::Span #

The duration (in hours) in which new users cannot send media


[View source]
def pseudonymous : Bool | Nil #

Whether or not to enable pseudonymous mode, which forces the use of tripcodes for all users and automatically prepends messages with the user's tripcode


[View source]
def registration_open : Bool | Nil #

Whether or not registration is open, allowing new users to join


[View source]
def sign_limit_interval : Int32 #

Limit a users' usage of SignCommand and TripodeSignCommand for once every interval (in seconds)


[View source]
def tripcode_salt : String #

A String used to generate secure tripcodes


[View source]
def upvote_limit_interval : Int32 #

Limit a user's usage of UpvoteHandler for once every interval (in seconds)


[View source]
def warn_deduction : Int32 #

The amount of karma to remove from a user when receiving a cooldown


[View source]
def warn_lifespan : Int32 #

The length of time (in hours) until a warning expires


[View source]