A simple Discord bot that retrieves the skins on sale in one’s Valorant store.
-
Clone the repository from
https://github.com/sudhxnva/valo-store-bot.git
-
Run the command
npm install
to install all dependencies. -
Create a Discord bot on the Discord Developer Portal and generate an access token. (refer to this guide)
-
Create a
.env
file in the root folder with the following values:SECRET = "random_string_to_encrypt_passwords" BOT_TOKEN = "your_discord_bot_token" DB_URL = "mongoDB_connection_string"
(Yes, the bot will need a MongoDB instance)
-
Run the bot using
npm start
For development, you can use
npm run dev
(runs with nodemon). The bot will listen to the command!test
instead of!store
in dev mode.
Note: This implementation of the bot was designed for a small Discord server with my friends in it. Hence, it encrypts the password and stores it in a DB so that a user doesn’t have to type in their credentials every single time. The app is only encrypting the password, NOT hashing it(read the difference here). So this won’t suit big servers where you people who are not comfortable with their passwords being stored in a random user’s database (A solution to this is that you can modify it to only store the username and ask them to enter their password every time).
!store
command on a server to retrieve the store.
If a user is calling the command for the first time, they will be prompted to enter their details on a Discord DM chat with the bot.
Once registered, the user will not have to enter their details again. The !store
command should work smoothly.
- Valorant.js (A brilliant easy-to-use library for Valorant) by Sprayxe
- Inspiration for this bot from this project (thanks OwOHamper!)