如何使用 Eris Discord 在频道中以文件形式发送数据
How to send a data in the form of a file in a channel using Eris Discord
我在数组中有一些数据。我希望它以 .json
文件的形式在通道中发送数据。如何在 Eris 中做到这一点?
您可以找到文档 here。因此,您将如何通过文件在频道中发送它
<Client>.createMessage(<Message>.channel.id, 'Text', {file: {file.name: '<name>.json', file.file: 'Put your array data here'}})
希望对您有所帮助!
编辑:前一个错了。正确的格式是
<Client>.createMessage(<Message>.channel.id, 'Text', {file: {file.name: '<name>.json', file.file: 'Put your array data here'}})
我在数组中有一些数据。我希望它以 .json
文件的形式在通道中发送数据。如何在 Eris 中做到这一点?
您可以找到文档 here。因此,您将如何通过文件在频道中发送它
<Client>.createMessage(<Message>.channel.id, 'Text', {file: {file.name: '<name>.json', file.file: 'Put your array data here'}})
希望对您有所帮助!
编辑:前一个错了。正确的格式是
<Client>.createMessage(<Message>.channel.id, 'Text', {file: {file.name: '<name>.json', file.file: 'Put your array data here'}})