telegram

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package telegram exposes the Telegram (Bot API) constructor and the raw-update and client accessors for botbooter. Import it for a Telegram bot; a Telegram-only binary pulls in go-telegram but never discordgo or slack-go.

Index

Constants

View Source
const EnvSuppressURLWarning = tgint.EnvSuppressURLWarning

EnvSuppressURLWarning names the environment variable that silences the plaintext-token warning the Telegram resolver logs on every successful attachment resolve. Set it to any non-empty value to opt out.

Variables

This section is empty.

Functions

func Client

func Client(b *botbooter.Bot) *bot.Bot

Client returns the go-telegram bot client backing b, or nil if b is not a Telegram bot.

func New

func New(token string) (*botbooter.Bot, error)

New creates a Telegram bot from a BotFather token. It returns an error only if go-telegram rejects the token at construction; an invalid token otherwise surfaces when Run or Connect starts polling.

func RawReactionUpdate added in v0.4.0

func RawReactionUpdate(r *botbooter.Reaction) (*models.MessageReactionUpdated, bool)

RawReactionUpdate returns the raw Telegram message_reaction update carried on r, reporting whether r originated from a Telegram reaction.

func RawUpdate

func RawUpdate(m *botbooter.Message) (*models.Update, bool)

RawUpdate returns the raw Telegram update carried on m, reporting whether m originated from Telegram.

Types

This section is empty.

Jump to

Keyboard shortcuts

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