# README
=================================== Common Controls Library for Telebot
Library provides common controls to use with Telebot_ library.
- Picklist
- Rating
- Post Buttons
- Keyboard
- Middleware
- Helper functions for logging.
.. _Telebot: https://github.com/tucnak/telebot
# Packages
No description provided by the author
# Functions
ButtonMarkup returns the button markup for the message.
No description provided by the author
ChatInfo returns the chat info.
No description provided by the author
GetLogger returns current logger.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewInput text creates a new text input, optionally chaining with the `next` handler.
NewInputError returns an input error with msg.
No description provided by the author
No description provided by the author
NewMessage creates new Message Controller.
NewMessageText is a convenience wrapper for NewMessage with a fixed text.
NewPicklist creates a new picklist.
NewPicklistText is a convenience function to return picklist with fixed text and values.
NewPostButtons creates an instance of PostButtons.
No description provided by the author
NewSubChecker creates new subscription checker that checks the subscription on the desired channels.
NoDebugLogger switches off debug messages.
NoLogging switches off default logging, if you're brave.
No description provided by the author
No description provided by the author
PickOptBtnPattern sets the inline markup button pattern.
No description provided by the author
No description provided by the author
No description provided by the author
PickOptNoUpdate sets the No Update option.
No description provided by the author
No description provided by the author
PickOptRemoveButtons set the Remove Buttons option.
No description provided by the author
PrivateOnly is the middleware that restricts the handler to only private messages.
No description provided by the author
RBOptShowPostRating enables counter of total upvotes/downvotes.
RBOptShowVoteCounter enables post rating between up/down vote buttons.
No description provided by the author
No description provided by the author
Sdump dumps the structure.
SetDebugLogger sets the debug logger which is used to output debug messages, if you must.
SetLogger sets the current logger.
TextFn wraps the message in a TextFunc.
Userinfo returns the user info.
No description provided by the author
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
No description provided by the author
ErrNoChange should be returned if the user picked the same value as before, and no update needed.
ErrRetry should be returned by CallbackFunc if the retry should be performed.
# Structs
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Message is the controller that sends a message.
No description provided by the author
No description provided by the author
Rating is a struct for attaching post rating.
No description provided by the author
SubChecker is controller to check the chat subscription.
# Interfaces
No description provided by the author
Boter is the interface to send messages.
No description provided by the author
Controller is the interface that some of the common controls implement.
Logger is the interface for logging.
# Type aliases
BtnCallbackFunc is being called once the user picks the value, it should return error if the value is incorrect, or ErrRetry if the retry should be performed.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
MsgErrFunc is the function that processes the user input.
No description provided by the author
No description provided by the author
RatingFunc is the function called by callback, given the message, user and the button index it should update the records and return the new buttons with updated values for the posting, it must maintain count of votes inhouse.
No description provided by the author
No description provided by the author
No description provided by the author
TextFunc returns formatted text, possibly personalised for user u.
TextFunc returns values for inline buttons, possibly personalised for user u.