feat(controller): add source for command handling.

feat(telegram): switch message type to markdown
feat(controller): add welcome message for telegram bot.
This commit is contained in:
2026-08-13 17:07:55 +08:00
parent 8589654ba4
commit f2cc16177c
8 changed files with 90 additions and 65 deletions
+2 -2
View File
@@ -179,12 +179,12 @@ func (q *QQController) processCommand(cmd controller.Command) string {
parsed.ChatID = cmd.ChatID
parsed.ChatType = cmd.ChatType
parsed.SenderID = cmd.SenderID
parsed.Source = "qq_napcat"
// Hand the complete command to the unified processor, which checks group
// vs private, trusted groups, admin permissions, and executes it.
response, err := controller.GetManager().Trigger(parsed, q.cfg.TrustedGroups, q.cfg.Admins, q.cfg.ListenMethod)
cfg := config.GetConfig()
if cfg.System.DebugMode && cfg.Debug.ShowTriggerCmdEcho {
if config.GetConfig().System.DebugMode && config.GetConfig().Debug.ShowTriggerCmdEcho {
postLog.Debug(fmt.Sprintf("[qq_napcat] triggered command: \"/%s\" with args: \"%s\" from chatID: %d and senderID: %d", parsed.Command, strings.Join(parsed.Args, ", "), cmd.ChatID, cmd.SenderID))
}
if err != nil {