package
0.0.0-20240805065432-06ae7560d127
Repository: https://github.com/divideprojects/alita_robot.git
Documentation: pkg.go.dev

# Functions

BuildKeyboard is used to build a keyboard from a list of buttons provided by the database.
ChunkKeyboardSlices function used in making the help menu keyboard.
ConvertButtonV2ToDbButton is used to convert []tgmd2html.ButtonV2 to []db.Button.
ExtractAdminUpdateStatusChange Takes a ChatMemberUpdated instance and extracts whether the 'old_chat_member' was a member or admin of the chat and whether the 'new_chat_member' is a admin of the chat.
ExtractJoinLeftStatusChange Takes a ChatMemberUpdated instance and extracts whether the 'old_chat_member' was a member of the chat and whether the 'new_chat_member' is a member of the chat.
FormattingReplacer replaces the formatting in a message.
GetFullName returns the full name of a user.
GetLangFormat returns the language name and flag.
GetMessageLinkFromMessageId Gets the message link via chat Id and message Id maybe replace in future by msg.GetLink().
GetNoteAndFilterType is a helper function to get the note and filter type from a *gotgbot.Message object.
GetWelcomeType is a helper function to get the welcome type from a *gotgbot.Message object.
InitButtons initializes the buttons for the connection menu.
InlineKeyboardMarkupToTgmd2htmlButtonV2 this func is used to convert gotgbot.InlineKeyboardarkup to []tgmd2html.ButtonV2.
IsUserConnected checks if a user is connected to a chat.
MakeLanguageKeyboard makes a keyboard with all the languages in it.
MentionHtml returns a mention in html format.
MentionUrl returns a mention in html format.
PasteToNekoBin CreateTelegraphPost function used to create a Telegraph Page/Post with provide text We can use '<br>' inline text to split the messages into different paragraphs.
ReverseHTML2MD function to convert html formatted raw string to markdown to get noformat string.
RevertButtons is used to convert []db.Button to string.
SendFilter Simple function used to send a filter with help from EnumFuncMap, this just organises data for it.
SendNote Simple function used to send a note with help from EnumFuncMap, this just organises data for it and returns the message.
Shtml is a shortcut for SendMessageOpts with HTML parse mode.
Smarkdown is a shortcut for SendMessageOpts with Markdown parse mode.
SplitMessage splits a message into multiple messages if it is too long.

# Constants

NOTE: small helper functions constants.
NOTE: small helper functions constants.
NOTE: small helper functions constants.
NOTE: small helper functions constants.

# Variables

FiltersEnumFuncMap A rather very complicated FiltersEnumFuncMap Variable made by me to send filters in an appropriate way.
GreetingsEnumFuncMap FIXME: when using /welcome command in private with connection, the string of welcome is sent to connected chat instead of pm GreetingsEnumFuncMap A rather very complicated GreetingsEnumFuncMap Variable made by me to send filters in an appropriate way.
NotesEnumFuncMap TODO: make a new function to merge all EnumFuncMap functions NotesEnumFuncMap A rather very complicated NotesEnumFuncMap Variable made by me to send filters in an appropriate way.