Skip to content

nezorflame/example-telegram-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

f5a7b0d · Mar 23, 2024

History

33 Commits
Mar 19, 2024
Mar 19, 2024
Mar 19, 2024
Mar 19, 2024
Mar 23, 2024
Mar 19, 2024
Mar 19, 2024
Mar 19, 2024
Mar 19, 2024
Mar 19, 2024
Mar 23, 2024
Mar 23, 2024
Mar 19, 2024

Repository files navigation

example-telegram-bot Workflow status Go Report Card GolangCI FOSSA license check FOSSA security check

Example bot template for Telegram.

Description

With this type of setup all you need to do is:

  • create a project from the template and git clone it
  • replace the module and bot name to your own
  • run make init to set up the project and its dependencies
  • add required code
  • set up the environment or your .env file for your needs
  • modify .service file for systemd to manage your bot
  • deploy your bot to the server of choice!

Dependencies

This bot uses:

Structure

This project mostly adheres to the Project Layout structure, excluding pkg folders.

internal package holds the private libraries:

  • config for configuration
  • bolt for database (using BoltDB)
  • file for file and network helpers
  • telegram package with bot implementation

Customization

To add another custom command handler, you can:

  • add a command to .env file (and also a corresponding message, if required)
  • edit internal packages

License

FOSSA Status