Table of Contents
- Introduction
- Tournament Management Commands
- Profile Management Commands
- JSON Schema for Tournament Data
- JSON Schema for User Profiles
- Explanation
- Links
Introudction
Create tournaments on Discord and manage them easily.
Tournament Management Commands
-
/tournament-create
- Command- Description: Instantiates a comprehensive tournament schema with extensive parameters and metadata, including match format.
- Parameters:
- Tournament Title: [Designated Name]
- Match Format: [1v1 or 2v2]
- Participants Overview (Varies by Match Format):
- For 1v1:
Competitor 1 | Competitor 2 -------------------+-------------------- ELRoyal | Guest
- For 2v2:
Team 1 | Team 2 --------------------+-------------------- ELRoyal, Teammate | Someone, Someone
- For 1v1:
- Game Title: [Selected Game] (Permissible Entries: VALORANT, COD, CS2, FORTNITE, APEX LEGENDS, ROBLOX)
- Event Date: [Date Placeholder] (To Be Determined)
- Total Enrollments: [Count Placeholder] (Not Applicable until Registration Commencement)
- Designated Victor: [Winner Placeholder] (To Be Declared Post-Event)
- Interactive Element:
REGISTER
Button: Triggers a modal interface requiring users to input theirUser Tag
andClan Affiliation
for enrollment.
- Image Generation:
- Utilizes the
canvacord
library to dynamically generate an image of the tournament table, providing a visually engaging representation of the participants and clan affiliations. The format of the image will adapt based on the selected match format (1v1 or 2v2).
- Utilizes the
-
/setwinner
- Command- Description: Facilitates the modification of tournament metadata to officially designate a victor.
- Parameters:
msgid
: [Identifier for the tournament announcement message]usertag
: [Tag of the victorious participant]
- Functionality: Alters the designated message to update the tournament’s winner status and amend the relevant data fields. Updates the associated image generated by
canvacord
to reflect the new winner.
-
/tournament-show
- Command- Description: Presents a curated overview of ongoing and forthcoming tournaments.
- Output: An integrated summary displaying the status and essential details of all current and scheduled tournaments, including any dynamically generated images of tournament tables.
-
/tournament-list
- Command- Description: Delivers a comprehensive catalog of all tournaments that have been instantiated to date.
- Output: A register enumerating each
Tournament Title
along with the correspondingDeclared Winner
.
Profile Management Commands
-
/setprofile
- Command- Description: Configures or updates user profiles by delineating game preferences within a structured data repository.
- Interactive Component:
- An embedded interface featuring a selection menu for available game options.
- User selections are persistently stored within a JSON-based datastore. If no preference is indicated, the entry is recorded as
NULL
.
-
/viewprofile
- Command- Description: Retrieves and presents detailed profile information for a specified user.
- Parameters:
userid
: [Unique Identifier for the target user profile]
- Output: An embedded data view showcasing the user’s game preferences and other pertinent profile information.
JSON Schema for Tournament Data
{
"tournaments": [
{
"tournamentId": "string", // Unique identifier for the tournament
"title": "string", // Title of the tournament
"matchFormat": "string", // Format of the match (1v1 or 2v2)
"game": "string", // Game title (e.g., VALORANT, COD, CS2)
"date": "string", // Date of the tournament (ISO 8601 format)
"totalRegistrations": "number", // Number of registrations
"winner": "string", // UserTag of the winner (if determined)
"participants": [
{
"team": "string", // Team name or individual participant identifier
"members": [
{
"userTag": "string", // Discord UserTag of the participant
"clan": "string" // Clan name
}
]
}
],
"imageUrl": "string" // URL to the generated image of the tournament table
}
]
}
JSON Schema for User Profiles
{
"profiles": [
{
"userId": "string", // Unique identifier for the user
"userTag": "string", // Discord UserTag of the user
"gamePreferences": [
{
"game": "string", // Game title (e.g., VALORANT, COD)
"preference": "string" // User's preference level or role
}
]
}
]
}
Explanation
-
Tournaments Collection:
tournamentId
: A unique string identifier for each tournament.title
: The name of the tournament.matchFormat
: Indicates whether the tournament is1v1
or2v2
.game
: The title of the game being played.date
: The date of the tournament, formatted in ISO 8601.totalRegistrations
: The total number of participants registered.winner
: TheUserTag
of the winning participant, if determined.participants
: An array of participant objects, each containing:members
: An array of members in the team or individual participants with theirUserTag
andclan
.
imageUrl
: URL to the image generated bycanvacord
representing the tournament table.
-
Profiles Collection:
userId
: A unique identifier for each user.userTag
: The Discord UserTag of the user.gamePreferences
: An array of objects representing the user's game preferences, including:game
: The title of the game.preference
: The user's preference level or role within the game.