mirror of
https://gitdab.com/cadence/out-of-your-element.git
synced 2025-09-11 04:33:02 +02:00
Qualify kind of stream
This commit is contained in:
parent
0d0ca98e13
commit
a5fd30d535
11 changed files with 26 additions and 25 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
const Ty = require("../../types")
|
||||
const DiscordTypes = require("discord-api-types/v10")
|
||||
const {Readable} = require("stream")
|
||||
const stream = require("stream")
|
||||
const chunk = require("chunk-text")
|
||||
const TurndownService = require("@cloudrac3r/turndown")
|
||||
const domino = require("domino")
|
||||
|
@ -820,7 +820,7 @@ async function eventToMessage(event, guild, di) {
|
|||
|
||||
// Split into 2000 character chunks
|
||||
const chunks = chunk(content, 2000)
|
||||
/** @type {(DiscordTypes.RESTPostAPIWebhookWithTokenJSONBody & {files?: {name: string, file: Buffer | Readable}[]})[]} */
|
||||
/** @type {(DiscordTypes.RESTPostAPIWebhookWithTokenJSONBody & {files?: {name: string, file: Buffer | stream.Readable}[]})[]} */
|
||||
const messages = chunks.map(content => ({
|
||||
content,
|
||||
allowed_mentions: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue