diff --git a/CHANGELOG.md b/CHANGELOG.md index 55808e0..b3a061b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,14 +1,20 @@ # Selphybot Changelog Updates are listed in reverse chronological order. +### 1.3 (dev) +- use global array of pointers to commands to allow easier modification and avoid unnecessary memcpy +- added feedback to !complain (used to work but was forgotten when refactoring) +- lessen the retardation +- added !mods +- fix !help not showing all relevant commands +- made !help available to all users +- set !help as the currently played game + ### 1.2 - added !help command to automatically print a list of all commands and some additional information - finally wrote a readme - updated wink regex - added more misc commands -- added feedback to !complain (used to work but was forgotten when refactoring) -- use global array of pointers to commands to allow easier modification and avoid unnecessary memcpy -- lessen the retardation ### 1.1 - cooldowns are now stored per-user, not globally, and no longer apply in DMs diff --git a/command.go b/command.go index 54d7422..36ba4b7 100644 --- a/command.go +++ b/command.go @@ -207,9 +207,7 @@ func giveAgeRole(s *discordgo.Session, m *discordgo.MessageCreate) { func getHelpEmbed() *discordgo.MessageEmbed { commandList := "Im Folgenden findest du eine automatisch generierte Liste aller Commands. Um herauszufinden, was sie tun, probiere sie aus oder lies den Source Code (siehe unten).\n```" for _, command := range commands { - fmt.Println(command.Trigger) - if command.Type != CommandTypeRegex && (!command.AdminOnly || command.DMOnly) { - fmt.Sprintf("%s appended", command.Trigger) + if command.Type != CommandTypeRegex && !command.AdminOnly && !command.DMOnly { commandList += "- " + command.Trigger + "\n" } } diff --git a/main.go b/main.go index babbf0a..6096613 100644 --- a/main.go +++ b/main.go @@ -34,6 +34,7 @@ func main() { } defer f.Close() log.SetOutput(f) + dg.UpdateStatus(0, "!help") addCommands() fmt.Println("Bot running. selphyWoo") @@ -77,7 +78,7 @@ func addCommands() { registerCommand(Command{Trigger: "echo", Type: CommandTypePrefix, Function: echoMessage, AdminOnly: true}) // This needs to be the last command because getHelpEmbed is evaluated here once, not on every function call. Putting it too early will result in missing commands in the output. - registerCommand(Command{Trigger: "!help", OutputEmbed: getHelpEmbed(), Type: CommandTypeFullMatch, DMOnly: true}) + registerCommand(Command{Trigger: "!help", OutputEmbed: getHelpEmbed(), Type: CommandTypeFullMatch}) fmt.Printf("Successfully initialized %d commands\n", len(commands)) log.Printf("Successfully initialized %d commands", len(commands))