Fixed music bot icons

This commit is contained in:
WolverinDEV 2018-08-12 13:48:03 +02:00
parent 66f76a91f7
commit 26b055d735

View file

@ -10,10 +10,12 @@ enum GroupTarget {
CHANNEL CHANNEL
} }
class GroupProperties {
iconid: number = 0;
}
class Group { class Group {
properties: any = { properties: GroupProperties = new GroupProperties();
iconid: 0
};
readonly handle: GroupManager; readonly handle: GroupManager;
readonly id: number; readonly id: number;
@ -34,13 +36,13 @@ class Group {
} }
updateProperty(key, value) { updateProperty(key, value) {
this.properties[key] = value; JSON.map_field_to(this.properties, value, key);
if(key == "iconid") { if(key == "iconid") {
const _this = this; this.properties.iconid = (new Uint32Array([this.properties.iconid]))[0];
console.log("Icon id " + _this.properties.iconid); console.log("Icon id " + this.properties.iconid);
this.handle.handle.channelTree.clientsByGroup(this).forEach(client => { this.handle.handle.channelTree.clientsByGroup(this).forEach(client => {
client.updateGroupIcon(_this); client.updateGroupIcon(this);
}); });
} }
} }