fix bugs
This commit is contained in:
parent
c55dda6ae3
commit
e4d37ff327
2 changed files with 7 additions and 5 deletions
|
@ -21,11 +21,11 @@ class Message extends SnowFlake {
|
||||||
stickers!: Sticker[];
|
stickers!: Sticker[];
|
||||||
owner: Channel;
|
owner: Channel;
|
||||||
headers: Localuser["headers"];
|
headers: Localuser["headers"];
|
||||||
embeds!: Embed[];
|
embeds: Embed[] = [];
|
||||||
author!: User;
|
author!: User;
|
||||||
mentions!: User[];
|
mentions: User[] = [];
|
||||||
mention_roles!: Role[];
|
mention_roles!: Role[];
|
||||||
attachments!: File[]; //probably should be its own class tbh, should be Attachments[]
|
attachments: File[] = []; //probably should be its own class tbh, should be Attachments[]
|
||||||
message_reference!: {
|
message_reference!: {
|
||||||
guild_id: string;
|
guild_id: string;
|
||||||
channel_id: string;
|
channel_id: string;
|
||||||
|
@ -277,7 +277,7 @@ class Message extends SnowFlake {
|
||||||
this.member = _;
|
this.member = _;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (this.mentions.length || this.mention_roles.length) {
|
if (this.mentions?.length || this.mention_roles?.length) {
|
||||||
//currently mention_roles isn't implemented on the spacebar servers
|
//currently mention_roles isn't implemented on the spacebar servers
|
||||||
console.log(this.mentions, this.mention_roles);
|
console.log(this.mentions, this.mention_roles);
|
||||||
}
|
}
|
||||||
|
@ -592,7 +592,7 @@ class Message extends SnowFlake {
|
||||||
username.textContent = "Blocked user";
|
username.textContent = "Blocked user";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (message.attachments.length || message.embeds.length) {
|
if (message.attachments?.length || message.embeds?.length) {
|
||||||
const b = document.createElement("b");
|
const b = document.createElement("b");
|
||||||
b.innerText = I18n.getTranslation("message.attached");
|
b.innerText = I18n.getTranslation("message.attached");
|
||||||
reply.append(b);
|
reply.append(b);
|
||||||
|
|
|
@ -79,6 +79,7 @@ class Voice {
|
||||||
private pstatus: string = "not connected";
|
private pstatus: string = "not connected";
|
||||||
public onSatusChange: (e: string) => unknown = () => {};
|
public onSatusChange: (e: string) => unknown = () => {};
|
||||||
set status(e: string) {
|
set status(e: string) {
|
||||||
|
console.log("state changed: " + e);
|
||||||
this.pstatus = e;
|
this.pstatus = e;
|
||||||
this.onSatusChange(e);
|
this.onSatusChange(e);
|
||||||
}
|
}
|
||||||
|
@ -672,6 +673,7 @@ a=rtcp-mux\r`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
async leave() {
|
async leave() {
|
||||||
|
console.warn("leave");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.status = "Left voice chat";
|
this.status = "Left voice chat";
|
||||||
if (this.ws) {
|
if (this.ws) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue