Skip to content

bezsahara/TelegramKitty

Repository files navigation

logo

What is it?

TelegramKitty is a fun and user-friendly Koltin Telegram bot library that makes it easy to access all API methods and types, with names that match the official API. Documentation is also included for all types and methods (was copied from telegram's website).

How to use this?

First, you will need to install it:

dependencies {
    implementation("org.bezsahara:kittybot:1.0.1")
}

A simple program would look like:

KittyBot<PollingReceiver> {
    this.token = "your_token"
    dispatchers {
        text("/start") {
            bot.sendMessage(chatId, "Hi, ${message.chat.firstName}")
        }
    }
}.startPolling()

And more examples are located in samples folder.

Features

Polling and Webhooks

KittyBot (TelegramKitty) supports both polling and webhooks.

Stage-Based Conversation Flow

Easy to use stage-based system that guides users through a conversation. Define the stages, and the bot manages user inputs and transitions automatically. Just use the startStageHandler function in your dispatchers block.

Single and Multi-threaded

Handlers can be executed in single and multi-threaded environments. You can use the updaterMode property in KittyBot builder to specify it.

All these features and many more can be found in samples folder.

Cats

It includes several methods to send cat pics) You can find them in cats.kt

License

Copyright 2024 Hlib Korol

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Powerful and type-safe Telegram Bot API wrapper with built-in cat pic functionality.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages