Files
archipelago/connectors/telegram/main.go
T
sam 6761b66bd0 feat(telegram): link a Telegram account to an Archie account with a /start code (archie-core #2095)
Declare links_accounts and the account.link event, return the bot's deep link
from LinkURL, and emit account.link when an allowed user sends /start with a
code. Approval answers carry chat_id so the host can reply to an unlinked
account.
2026-11-27 19:47:00 +11:00

15 lines
572 B
Go

// Command telegram is the Telegram connector: it delivers messages, with
// Approve and Deny buttons on an approval request, to the private chats of
// the users an operator allows, and listens for their taps. A tap becomes an
// approval.answer event, so an answer reaches Archie the way every event does.
// A /start code a user sends the bot becomes an account.link event.
package main
import "github.com/samcharles93/archipelago/sdk/connector"
func main() {
connector.Serve(func(cfg connector.Config) (connector.Connector, error) {
return newTelegram(cfg)
})
}