REPOSITORY / ScuroNeko/Laniakea

Pull Requests

PULL REQUESTS REPOSITORY

v1.0.0 #9

Merged
ScuroNeko merged 101 commits from dev into main 2026-05-20 13:43:34 +03:00
Showing only changes of commit 3861746a3e - Show all commits
+6 -6
View File
@@ -93,14 +93,14 @@ func (bot *Bot[T]) handleMessage(update *tgapi.Update, ctx *MsgContext) {
if _, exists := plugin.commands[cmd]; exists {
ctx.Text = args
ctx.Args = strings.Fields(args) // Убирает лишние пробелы
if !plugin.executeMiddlewares(ctx, bot.dbContext) {
return
}
ctx.Logger = plugin.logger
if ctx.Logger == nil {
ctx.Logger = bot.logger
}
if !plugin.executeMiddlewares(ctx, bot.dbContext) {
return
}
plugin.executeCmd(cmd, ctx, bot.dbContext)
return
}
@@ -132,13 +132,13 @@ func (bot *Bot[T]) handleCallback(update *tgapi.Update, ctx *MsgContext) {
continue
}
if !plugin.executeMiddlewares(ctx, bot.dbContext) {
return
}
ctx.Logger = plugin.logger
if ctx.Logger == nil {
ctx.Logger = bot.logger
}
if !plugin.executeMiddlewares(ctx, bot.dbContext) {
return
}
plugin.executePayload(data.Command, ctx, bot.dbContext)
return
}