diff --git a/admin.go b/admin.go index 1236b8d..32c6e79 100644 --- a/admin.go +++ b/admin.go @@ -30,8 +30,8 @@ func NoRights() Rights { return Rights{} } // NoRestrictions should be used when un-restricting or // un-promoting user. // -// member.Rights = tb.NoRestrictions() -// bot.Restrict(chat, member) +// member.Rights = tb.NoRestrictions() +// b.Restrict(chat, member) // func NoRestrictions() Rights { return Rights{ diff --git a/bot.go b/bot.go index 13c6c41..8b538c1 100644 --- a/bot.go +++ b/bot.go @@ -978,7 +978,7 @@ func (b *Bot) Notify(to Recipient, action ChatAction) error { // Ship replies to the shipping query, if you sent an invoice // requesting an address and the parameter is_flexible was specified. // -// Usage: +// Example: // // b.Ship(query) // OK // b.Ship(query, opts...) // OK with options @@ -1050,8 +1050,8 @@ func (b *Bot) Answer(query *Query, resp *QueryResponse) error { // // Example: // -// bot.Respond(c) -// bot.Respond(c, response) +// b.Respond(c) +// b.Respond(c, response) // func (b *Bot) Respond(c *Callback, resp ...*CallbackResponse) error { var r *CallbackResponse diff --git a/file.go b/file.go index 2025e77..e359bed 100644 --- a/file.go +++ b/file.go @@ -31,7 +31,7 @@ type File struct { // so upon uploading media you'll need to set embedded File // with something. NewFile() returning File makes it a one-liner. // -// photo := &tb.Photo{File: tb.FromDisk("chicken.jpg")} +// photo := &tb.Photo{File: tb.FromDisk("chicken.jpg")} // func FromDisk(filename string) File { return File{FileLocal: filename} @@ -44,7 +44,7 @@ func FromDisk(filename string) File { // so upon uploading media you'll need to set embedded File // with something. NewFile() returning File makes it a one-liner. // -// photo := &tb.Photo{File: tb.FromURL("https://site.com/picture.jpg")} +// photo := &tb.Photo{File: tb.FromURL("https://site.com/picture.jpg")} // func FromURL(url string) File { return File{FileURL: url} @@ -57,7 +57,7 @@ func FromURL(url string) File { // so upon uploading media you'll need to set embedded File // with something. NewFile() returning File makes it a one-liner. // -// photo := &tb.Photo{File: tb.FromReader(bytes.NewReader(...))} +// photo := &tb.Photo{File: tb.FromReader(bytes.NewReader(...))} // func FromReader(reader io.Reader) File { return File{FileReader: reader}