usersnipe is a simple Discord bot I made for fun designed to scrape a gaming site for specific usernames and notify the user who requested it via DM as well as in the requested channel when they come online. This uses a headless browser to scrape and navigate the site. It doesn't work on all sites, only a select few gaming forums.
The bot currently supports two main commands:
/snipe
: Allows users to store up to 5 usernames to monitor. The bot will check the site every few minutes for all saved usernames. When a username is found, it notifies the user, then removes the username from their list./cancel
: Allows users to clear their snipe list, deleting all saved usernames from the database.
The bot requires the following dependencies:
- Discord.js - for interaction with the Discord API.
- MongoDB - for storing sniped usernames.
- Puppeteer - for navigating and scraping the specified site.
- Node.js - Recommended version 14 or higher
- MongoDB URI - A valid MongoDB URI for database connection
- Discord Bot Token - Token for your bot application
- Clone the repository:
git clone https://github.com/cloudali/UsernameSnipe.git cd UsernameSnipe
- Install dependencies:
npm install
- Configure
config.json
- Open config.json and update it with your bot's settings:
- mongodb: Your MongoDB URI
- username and password: Credentials to log into the gaming site you’re scraping
- clientId and guildId: IDs of your Discord application and server (guild)
- token: Your Discord bot token
- After these steps, you’ll be ready to launch and use UsernameSnipe!