Skip to content

IgorKha/ircme_bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ircme_bot

Simple Telegram bot on Go (telego) that builds messages in this format:

<name> thinks that: <text>

The generated message is sent in italic formatting.

<name> is resolved with this priority:

  1. username
  2. first_name
  3. someone

Features

  • Handles inline query updates.
  • Returns one inline result (article) with the final message text.
  • Handles /me <text> command in regular chat messages:
    • sends a new bot message in the same style;
    • deletes the original user command message.
  • Uses dedicated handlers for inline and command flows, wired through a shared update dispatcher.
  • Keeps an in-memory usage counter and logs to stdout after every chosen inline result.

Run

export TELEGRAM_BOT_TOKEN="<your_bot_token>"
go run ./cmd/bot

Run In Docker

Build image:

docker build -t ircme-bot .

Run container:

docker run --restart unless-stopped \
  --name ircme_bot \
  -d \
  -e TELEGRAM_BOT_TOKEN="<your_bot_token>" \
  ircme-bot

About

Send IRC /me style message (inline and command mode) in telegram

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors