[WIP] A music bot for Matrix that connects to Element Call enabled channels.
1import {MatrixClient, UserIdentifier} from "matrix-js-sdk";
2
3export async function createTokens(
4 client: MatrixClient,
5 userIdentifier: UserIdentifier,
6 password: string
7) {
8 const loginResponse = await client.loginRequest({
9 type: "m.login.password",
10 identifier: userIdentifier,
11 password: password,
12 refresh_token: true,
13 device_id: "matrix-music"
14 })
15
16 console.log("-----------------------------------------------")
17 console.log(loginResponse)
18 console.log("-----------------------------------------------")
19
20 return loginResponse
21}