iprobedroid / swgoh-arena-tracker

47 stars 189 forks source link

Customizable messages for climb / drop / current state #23

Closed johninparis closed 3 years ago

johninparis commented 4 years ago

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:

The messages would contain plain text, with these tokens

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%"