generated from array-in-a-matrix/matrix-bot-template
parent
dfa6671562
commit
4553eb046b
1 changed files with 4 additions and 10 deletions
|
@ -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)
|
||||
echo("Copy this access token to your bot's config: ", client.accessToken)
|
Loading…
Add table
Reference in a new issue