Skip to content

A discord bot that uses unofficial StatsVLR scrapping API to fetch the stats/data.

License

Notifications You must be signed in to change notification settings

StatsVLR/StatsVLR-Discord

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

75 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

StatsVLR-Discord

The StatsVLR-Discord bot enhances your Discord experience by providing comprehensive Valorant data directly within your server. Utilizing advanced Slash Commands, Modals, and Buttons, this bot offers a seamless way to access and interact with a wide range of Valorant-related information. Key features include:

  • Detailed Player Information: Retrieve in-depth profiles of Valorant players, including stats, past teams, and social media links.
  • Team Insights: Get detailed data about Valorant teams, including player rosters, staff, results, and upcoming matches.
  • Match and Event Data: Access results from past matches, view upcoming fixtures, and explore event details such as dates, prize pools, and statuses.

Table of Contents

Features

Fetch detailed player information

Response:

{
  "status": "string",
  "data": {
    "info": {
      "id": "string",
      "url": "string",
      "img": "string",
      "user": "string",
      "name": "string",
      "country": "string",
      "flag": "string"
    },
    "team": {
      "id": "string",
      "url": "string",
      "name": "string",
      "logo": "string",
      "joined": "string"
    },
    "results": [
      {
        "match": {
          "id": "string",
          "url": "string"
        },
        "event": {
          "name": "string",
          "logo": "string"
        },
        "teams": [
          {
            "name": "string",
            "tag": "string",
            "logo": "string"
          }
        ]
      }
    ],
    "pastTeams": [
      {
        "id": "string",
        "url": "string",
        "name": "string",
        "logo": "string",
        "info": "string"
      }
    ],
    "socials": {
      "twitter": "string",
      "twitter_url": "string",
      "twitch": "string",
      "twitch_url": "string"
    }
  }
}
Fetch all players or from a specific country

Response:

{
  "status": "string",
  "size": 0,
  "pagination": {
    "page": 0,
    "limit": 0,
    "totalElements": 0,
    "totalPages": 0,
    "hasNextPage": true
  },
  "data": [
    {
      "url": "string",
      "user": "string",
      "name": "string",
      "img": "string",
      "country": "string"
    }
  ]
}
Fetch detailed team information

Response:

{
  "status": "string",
  "data": {
    "info": {
      "name": "string",
      "tag": "string",
      "logo": "string"
    },
    "players": [
      {
        "id": "string",
        "url": "string",
        "user": "string",
        "name": "string",
        "img": "string",
        "country": "string"
      }
    ],
    "staff": [
      {
        "id": "string",
        "url": "string",
        "user": "string",
        "name": "string",
        "tag": "string",
        "img": "string",
        "country": "string"
      }
    ],
    "events": [
      {
        "id": "string",
        "url": "string",
        "name": "string",
        "results": ["string"],
        "year": "string"
      }
    ],
    "results": [
      {
        "match": {
          "id": "string",
          "url": "string"
        },
        "event": {
          "name": "string",
          "logo": "string"
        },
        "teams": [
          {
            "name": "string",
            "tag": "string",
            "logo": "string",
            "points": "string"
          }
        ]
      }
    ],
    "upcoming": [
      {
        "match": {
          "id": "string",
          "url": "string"
        },
        "event": {
          "name": "string",
          "logo": "string"
        },
        "teams": [
          {
            "name": "string",
            "tag": "string",
            "logo": "string"
          }
        ]
      }
    ]
  }
}
Fetch all the events

Response:

{
  "status": "string",
  "size": 0,
  "data": [
    {
      "id": "string",
      "name": "string",
      "status": "string",
      "prizepool": "string",
      "dates": "string",
      "country": "string",
      "img": "string"
    }
  ]
}
Fetch all the matches

Response:

{
  "status": "string",
  "size": 0,
  "data": [
    {
      "id": "string",
      "teams": [
        {
          "name": "string",
          "country": "string",
          "score": "string"
        }
      ],
      "status": "string",
      "event": "string",
      "tournament": "string",
      "img": "string",
      "in": "string"
    }
  ]
}
Fetch all the results

Response:

{
  "status": "string",
  "size": 0,
  "data": [
    {
      "id": "string",
      "teams": [
        {
          "name": "string",
          "score": "string",
          "country": "string",
          "won": true
        }
      ],
      "status": "string",
      "ago": "string",
      "event": "string",
      "tournament": "string",
      "img": "string"
    }
  ]
}

Commands

Here is a list of available commands and their descriptions:

  • Events: Provides information about all events.
  • Matches: Provides information about upcoming matches or matches being played.
  • Panel: Manages the command panel for interaction with the bot.
  • Player:
    • List Players: Provides information about Valorant players.
    • Player Info: Provides information about a specific Valorant Esports player.
  • Results: Provides information about the results of games already played.
  • Team:
    • List Teams: Provides information about all teams.
    • Team Info: Provides detailed information about a Valorant team.

Project Tree

πŸ“¦ 
β”œβ”€ .gitignore
β”œβ”€ LICENSE
β”œβ”€ README.md
β”œβ”€ commands
β”‚  β”œβ”€ events
β”‚  β”‚  └─ events.js
β”‚  β”œβ”€ matches
β”‚  β”‚  └─ matches.js
β”‚  β”œβ”€ panel
β”‚  β”‚  └─ panel.js
β”‚  β”œβ”€ player
β”‚  β”‚  β”œβ”€ listplayers.js
β”‚  β”‚  └─ player.js
β”‚  β”œβ”€ results
β”‚  β”‚  └─ result.js
β”‚  └─ team
β”‚     β”œβ”€ listteams.js
β”‚     └─ team.js
β”œβ”€ events
β”‚  β”œβ”€ client
β”‚  β”‚  └─ ready.js
β”‚  └─ guild
β”‚     β”œβ”€ interactionCreate.js
β”‚     └─ modal
β”‚        β”œβ”€ modalCreate.js
β”‚        └─ modalData.js
β”œβ”€ example.config.json
β”œβ”€ index.js
β”œβ”€ package-lock.json
└─ package.json

Todo:

Completed:

  • Events
  • Matches
  • Result
  • News
  • Players
    • List All Players
  • Team
    • List All Teams
  • Panel
    • Find Player
    • Find Team
  • Autopost news in a channel
  • Player stats from tracker.gg

Yet to Do:

  • Agents
  • Buddies
  • Bundles
  • Ceremonies
  • Competitive Tiers
  • Content Tiers
  • Contracts
  • Currencies
  • Gamemodes
  • Gear
  • Level Borders
  • Maps
  • Player Cards
  • Player Titles
  • Seasons
  • Sprays
  • Weapons

Setup

Prerequisites

  • Node.js (version 16 or later)
  • Discord.js (v14 or later)
  • Axios
  • A Discord bot token and a registered bot application

Installation

  1. Clone the repository:

    git clone https://github.com/krushna06/StatsVLR-Discord
  2. Install dependencies:

    npm install
  3. Configure your bot:

    {
      "token": "",
      "clientId": "",
      "embedColor": "#00FF00",
      "errorColor": "#FF0000",
      "successColor": "#00FF00",
      "api_url": "https://statsvlr.n0step.xyz"
    }
  4. Run the bot:

    npm start

Troubleshooting

  • Error: "Something went wrong. Try again"
    This message typically means there's an issue with the API call or the interaction. Check the console for any error messages and verify your API endpoints.

  • Error: "Invalid ID provided"
    This error

occurs if the ID provided does not match any data in the API. Double-check the ID and ensure it is correct.

Contribution

Feel free to contribute to this project by submitting issues, feature requests, or pull requests. Your feedback and contributions are welcome!

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

A discord bot that uses unofficial StatsVLR scrapping API to fetch the stats/data.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published