- 📍 Overview
- 📦 Features
- 📂 Structure
- 💻 Installation
- 🏗️ Usage
- 🌐 Hosting
- 📄 License
- 👏 Authors
This repository contains the code for a Discord bot that fetches and displays the Valorant daily shop for users. This bot utilizes Discord.js v14 for interacting with Discord's API, TypeScript for code organization and strong typing, Node.js for the backend, and MongoDB for storing user tokens and preferences.
Feature | Description | |
---|---|---|
⚙️ | Secure Login | The bot implements a secure authentication system that allows users to log in with their Riot Games accounts, using the new captcha flow for enhanced security. |
📄 | Shop Display | Users can use a command (/shop) to see the current daily shop items, including descriptions and prices, directly within their Discord server. |
🔗 | Shop History | The bot offers a command (/shop-history) to view previous daily shop offerings, allowing users to track past items and plan for future purchases. |
🧩 | User Settings | Users can customize their experience by managing preferences like notification frequency and shop update reminders. |
🧪 | Error Handling | Robust error handling ensures the bot can gracefully deal with issues during login, token extraction, or API communication, providing informative messages to users. |
⚡️ | API Rate Limiting | To prevent exceeding Valorant API limits, the bot uses a rate limiter to manage API requests efficiently. |
🔐 | Data Privacy | The bot prioritizes user privacy by securely storing access tokens only for the duration of the session and adhering to Riot's privacy policies. |
🔀 | Modular Design | The codebase is structured into modules, making it easier to maintain, scale, and add new features in the future. |
🔌 | API Integration | The bot seamlessly integrates with Discord's API and Riot Games' API for authentication and data fetching. |
valorant-daily-shop-discord-bot/
├── authentication
│ ├── discord.js
│ └── riot.js
├── commands
│ ├── login.js
│ ├── shop.js
│ ├── shop-history.js
│ └── settings.js
├── events
│ ├── ready.js
│ ├── interactionCreate.js
│ └── messageCreate.js
├── services
│ ├── valorant.js
│ └── discord.js
├── models
│ ├── user.js
│ └── shop.js
├── utils
│ ├── embed.js
│ ├── logger.js
│ └── errorHandler.js
├── config
│ └── env.config.js
├── .env
├── package.json
└── README.md
- Node.js
- npm
- MongoDB (Optional for storing user tokens and preferences)
- Clone the repository:
git clone https://github.com/coslynx/valorant-daily-shop-discord-bot.git
- Navigate to the project directory:
cd valorant-daily-shop-discord-bot
- Install dependencies:
npm install
- Create a
.env
file with the following environment variables:DISCORD_TOKEN=your_discord_bot_token
- (Optional) Set up a MongoDB database and update the
.env
file with the connection string.
- Start the development server:
npm start
- The bot will connect to your Discord server and be ready to receive commands.
- Discord Token: Set your Discord bot token in the
.env
file. - MongoDB Connection String (Optional): If using MongoDB, add the connection string to the
.env
file.
/login
: Initiates the authentication process, prompting the user to log in with their Riot Games account./shop
: Fetches and displays the current Valorant daily shop items./shop-history
: Retrieves and shows previous daily shop offerings./settings
: Allows users to manage their preferences, including notification settings.
- Create a new application on your preferred hosting service (e.g., Heroku, AWS).
- Add the project to your application.
- Set up environment variables in the hosting service configuration (DISCORD_TOKEN, MongoDB connection string).
- Deploy the application.
This project is licensed under the MIT License.
- Author Name - Spectra.codes
- Creator Name - DRIX10
Why only generate Code? When you can generate the whole Repository!