Pass full command manager to context (breaking)
This commit is contained in:
parent
bc86a36745
commit
a389de2c77
@ -92,14 +92,14 @@ func (c *CommandManager) OnMessage(session *discordgo.Session, m *discordgo.Mess
|
|||||||
guild, _ := session.Guild(m.GuildID)
|
guild, _ := session.Guild(m.GuildID)
|
||||||
|
|
||||||
ctx := Context{
|
ctx := Context{
|
||||||
Session: session,
|
Session: session,
|
||||||
Channel: channel,
|
Channel: channel,
|
||||||
Message: m.Message,
|
Message: m.Message,
|
||||||
User: m.Author,
|
User: m.Author,
|
||||||
Guild: guild,
|
Guild: guild,
|
||||||
Member: m.Member,
|
Member: m.Member,
|
||||||
Invoked: "",
|
Invoked: "",
|
||||||
ErrorChannel: c.ErrorChannel,
|
CommandManager: c,
|
||||||
}
|
}
|
||||||
|
|
||||||
var cmd []string
|
var cmd []string
|
||||||
|
|||||||
@ -80,6 +80,6 @@ type Context struct {
|
|||||||
Member *discordgo.Member
|
Member *discordgo.Member
|
||||||
// Name of the command as it was invoked (this is so you know what alias was used to call the command)
|
// Name of the command as it was invoked (this is so you know what alias was used to call the command)
|
||||||
Invoked string
|
Invoked string
|
||||||
// Error channel
|
// Command Manager
|
||||||
ErrorChannel chan CommandError
|
CommandManager *CommandManager
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user