Git Product home page Git Product logo

swgoh-arena-tracker's Introduction

Join our Discord channel to be updated.

Simple SWGOH Arena Tracker

DiscordChannel --my capacity is quite limited, yet you can help each other on this channel

Deploy straight to Heroku(24/7 free if a credit card registered)

Deploy

Configuration

Set environment variables:

Variable Name Description Notes
ARENA_TYPE SQUAD or FLEET Required(yet SQUAD is by default if not set)
DISCORD_WEB_HOOK Webhook to discord channel. Required
ALLY_CODES Comma separated list of ally codes.
Example:
123456789,123456788,123456999
Ignored if ALLY_CODES_URL present
ALLY_CODES_URL URL to a json file with players.
Recommended to use secret github gist like this example
How to find discord id..
Format: https://gist.github.com/<user_name>/<gist_id>/raw
Notes:name and discordId is not required, just set them to an empty string "", userIcon is for discord emoji(:emoji_code:)

Deploy with Heroku steps

0. Delete previously created application(if you have one).

1. Click the button below.

Deploy

2. Create the application with a unique name and press Deploy app button.

ScreenShot

3. Once deployed press Manage App button.

ScreenShot

4. Go to settings tab.

ScreenShot

5. Press Reveal Config Vars button and set environment variables.

ScreenShot

Ally codes is a comma-separated string(like: 123456789,125456189 ...).

You will need to create a Discord web hook in the channel of choice. Fill the DISCORD_WEB_HOOK with the that unique url.

Choose your arena type - SQUAD or FLEET. Check the application logs if the tracker stops sending messages.

6. Activate the resource to run the tracker under the Resources tab.

ScreenShot

7. Check logs under More -> View logs for any errors.

ScreenShot

8. Add a credit card to your profile to get extra free hours for forever free 24/7 hosting.

ScreenShot

9. Keep only one application and one resource at a time, otherwise you will be charged...

swgoh-arena-tracker's People

Contributors

iprobedroid avatar

Stargazers

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

Watchers

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

swgoh-arena-tracker's Issues

Additional CUSTOM_MESSAGE string options

It would be great if we had flexibility over where the tag is placed in the CUSTOM_MESSAGE strings
%TAG_ID_ON_DROP%
%TAG_ID_ON_CLIMB%
In particular I would like to be able to have it last

Discord tagging

Hello, is everything working with discord taging. I checked DISCORD_TAGS variable and also checked ALLY_CODES_URL with file with players, but discord tracker isnt tagging me.

example tracker wrote :
<@my discord id)>(my ingame name) dropped from 3 to 6
I think there is a problem with mark "<" at the beginning or im doing something wrong

I checked also another player with no discord id in gist list and tracker wrote proper tag :
@invalid-user(other ingame name) dropped from 6 to 10. There is no any "<" and ">"

Customizable messages for climb / drop / current state

It'd be really nice to have customizable message strings for the messages posted when someone climbs or drops, as well as those sent out to show current state ("is at"). Using tokens for certain values, customizable messages would allow localization as well as tailoring to preferences (for example: including emoji arrows for up and down, putting the rank before the name, etc).

From what I see the current bot send out, I'd propose these environment variables:

  • MESSAGE_STATUS
  • MESSAGE_CLIMB
  • MESSAGE_DROP

The messages would contain plain text, with these tokens

  • %ALLY_NAME% (replaced by player's in-game name)
  • %CURRENT_RANK% (replaced by player's current rank)
  • %PREVIOUS_RANK% (replaced by player's rank prior to this message)

So the current default message noting a player's climb could be expressed as:
MESSAGE_CLIMB = "`%ALLY_NAME%` climbed from %PREVIOUS_RANK% to %CURRENT_RANK%"

The current default message noting a player's status could be expressed as:
MESSAGE_STATUS = "`%ALLY_NAME%` is at %CURRENT_RANK%"

And a customized version of the drop message, using an emoji arrow and bold text for the player name, could be expressed as:
MESSAGE_DROP = ":arrow_down_small: **%ALLY_NAME%** dropped from %PREVIOUS_RANK% to %CURRENT_RANK%"

Heroku Free Tier Going Away

The usage of the Heroku free tier will no longer be possible starting November 28, 2022. While this is a useful tool, I expect usage will drop off substantially when the cost goes to $7/month.

Perhaps it is possible to work this for a different provider that either has a free tier or substantially cheaper option for similar functionality.

Accept local file for ALLY_CODES_URL

Please add code to accept local file for ALLY_CODES_URL instead of requiring URL
Something like ALLY_CODES_FILE or check if file is local file first before trying network operation

Configurable sleep times

Hi,
Great work!
Can you make configurable the times in seconds to wait between each player check and after all players are checked configurable?
With your current defaults (2 sec and 3 min) if not provided. For example:
WAIT_BETWEEN_PLAYERS = 2
WAIT_AFTER_ALL_PLAYERS = 180

Thanks!
BR

Enhancement : Fleet and arena in same time

Hosting the Squad App and Fleet App on heroku is sadly impossible (app is shutdown in 15 days)
Is it possible to make working both arena type ? With a property for fleet discord tags and squad discord tags for example

Ability to tag on fall when over X

Now that we are starting to see more GLs in arena we have many that sit it top spots all day. They are willing to help and put in easier to beat teams but would like if they could be tagged only when a certain threshold is met, say fallen out of top 10 or top 20.

I'd be willing to help as I have some coding experience, discord = Mol Rakea#6130

Reporting offending ally code in error message output

I have some bad ally codes, but can't clearly figure out what they are, getting this message from the bot output:

Error: Sequence contains no matching element
Error: Sequence contains no matching element

In this case I believe I have two, if I knew what the erroneous values were, I could remove them or get them updated.

Request about source code

Not really an issue, but since git hub doesnt allow for private messages I have no other way to reach out to you.

Like another user in february I wonder if you would be willing to share the source code of your project. Would love to have a look at how you handle things, learn a bit from it and maybe use some of it for a bit of experimenting of my own.

If you are willing I could share either an email or my discord tag or something with you for contact.

Heroku app deploy button throws error

Tried deploying from the readme instructions, error thrown is: "No app.json located in the repo URL provided."

I can see the file in the repo, is the correct URL being passed?

2019-11-04

Failed to deserialize player settings

Hi, I just deployed the bot on Heroku but I'm getting the following error in the application logs:
[PlayerSettingsProvider]:Failed to deserialize player settings: Unexpected character encountered while parsing value: <. Path '', line 0, position 0.
EDIT: It only happens with a json file, if I provide the allycodes in as a comma-separated list it works

Crash on timeout, other questions

First... I am really liking this. It's been very informative.

Second... I have noticed that when the game API call times out, it just stops polling. I have had to make the docker container automatically restart, but that results in a dump of all the players in the configuration everytime it restarts. I understand why that is I think, but it would be better if the timeout didn't cause a crash.

Additionally, some other questions...

I am wondering about the polling frequency of the API. Is it every one minute?

Also, if I modify the shard-bot we use to output the json like the bot wants for the URL, how often will it get retrieved?

Lastly, is the source code for the bot itself available somewhere? I think I could solve most of these questions that way. Or perhaps information on the API being called? I maintain a discord bot used by my arena shards and a few others, and I've been wondering about pairing that with this sort of tracking for quite some time.

Thanks!

Add an option for additional logging

I think it would be helpful to send a message equivalent to what is sent to the webhook to stdout. That way with docker logs you could get some historical data like how many fights (wins) a player has used or to determine climbing times, etc.

Error with the ally-code

hey guys,
I would love to use this awesome bot! but i have an error in the logs, which i cant handle. I filled the config vars as shown with allycodes: only numbers, without a space. but is still get an error. I would be very happy if someone could help me!

"Error: errorCode:Invaliddata, allyCode:, authId:sLmTMu1GTQiMtLm3PeGgEA, token:OXQI_N9xTDyChIVoiKF8Rg, PlayerId/ally code must be specified"

Thanks a lot!

Add an option to ignore movement past a certain rank

We use the tracker for 2 purposes, one is to track shard members and it is awesome at that, the other is to track enemies. The enemy tracking is only relevant up to certain ranks.

it would be good if you can set an upper limit on the tracking of users similar to the discord user tags that can be set to stop at certain ranks, a setting that can stop reporting on a user in discord entirely when they fall below a certain rank.

RQ: Ability to tag on climb

Hi, and thanks for creating this - extremely useful.

We have a small set of folks that snipe our shard players on payout that we'd like to track when they climb. Any chance we can set a variable to notify via discord on climb -or- drop?

Thank you!

Contact Developer

Not really an issue with the bot, but want to talk to the developer about the backend as I am building some stuff in Python and running into some limitations with available APIs. Is there a place I can contact the developer of this bot?

Deploy to Heroku

Hello, i get this error when i try to deploy app to heroku :

A valid GitHub directory could not be found.

The given URL (https://github.com/) is not a valid GitHub repository.

ARENA_TYPE combined Fleet and Squad

Hello there,

Is it possible to define Fleet and Squad arena together and run it in one container?
(Like coma separated SQUAD,FLEET)

Thank you very much in advance!

Source Code

Hello, can you please share source code of this bot? I’m planning to create normal discord tracker bot (without Heroku limitations) and want to take some of your development if you don’t mind of it

Thank you so much

Error in the Logs

First this is awesome and helps the shard a LOT! I am showing this error over and over in the logs and not sure what the problem is as i'm not a developer. Any help would be appreciated!

2020-01-12T17:48:01.257077+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=nghtmare-arena-tracker.herokuapp.com request_id=3b7e03e0-1cf9-4d39-90e0-64e6889dafe5 fwd="My local IP" dyno= connect= service= status=503 bytes= protocol=https

Object reference error

Hello! This bot looks amazing for my Arena Shard.

I have set it up per the provided instructions. I set up a JSON with the formatting shown, and I set it up as a secret Gist on my Github. I defined all names, but left all the Discord tags as empty fields ("").

When I initialize the JSON link, it loads the players into the assigned discord channel. The bot seems to be working as expected, but the logs are capturing this constant error approximately every 5 minutes:
Error: Object reference not set to an instance of an object.

I would appreciate any advice, or whether I should just ignore this error.

RQ: Tag only when dropping in position

Hey,

Great work!
I have a very easy to implement request.
Now tags work always, when you climb and when you drop.
You know when you climb so you don't really need a tag, so using the tag only when dropping might be a very nice refinement and should be pretty easy to implement.

Thanks

JSON error I dont understand

Thanks for the bot, it's fantastic!

I'm getting the following error multiple times in the log:

[PlayerSettingsProvider]:Failed to deserialize player settings: Unexpected character encountered while parsing value: <. Path '', line 0, position 0.

I only get it when using ALLY_CODES_URL (I tested with just ALLY_CODES and a single code and it worked fine), so I assume whatever is wrong is in here:
https://gist.github.com/mimregi/1010331e0417b4593a0bec0d47a599d3

I tried it with and without the discord ID line, tried making it public, still getting the same error.

Anything obviously not right there?

Thanks in advance!

Error on raspbian mono on raspberry pi 3

Trying to run SimpleTracker.dll on mono on raspbian (Mono JIT compiler version 5.18.0.240) gives the following error:
ERROR:The 'Content-Type' header must be modified using the appropriate property or method.

See the player in your old spot

It'd be nice to add the name of the player in your old position (who is the one most likely to have dropped you). Something like:

@player(Nickname) dropped from 39 to 49. Currently at 39 (AnotherPlayer)

I do know some programming so maybe i can try and help out

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.