Discord Bot Development in NodeJS
Budget: $30 – $250 USD
1. Use NodeJS, discord-interactions library and the official Glitch template for development.
2. We have already created an application command "verify" with an string option "username". (You can skip this part)
3. When APPLICATION_COMMAND "verify" is received, fetch the "username" string option, then, make a form-data POST request to https://example.com/verifyuser.php, the POST data should contain: discord user id (discordid) and the "username" value entered with /verify command (username). If the server returns "OK", add the current user to "VIP" role, then display a success message. If the server returns anything other than "OK", send the server response to the user. For example, if server returns "Cannot find such user", the end user will receive "Error: Cannot find such user".
4. Every 12 hours, the NodeJS app should fetch all users under the "VIP" role, combine all discord user IDs into a single string separated by comma. Then post the data (vipusers=aaa,bbb,ccc) to https://example.com/verifyusermulti.php, the server will return a comma deliminated string of users that should be removed from VIP role. For example, if server returns "bbb,ccc", then user bbb and user ccc should be removed from VIP role, while aaa would retain VIP role.
5. The bot should also set it's status to "Online" and change its server name to "BotPanda".
2. We have already created an application command "verify" with an string option "username". (You can skip this part)
3. When APPLICATION_COMMAND "verify" is received, fetch the "username" string option, then, make a form-data POST request to https://example.com/verifyuser.php, the POST data should contain: discord user id (discordid) and the "username" value entered with /verify command (username). If the server returns "OK", add the current user to "VIP" role, then display a success message. If the server returns anything other than "OK", send the server response to the user. For example, if server returns "Cannot find such user", the end user will receive "Error: Cannot find such user".
4. Every 12 hours, the NodeJS app should fetch all users under the "VIP" role, combine all discord user IDs into a single string separated by comma. Then post the data (vipusers=aaa,bbb,ccc) to https://example.com/verifyusermulti.php, the server will return a comma deliminated string of users that should be removed from VIP role. For example, if server returns "bbb,ccc", then user bbb and user ccc should be removed from VIP role, while aaa would retain VIP role.
5. The bot should also set it's status to "Online" and change its server name to "BotPanda".