MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / getDefaultQQBot

Function getDefaultQQBot

agent/app/service/agents_channels.go:1613–1632  ·  view source on GitHub ↗
(bots []dto.AgentQQBotBot)

Source from the content-addressed store, hash-verified

1611}
1612
1613func getDefaultQQBot(bots []dto.AgentQQBotBot) dto.AgentQQBotBot {
1614 for _, bot := range bots {
1615 if bot.IsDefault || bot.AccountID == "default" {
1616 bot.IsDefault = true
1617 if bot.Name == "" {
1618 bot.Name = "Default"
1619 }
1620 return bot
1621 }
1622 }
1623 if len(bots) > 0 {
1624 bot := bots[0]
1625 bot.IsDefault = true
1626 if bot.Name == "" {
1627 bot.Name = "Default"
1628 }
1629 return bot
1630 }
1631 return defaultQQBot()
1632}

Callers 2

setQQBotConfigFunction · 0.85

Calls 1

defaultQQBotFunction · 0.85

Tested by

no test coverage detected