Update PinDMs.plugin.js

This commit is contained in:
Mirco Wittrien 2018-12-01 11:07:00 +01:00
parent a41d340674
commit 8b150cb5de
1 changed files with 2 additions and 3 deletions

View File

@ -19,7 +19,7 @@ class PinDMs {
getDescription () {return "Allows you to pin DMs, making them appear at the top of your DM-list.";} getDescription () {return "Allows you to pin DMs, making them appear at the top of your DM-list.";}
getVersion () {return "1.2.1";} getVersion () {return "1.2.2";}
getAuthor () {return "DevilBro";} getAuthor () {return "DevilBro";}
@ -267,8 +267,7 @@ class PinDMs {
delete pinnedDMs[id]; delete pinnedDMs[id];
id = DMid; id = DMid;
} }
if (!this.ChannelUtils.getChannel(id)) delete pinnedDMs[id]; if (typeof sortedDMs[pinnedDMs[id]] == "undefined") sortedDMs[pinnedDMs[id]] = id;
else if (typeof sortedDMs[pinnedDMs[id]] == "undefined") sortedDMs[pinnedDMs[id]] = id;
else sortDM(sortedDMs, pinnedDMs[id]+1, id); else sortDM(sortedDMs, pinnedDMs[id]+1, id);
}; };
for (let id in pinnedDMs) sortDM(id); for (let id in pinnedDMs) sortDM(id);