Dependencies
-discord.js - v13
-enum
-larg
You can use npm install
to install these packages automatically.
Run
Run the following commands to clone the repo and get into its directory:
-git clone https://github.com/qkrisi/ktanecord
-cd ktanecord
In that directory create a file called `config.json`
Paste these lines in it, and replace the values with the proper ones:
{
"discord": "token",
"token": "prefix",
"prod": false,
"tpServerIP": "IP",
"tpServerPort": "port",
"tpServerPass": "yourpwd",
"ScoreSheet": "sheetID",
"TwitchID": "AppID",
"TwitchSecret": "AppSecret",
"ScoreLog": "ChannelID",
"Invite": "Invite link",
"SimPort": "port",
"EnableSimulator": false,
"DPPort": 6000,
"DPSalts": ["a", "b", "c"],
"TPBounds": [0, 0],
"TPAdmins": 0,
"TPServer": 0
}
Name | Description |
---|---|
discord | The token of the bot |
token | The prefix of the bot, that it'll use before commands (help, etc.) |
prod | Should always be false ! |
tpServerIP | The address of the WebSocket server in the KTaNE Simulator and the ip of the server that stores Twitch Plays scores (if needed), more about that below (can be "localhost") |
tpServerPort | The port of the server that stores Twitch Plays scores (if needed), more about that below |
tpServerPass | A password to block false scores (if needed) |
ScoreSheet | The ID of the Google Spreadsheet that stores module scores (if needed) |
TwitchID | ID of Twitch application (if needed, for streamer stats) |
TwitchSecret | Secret of Twitch application (if needed, for streamer stats) |
ScoreLog | ID of the score logging channel (if needed) |
Invite | Invite link of the bot with the applications.commands scope |
SimPort | Port of the WebSocket server in the KTaNE Simulator |
EnableSimulator | Boolean value indicating the usage of the KTaNE Simulator bot |
DPPort | Port of the Discord Plays server |
DPSalts | Salts to use when encoding the Discord Plays token (any 3 string) |
TPBounds | A list of 2 role IDs: the IDs of the roles denoting the start and the end of the TP role list |
TPAdmins | The role ID of the admin role on the TP server |
TPServer | The ID of the TP server |
KTaNE Simulator: https://github.com/Qkrisi/ktanesim
To run the bot, run the command node src/main.js
Dependencies
You also need Python3.8+
Run
Create a Google Application with the Spreadsheet API enabled.
Create credentials for the Spreadsheet API, save that as a JSON to stats_server/credentials.json
To run the server, run the following command: python ./stats_server/__main__.py
To send scores to the server, use this mod. (More about it in the readme of its repo)
Contributions are highly appreciated, but under the following rule(s):
-Do not submit pull requests for the master, nor the Beta branch! Pull requests are only accepted for the Test branch, which will be merged with the Beta branch later on. To switch to the Test branch, simply run git checkout Test
Join our Discord Server to test out new feauters, give feedback about the bot!
If you're a streamer and wish to be the part of the tp stats system, ping me on Disord (Qkrisi#4982
)