- Clone this git repository to your local machine
- Create a
.env
file with the following variables:DISCORD_TOKEN
: Generated bot tokenDISCORD_GUILD
: Name of Discord serverMATCH_PREFIX
: Replay prefix used to match valid replays (e.g.https://replay.pokemonshowdown.com
)MATCH_CHANNEL
: Channel where replays are posted
- Run the main file:
python Main.py
- If this is successful, the console should say
{Bot name} is connected to the following guild: {Discord server name}(id: {Discord server id})
- Bot will start to initialize by reading all message history in that channel and scanning for replays
- This will take a long time depending on how active the server is; Assume 5-15 minutes at least
- This is a one time action. Once the messages have been scanned, all replays will be stored in DB
- Even if bot is taken offline, data will persist and account for all missing replays when started again
- If this is successful, the console should say
+ranking
- Parameters:
rank_type
: Takes values ofmonth
orall
, defaults tomonth
unranked
: Takes values ofunranked
orranked
, defaults tounranked
limit
: Takes any integer value, defaults to20
format
: Takes a string value, defaults togen9nationaldexag
- Return:
- List of elo and ranking for all users
- If
month
, shows only elo/rank based on current month. Ifall
, shows all time elo/rank - If
unranked
, includes unranked users in ranking. Ifranked
, only shows ranked users
- If
- List of elo and ranking for all users
- Parameters:
+past_ranking
- Parameters:
month
: Takes any two digit integer, defaults to01
year
: Takes any four digit integer, defaults to1970
unranked
: Takes values ofunranked
orranked
, defaults tounranked
limit
: Takes any integer value, defaults to20
format
: Takes a string value, defaults togen9nationaldexag
- Return:
- List of elo and ranking for all users from a previous month/year
- If
unranked
, includes unranked users in ranking. Ifranked
, only shows ranked users
- If
- List of elo and ranking for all users from a previous month/year
- Parameters:
+show_rank
- Parameters:
username
: Takes any showdown usernamerank_type
: Takes values ofmonth
orall
, defaults tomonth
format
: Takes a string value, defaults togen9nationaldexag
- Return:
- Elo of user
- If
all
, shows all time elo. Ifmonth
, shows current month elo
- If
- Elo of user
- Parameters:
+pokemon_usage
- Parameters:
username
: Takes any showdown username orall
, defaults toall
usage_type
: Takes values ofmost
,win
, orlose
, defaults tomost
rank_type
: Takes values ofmonth
orall
, defaults tomonth
limit
: Takes any integer value, defaults to20
format
: Takes a string value, defaults togen9nationaldexag
- Return:
- Most common pokemon used
- If
all
, shows most common pokemon across all users. If specific username, shows most common pokemon for that user - If
most
, shows most common pokemon in all matches. Ifwin
, shows most common pokemon in winning matches. Iflose
, shows most common pokemon in losing matches. - If
all
, shows most common pokemon of all time. Ifmonth
, shows most common pokemon of current month
- If
- Most common pokemon used
- Parameters:
+pokemon_usage_one
- Parameters:
pokemon
: Takes any pokemon name, no defaultusage_type
: Takes values ofmost
,win
, orlose
, defaults tomost
rank_type
: Takes values ofmonth
orall
, defaults tomonth
format
: Takes a string value, defaults togen9nationaldexag
- Return:
- Pokemon usage for one pokemon
- If
most
, shows pokemon usage in all matches. Ifwin
, shows pokemon usage in winning matches. Iflose
, shows pokemon usage in losing matches. - If
all
, shows pokemon usage of all time. Ifmonth
, shows pokemon usage of current month
- If
- Pokemon usage for one pokemon
- Parameters:
+past_pokemon_usage
- Parameters:
username
: Takes any showdown username orall
, defaults toall
usage_type
: Takes values ofmost
,win
, orlose
, defaults tomost
month
: Takes any two digit integer, defaults to01
year
: Takes any four digit integer, defaults to1970
limit
: Takes any integer value, defaults to20
format
: Takes a string value, defaults togen9nationaldexag
- Return:
- Most common pokemon used from past meta
- If
all
, shows most common pokemon across all users. If specific username, shows most common pokemon for that user - If
most
, shows most common pokemon in all matches. Ifwin
, shows most common pokemon in winning matches. Iflose
, shows most common pokemon in losing matches.
- If
- Most common pokemon used from past meta
- Parameters:
+rival
- Parameters:
username
: Takes any showdown usernamerival_type
: Takes values ofmost
,win
, orlose
, defaults tomost
rank_type
: Takes values ofmonth
orall
, defaults tomonth
- Return:
- Most common user played against
- If
most
, shows most common rival in all matches. Ifwin
, shows most common rival in winning matches. Iflose
, shows most common rival in losing matches. - If
all
, shows most common pokemon of all time. Ifmonth
, shows most common pokemon of current month
- If
- Most common user played against
- Parameters: