Giter VIP home page Giter VIP logo

warzone-stats's Introduction

Warzone Stats

Discord bot for calculating aggregate player stats for Call of Duty Warzone.

NOTICE

Self-hosting using Docker

Due to changes to the tracker.gg API, this bot has issues fetching data at scale. Feel free to host a version of this bot yourself for your personal Discord server using Docker.

  1. Install Docker Engine.
  2. Create a Discord bot, note down your generated token, and add the bot to your server.
  3. Clone this repository and add your generated token to the Dockerfile file at line 4.
  4. In a terminal window, run docker compose up --build to start the bot.

Features

  • Register players for combined stats
  • Scheduled stats posting using cronjob syntax
  • View single player stats
  • Supports [mode] parameter to show stats for different game modes.
    • Battle Royale: br
    • Warzone Rumble: rmbl
    • Plunder: plndr
    • Resurgence: rsg
  • Supports PlayStation Network (psn), Xbox Live (xbl) and Battlenet (battlenet) platforms
  • Supports [time] parameter to only show stats from specific times, e.g., last 8 hours (8h) or past 3 days (3d). Default value: 24h
    • Hours: h
    • Days: d
    • Weeks: w
    • Months: m
  • Supports random team splits into groups

Guide

  • Invite the bot to your server. Setup your own local instance by following the Docker instructions above.
  • Send !wz stats <modeId> [platformId] [playerId] [time] to fetch stats for a specific player.
  • Send !wz stats <mode> [time] to get stats for all registered users.
    • Register users using !wz register <platformId> <playerId>
    • Unregister users using !wz unregister <platformId> <playerId>
    • Enclose <playerId> in double-quotes (like "<playerId>") if it contains spaces.
  • For scheduling stats posting, send !wz schedule "<cronjob>" 8h. For example, !wz schedule "30 19 * * *" 8h posts stats everyday at 19:30 UTC.
  • For team splits, send !wz teams <teamSize> to get a random list of teams from registered users.

Example

  • To fetch stats for the player botmun_ playing with a PlayStation for the past two weeks, send !wz stats br psn botmun_ 2w.
  • Example response from the bot on Discord

Example bot response

Issues

  • If you encounter issues with your profile not loading, check if you can access it on the COD Warzone Stats Tracker Site whose awesome API is used by the bot. Yours might be set to private.
  • Allow the bot permission to use external emojis so it can use icons for platforms instead.
  • For Battlenet, it may be necessary to suffix the hash for your profile when requesting stats (e.g., username#12345).
  • Feel free to open a GitHub issue if you face any problems.

Credits

Donate

We're a bunch of students who enjoy playing the game and worked on this bot in our spare time between classes and jobs. We won't ever restrict basic functionality for other players out there but if you find the bot useful, please considering buying us a coffee :)

Buy me a coffee

warzone-stats's People

Contributors

dependabot[bot] avatar haroon96 avatar jhoogstraat avatar osama-h-rana avatar saadmujeeb05 avatar thoughtpalette avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

warzone-stats's Issues

Bot offline

Hi Team,

This bot is coming up offline in my server. Any ideas?

Getting invalid

Please provide example for the action

Invalid syntax, use !wz register <psn|xbl|atvi> "<username>" instead.

Add lobby k/d

Lobby k/d is available in the same api. Decide on mean/max/min of it and add it to stats.

An error occurred!

when i try to use the bot, it shows
'An error occurred!'
Even with the cmd in the wiki : !wz stats br psn botmun_ 2w

New gamemodes integration (Vanguard Update)

Hello,

would it be possible to add the new gamemodes to your hosted instance, currently the bot barely fetches any data because of the new gametypes around.

Best regards.

FGv6OQxXoAQT4Gp

List of modes required to run bot

Currently the database is expected to contain a list of game modes.

As the data is cached after fetching, it could just as well reside in the code.
At least the possible game modes should be documented somewhere.

Hosting, 403 error

Hi, i wrote a similar code, to the one in getRecentMatches, but am getting this 403 error, but not on my computer, only in my server, i was wondering why?

which hosting are you using currently for your bot

Mongo Data Models

hi there, thanks for this awesome work. I just wondering mongo data models. For example, you searching modeIds with given mode. How mongo data models should be ?

Thanks.

Filter by match type

Users are wanting to have the capability to have Battle royal feature to be further filtered by either solos, duos, trios, or quads. This is already available on the warzone site. Example:

user wants to see how their stats over time when playing battle royal, solos.

Add additional stats

Stats like Assists are now shown in Warzone. Should check if these or any other stats are now available on the API and add them to the response.

Activision account not working

Comes back with "player does not exist" even if COD Tracker finds it with no issues.
Using the name#1234 format

edit: sorry, realised i was using battle.net rather than activision!

close ~

Live?

Hello, is this BOT still live? i'm trying to use it, but it appears offline, and none of the commands work.

Mismatch between Profile endpoint & Match endpoint of tracker.gg

I just want to know how you guys deal with the difference between to two endpoints;

I have been having trouble finding the exact list of modIds described by this value:

image

There are cases where i could determine from the profile endpoint, that a user added 8 kills to there profile, but when i check the match endpoint, i could see they made only 4 for example, or sometimes the profile is only 2 and from matches i can tell its 5, so i wonder does the profile only tracker specific mods, if yes can you provide me the list of mods that is considered by the Battle royale field, in profile endpoint

All possible modeIds

Hi, do you have a list of all possible modeIds, I want to filter by matches which are only battle royal matches

like for example:

const matches = matchesResponse.data.matches.filter((x) =>
							x.attributes.modeId.startsWith('br')
);

or have a list of all possible battle royal modeIds like:

const matches = matchesResponse.data.matches.filter((x) => battle_royale_mods.includes(x.attributes.modeId ));

Thank you

Stats won't pull

Im typing everything correctly registered and linked to the cod stats site listed with this bot and nothing will pull can you please help me fix this

Switch to slash commands

As reading messages will become a privileged intent and slash commands are recommended now, the bot should switch to slash commands.

What do you think about this?
If you like, i'll provide a PR.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.