summaryrefslogtreecommitdiff
path: root/api.js
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-05-12 20:14:06 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2017-05-12 20:14:12 +0200
commit90f291211703b4d6823c55ca84ba3b1d4127b027 (patch)
treef987517bbb2eb6c9b6349d4a3e96d82b62c8202c /api.js
parent54565aeccffb0722de554820eb856b23ac3c004f (diff)
downloaddiscordbot-90f291211703b4d6823c55ca84ba3b1d4127b027.tar.gz
discordbot-90f291211703b4d6823c55ca84ba3b1d4127b027.zip
vgpin: allow to pin a guild to a server2.3.1
Diffstat (limited to 'api.js')
-rw-r--r--api.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/api.js b/api.js
index 66d52da..12f58c3 100644
--- a/api.js
+++ b/api.js
@@ -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