SCE-Development/SCE-discord-bot

Add s!print Command

Opened this issue · 1 comments

How to do this

  1. Ensure the user sends a file and the file is of type .pdf
  2. 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...
}
  1. Connect the discord bot to the REST API on SCE-RPC. Consider making a helper function to send everything over from the s!print's execute function. An example helper function is in src/APIFunctions/2DPrinting.js:50 which is called in src/Pages/2DPrinting/2DPrinting.js:226.

To learn more about how printing works, read this wiki page

localhost:8084/SceRpcApi/2DPrinting/Printer/sendPrintRequest