Package Exports
- verify-discord
- verify-discord/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (verify-discord) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Discord Verification
This package will help you create a simple verification system
Usage & Examples
Here are some examples of the different functions.
The following functions are available:
- Requiring the package
- Starting the Verification process
- The user entered a number
- The user wants to retry
- Verify the pin the user entered
Requiring the package
const Verification = require('discord-verification');
const verification = new Verification();
Starting the verification process
The interaction provided must be a Discord.JS ButtonInteraction!
The interaction provided must be a Discord.JS User!
// Only needed if you want every user to have a different pin
// If you leave the function blank, a random pin will be made
await verification.verificationNewPin(NEW_PIN);
await verification.verificationStart({ interaction, user })
The user entered a number
The interaction provided must be a Discord.JS ButtonInteraction!
await verification.verificationAddNumber({ interaction, number: THE_NUMBER_THE_USER_ENTERED})
The user wants to retry
The interaction provided must be a Discord.JS ButtonInteraction!
The interaction provided must be a Discord.JS User!
await verification.verificationRetry({ interaction, user })
Verify the pin the user entered
The interaction provided must be a Discord.JS ButtonInteraction!
The role provided must be a Discord.JS Role!
await verification.verificationCheck({ interaction, role })