-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
Description:
Creating a tournament on the TA-website, doesn't show the tournament in the TA-client stateManager, even when using a bot-token from the user creating the tournament.
This might be connected to #81, but I'm not entirely sure.
Reproduction steps:
Written steps:
- Create a Tournament
- Create a bot-token
- Create a simple function, using
moons-ta-clientto check for the tournament:
import "dotenv/config";
import { TAClient } from "moons-ta-client";
const tournamentName: string = "Hawk Test"
const test_auth: string = "eyJhbGciOiJSUzI1NiIsImtpZCI6IkVEQ0JGQTU2QTA5ODc4QkI0NEREOUZCOTM0MjFGMTIzN0UzNDJDRjIiLCJ4NXQiOiI3Y3Y2VnFDWWVMdEUzWi01TkNIeEkzNDBMUEkiLCJ0eXAiOiJKV1QifQ.eyJpYXQiOiIxNzU5NjcxNzA2IiwiZXhwIjoiMjA3NTIwNDUwNiIsInRhOmRpc2NvcmRfaWQiOiIyYjM5MDIwOC04ZDQ1LTQxNzMtODUxOS1hNGNmMjk2MmUyNWUiLCJ0YTpkaXNjb3JkX25hbWUiOiJDb21wU2FiZXIiLCJ0YTpkaXNjb3JkX2F2YXRhciI6IiIsImlzcyI6InRhX3NlcnZlciIsImF1ZCI6InRhX3VzZXJzIn0.UDocEuKfGEsxT2qM7FmVxut2JjmO4aTmkFgq6GSPsGYHuOtFWoMO_DLJZ4LvapE6cNBzgoC2TIDyDSi1MN5vUL-7eRuLdgbV9ieivNS7pUYgWLrgXH8iPUrT9Gcsk3iIXl-mvyjpi_wzrJ8kEFsviNGOIP4RDHrb7iEdbnfVAIQ2aAoLMQRyRNJ0RDa5IBse0icBtQ8EgESqdVYHuff6PEmEjY8bikNDvalS5M8Zqt5QuotCVg-3S3MTOVBbctEBFQ2RUGZ5PPj401peienEc51FcoceQ7qBsCKsBoF-4ZJzujFWeOQhUtDXCsWg1RxpghNNFDZoOjdxTehHMsQrEQ"
async function simpleTaFetcher() {
const client = new TAClient();
client.setAuthToken(test_auth);
await client.connect(process.env.TA_IP, process.env.TA_PORT);
const tournamentData = client.stateManager.getTournaments().find(t => t.settings.tournamentName === tournamentName);
console.dir(tournamentData, { depth: null });
client.disconnect();
}
simpleTaFetcher();- Returns
undefined
Note
Bot token was invalidated after the video.
Metadata
Metadata
Assignees
Labels
No labels