resume active sessions
This commit is contained in:
1 parent
9e94c05fb6
commit
917a361370
19 files changed
+871
-42
No files matched your search
@@ -22,6 +22,8 @@ type SlackCommand struct {
|
||||
Required bool
|
||||
// With no args it only shows a setting.
|
||||
Shows bool
|
||||
// It only shows things, whatever the args.
|
||||
ReadOnly bool
|
||||
}
|
||||
|
||||
const (
|
||||
@@ -66,6 +68,9 @@ var Commands = []SlackCommand{
|
||||
{Name: "dm_permission", Verb: "dm", Required: true,
|
||||
Help: "Allow or forbid everyone changing a setting on their own DM container. User managers only.",
|
||||
Args: "A permission and on or off, like `storage off`"},
|
||||
{Name: "in_flight", Verb: "in-flight", Shows: true, ReadOnly: true,
|
||||
Help: "For debugging: show slackerbot's in-flight files, the replies it's still working on and would pick back up after a restart. Super users and user managers only.",
|
||||
Args: "`all` for every channel's file. Empty shows this channel's"},
|
||||
{Name: "managers", Verb: "managers", Shows: true,
|
||||
Help: "Show, add or remove user managers.",
|
||||
Args: "`add <@U012AB>` or `remove <@U012AB>`. Empty lists them"},
|
||||
@@ -90,7 +95,7 @@ func (c SlackCommand) Missing(args string) bool {
|
||||
}
|
||||
|
||||
func (c SlackCommand) Changes(args string) bool {
|
||||
return !c.Shows || strings.TrimSpace(args) != ""
|
||||
return !c.ReadOnly && (!c.Shows || strings.TrimSpace(args) != "")
|
||||
}
|
||||
|
||||
// Reply is what the bot answers a command call with.
|
||||
|
||||
Reference in new issue
Block a user