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[];
|
||||
owner: Channel;
|
||||
headers: Localuser["headers"];
|
||||
embeds!: Embed[];
|
||||
embeds: Embed[] = [];
|
||||
author!: User;
|
||||
mentions!: User[];
|
||||
mentions: User[] = [];
|
||||
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!: {
|
||||
guild_id: string;
|
||||
channel_id: string;
|
||||
|
@ -277,7 +277,7 @@ class Message extends SnowFlake {
|
|||
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
|
||||
console.log(this.mentions, this.mention_roles);
|
||||
}
|
||||
|
@ -592,7 +592,7 @@ class Message extends SnowFlake {
|
|||
username.textContent = "Blocked user";
|
||||
return;
|
||||
}
|
||||
if (message.attachments.length || message.embeds.length) {
|
||||
if (message.attachments?.length || message.embeds?.length) {
|
||||
const b = document.createElement("b");
|
||||
b.innerText = I18n.getTranslation("message.attached");
|
||||
reply.append(b);
|
||||
|
|
|
@ -79,6 +79,7 @@ class Voice {
|
|||
private pstatus: string = "not connected";
|
||||
public onSatusChange: (e: string) => unknown = () => {};
|
||||
set status(e: string) {
|
||||
console.log("state changed: " + e);
|
||||
this.pstatus = e;
|
||||
this.onSatusChange(e);
|
||||
}
|
||||
|
@ -672,6 +673,7 @@ a=rtcp-mux\r`;
|
|||
}
|
||||
}
|
||||
async leave() {
|
||||
console.warn("leave");
|
||||
this.open = false;
|
||||
this.status = "Left voice chat";
|
||||
if (this.ws) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue