From 28756355321d023473b9a5d10d43b90a6f479cda Mon Sep 17 00:00:00 2001 From: Maximilian von Lindern Date: Sun, 6 Jun 2021 15:12:16 +0200 Subject: [PATCH] bot: remove deprecated Subcommand.SanitizeMessage --- bot/subcommand.go | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/bot/subcommand.go b/bot/subcommand.go index 3e16ac5..aee97a4 100644 --- a/bot/subcommand.go +++ b/bot/subcommand.go @@ -76,12 +76,6 @@ type Subcommand struct { // Aliases is alternative way to call this subcommand in Discord. Aliases []string - // SanitizeMessage is currently no longer used automatically. - // AllowedMentions is used instead. - // - // This field is deprecated and will be removed eventually. - SanitizeMessage func(content string) string - // Commands can return either a string, a *discord.Embed, or an // *api.SendMessageData, with error as the second argument. @@ -124,12 +118,7 @@ type CanHelp interface { // NewSubcommand is used to make a new subcommand. You usually wouldn't call // this function, but instead use (*Context).RegisterSubcommand(). func NewSubcommand(cmd interface{}) (*Subcommand, error) { - var sub = Subcommand{ - command: cmd, - SanitizeMessage: func(c string) string { - return c - }, - } + sub := Subcommand{command: cmd} if err := sub.reflectCommands(); err != nil { return nil, errors.Wrap(err, "failed to reflect commands")