-
Notifications
You must be signed in to change notification settings - Fork 7
Tutorial
Hi, this is a tutorial on how to invite and setup the Tosurnament bot.
Just a little explanation of the nomenclature used below:
-
<parameter>
means that the parameter is mandatory. It does not mean you have to write<parameter>
orparameter
. -
[<parameter>]
means that the parameter is optional. It does not mean you have to write[<parameter>]
,<parameter>
orparameter
.
Here we go!
- You just need to click here.
- Select the server on which you want the bot to be.
- Click
Authorize
.
By default, the bot is in English. You can see the list of language available by using the ;set_language
command.
If you find a language to use, you can then use ;set_language <language>
with <language>
being the chosen language. For example: ;set_language fr
.
If you do not find a language to use, you can contribute to this repository. Please check the README for more information.
On your server, use this command: ;create_tournament <acronym> <name> [<bracket_name>]
.
NOTE: [<bracket_name>]
is optional, use it if you have multiple brackets.
Examples:
;create_tournament RT "Random Tournament"
;create_tournament RT "Random Tournament" "Tier 1"
IMPORTANT: the "
are mandatory for tournament name containing spaces.
In case you did a mistake, you can use the following commands:
;set_tournament_name <name>
;set_tournament_acronym <acronym>
;set_bracket_name <bracket_name>
Your tournament is now created!
Now you should use set an admin role on the bot to allow other people to modify the bot settings: ;set_admin_role <role>
.
Examples:
-
;set_admin_role Admin
(just the name of the role) ;set_admin_role @Admin
It is now time to set up some global settings, used whether you have one or multiple brackets.
It will allow those with the role to use specific commands, like reschedule
.
Command: ;set_player_role <role>
, where <role>
is a role (or role name) on your server.
Example: ;set_player_role Player
(or ;set_player_role @Player
works too)
It will allow referees to take/drop matches present on the schedules spreadsheet.
Command: ;set_referee_role <role>
It will allow streamers to take/drop matches present on the schedules spreadsheet.
Command: ;set_streamer_role <role>
It will allow commentators to take/drop matches present on the schedules spreadsheet.
Command: ;set_commentator_role <role>
If you are hosting a team tournament, you might be interested in the team captain role. It will be used for reschedule (only the team captain can make/accept/deny reschedules).
Command: ;set_team_captain_role <role>
It will be used for reschedule alerts and referee match notification alerts.
Command: ;set_staff_channel <channel>
Example: ;set_staff_channel #staff_channel
It will be used for player match notification alerts.
Command: ;set_match_notification_channel <channel>
It will be used during reschedule, checking that the previous time of the match are in more than X hours, X being the number of hours set. By default, it is set to 6.
Command: ;set_reschedule_deadline_hours_before_current_time <hours>
Example: ;set_reschedule_deadline_hours_before_current_time 12
It will be used during reschedule, checking that the new time of the match are in more than X hours, X being the number of hours set. By default, it is set to 24.
Command: ;set_reschedule_deadline_hours_before_new_time <hours>
Example: ;set_reschedule_deadline_hours_before_new_time 12
It will be used during reschedule, checking that the new time is before the specified date. The date format is <day_of_the_week> <time: HH:mm>
where <day_of_the_week>
is the day of the week in English in all letters (ex: Monday). The date is either in UTC by default, or uses the timezone defined with ;set_utc
.
Command: ;set_reschedule_deadline_end <day_of_the_week> <time: HH:mm>
Example: ;set_reschedule_deadline_end Monday 12:00
If you are hosting a team tournament, there is a ping team setting. It will ping a team when set to True, or the team captain when set to False (if the Team Captain role is not set, it will take the 1st player of the team). By default, it is set to True.
Command: ;set_ping_team <boolean>
Example: ;set_ping_team false
If you are hosting a timezone-specific tournament, you can specify the timezone the bot will use when displaying and processing dates. The format to use is +HH:mm
or -HH:mm
. By default, it is set to +00:00
.
Command: ;set_utc <tz_info>
Example: ;set_utc +02:00
If you want to use plain text date/time in your spreadsheets, you need to set this setting. This command uses specific flags that you can find here. By default, it is set to %d %B
.
Command: ;set_date_format <date_format>
Example: ;set_date_format %d/%m/%Y
You will need to create other brackets first.
Command: ;create_bracket <name>
Example: ;create_bracket Tier 2
Now, remember that you will need to set the settings for each bracket individually (a dashboard to ease this process will come later on). To change the current bracket on which you will change the settings, you need to use: ;get_bracket <index>
. The <index>
of each bracket is given to you when using ;get_bracket
without any parameter.
Example: ;get_bracket 2
You can also change the name of a bracket.
Command: ;set_bracket_name <name>
Example: ;set_bracket_name Tier 3
Before setting the spreadsheets, you need to authorize the bot to read and write in your spreadsheet. You have 2 choices, either:
- Create an Edit shareable link: click on SHARE -> Get a shareable link -> Anyone with the link can edit.
- Share the spreadsheet to the TosurnamentBot account: click on SHARE -> In the box below People, write
tosurnament-bot@tosurnament-bot.iam.gserviceaccount.com
(don't worry if you receive a mail saying it didn't find the recipient).
The <range>
parameter present below is a google spreadsheet range. For more info, please check the A1 notation here.
All the ranges to set below MUST BE REAL DATA AND NOT FORMULAS. If you have information in different sheets (tabs) for the same spreadsheet, you can prefix a range like this: Sheet Name!A2:A
.
If you need to have separated ranges for the same range setting, you can do it like this: A2:A,C2:C,E2:E,G2:G
.
After setting up the spreadsheets, if you do manual updates to any of them, please remember to use ;sync_spreadsheet
. It shouldn't be needed most of the time, but it is better to always do it.
Command: ;set_schedules_spreadsheet <spreadsheet_id> <sheet_name>
, where <spreadsheet_id>
is the url or the id of the spreadsheet and <sheet_name>
is the name of the sheet (tab) containing the schedules. If no <sheet_name>
is given as parameter, it will use the first sheet (tab) present in the spreadsheet.
Example: ;set_schedules_spreadsheet https://docs.google.com/spreadsheets/d/1A0zgYzD8gGHkyISuaqTDxIhoiJ_3lDyTkF_M0IJ4K14 Tier 1
You can also change the sheet used.
Command: ;set_schedules_spreadsheet_sheet_name <sheet_name>
Example: ;set_schedules_spreadsheet_sheet_name Tier 2
It will be used for reschedule and taking/dropping matches. Even if there are different brackets, every match id must be unique.
Command: ;set_schedules_spreadsheet_range_match_id <range>
Example: ;set_schedules_spreadsheet_range_match_id A2:A
It should be a column containing the first team/player of the schedule.
Command: ;set_schedules_spreadsheet_range_team1 <range>
It should be a column containing the second team/player of the schedule.
Command: ;set_schedules_spreadsheet_range_team2 <range>
It will be used to get/change the match date.
Command: ;set_schedules_spreadsheet_range_date <range>
It will be used to get/change the match time.
Command: ;set_schedules_spreadsheet_range_time [<range>]
It will be used to take/drop matches and be notified by alerts.
Command: ;set_schedules_spreadsheet_range_referee <range>
It will be used to take/drop matches.
Command: ;set_schedules_spreadsheet_range_streamer [<range>]
It will be used to take/drop matches.
Command: ;set_schedules_spreadsheet_range_commentator [<range>]
It will be filled with the score of team1 when using the post_result
command.
Command: ;set_schedules_spreadsheet_range_score_team1 [<range>]
It will be filled with the score of team2 when using the post_result
command.
Command: ;set_schedules_spreadsheet_range_score_team2 [<range>]
It will be filled with the mp links of the match when using the post_result
command.
Command: ;set_schedules_spreadsheet_range_mp_links [<range>]
.
This command has been changed to ;set_date_format
. Also, the bot can now read date and time without needing to change the format to Plain Text
.
It will be used to read/write the right format in the match schedule. This command uses specific flags that you can find here. By default, it is set to %d %B
.
Command: ;set_schedules_spreadsheet_date_format <date_format>
Example: ;set_schedules_spreadsheet_date_format %d/%m/%Y
If set to False
, one cell can contain multiple staffs and there cannot be multiple cells for the same row. For example, a match will have a commentator cell that can have 2 commentators like: Commentator A / Commentator B
. If set to True
, one cell can only contain 1 staff but there can be multiple cells for the same row. For example, a match will have 2 commentator cells like: Commentator A
| Commentator B
. By default, it is set to False.
Command: ;set_schedules_spreadsheet_staff_is_range <boolean>
Example: ;set_schedules_spreadsheet_staff_is_range True
Command: ;set_players_spreadsheet <spreadsheet_id> <sheet_name>
, where <spreadsheet_id>
is the url or the id of the spreadsheet and <sheet_name>
is the name of the sheet (tab) containing the players list. If no <sheet_name>
is given as parameter, it will use the first sheet (tab) present in the spreadsheet.
Example: ;set_players_spreadsheet https://docs.google.com/spreadsheets/d/1A0zgYzD8gGHkyISuaqTDxIhoiJ_3lDyTkF_M0IJ4K14 Players
If you need to change the sheet used.
Command: ;set_players_spreadsheet_sheet_name <sheet_name>
Example: ;set_players_spreadsheet_sheet_name Player list
It will be used for every player command. Do not set it for single player tournament.
Command: ;set_players_spreadsheet_range_team_name [<range>]
It needs to contain all players name. It will be used for every player command.
Command: ;set_players_spreadsheet_range_team <range>
If you want to not make the player use the link
command, you will need to set the discord or discord id range, as it will be used to identify/ping the players.
Command: ;set_players_spreadsheet_range_discord [<range>]
If you want to not make the player use the link
command, you will need to set the discord or discord id range, as it will be used to identify/ping the players.
Command: ;set_players_spreadsheet_range_discord_id [<range>]
It can be used by some commands. Useful in multiple brackets tournament.
Command: ;set_bracket_role <role>
It will be filled automatically if using the post_result
command.
Command: ;set_challonge <tournament_id>
, where <tournament_id>
can be either the tournament url or id.
Example: ;set_challonge https://challonge.com/testandroid/
After setting everything, you might want to test if everything works correctly. Please refer to this page if you want to test your settings.
For more advanced settings, please refer to the pages below:
- Verification role/channel setup
- Registration
- Qualifiers
- Useful commands for staffs and players
- Reaction for role message
- Qualifiers results (DO NOT USE FOR NOW)
- Post result (DO NOT USE FOR NOW)