diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-05-12 20:14:06 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-05-12 20:14:12 +0200 |
| commit | 90f291211703b4d6823c55ca84ba3b1d4127b027 (patch) | |
| tree | f987517bbb2eb6c9b6349d4a3e96d82b62c8202c /api.js | |
| parent | 54565aeccffb0722de554820eb856b23ac3c004f (diff) | |
| download | discordbot-2.3.1.tar.gz discordbot-2.3.1.zip | |
vgpin: allow to pin a guild to a server2.3.1
Diffstat (limited to 'api.js')
| -rw-r--r-- | api.js | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -226,6 +226,12 @@ module.exports.getMatch = async (id) => { module.exports.getGuild = async (token) => { return await api.getFE("/guild", { user_token: token }, 60, "guild+" + token); } + +// return a guild +module.exports.getGuildMembersByGuildName = async (name) => { + // TODO caching + return await api.getFE("/guild/" + name + "/members", { }, 0); +} // TODO! cache guilds by guild id, not by user token // add user to guild |
