Skip to content

Commit

Permalink
feat(core): support bot.hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed Feb 17, 2022
1 parent 825a1a6 commit d32cb78
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/core/src/bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export interface Bot extends Bot.BaseConfig, Bot.Methods, Bot.UserBase {}
export abstract class Bot<T extends Bot.BaseConfig = Bot.BaseConfig> {
public app: App
public platform: string
public hidden?: boolean
public internal?: any
public selfId?: string
public logger: Logger
Expand Down
1 change: 1 addition & 0 deletions plugins/adapter/onebot/src/bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export class OneBotBot extends Bot<BotConfig> {
selfId: profile.tiny_id,
}
this.guildBot = this.app.bots.create('onebot', guildBotConfig, QQGuildBot)
this.guildBot.hidden = true
this.guildBot.internal = this.internal
this.guildBot.parentBot = this
this.guildBot.avatar = profile.avatar_url
Expand Down
1 change: 1 addition & 0 deletions plugins/frontend/sandbox/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ interface BotConfig extends Bot.BaseConfig {
export class SandboxBot extends Bot<BotConfig> {
username = 'koishi'
selfId = 'koishi'
hidden = true
handle: SocketHandle

constructor(adapter: Sandbox, config: BotConfig) {
Expand Down

0 comments on commit d32cb78

Please sign in to comment.