Add s!print Command
Opened this issue · 1 comments
evanugarte commented
How to do this
- Ensure the user sends a file and the file is of type
.pdf
- We need a way to convert the
fileurl
to bytes and then send it to the api.
e.g.
if (message.attachments.array().length) {
const uploadedFile = message.attachments.array()[0];
const fileUrl = uploadedFile.url;
// need to do something with fileUrl...
}
- Connect the discord bot to the REST API on SCE-RPC. Consider making a helper function to send everything over from the
s!print
'sexecute
function. An example helper function is insrc/APIFunctions/2DPrinting.js:50
which is called insrc/Pages/2DPrinting/2DPrinting.js:226
.
To learn more about how printing works, read this wiki page
evanugarte commented
localhost:8084/SceRpcApi/2DPrinting/Printer/sendPrintRequest