Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: keep order of commands, better docs #681

Closed
wants to merge 2 commits into from

Conversation

dvordrova
Copy link

Came across some difficulties when used layout, one of that is commands usage:

  • every restart I have different set of commands, owning to it is map (made it list)
  • not obvious to find way of templating commands (added to example.yml) and tests
  • not obvious how to use SetCommands for all not specified locales (added it in layout docstring)

@demget demget added this to the v3.4 milestone Jun 25, 2024
Comment on lines +35 to 44
assert.Equal(t, []tele.Command{{
Text: "start",
Description: "Start the bot",
}, {
Text: "help",
Description: "How to use the bot",
}, {
Text: "settings",
Description: "{{ text `cmd_settings` }}",
}}, lt.Commands())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why to keep lt.Commands() then if they're not executed as a template?

@demget
Copy link
Collaborator

demget commented Aug 9, 2024

Thank you @dvordrova, please rebase from v3.4 and fix the merge conflicts

@demget demget changed the base branch from v3 to v3.4 August 9, 2024 12:20
@demget demget modified the milestones: v3.4, v3.5 Aug 10, 2024
@demget demget deleted the branch tucnak:v3.4 August 10, 2024 14:58
@demget demget closed this Aug 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants