small patches
This commit is contained in:
@@ -198,7 +198,7 @@ class Channel extends SnowFlake {
|
|||||||
return false;
|
return false;
|
||||||
}), this.readbottom.bind(this));
|
}), this.readbottom.bind(this));
|
||||||
}
|
}
|
||||||
constructor(json, owner, id = json === -1 ? undefined : json.id) {
|
constructor(json, owner, id = json === -1 ? "" : json.id) {
|
||||||
super(id);
|
super(id);
|
||||||
if (json === -1) {
|
if (json === -1) {
|
||||||
return;
|
return;
|
||||||
|
@@ -86,7 +86,7 @@ class Group extends Channel {
|
|||||||
this.user = this.localuser.user;
|
this.user = this.localuser.user;
|
||||||
}
|
}
|
||||||
this.name ??= this.localuser.user.username;
|
this.name ??= this.localuser.user.username;
|
||||||
this.parent_id = null;
|
this.parent_id = undefined;
|
||||||
this.parent = null;
|
this.parent = null;
|
||||||
this.children = [];
|
this.children = [];
|
||||||
this.guild_id = "@me";
|
this.guild_id = "@me";
|
||||||
|
@@ -70,7 +70,7 @@ class Guild extends SnowFlake {
|
|||||||
settings.show();
|
settings.show();
|
||||||
}
|
}
|
||||||
constructor(json, owner, member) {
|
constructor(json, owner, member) {
|
||||||
if (json === -1) {
|
if (json === -1 || member === null) {
|
||||||
super("@me");
|
super("@me");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
"removeComments": false,
|
"removeComments": false,
|
||||||
"noImplicitThis":true,
|
"noImplicitThis":true,
|
||||||
"useUnknownInCatchVariables":true,
|
"useUnknownInCatchVariables":true,
|
||||||
"strictNullChecks":false
|
"strictNullChecks":true
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"./webpage/*.ts"
|
"./webpage/*.ts"
|
||||||
|
@@ -210,7 +210,7 @@ class Channel extends SnowFlake{
|
|||||||
this.readbottom.bind(this)
|
this.readbottom.bind(this)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
constructor(json:channeljson|-1,owner:Guild,id:string=json===-1?undefined:json.id){
|
constructor(json:channeljson|-1,owner:Guild,id:string=json===-1?"":json.id){
|
||||||
super(id);
|
super(id);
|
||||||
if(json===-1){
|
if(json===-1){
|
||||||
return;
|
return;
|
||||||
|
@@ -92,7 +92,7 @@ class Group extends Channel{
|
|||||||
this.user=this.localuser.user;
|
this.user=this.localuser.user;
|
||||||
}
|
}
|
||||||
this.name??=this.localuser.user.username;
|
this.name??=this.localuser.user.username;
|
||||||
this.parent_id=null;
|
this.parent_id=undefined;
|
||||||
this.parent=null;
|
this.parent=null;
|
||||||
this.children=[];
|
this.children=[];
|
||||||
this.guild_id="@me";
|
this.guild_id="@me";
|
||||||
|
@@ -79,8 +79,8 @@ class Guild extends SnowFlake{
|
|||||||
s1.options.push(new RoleList(permlist,this,this.updateRolePermissions.bind(this)));
|
s1.options.push(new RoleList(permlist,this,this.updateRolePermissions.bind(this)));
|
||||||
settings.show();
|
settings.show();
|
||||||
}
|
}
|
||||||
constructor(json:guildjson|-1,owner:Localuser,member:memberjson|User){
|
constructor(json:guildjson|-1,owner:Localuser,member:memberjson|User|null){
|
||||||
if(json===-1){
|
if(json===-1||member===null){
|
||||||
super("@me");
|
super("@me");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user