# README
Crare
Provides fasthttp and net/http dual network libraries at the same time!
Use this branch if you want to try out the latest features. If you're after stability, then use the original project.
If you need some examples, I'll put them in this organization.
This is a fork of https://github.com/tucnak/telebot . This library requires minimum go1.21.3
go get -u github.com/3JoB/telebot/v2
Docs
Read the documentation here, it's still a work in progress but will be ready soon.
Contributing
- Fork it
- Clone v2:
git clone -b github.com/3JoB/telebot
- Create your feature branch:
git checkout -b v2
- Make changes and add them:
git add .
- Commit:
git commit -m "add some feature"
- Push:
git push origin v2
- Pull request
License
Crare is distributed under MIT.
# Packages
No description provided by the author
No description provided by the author
No description provided by the author
# Functions
AdminRights could be used to promote user to admin.
Err returns Error instance by given description.
Forever is a ExpireUnixtime of "forever" banning.
FromDisk constructs a new local (on-disk) file object.
FromReader constructs a new file from io.Reader.
FromURL constructs a new file on provided HTTP URL.
NewBot does try to build a Bot with token `token`, which is a secret API key assigned to particular bot.
NewError returns new Error instance with given description.
NewMiddlewarePoller wait for it..
No description provided by the author
NoRestrictions should be used when un-restricting or un-promoting user.
NoRights is the default Rights{}.
Placeholder is used to set input field placeholder as a send option.
SetdefaultJSON will set a default global JSON handler.
# Constants
No description provided by the author
AllowWithoutReply = SendOptions.AllowWithoutReply.
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
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
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
No description provided by the author
ForceReply = ReplyMarkup.ForceReply.
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
NoPreview = SendOptions.DisableWebPagePreview.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
OneTimeKeyboard = ReplyMarkup.OneTimeKeyboard.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
OnMigration happens when group switches to a supergroup.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
Basic message handlers.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
These are one of the possible events Handle() can deal with.
NOTE: Despite "any" type isn't described in documentation, it needed for proper KeyboardButtonPollType marshaling.
No description provided by the author
No description provided by the author
Protected = SendOptions.Protected.
No description provided by the author
No description provided by the author
No description provided by the author
RemoveKeyboard = ReplyMarkup.RemoveKeyboard.
No description provided by the author
Silent = SendOptions.DisableNotification.
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
No description provided by the author
No description provided by the author
No description provided by the author
Bad request errors.
No description provided by the author
Bad request errors.
No description provided by the author
Bad request errors.
Forbidden errors.
Bad request errors.
Bad request errors.
Bad request errors.
Bad request errors.
Bad request errors.
Bad request errors.
No description provided by the author
Bad request errors.
Bad request errors.
Bad request errors.
Bad request errors.
Bad request errors.
Bad request errors.
General errors.
Forbidden errors.
Forbidden errors.
Forbidden errors.
No description provided by the author
Bad request errors.
Bad request errors.
Bad request errors.
Bad request errors.
Bad request errors.
Bad request errors.
Bad request errors.
General errors.
Bad request errors.
Bad request errors.
Bad request errors.
Forbidden errors.
Bad request errors.
Bad request errors.
Bad request errors.
Bad request errors.
Bad request errors.
Bad request errors.
General errors.
Bad request errors.
Bad request errors.
No description provided by the author
General errors.
No description provided by the author
Bad request errors.
Forbidden errors.
Bad request errors.
Bad request errors.
Bad request errors.
Bad request errors.
Bad request errors.
Bad request errors.
Bad request errors.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
Animation object represents a animation file.
ArticleResult represents a link to an article or web page.
Audio object represents an audio file.
AudioResult represents a link to an mp3 audio file.
AutoDeleteTimer represents a service message about a change in auto-delete timer settings.
Bot represents a separate Telegram bot instance.
Btn is a constructor button, which will later become either a reply, or an inline button.
Callback object represents a query from a callback button in an inline keyboard.
CallbackResponse builds a response to a Callback query.
Chat object represents a Telegram user, bot, group or a channel.
ChatInviteLink object represents an invite for a chat.
ChatJoinRequest represents a join request sent to a chat.
ChatLocation represents a location to which a chat is connected.
ChatMember object represents information about a single chat member.
ChatMemberUpdate object represents changes in the status of a chat member.
ChatPhoto object represents a chat photo.
Command represents a bot command.
CommandParams controls parameters for commands-related methods (setMyCommands, deleteMyCommands and getMyCommands).
CommandScope object represents a scope to which bot commands are applied.
Contact object represents a contact to Telegram user.
ContactResult represents a contact with a phone number.
Context wraps an update and represents the context of current event.
Currency contains information about supported currency for payments.
No description provided by the author
Dice object represents a dice with a random value from 1 to 6 for currently supported base emoji.
Document object represents a general file (as opposed to Photo or Audio).
DocumentResult represents a link to a file.
No description provided by the author
File object represents any sort of file.
No description provided by the author
Game object represents a game.
GameHighScore object represents one row of the high scores table for a game.
No description provided by the author
No description provided by the author
GifResult represents a link to an animated GIF file.
Group is a separated group of handlers, united by the general middleware.
No description provided by the author
Handle stores each handler and its corresponding middleware, which may be optimized in the future.
InlineButton represents a button displayed in the message.
InlineResult represents a result of an inline query that was chosen by the user and sent to their chat partner.
InputContactMessageContent represents the content of a contact message to be sent as the result of an inline query.
InputLocationMessageContent represents the content of a location message to be sent as the result of an inline query.
InputMedia represents a composite InputMedia struct that is used by Telebot in sending and editing media methods.
InputTextMessageContent represents the content of a text message to be sent as the result of an inline query.
InputVenueMessageContent represents the content of a venue message to be sent as the result of an inline query.
Invoice contains basic information about an invoice.
Location object represents geographic position.
LocationResult represents a location on a map.
No description provided by the author
Login represents a parameter of the inline keyboard button used to automatically authorize a user.
LongPoller is a classic LongPoller with timeout.
MaskPosition describes the position on faces where a mask should be placed by default.
MenuButton describes the bot's menu button in a private chat.
Message object represents a message.
MessageEntity object represents "special" parts of text messages, including hashtags, usernames, URLs, etc.
MiddlewarePoller is a special kind of poller that acts like a filter for updates.
No description provided by the author
Mpeg4GifResult represents a link to a video animation (H.264/MPEG-4 AVC video without sound).
Order represents information about an order.
Payment contains basic information about a successful payment.
Photo object represents a single photo file.
PhotoResult represents a link to a photo.
Poll contains information about a poll.
PollAnswer represents an answer of a user in a non-anonymous poll.
PollOption contains information about one answer option in a poll.
PreCheckoutQuery contains information about an incoming pre-checkout query.
Price represents a portion of the price for goods or services.
No description provided by the author
ProximityAlert sent whenever a user in the chat triggers a proximity alert set by another user.
Query is an incoming inline query.
QueryResponse builds a response to an inline Query.
ReplyButton represents a button displayed in reply-keyboard.
ReplyMarkup controls two convenient options for bot-user communications such as reply keyboard and inline "keyboard" (a grid of buttons as a part of the message).
No description provided by the author
ResultBase must be embedded into all IQRs.
Rights is a list of privileges available to chat members.
SendOptions has most complete control over in what way the message must be sent, providing an API-complete set of custom properties and options.
Settings represents a utility struct for passing certain properties of a bot around and is required to make bots.
ShippingAddress represents a shipping address.
ShippingOption represents one shipping option.
ShippingQuery contains information about an incoming shipping query.
No description provided by the author
Sticker object represents a WebP image, so-called sticker.
StickerResult represents an inline cached sticker response.
StickerSet represents a sticker set.
StoredMessage is an example struct suitable for being stored in the database as-is or being embedded into a larger struct, which is often the case (you might want to store some metadata alongside, or might not.).
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Update object represents an incoming update.
User object represents a Telegram user, bot.
Venue object represents a venue location with name, address and optional foursquare ID.
VenueResult represents a venue.
Video object represents a video file.
VideoChatEnded represents a service message about a video chat ended in the chat.
VideoChatParticipants represents a service message about new members invited to a video chat.
VideoChatScheduled represents a service message about a video chat scheduled in the chat.
VideoChatStarted represents a service message about a video chat started in the chat.
VideoNote represents a video message.
VideoResult represents a link to a page containing an embedded video player or a video file.
Voice object represents a voice note.
VoiceResult represents a link to a voice recording in an .ogg container encoded with OPUS.
WebApp represents a parameter of the inline keyboard button or the keyboard button used to launch Web App.
WebAppData object represents a data sent from a Web App to the bot.
WebAppMessage describes an inline message sent by a Web App on behalf of a user.
A Webhook configures the poller for webhooks.
A WebhookEndpoint describes the endpoint to which telegram will send its requests.
A WebhookTLS specifies the path to a key and a cert so the poller can open a TLS listener.
No description provided by the author
WebAppAccessAllowed represents a service message about a user allowing a bot to write messages after adding the bot to the attachment menu or launching a Web App from a link.
# Interfaces
CallbackEndpoint is an interface any element capable of responding to a callback `\f<unique>`.
Editable is an interface for all objects that provide "message signature", a pair of 32-bit message ID and 64-bit chat ID, both required for edit operations.
InputMessageContent objects represent the content of a message to be sent as a result of an inline query.
Inputtable is a generic type for all kinds of media you can put into an album.
The idea of Logger comes from https://github.com/tucnak/telebot/issues/619.
Media is a generic type for all kinds of media that includes File.
Poller is a provider of Updates.
Recipient is any possible endpoint you can send messages to: either user, group or a channel.
Result represents one result of an inline query.
Sendable is any object that can send itself.
# Type aliases
Album lets you group multiple media into a single message.
ChatAction is a client-side status indicating bot activity.
ChatID represents a chat or an user integer ID, which can be used as recipient in bot methods.
ChatType represents one of the possible chat types.
No description provided by the author
DiceType defines dice types.
Entities is used to set message's text entities as a send option.
EntityType is a MessageEntity type.
HandlerFunc represents a handler function, which is used to handle actual endpoints.
MaskFeature defines sticker mask position.
MemberStatus is one's chat status.
No description provided by the author
Option is a shortcut flag type for certain message features (so-called options).
ParseMode determines the way client applications treat the text of the message.
PollType defines poll types.
Results is a slice wrapper for convenient marshalling.
Row represents an array of buttons, a row.
No description provided by the author