REPOSITORY / ScuroNeko/Laniakea
Compare commits
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f0da64c7af
|
||
|
|
3861746a3e
|
+6
-6
@@ -93,14 +93,14 @@ func (bot *Bot[T]) handleMessage(update *tgapi.Update, ctx *MsgContext) {
|
|||||||
if _, exists := plugin.commands[cmd]; exists {
|
if _, exists := plugin.commands[cmd]; exists {
|
||||||
ctx.Text = args
|
ctx.Text = args
|
||||||
ctx.Args = strings.Fields(args) // Убирает лишние пробелы
|
ctx.Args = strings.Fields(args) // Убирает лишние пробелы
|
||||||
if !plugin.executeMiddlewares(ctx, bot.dbContext) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx.Logger = plugin.logger
|
ctx.Logger = plugin.logger
|
||||||
if ctx.Logger == nil {
|
if ctx.Logger == nil {
|
||||||
ctx.Logger = bot.logger
|
ctx.Logger = bot.logger
|
||||||
}
|
}
|
||||||
|
if !plugin.executeMiddlewares(ctx, bot.dbContext) {
|
||||||
|
return
|
||||||
|
}
|
||||||
plugin.executeCmd(cmd, ctx, bot.dbContext)
|
plugin.executeCmd(cmd, ctx, bot.dbContext)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -132,13 +132,13 @@ func (bot *Bot[T]) handleCallback(update *tgapi.Update, ctx *MsgContext) {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if !plugin.executeMiddlewares(ctx, bot.dbContext) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
ctx.Logger = plugin.logger
|
ctx.Logger = plugin.logger
|
||||||
if ctx.Logger == nil {
|
if ctx.Logger == nil {
|
||||||
ctx.Logger = bot.logger
|
ctx.Logger = bot.logger
|
||||||
}
|
}
|
||||||
|
if !plugin.executeMiddlewares(ctx, bot.dbContext) {
|
||||||
|
return
|
||||||
|
}
|
||||||
plugin.executePayload(data.Command, ctx, bot.dbContext)
|
plugin.executePayload(data.Command, ctx, bot.dbContext)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -1,9 +1,9 @@
|
|||||||
package utils
|
package utils
|
||||||
|
|
||||||
const (
|
const (
|
||||||
VersionString = "1.0.0-rc.8"
|
VersionString = "1.0.0-rc.9"
|
||||||
VersionMajor = 1
|
VersionMajor = 1
|
||||||
VersionMinor = 0
|
VersionMinor = 0
|
||||||
VersionPatch = 0
|
VersionPatch = 0
|
||||||
VersionBeta = 8
|
VersionBeta = 9
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user