mirror of
https://github.com/truewhile/MeBox.git
synced 2026-10-07 22:06:38 +08:00
Clarify cleanup rule bot commands
This commit is contained in:
@@ -171,8 +171,9 @@ func TestTelegramCommandMenusSeparateGroupAndAdminCommands(t *testing.T) {
|
||||
t.Fatalf("group menu should include %s", required)
|
||||
}
|
||||
}
|
||||
adminNames := telegramCommandNames(telegramAdminBotCommandMenu())
|
||||
for _, required := range []string{"users", "status", "cleanup_rule"} {
|
||||
adminCommands := telegramAdminBotCommandMenu()
|
||||
adminNames := telegramCommandNames(adminCommands)
|
||||
for _, required := range []string{"users", "status", "cleanup_mode", "cleanup_rule"} {
|
||||
if !adminNames[required] {
|
||||
t.Fatalf("admin menu should include %s", required)
|
||||
}
|
||||
@@ -182,6 +183,11 @@ func TestTelegramCommandMenusSeparateGroupAndAdminCommands(t *testing.T) {
|
||||
t.Fatalf("admin menu should hide compatibility alias %s", hiddenAlias)
|
||||
}
|
||||
}
|
||||
for _, command := range adminCommands {
|
||||
if strings.Contains(command.Description, "Sakura") {
|
||||
t.Fatalf("admin menu command %s should not mention Sakura: %q", command.Command, command.Description)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func telegramCommandNames(commands []telegramBotCommand) map[string]bool {
|
||||
|
||||
Reference in New Issue
Block a user