mirror of
https://github.com/tiennm99/tiennm99bot.git
synced 2026-10-14 10:18:59 +00:00
fix(commands): remove examples from command discovery
This commit is contained in:
1 parent
b5c7427520
commit
a211b7f8b7
22 files changed
+47
-154
No files matched your search
@@ -17,11 +17,6 @@ func (c Command) InvocationSentence() string {
|
||||
return withTerminalPunctuation(c.Invocation())
|
||||
}
|
||||
|
||||
// ExampleInvocation returns the explicitly registered copyable example.
|
||||
func (c Command) ExampleInvocation() string {
|
||||
return strings.TrimSpace(c.Example)
|
||||
}
|
||||
|
||||
// SummarySentence normalizes a command summary to a sentence without
|
||||
// duplicating terminal punctuation supplied by the registration.
|
||||
func (c Command) SummarySentence() string {
|
||||
@@ -38,10 +33,6 @@ func (c Command) TelegramMenuDescription() string {
|
||||
sb.WriteByte(' ')
|
||||
}
|
||||
sb.WriteString(c.SummarySentence())
|
||||
if example := c.ExampleInvocation(); example != "" {
|
||||
sb.WriteString(" Eg: ")
|
||||
sb.WriteString(example)
|
||||
}
|
||||
return sb.String()
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user