IEU (Interactions Endpoint Url)
Configure an Interactions Endpoint to allow Interactions via HTTP POSTs.
This is meant to be used when first creating a project.
💢 Difficulty Level: Medium - Not intended for beginners. (unless you are adventurous 🤠)
What this package includes:
- Named File and Directory Structure file loading
- Verify module showing try, catch, finally example
- Example Command to show usage of implemented Interactions
- Command create script in Autocode:Self:Deployed.js
Named File & Directory Structure File Loading:
Files are loaded according to how thier name is structured.
Lets say we have a file named: d2_keeprole.js
The underscore after the first word part is telling the loader that there is a folder involved.
The folder name is dictated by the first word part, ie "d2", the loader will then look for the whole word "d2_keeprole.js" in the folder "d2".
As for multiple underscores in a filename, The loader is currently using the first underscore it encounters.
So a filename of say: file_name_parts will not be processed any differently.
The loader will look for the file: file_name_parts in a folder named "file".
The filenames you specify when dealing with components are treated the same way as regular file loads.
💢 What if there is no underscore in the filename?:
No underscore in the filename tells the loader to look for the file in the "base" folder.
This is just a name I have selected and yes, You can change it.
You can see a no underscore file example in the following image aswell as the directory structure.
🆗 Great. Now how is this done and where do I change the "base" folder❓
This is done in the main folder and file under functions. (something I expect anyone interested in the IEU to know)
Here is the loader portion and the base folder name location.
These will be required in order to operate correctly.
See explanations after image.
Environment variables explained:
💢 AppID & BotKEY
AppID is your Application Id as listed in the Discord Developer Portal.
BotKEY is your Public Key as listed in the Discord Developer Portal.
💢 CLIENT_ID & CLIENT_SECRET:
These are going to be used in a future module.
They are not currently required but since you are starting fresh, I suggest putting them in your environment for safe keeping.
This is used in creating the Example Slash Command.
💢 (btn1_role_id) - (btn2_role_id) - (btn3_role_id):
3 Roles are needed in order to use the example command.
You have to enter the role ids into the environment as noted earlier in the "Environment Variables" image.
But wait! You didn't cover everything in this package??
If you require further explanation than what has been given, I suggest that you not use this setup.