generated from array-in-a-matrix/matrix-bot-template
12 lines
No EOL
443 B
Nim
12 lines
No EOL
443 B
Nim
# This is a nim equivalent to the Login example written on the matrix-bot-sdk's
|
|
# documentation website: https://turt2live.github.io/matrix-bot-sdk/tutorial-bot.html
|
|
|
|
import ../nimbotsdk
|
|
import jsconsole
|
|
|
|
const homeserverUrl: cstring = "https://matrix.example.xyz"
|
|
|
|
let auth = newMatrixAuth(homeserverUrl)
|
|
let client = auth.passwordLogin("username", "password")
|
|
|
|
console.log("Copy this access token to your bot's config: ", client.accessToken) |