Add shard client prop fetching, remove guild count fetching, improve eval

This commit is contained in:
Schuyler Cebulskie
2016-09-24 02:12:45 -04:00
parent e4f416ae6c
commit 1008f601f4
4 changed files with 58 additions and 42 deletions

View File

@@ -150,6 +150,11 @@ class Client extends EventEmitter {
} catch (err) {
process.send({ _evalError: err });
}
} else if (message._fetchProp) {
const props = message._fetchProp.split('.');
let value = this; // eslint-disable-line consistent-this
for (const prop of props) value = value[prop];
process.send({ _fetchProp: message._fetchProp, _fetchPropValue: value });
}
});
}