class PrivateParlorXT::ForwardHandler
- PrivateParlorXT::ForwardHandler
- PrivateParlorXT::UpdateHandler
- PrivateParlorXT::Handler
- Reference
- Object
Overview
A handler for forwarded message updates
Defined in:
private-parlor-xt/handlers/update_handlers/forward_handler.crInstance Method Summary
-
#deanonymous_poll?(user : User, message : Tourmaline::Message, services : Services) : Bool
Returns
true
if the forwarded poll does not have anonymous voting -
#do(message : Tourmaline::Message, services : Services) : Nil
Checks if the forwarded message meets requirements and relays it
-
#spamming?(user : User, message : Tourmaline::Message, services : Services) : Bool
Checks if the user is spamming forwarded messages
-
#spend_karma(user : User, services : Services) : User
Returns the
User
with decremented karma whenKarmaHandler
is enabled and user has sufficient karma for a forwarded message -
#sufficient_karma?(user : User, message : Tourmaline::Message, services : Services) : Bool | Nil
Checks if the user has sufficient karma to send a forwarded message when
KarmaHandler
is enabled
Instance methods inherited from class PrivateParlorXT::UpdateHandler
authorized?(user : User, message : Tourmaline::Message, authority : MessagePermissions, services : Services) : Bool
authorized?,
deny_user(user : User, services : Services) : Nil
deny_user,
meets_requirements?(message : Tourmaline::Message) : Bool
meets_requirements?,
message_receivers(user : User, services : Services) : Array(UserID)
message_receivers,
record_message_statistics(type : Statistics::Messages, services : Services) : Nil
record_message_statistics,
reply_receivers(message : Tourmaline::Message, user : User, services : Services) : Hash(UserID, ReplyParameters) | Nil
reply_receivers,
user_from_message(message : Tourmaline::Message, services : Services) : User | Nil
user_from_message
Macros inherited from class PrivateParlorXT::UpdateHandler
return_on_command(text)
return_on_command
Instance methods inherited from class PrivateParlorXT::Handler
do(message : Tourmaline::Message, services : Services) : Nil
do,
reply_message(user : User, message : Tourmaline::Message, services : Services) : Tourmaline::Message | Nil
reply_message,
reply_user(user : User, reply_message : Tourmaline::Message, services : Services) : User | Nil
reply_user,
unique?(user : User, message : Tourmaline::Message, services : Services, text : String | Nil = nil) : Bool
unique?,
update_user_activity(user : User, services : Services) : Nil
update_user_activity
Constructor methods inherited from class PrivateParlorXT::Handler
new(config : Config)
new
Instance Method Detail
Returns true
if the forwarded poll does not have anonymous voting
Returns false
otherwise
Checks if the forwarded message meets requirements and relays it
Checks if the user is spamming forwarded messages
Returns true
if the user is spamming forwarded messages, false
otherwise
Returns the User
with decremented karma when KarmaHandler
is enabled and
user has sufficient karma for a forwarded message
Checks if the user has sufficient karma to send a forwarded message when KarmaHandler
is enabled
Returns true
if:
KarmaHandler
is not enabled- The price for forwarded messages is less than 0
- The user's
Rank
is equal to or greater than the cutoffRank
- User has sufficient karma
Returns nil
if the user does not have sufficient karma