Rename echo/album field to child
Signed-off-by: Etzelia <etzelia@hotmail.com>pull/7/head
parent
1daa78027b
commit
21bd2a2c8b
|
@ -9,7 +9,7 @@ const clearMax = 20
|
|||
|
||||
func init() {
|
||||
commands = append(commands, &command{
|
||||
name: "clear",
|
||||
name: "clear",
|
||||
staffOnly: true,
|
||||
validate: func(cmd commandInit) bool {
|
||||
return isStaff(cmd.message.Member.Roles, cmd.config.StaffRoles)
|
||||
|
|
|
@ -37,8 +37,7 @@ type commandInit struct {
|
|||
type command struct {
|
||||
staffOnly bool
|
||||
deleteInvocation bool
|
||||
echo bool
|
||||
album bool
|
||||
child bool
|
||||
// TODO Does this really need to exist separately?
|
||||
validate func(cmd commandInit) bool
|
||||
run func(cmd commandInit) (string, error)
|
||||
|
|
|
@ -14,7 +14,7 @@ func Echo(cfg *config.Config) {
|
|||
commands = append(commands, &command{
|
||||
name: e.Name,
|
||||
aliases: e.Aliases,
|
||||
echo: true,
|
||||
child: true,
|
||||
validate: func(cmd commandInit) bool {
|
||||
return true
|
||||
},
|
||||
|
|
|
@ -65,7 +65,7 @@ func allHelp(cmd commandInit) *discordgo.MessageEmbed {
|
|||
embed.Description = "Commands with an asterisk (*) are staff-only"
|
||||
}
|
||||
for _, c := range commands {
|
||||
if c.echo || c.album {
|
||||
if c.child {
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ func Album(cfg *config.Config) error {
|
|||
commands = append(commands, &command{
|
||||
name: a.Name,
|
||||
aliases: a.Aliases,
|
||||
album: true,
|
||||
child: true,
|
||||
validate: func(cmd commandInit) bool {
|
||||
return true
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue