mirror of
https://github.com/spacebarchat/server.git
synced 2026-04-26 19:35:20 +00:00
Maybe fix an issue elisa had with discord.py
This commit is contained in:
@@ -704,6 +704,12 @@ export class Channel extends BaseClass {
|
||||
}
|
||||
|
||||
toJSON(): PublicChannel {
|
||||
// needed as some CHANNEL_UPDATE event doesn't call the calculatePosition function and doesn't populate
|
||||
// the position field. Needs to be looked into more
|
||||
// TODO: Look into when this can be undefined during CHANNEL_UPDATE
|
||||
if (this.position === undefined) {
|
||||
this.position = 0;
|
||||
}
|
||||
return {
|
||||
...this,
|
||||
last_pin_timestamp: this.last_pin_timestamp?.toISOString(),
|
||||
|
||||
Reference in New Issue
Block a user