Skip to content

Commit

Permalink
fix NoEmbed loop (#201)
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-smart authored Nov 5, 2024
1 parent d99e3fd commit 339dee6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/NoEmbed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ const make = Effect.gen(function* () {
yield* getChannel(event.guild_id!, event.channel_id).pipe(
Effect.flatMap(EligibleChannel),
)
const message = event.content
? event
: yield* rest
.getChannelMessage(event.channel_id, event.id)
.json.pipe(Effect.flatMap(EligibleMessage))
const message = yield* EligibleMessage(
event.content
? event
: yield* rest.getChannelMessage(event.channel_id, event.id).json,
)
yield* rest.editMessage(message.channel_id, message.id, {
flags: message.flags! | Discord.MessageFlag.SUPPRESS_EMBEDS,
flags: message.flags | Discord.MessageFlag.SUPPRESS_EMBEDS,
})
}).pipe(
Effect.withSpan("NoEmbed.handleMessage"),
Expand Down

0 comments on commit 339dee6

Please sign in to comment.