Rename echo/album field to child

Signed-off-by: Etzelia <etzelia@hotmail.com>
pull/7/head
Etzelia 2021-05-13 22:07:58 -05:00
parent 1daa78027b
commit 21bd2a2c8b
No known key found for this signature in database
GPG Key ID: 708511AE7ABC5314
5 changed files with 5 additions and 6 deletions

View File

@ -37,8 +37,7 @@ type commandInit struct {
type command struct { type command struct {
staffOnly bool staffOnly bool
deleteInvocation bool deleteInvocation bool
echo bool child bool
album bool
// TODO Does this really need to exist separately? // TODO Does this really need to exist separately?
validate func(cmd commandInit) bool validate func(cmd commandInit) bool
run func(cmd commandInit) (string, error) run func(cmd commandInit) (string, error)

View File

@ -14,7 +14,7 @@ func Echo(cfg *config.Config) {
commands = append(commands, &command{ commands = append(commands, &command{
name: e.Name, name: e.Name,
aliases: e.Aliases, aliases: e.Aliases,
echo: true, child: true,
validate: func(cmd commandInit) bool { validate: func(cmd commandInit) bool {
return true return true
}, },

View File

@ -65,7 +65,7 @@ func allHelp(cmd commandInit) *discordgo.MessageEmbed {
embed.Description = "Commands with an asterisk (*) are staff-only" embed.Description = "Commands with an asterisk (*) are staff-only"
} }
for _, c := range commands { for _, c := range commands {
if c.echo || c.album { if c.child {
continue continue
} }

View File

@ -19,7 +19,7 @@ func Album(cfg *config.Config) error {
commands = append(commands, &command{ commands = append(commands, &command{
name: a.Name, name: a.Name,
aliases: a.Aliases, aliases: a.Aliases,
album: true, child: true,
validate: func(cmd commandInit) bool { validate: func(cmd commandInit) bool {
return true return true
}, },