This Discord Bot allows for creation of teams between players in a discord server. When a team is created, the team is given a category channel with a default list of channels. The bot keeps track of the members of the team, and uses this information to maintain access to these channels. If all members of a team leave, the channels are deleted.
{ } shows a command parameter is optional.
teams Help menu
teams create [team name] Create a new team
teams invite [user] Add a user to the user's current team
teams revoke [user] Revoke an invite to your current team for user.
teams leave Leave your current team.
teams join Join a team. (requires invite)
teams points Display the user's teams' points.
teams points {team name} Check the points of a specific team.
teams top {number of teams} Check the top teams with their points.
teams roster {team name} List the players on a given roster.
teams play teamName [user's team]-[other team] Send a message for confirmation to the other team.
teams confirm teamName Confirm that a game with the listed score occured.
teams deny teamName Deny that a game with the listed score occured.
teams pending {games}/{invites} View all pending match results with other teams.
The bot will remove its output from its commands, if typed correctly, in order to prevent spam. Also to reduce spam, the bot will show the current ranked queue after each command typed, but will then be automatically removed after 5 minutes.
node index.js - Start locally
- Linux Server
Use the following commands through SSH to start the bot:
Start and persist through SSH: node index.js > console_error.txt > console_output.txt &
Look at active background processes: ps -ax | grep node
Kill the process running in the background: kill -9 {ProcessNum}
Obtain the {ProcessNum} after looking at the active background processes.
Use "Exit" when finished, before closing console.
This bot uses DiscordAPI v12.
How to get a token: https://www.writebots.com/discord-bot-token/
If you're using this bot on your own, you will need the following.
config.json in this format:
{
"prefix": "TEAMS",
"token": "token"
}
A "data" folder in the root directory to contain all the teams information with the following names:
- data
- team-invites.txt
- team-matches.txt
- team-points.txt
- team-roster.txt
- teams.txt
- team-invites.txt