Overview
This section contains complete, working examples demonstrating various Gogram features and common use cases.Available Examples
Hello World
Your first Gogram bot - send a simple message
Echo Bot
Bot that repeats everything you send
Welcome Bot
Welcome new members to your group
Get History
Fetch message history from chats
Get Chat Members
List all members in a group or channel
Get Dialogs
Get list of all your chats
Inline Queries
Respond to inline queries (@yourbot)
Using Inline Bots
Use other inline bots in your code
Bot Keyboards
Create custom and inline keyboards
Conversations
Handle multi-step conversations with Ask/Response
Broadcast Messages
Send messages to all bot users without database
Star Gifts
Send and receive Telegram star gifts
Star Payments
Accept payments and handle refunds with Telegram Stars
Raw Updates
Handle raw Telegram updates directly
Basic Bot
Complete bot with commands and handlers
Getting Started
Each example includes:- Complete, runnable code
- Inline comments explaining each step
- Setup instructions
- Common use cases