Skip to content

Commit

Permalink
fix(discord): add missing groupId in getMessage
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed Apr 29, 2021
1 parent 14c92ca commit c5a0124
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/adapter-discord/src/bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,14 @@ export class DiscordBot extends Bot<'discord'> {
}

async getMessage(channelId: string, messageId: string): Promise<MessageInfo> {
const msg = await this.$getMessage(channelId, messageId)
const [msg, channel] = await Promise.all([
this.$getMessage(channelId, messageId),
this.$getChannel(channelId),
])
const result: MessageInfo = {
messageId: msg.id,
channelId: msg.channel_id,
groupId: msg.guild_id,
groupId: channel.guild_id,
userId: msg.author.id,
content: msg.content,
timestamp: new Date(msg.timestamp).valueOf(),
Expand Down

0 comments on commit c5a0124

Please sign in to comment.