* call toJSON of keys in gateway when using erlpack
* dont send bitrate/etc as null when should be undefined * set user flags to number instead of string * send empty 'threads' in identify when not using new state v2
This commit is contained in:
@@ -468,6 +468,18 @@ export class Channel extends BaseClass {
|
||||
];
|
||||
return disallowedChannelTypes.indexOf(this.type) == -1;
|
||||
}
|
||||
|
||||
toJSON() {
|
||||
return {
|
||||
...this,
|
||||
|
||||
// these fields are not returned depending on the type of channel
|
||||
bitrate: this.bitrate || undefined,
|
||||
user_limit: this.user_limit || undefined,
|
||||
rate_limit_per_user: this.rate_limit_per_user || undefined,
|
||||
owner_id: this.owner_id || undefined,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export interface ChannelPermissionOverwrite {
|
||||
|
||||
@@ -390,4 +390,11 @@ export class Guild extends BaseClass {
|
||||
|
||||
return guild;
|
||||
}
|
||||
|
||||
toJSON() {
|
||||
return {
|
||||
...this,
|
||||
unavailable: this.unavailable == false ? undefined : true,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@ export class User extends BaseClass {
|
||||
email?: string; // email of the user
|
||||
|
||||
@Column()
|
||||
flags: string = "0"; // UserFlags // TODO: generate
|
||||
flags: number = 0; // UserFlags // TODO: generate
|
||||
|
||||
@Column()
|
||||
public_flags: number = 0;
|
||||
|
||||
Reference in New Issue
Block a user