Jump to content


discord bot - wotbot

stats blitzstars discord bot open source github python discord.py wotbot

  • Please log in to reply
85 replies to this topic

b48g55m #1 Posted 20 October 2017 - 08:02 PM

    Junior Sergeant

  • Player
  • 20992 battles
  • 216
  • [MODRY]
  • Member since:
    10-11-2015

Based on our conversation in BlitzStars topic i have created a simple discord bot - wotbot - as a proof of concept. As people seem to like it, feel free to use it, provide feedback or improve it - It is open source. Feel free to join discussion at dedicated channel on discord: https://discord.gg/2CZ7eYv

 

You can invite WotBot to your server via this link: https://discordapp.c...t&permissions=0

 

Besides personal statistics about winrate,medals, mastery, blitzstars signature image etc. it provides useful stats for clan leaders - players' averages, days afk, and also battle count and winrate statistics for custom defined time periods - per user and also per clan: clanwinrate, clantopplayers, clanmedals, clanactivity, clansavestats, clanreadstats.

 

List of commands:

AceHeroes:

Table of clan/server heroes with highest damage in ACEd battles. Your members can post their own records and you can approve them to go to the table. Managers can be setup to do the approvals. Command can be set so either anybody or allowed only can post.

 

aceheroes - Ace of Heroes
    aceheroes managerremove - remove managers via list of mentions
    aceheroes manageradd - add managers via list of mentions
    aceheroes manager - list of managers
    aceheroes push - push from cue to list
    aceheroes view - View list of aces together vith IDs and who approved it
    aceheroes post - Post: name damage tank tier picture. Spaces in quotes: 'Kuro Mori Mine'
    aceheroes cue - view cue of submitted battles
    aceheroes allowonlyremove - remove from allowed via list of mentions
    aceheroes allowonly - see allowonly list
    aceheroes bannedremove - unban via list of mentions
    aceheroes bannedadd - ban via list of mentions
    aceheroes allowonlyadd - add to allowed via list of mentions
    aceheroes banned - see banned list
    aceheroes delete - delete by ID

 

BlitzStarsStats:
bsig - BlitzStars WR signature. From 0 (uses your name) to 10 WG names.
bstats - BlitzStars top stats. From 0 (uses your name) to 10 WG names.

 

ClanStats:
clanactivity - Clan activity summary. Clan name or empty for current user's clan
clanmedals - Medal counts for clan members. Clan name or empty for current user's clan
clanstats - Clan stats since last checkpoint. Clan name or empty for current user's clan. Mak...
clantopplayers - Top clan players per tier: mastery/dmg/wr
clanwinrate - Clan winrate: WR, DMG, days afk per player.

 

PlatoonConnector:
platoon - List of platoon requests. Lists last 60 minutes
    platoon join - Reply to platoon request. Specify ID, example platoon join 1
    platoon post - Post platoon request. Specify tier and optionally region, example: platoon...
    platoon list - List of platoon requests. You can specify minutes to go back, default is 60

 

UserStats:
denoob - Denoob your stats one tier at a time.
liststats - List names of players you keep track of
mastery - Show list of tanks with Mark Of Mastery. Choose type of mastery: ace, 1, 2, 3, 0, d...
medals - Get players medals. From 0 (your name) to 10 WG names.
readstats - Show single player tier stats difference since last checkpoint. 0 (your name) or ...
readstatslist - Show stats for multiple players (names from your saved list). Save with ?save...
statslist - Maintain your list of player names for stats.
    statslist add - Adds names to existing list
    statslist clear - Removes list completely
    statslist save - Overwrites current list with new names
statsmany - Show multiple players tier stats difference since last checkpoint. From 0 (your n...
unicum - Road to Unicum - see when you get there. From 0 name (uses your name) to 10 WG names.
winrate - See per tier stats. Battles, WR and DMG. From 0 (your name) to 1 WG name.

 

Utilities:
blitztype - WOT Blitz BlitzTypeKeyboard for Android.
botstats - WotBot statistics.
help - Shows this message.
invite - Provides wotbot invitation link.
ping - Ping response between discord and the user.
servers - See current number of players per region.

 

No Category:
conf - Configure some settings for wotbot
    conf updates-channel - Add/Remove channel where to receive notifications about new wotbot...
    conf playername - Set WG playername.
    conf region - Set region. Allowed is one of: eu ru na asia
    conf prefix - Set your server prefix, one character, no space.
    conf platoon-channel - Add/Remove chanel where to receive platoon notifications

 

More:
Type ?help command for more info on a command.

 

Privacy message: WotBot respects your privacy. It doesn't expose user messages in any way. It doesn't log user messages. It does keep track of used commands (see the ?botstats for popular commands). Wotbot does keep log of commands and command arguments (like discord or WG usernames) for troubleshooting purposes. User data saved via settings and platoon-connector contain Discord user ID, Wargaing ID and some preference (for example region). None of the saved or observed data is shared with any third party in any way. Wotbot doesn't conduct any administrative tasks.

 

To see full list of documented commands in the spoiler below, click the show button:

 

Source: https://github.com/vanous/wotbot

Discuss: here

Report issues: https://github.com/v...s/wotbot/issues

Note: discord android client has a bug, messages are cut after 25th line: https://trello.com/c/oW3jPut7

Attached Files

  • Attached File   Screenshot from 2017-10-20 21-59-20.png   83.94K

Edited by b48g55m, 19 January 2018 - 08:31 AM.

...

b48g55m #2 Posted 21 October 2017 - 06:52 PM

    Junior Sergeant

  • Player
  • 20992 battles
  • 216
  • [MODRY]
  • Member since:
    10-11-2015

added auto-updating indication in how many servers is the bot running

added BlitzTypeKeyboard ?blitztype

added BlitzStars signature ?bsig

Attached Files

  • Attached File   Screenshot from 2017-10-21 20-49-10.png   51.42K

Edited by b48g55m, 21 October 2017 - 06:55 PM.

...

coen1974 #3 Posted 22 October 2017 - 10:55 AM

    Lance-corporal

  • Player
  • 11298 battles
  • 92
  • [HFORC]
  • Member since:
    08-15-2016

Good work! :great:

 

I added the bot to my Discord server. I must admit I am quite a noob technically, so is there a way for me to add things to the bot, or do i have to program my own bot?


_


b48g55m #4 Posted 22 October 2017 - 11:33 AM

    Junior Sergeant

  • Player
  • 20992 battles
  • 216
  • [MODRY]
  • Member since:
    10-11-2015

View Postcoen1974, on 22 October 2017 - 10:55 AM, said:

Good work! :great:

 

I added the bot to my Discord server. I must admit I am quite a noob technically, so is there a way for me to add things to the bot, or do i have to program my own bot?

 

it has to be programmed. but let me know what it is, perhaps i can do it.

my current plan:

- make "clan activity command" to list clan members by their activity (in our clan, we kick people who weren't active for more then 100 days)

- make the medals more comparison friendly, add more people to the compare

- platoon search/find command (cross server)

- count-ins subscribe (cross server) → i will add it as platoon feature, basically platoon post count-in

- medal indicator - send a message when Ace/1 was achieved (only new ones for each tank can be detected), plus perhaps more medals

- look into blitzstars stats for short term (30/60/90) statistics

- there are many bots that do just stats ([1] [2]), so i am not concentrating on that right away

 

[1] serbot by maddox

[2] blitzbot ( https://github.com/CodeMan99/blitzbot )

 

 

edit: done

 

 

 

 


Edited by b48g55m, 20 November 2017 - 08:17 PM.

...

coen1974 #5 Posted 22 October 2017 - 11:54 AM

    Lance-corporal

  • Player
  • 11298 battles
  • 92
  • [HFORC]
  • Member since:
    08-15-2016

Really like the ?blitzsig command:great:

 

i personally would like to see the ‘history table’ option, but only the current count will do (the top one, which are your most recent games). I find myself looking at that regularly.

Also a medal count per tank or a stats count per tank would be nice, like the one you can see in your garage when you click on record->vehicles->awards.

 

Really appreciate your work, thanks! :medal:

 


_


b48g55m #6 Posted 22 October 2017 - 03:22 PM

    Junior Sergeant

  • Player
  • 20992 battles
  • 216
  • [MODRY]
  • Member since:
    10-11-2015

>Really like the ?blitzsig command

 

thank you!

 

> Also a medal count per tank or a stats count per tank would be nice, like the one you can see in your garage when you click on record->vehicles->awards.

 

this is easy and can be done, data comes from WG

 

>i personally would like to see the ‘history table’ option, but only the current count will do (the top one, which are your most recent games). I find myself looking at that regularly.

 

before i do this, i would like to check with @sockrobber

 

now i added ?clanactivity , this has to get all player's data from WG in realtime, so i update on the go :)

 


...

coen1974 #7 Posted 22 October 2017 - 06:02 PM

    Lance-corporal

  • Player
  • 11298 battles
  • 92
  • [HFORC]
  • Member since:
    08-15-2016

View Postb48g55m, on 22 October 2017 - 03:22 PM, said:

 

>i personally would like to see the ‘history table’ option, but only the current count will do (the top one, which are your most recent games). I find myself looking at that regularly.

 

before i do this, i would like to check with @sockrobber

 

 

Maybe instead of the History Table of Blitzstars, you can use the data from the Blitz Assistant app. This one :

 

It also states your last couple of battles and its associated winrate.

 

cheers

Attached Files

  • Attached File   B38EC2D9-E54F-4B1D-863C-6B74304D9E5D.jpeg   121.86K

_


coen1974 #8 Posted 22 October 2017 - 06:05 PM

    Lance-corporal

  • Player
  • 11298 battles
  • 92
  • [HFORC]
  • Member since:
    08-15-2016
After I type ?clanactivity, i see the wotbot typing. But nothing appears on the screen.

_


b48g55m #9 Posted 22 October 2017 - 07:26 PM

    Junior Sergeant

  • Player
  • 20992 battles
  • 216
  • [MODRY]
  • Member since:
    10-11-2015

that should be fixed *, please report in case of issues.

 

* limit in number of characters in discord message.


...

SNeakyPEeky__3 #10 Posted 22 October 2017 - 07:34 PM

    Lance-corporal

  • Player
  • 8694 battles
  • 11
  • Member since:
    11-16-2016
alright i added the bot but idk how the commands work i cant find the list of commands.. sorry kinda a noob also in this

b48g55m #11 Posted 22 October 2017 - 07:35 PM

    Junior Sergeant

  • Player
  • 20992 battles
  • 216
  • [MODRY]
  • Member since:
    10-11-2015

View PostSNeakyPEeky__3, on 22 October 2017 - 07:34 PM, said:

alright i added the bot but idk how the commands work i cant find the list of commands.. sorry kinda a noob also in this

 

type:

?help


...

SNeakyPEeky__3 #12 Posted 22 October 2017 - 07:51 PM

    Lance-corporal

  • Player
  • 8694 battles
  • 11
  • Member since:
    11-16-2016

View Postb48g55m, on 22 October 2017 - 07:35 PM, said:

 

type:

?help

 

thanks got them so theres only 4 commands?

b48g55m #13 Posted 22 October 2017 - 07:55 PM

    Junior Sergeant

  • Player
  • 20992 battles
  • 216
  • [MODRY]
  • Member since:
    10-11-2015

View PostSNeakyPEeky__3, on 22 October 2017 - 07:51 PM, said:

 

thanks got them so theres only 4 commands?

 

at this point yes.
...

LoadAimFireRun #14 Posted 26 October 2017 - 09:14 AM

    Sergeant

  • Player
  • 24821 battles
  • 326
  • [-ROP-]
  • Member since:
    12-22-2015
Thank you, I installed it on the the ROP discord server and all seem to like it.

b48g55m #15 Posted 26 October 2017 - 05:40 PM

    Junior Sergeant

  • Player
  • 20992 battles
  • 216
  • [MODRY]
  • Member since:
    10-11-2015

View PostLoadAimFireRun, on 26 October 2017 - 09:14 AM, said:

Thank you, I installed it on the the ROP discord server and all seem to like it.

 

Thank you! I have noticed, that the bot generated some errors, due to NA player names. I will add custom server attribute later on...

 


...

b48g55m #16 Posted 28 October 2017 - 05:45 PM

    Junior Sergeant

  • Player
  • 20992 battles
  • 216
  • [MODRY]
  • Member since:
    10-11-2015

I have added multiple regions support (eu, ru, na, asia). You can leave it out or specify in username@region

Also, bsig now takes multiple player names as argument.

 

I have moved the bot onto it's own digital ocean server.


Edited by b48g55m, 29 October 2017 - 04:32 PM.

...

b48g55m #17 Posted 01 November 2017 - 08:48 PM

    Junior Sergeant

  • Player
  • 20992 battles
  • 216
  • [MODRY]
  • Member since:
    10-11-2015

OK, at this point, 10 servers are using wotbot, nice :)

 

Besides rewriting the bot to modular architecture i have fixed few details, extended the list of medals to the following:

"heroesOfRassenay", "medalLafayettePool", "medalKolobanov", "medalRadleyWalters", "mainGun", "scout", "supporter", "medalCrucialContribution", "medalBrothersInArms", "kamikaze", "steelwall"

 

and I have added "clanmedals", to list full clan medals, if > 0:

 

 

 

 

 

 

 

 


Edited by b48g55m, 01 November 2017 - 08:54 PM.

...

LoadAimFireRun #18 Posted 03 November 2017 - 11:44 AM

    Sergeant

  • Player
  • 24821 battles
  • 326
  • [-ROP-]
  • Member since:
    12-22-2015
Tx, installed on two of my servers; CFG and ROP.

b48g55m #19 Posted 03 November 2017 - 10:44 PM

    Junior Sergeant

  • Player
  • 20992 battles
  • 216
  • [MODRY]
  • Member since:
    10-11-2015

View PostLoadAimFireRun, on 03 November 2017 - 11:44 AM, said:

Tx, installed on two of my servers; CFG and ROP.

 

Nice :)
...

b48g55m #20 Posted 03 November 2017 - 10:52 PM

    Junior Sergeant

  • Player
  • 20992 battles
  • 216
  • [MODRY]
  • Member since:
    10-11-2015

Added a bit of stats:

 

Short-term data from blitzstars. I didn't have much time to do better, but it shows 30/60/90days, minus i think last save (about 24hours).

 

?bstats

or specify player name:

?bstats player_one player_two player_three

 

 

 

Tier stats difference:

 

first, take a snapshot of your tier stats:

 

?savestats

or specify player name:

?savestats player_one player_two player_three

 

 

Then, after playing some battles, see how you did:

 

?readstats

or specify player name:

?readstats player_one player_two player_three

 


...




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users