diff --git a/examples/printToken.nim b/examples/printToken.nim index 7a8904d..1aa7915 100644 --- a/examples/printToken.nim +++ b/examples/printToken.nim @@ -2,16 +2,10 @@ # documentation website: https://turt2live.github.io/matrix-bot-sdk/tutorial-bot.html import ../nimbotsdk -import jsconsole -const - homeserver: cstring = "https://matrix.chatinamatrix.xyz" - username: cstring = "test" - password: cstring = "zyEc5kLt3XHkw6Y!" +const homeserverUrl: cstring = "https://matrix.example.xyz" -# const homeserverUrl: cstring = "https://matrix.example.xyz" +let auth = newMatrixAuth(homeserverUrl) +let client = auth.passwordLogin("username", "password") -let auth = newMatrixAuth(homeserver) -let client = auth.passwordLogin(username, password) - -console.log("Copy this access token to your bot's config: ", client.accessToken) \ No newline at end of file +echo("Copy this access token to your bot's config: ", client.accessToken) \ No newline at end of file