Pass full command manager to context (breaking)

This commit is contained in:
Dustin Pianalto 2020-09-18 17:48:02 -08:00
parent bc86a36745
commit a389de2c77
2 changed files with 10 additions and 10 deletions

View File

@ -92,14 +92,14 @@ func (c *CommandManager) OnMessage(session *discordgo.Session, m *discordgo.Mess
guild, _ := session.Guild(m.GuildID)
ctx := Context{
Session: session,
Channel: channel,
Message: m.Message,
User: m.Author,
Guild: guild,
Member: m.Member,
Invoked: "",
ErrorChannel: c.ErrorChannel,
Session: session,
Channel: channel,
Message: m.Message,
User: m.Author,
Guild: guild,
Member: m.Member,
Invoked: "",
CommandManager: c,
}
var cmd []string

View File

@ -80,6 +80,6 @@ type Context struct {
Member *discordgo.Member
// Name of the command as it was invoked (this is so you know what alias was used to call the command)
Invoked string
// Error channel
ErrorChannel chan CommandError
// Command Manager
CommandManager *CommandManager
}