[splinter-info] Tracking your guilds Brawl statistics? This will help you!

in #blockchain2 years ago

Brawls have become more and more popular, with guilds leveling up to be able to participate in them. For already established guilds, who want to optimize their fray assignments, I added two more commands to the splinter-stats Discord bot: $brawl_guild and $brawl_player

2VZXybTSZJq1EFEMqZ2iEs7VKxvmFVY6eLE22jxtvUD9ojf1SpbeBSeVs7jna4dWHo9hJKYfEs8FF9SEiC46U5HC66zobtH1XuPkfPyAtFmRaVfnTH9cKXq6L1jteNmiNjU4N8hY3RyJCDwF7AvEyGcYWsQ.png

$brawl_guild

With the introduction of Brawls 2.0 the API now stores more information regarding Brawls. You can basically get the results on every Brawl since the 40th cycle. I don't know if it's possible to get the information before as well, so if you do then please let me know and I'll add it to the bot.

This is the information the you will get if you use the command $brawl_guild (so for example: $brawl_guild Team Possible):

image.png

Here is a little bit of explanation of the specific fields, but they should be pretty self explanatory:

CycleBrawl Cycle (Starts at 40 with the begin of Brawls 2.0)
RankWhich rank the guild finished in a Brawl
WinsTotal Wins in a Brawl
LossesTotal Losses in a Brawl
DrawsTotal Draws in a Brawl
PointsTotal Points gained in a Brawl (from win/loss/draw)
MeritsTotal Merits that the guild earned in a Brawl

$brawl_player

The probably more interesting command is $brawl_player. It will give you the lifetime Brawl performance of the player within your guild. It summarizes all previous Brawl performances and aggregates the stats into the following table:

image.png

The command can be used like this: $brawl_player <player_name> (e.g. $brawl_player giemo) Here again the explanation of the various fields:

FrayThe Frays the player has played
WinsTotal Wins within a given Fray
LossesTotal Losses within a given Fray
DrawsTotal Draws within a given Fray
ParticipationParticipation within a given Fray

Important: Since I don't want to spam the API (which would also result in a timeout and the unavailability of the Discord Bot) I am saving the Brawl results on the server. That means, the first time someone wants to get their player stats, I run through all the Brawls he/she was participating. This first run will take a lot longer than any future runs (where I can take that information from my server directly). It is also possible that the first time you try to use this command, it fails with an error message. Just wait a couple of minutes (at least 5) and then try again. It most certainly will work then.

How to integrate the bot into your Discord Server?

If you are an admin of a Discord Server and like to integrate splinter-info there, follow the below steps and you are ready to use it:

  1. Create a new channel called splinter-info
  2. Click here and choose the server you want to add the Discord Bot to (You need admin privileges to do so)
  3. Authorize the bot to read and write messages
  4. Use the bot as described above

If you have any suggestions for future utilities, that this bot should have, please let me know!


If you haven't joined Splinterlands yet, don't miss out on the fun. Use my referral link and I'll set you up with a couple of cards to get you started.

Sort:  

Congratulations @giemo! You have completed the following achievement on the Hive blockchain and have been rewarded with new badge(s):

You received more than 1750 upvotes.
Your next target is to reach 2000 upvotes.

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Check out the last post from @hivebuzz:

Hive Power Up Day - December 1st 2021 - Become an Orca!

Thanks for sharing! - @alokkumar121

This is awesome! anyway seems like brawl history is not showing up?

This has been disabled with the api changes a couple of months ago, because it was resulting in some softbans from the api.
I haven't gotten around to update/fix it yet

Oh, thanks! This is so amazing by the way.

Hello, I've read that you could share. I'd like to do quite the same thing but on a website and store each brawls results in a databse to keep track records.
Is it possible ti share source code of your bot ?

Just came across this today and gave it a try. Noticed an update needs to be made to the name of the Chaos Legion Only frays, they currently say "Untamed".