Skip to content

cloudali/usersnipe

Repository files navigation

USERSNIPE

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.

Features

The bot currently supports two main commands:

  1. /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.
  2. /cancel: Allows users to clear their snipe list, deleting all saved usernames from the database.

Dependencies

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.

Setup

Requirements

  • Node.js - Recommended version 14 or higher
  • MongoDB URI - A valid MongoDB URI for database connection
  • Discord Bot Token - Token for your bot application

Installation

  1. Clone the repository:
    git clone https://github.com/cloudali/UsernameSnipe.git
    cd UsernameSnipe
  2. Install dependencies:
    npm install
  3. 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
  1. After these steps, you’ll be ready to launch and use UsernameSnipe!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published