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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user