Tourmaline::HashPersistence
Inherits Tourmaline::Persistence < Reference < Object
Stores all persisted data in memory using a collection of hash tables.
Constructors
new(filename = nil)
SourceInstance methods
Returns true if the chat with the provided username exists.
filename
SourceFetches a chat by chat_id. Returns nil if the chat is not found.
Fetches a chat by username. Returns nil if the chat is not found.
Fetches a user by user_id. Returns nil if the user is not found.
Fetches a user by username. Returns nil if the user is not found.
handle_update(update : Update)
Takes an Update object, pulls out all unique Chats and Users,
and uses update_user and update_chat on each of them respectively.
init
Gets called when the bot is initialized. This can be used for setup if you need access to the bot instance.
persisted_chat_ids
Sourcepersisted_chats
Sourcepersisted_user_ids
Sourcepersisted_users
Source