Merge pull request #16 from H2-invent/development
add info when bot starts
This commit is contained in:
commit
3e24f63e29
2 changed files with 9 additions and 2 deletions
|
@ -29,12 +29,12 @@ export class conferenceUtils {
|
|||
|
||||
async sendJoinConference(roomId) {
|
||||
var url = await this.createConference(roomId);
|
||||
await this.client.sendHtmlText(roomId, '<div role="button" tabindex="0" class="mx_AccessibleButton mx_MemberList_invite"><a href ="' + url + '">Hier der Konferenz beitreten</a></div> ');
|
||||
await this.client.sendHtmlText(roomId, '<a href ="' + url + '">Hier der Konferenz beitreten</a> ');
|
||||
}
|
||||
|
||||
async inviteAll(roomId) {
|
||||
var url = await this.createConference(roomId);
|
||||
var text = '@room <h1>Diese Konferenz startet gerade</h1><br><a href="'+url+'">Jetzt dieser Konfernz beitreten</a>'
|
||||
var text = '@room <h2>Diese Konferenz startet gerade</h2><br><a href="'+url+'">➡️Jetzt dieser Konfernz beitreten</a>'
|
||||
await this.client.sendHtmlText(roomId, text);
|
||||
}
|
||||
|
||||
|
|
|
@ -33,6 +33,13 @@ client.on("room.join", handlemembership);
|
|||
client.start().then(() => console.log("Bot started!"));
|
||||
client.setDisplayName(MATRIX_DISPLAYNAME)
|
||||
|
||||
client.getWhoAmI().then(userInfo => {
|
||||
|
||||
console.log("Logged in as User:", userInfo.user_id);
|
||||
console.log("Logged in with the device ID:", userInfo.device_id);
|
||||
}).catch(err => {
|
||||
console.error("Error verifying session:", err);
|
||||
});
|
||||
const conferenceUtil = new conferenceUtils(client);
|
||||
// This is the command handler we registered a few lines up
|
||||
async function handleCommand(roomId, event) {
|
||||
|
|
Loading…
Add table
Reference in a new issue