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

@ -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)

View File

@ -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)

View File

@ -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
},

View File

@ -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
}

View File

@ -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
},