Samir
Samir

Reputation: 93

How to send a data in the form of a file in a channel using Eris Discord

I have some data in Array. I want it to send the data in a channel in the form of a .json file. How to do that in Eris?

Upvotes: 0

Views: 615

Answers (1)

RaymondJiang1
RaymondJiang1

Reputation: 66

You can find the docs here. So how you would send it in a channel via a file would be

<Client>.createMessage(<Message>.channel.id, 'Text', {file: {file.name: '<name>.json', file.file: 'Put your array data here'}})

I hope this helped!

Upvotes: 1

Related Questions