kbot

command module
v1.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2023 License: MIT Imports: 1 Imported by: 0

README

KBot

DevOps application from scratch

KBot is a Telegram bot written in the Go programming language, utilizing the Cobra-CLI v1.8.0 framework for command handling and Telebot v3.1.4 for integration with the Telegram API.

Installation

To get started with KBot, clone the repository:

git clone https://github.com/PTarasyuk/kbot.git
cd kbot

To install all necessary dependencies and compile the project, use:

go get
go build -ldflags "-X="github.com/PTarasyuk/kbot/cmd.appVersion=v1.0.2

To test the compiled project, do the following:

./kbot version

as a result, you should get the app's version v1.0.2.

Configuration

Enter your Telegram bot token in silent mode:

read -s TELE_TOKEN

Export the value of the TELE TOKEN variable to the current shell environment.

export TELE_TOKEN

Running

Run KBot using the following command:

./kbot start

@ptarasyuk_bot

Usage

This project uses a Makefile for common tasks. Run the following commands:

  • Format Code: make format
  • Lint Code: make lint
  • Run Tests: make test
  • Get Dependencies: make get
  • Build Application: make build (Override REGISTRY, TARGETOS and TARGETARCH with make build REGISTRY=ptarasyuk TARGETOS=linux TARGETARCH=arm)
  • Create Docker Image: make image (Override REGISTRY, TARGETOS and TARGETARCH with make image REGISTRY=ptarasyuk TARGETOS=linux TARGETARCH=arm)
  • Push Docker Image: make push (Override REGISTRY, TARGETOS and TARGETARCH with make push REGISTRY=ptarasyuk TARGETOS=linux TARGETARCH=arm)
  • Clean: make clean

For more details and options, run make help.

Documentation

Overview

Copyright © 2023 NAME HERE <EMAIL ADDRESS>

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL