Telegram Adapter
The Telegram adapter implements MessagingPort using grammY. Enable it with ADAPTER=telegram.
Group structure
Section titled “Group structure”The Telegram adapter requires a supergroup with Topics enabled. Topics are Telegram’s equivalent of Discord forum threads — one topic is created per ride.
How a ride flows
Section titled “How a ride flows”/newride— a multi-step conversation collects the ride details (or imports from a URL)- The bot creates a forum topic and pins the ride summary
- An announcement is posted in the group’s general thread with a Join this ride button
- When a member taps Join, the bot sends a notification in the ride topic
- The bot sends a day-before reminder (between 9am and 10pm local time) and an hour-before reminder on the day of the ride
Commands
Section titled “Commands”| Command | Description |
|---|---|
/newride |
Start the multi-step ride creation flow |
/rides |
List upcoming rides with a Join button |
/edit |
Edit a ride you proposed |
/cancel |
Cancel an active ride |
/weather |
Get the weather forecast for a ride (use inside its topic) |
/help |
Show how the bot works |
Differences from Discord
Section titled “Differences from Discord”| Feature | Discord | Telegram |
|---|---|---|
| Thread access | Bot adds/removes members explicitly | Topics are visible to all group members |
| Join notification | Sent in the forum thread | Sent in the ride topic |
| Leave notification | Member removed from thread | No-op (topic stays visible) |
| Member leave detection | guildMemberRemove event |
chat_member event (status left/kicked) |
Required bot permissions
Section titled “Required bot permissions”The bot must be an admin in the supergroup with at least:
| Permission | Why |
|---|---|
| Manage topics | Create and close forum topics |
| Pin messages | Pin the ride summary in each topic |
| Send messages | Post announcements and ride updates |