mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 13:57:10 +00:00
server 适配trss
This commit is contained in:
parent
fe132985fd
commit
fb05cccd5b
48 changed files with 900 additions and 963 deletions
|
|
@ -828,17 +828,17 @@ export function getMaxModelTokens (model = 'gpt-3.5-turbo') {
|
|||
|
||||
export function getUin (e) {
|
||||
if (e?.bot?.uin) return e.bot.uin
|
||||
if (e) {
|
||||
if (Array.isArray(e.bot.uin)) {
|
||||
if (Config.trssBotUin && e.bot.uin.indexOf(Config.trssBotUin) > -1) return Config.trssBotUin
|
||||
else return e.bot.uin[0]
|
||||
} else return e.bot.uin
|
||||
} else {
|
||||
if (Array.isArray(Bot.uin)) {
|
||||
if (Config.trssBotUin && Bot.uin.indexOf(Config.trssBotUin) > -1) return Config.trssBotUin
|
||||
else return Bot.uin[0]
|
||||
} else return Bot.uin
|
||||
}
|
||||
if (Array.isArray(Bot.uin)) {
|
||||
if (Config.trssBotUin && Bot.uin.indexOf(Config.trssBotUin) > -1) {return Config.trssBotUin}
|
||||
else {
|
||||
Bot.uin.forEach((u) => {
|
||||
if (Bot[u].self_id) {
|
||||
return Bot[u].self_id
|
||||
}
|
||||
})
|
||||
return Bot.uin[Bot.uin.length - 1]
|
||||
}
|
||||
} else return Bot.uin
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue