mumbledj/commands/help.go
2019-05-03 23:29:15 +02:00

75 lines
2.1 KiB
Go

/*
* MumbleDJ
* By Matthieu Grieger
* commands/help.go
* Copyright (c) 2016 Matthieu Grieger (MIT License)
*/
package commands
import (
"fmt"
"layeh.com/gumble/gumble"
"github.com/spf13/viper"
)
// HelpCommand is a command that outputs a help message that shows the
// available commands and their aliases.
type HelpCommand struct{}
// Aliases returns the current aliases for the command.
func (c *HelpCommand) Aliases() []string {
return viper.GetStringSlice("commands.help.aliases")
}
// Description returns the description for the command.
func (c *HelpCommand) Description() string {
return viper.GetString("commands.help.description")
}
// IsAdminCommand returns true if the command is only for admin use, and