Giter Site home page Giter Site logo

real0x0a1 / ruby-telegrambot Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 2 KB

This is a professional Telegram bot developed using the `telegram/bot` and `teleglass` libraries. It provides information and assistance to users.

Ruby 100.00%
ruby ruby-language ruby-programming-language ruby-project telegram-bot ruby-telegram-bot

ruby-telegrambot's Introduction

Professional Telegram Bot

This is a professional Telegram bot developed using the telegram/bot and teleglass libraries. It provides information and assistance to users.

Getting Started

To use this bot, you need to have a Telegram Bot API token. Replace YOUR_API_TOKEN in the code with your actual bot API token.

You also need to define the channel ID that users need to join in order to use the bot. Replace @your_channel_username with your actual channel username.

Features

Once a user joins the required channel, the bot provides the following features:

  • /start command: Displays a welcome message and asks for user's request.
  • /help command: Displays the help section with available commands.
  • /about command: Displays information about the bot.
  • Default response: If the user sends a message other than the above commands, the bot sends a default response suggesting the user to use /help command.

Implementation Details

The code checks if a user has joined the required channel using the user_joined_channel? method. If the user hasn't joined, the bot asks the user to join the channel by sending a message with a button. The button redirects the user to the channel.

The methods send_welcome_message, send_help_message, send_about_message, and send_default_response handle the respective functionality when the user interacts with the bot.

Example Usage

To use this bot, follow these steps:

  1. Replace YOUR_API_TOKEN with your Telegram Bot API token.
  2. Replace @your_channel_username with your actual channel username.
  3. Run the code to start the Telegram bot.
  4. Join the required channel using the button provided by the bot.
  5. Interact with the bot using the available commands.

Contributions

Contributions to this project are welcome. Feel free to make any improvements or add more features to enhance the bot's usability.

Happy botting!

Author

  • Ali (Real0x0a1)

ruby-telegrambot's People

Contributors

real0x0a1 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.