2024-08-19

Β·Visit Project

StatsVLR Discord Bot

A discord bot that uses the StatsVLR API to fetch valorant esports stats.

Table of Contents

Introduction

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.

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

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.


#Tags

stasvlr
valorant
esports
valorant
stats

Contact

Need more project details, have any doubts in mind, or interested in working together? Reach out to me directly at krushnavyas066@gmail.com. I'd be happy to connect and talk!

← All Projects