Skip to content

Commit

Permalink
layout: implement typed ChatID function
Browse files Browse the repository at this point in the history
  • Loading branch information
demget committed Oct 8, 2020
1 parent 91f4c34 commit 6005ff9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions layout/layout.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ func (lt *Layout) Duration(k string) time.Duration {
return cast.ToDuration(lt.config[k])
}

func (lt *Layout) ChatID(k string) tele.ChatID {
return tele.ChatID(lt.Int64(k))
}

func (lt *Layout) Text(c tele.Context, k string, args ...interface{}) string {
locale, ok := lt.Locale(c)
if !ok {
Expand Down

0 comments on commit 6005ff9

Please sign in to comment.