InvoID is the main system that Invomagic projects use to identify things. The structure of an InvoID is a prefix followed by a unique identifier. This system is universal across all InvoIDs.
To create an entirely new type of InvoID, you must define a new prefix. This prefix is what distinguishes one system from another.
For example:
- Tickets's Ticket Panels use the prefix PANELID.
- Simply Apply's Applications use the prefix apply.
When a new item is created (e.g., a new application), your system should generate a unique ID and append it to your chosen prefix. This full string becomes the InvoID.
this is done by creating a unique variable, it should be set to this PREFIX_{randomCharacters(30)}
InvoIDs are saved with data by setting the key to "DATANAME_INVOID" and the value as the data you are storing
While the prefix system is the basis for all InvoIDs, the data you associate with them will vary. Here is how a Simply Apply Application ID is used.
An example ID looks like this: apply_jhivIzbmwNCcoVgssPuZbaozItoOOW
You'll be using these IDs a lot in development. Here are the variables you can use to reference data associated with an application. Replace "ID" with the actual Application ID (the part after apply_).
- {BGVAR_applicationid.ID_name} - The Name of the Application
- {BGVAR_applicationid.ID_role} - The ID Of the Role its for (Mostly used for /verdict)
- {BGVAR_applicationid.ID_log} - The Log channel for the application responses
- {BGVAR_applicationid.ID_Blacklist} - The ID Of the Role not able to apply
- {BGVAR_applicationid.ID_ping} - The ID of the Role pinged for new application responses
- {BGVAR_applicationid.id_admin_role} - The ID of the role allowed to set a response as Approved or Denied
- {BGVAR_applicationid.ID_qamount} - The amount of Questions that are in the application
- {BGVAR_applicationid.ID_Qnum} - The Question of the application, replace "num" with the question number, such as "3" for the 3rd question
- {BGVAR_applicationid.ID_QHintnum} - The Question description of the application, replace "num" with the question number, such as "3" for the 3rd question
When creating an application, the bot should put the Application ID in the "server app ids" collection variable, so the bot can ensure that ID exists in other commands.
You are also welcome to add new data to be referenced by an ID, simply add a new object that is "ID_newnamehere" for example if you wanted to add the author of the application "ID_author" would be the object key.