Skip to content
Typegatewayv0.11.0

GatewayReplyResponse

A reply that may attach files in any form discord.js accepts, on top of the portable ReplyFile. The reply verbs already take this. Import it only to type a variable or a helper's return. A Notice render or a paginator page returns the plain ReplyResponse, which takes a ReplyFile alone.

type GatewayReplyResponse = ReplyResponse<GatewayFile>;
// any discord.js file form
await this.reply({
    components: [container],
    files: [new AttachmentBuilder(createReadStream('./report.pdf'), { name: 'report.pdf' })]
});