Categorygithub.com/nezorflame/pinger
repository
0.0.0-20240319213408-205db3ad66a2
Repository: https://github.com/nezorflame/pinger.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# README

pinger Workflow status Go Report Card GolangCI

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
  • add required code
  • change the config file to your needs
  • modify .service file for systemd to manage your bot
  • deploy your bot to the server of choice, using modified config and service files

Dependencies

This bot uses:

  • tgbotapi package to work with Telegram API
  • bbolt for local database
  • viper for configuration
  • slog for logging

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 config.toml (and also a corresponding message, if required)
  • edit internal packages

License

FOSSA Status