Skip to content

RabbitFored/gogram

Repository files navigation

telepher

Support Chat Off-topic

Features

Usage

package main

import (
    tl "github.com/goTelegramBot/gogram"
        "github.com/goTelegramBot/gogram/types"
)
  

func main() {
    
           b,err := tl.NewBot(os.Getenv("TOKEN"),nil)
    
           if err != nil{
                log.Println(err)
                return
           }

           b.Command("start",start)
           b.Start()
}
func start(bot tl.Bot,message *types.Message) {
            text := "Hi there!"
    
            markup := tl.InlineKeyboardMarkup()
            
            but1 := types.InlineKeyboardButton{Text:"Channel",Url: "https://t.me/theostrich"}
            but2 := types.InlineKeyboardButton{Text:"Support",Url: "https://t.me/ostrichdiscussion"}
            
            row1 := markup.Row(but1,but2)
            keyboard := markup.Parse(row1)
     
            bot.SendMessage(message.Chat.Id, text,&tl.Options{ReplyMarkup:&keyboard,ParseMode:"Markdown"})
}
     

For additional bot examples check examples repository.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages