Skip to content

Commit

Permalink
fix(core): default to group when no options.session
Browse files Browse the repository at this point in the history
  • Loading branch information
ilharp committed Dec 12, 2023
1 parent bfc3dc8 commit 4e8a083
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export abstract class MessageEncoder<C extends Context = Context, B extends Bot<
}

async send(content: h.Fragment) {
const isDirect = this.options.session?.isDirect ?? !this.guildId
const isDirect = this.options.session?.isDirect
this.session = this.bot.session({
type: 'send',
channel: { id: this.channelId, type: isDirect ? Channel.Type.DIRECT : Channel.Type.TEXT },
Expand Down

0 comments on commit 4e8a083

Please sign in to comment.