Skip to content

Commit

Permalink
fix tabs, fix autoformatting
Browse files Browse the repository at this point in the history
  • Loading branch information
dvordrova committed Aug 21, 2024
1 parent 5a355da commit 011b8c7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
29 changes: 15 additions & 14 deletions layout/example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ config:
- <<: *obj
- <<: *obj


buttons:
# Shortened reply buttons
help: Help
Expand All @@ -37,16 +38,16 @@ buttons:
stop:
unique: stop
text: Stop
data: "{{.}}"
data: '{{.}}'

# Callback data
pay:
unique: pay
text: Pay
data:
- "{{ .UserID }}"
- "{{ .Amount }}"
- "{{ .Currency }}"
- '{{ .UserID }}'
- '{{ .Amount }}'
- '{{ .Currency }}'

web_app:
text: This is a web app
Expand All @@ -55,22 +56,22 @@ buttons:

markups:
reply_shortened:
- [help]
- [settings]
- [ help ]
- [ settings ]
reply_extended:
keyboard:
- [contact]
- [ contact ]
one_time_keyboard: true
inline:
- [stop]
- [ stop ]
web_app:
- [web_app]
- [ web_app ]

results:
article:
type: article
id: "{{ .ID }}"
title: "{{ .Title }}"
description: "{{ .Description }}"
thumbnail_url: "{{ .PreviewURL }}"
message_text: "{{ text `article_message` }}"
id: '{{ .ID }}'
title: '{{ .Title }}'
description: '{{ .Description }}'
thumbnail_url: '{{ .PreviewURL }}'
message_text: '{{ text `article_message` }}'
6 changes: 3 additions & 3 deletions layout/layout.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,9 @@ func (lt *Layout) Commands() (cmds []tele.Command) {
//
// Usage:
//
// b.SetCommands(lt.CommandsLocale("en"), "en")
// b.SetCommands(lt.CommandsLocale("ru"), "ru")
// b.SetCommands(lt.CommandsLocale("en"))
// b.SetCommands(lt.CommandsLocale("en"), "en")
// b.SetCommands(lt.CommandsLocale("ru"), "ru")
// b.SetCommands(lt.CommandsLocale("en"))
func (lt *Layout) CommandsLocale(locale string, args ...interface{}) (cmds []tele.Command) {
var arg interface{}
if len(args) > 0 {
Expand Down

0 comments on commit 011b8c7

Please sign in to comment.