|
@@ -451,6 +451,33 @@ func (s *Session) GuildBanDelete(guildID, userID string) (err error) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+func (s *Session) GuildMembers(guildID string) (st []*Member, err error) {
|
|
|
+
|
|
|
+ body, err := s.Request("GET", GUILD_MEMBERS(guildID), nil)
|
|
|
+ if err != nil {
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ err = unmarshal(body, &st)
|
|
|
+ return
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+func (s *Session) GuildMember(guildID, userID string) (st *Member, err error) {
|
|
|
+
|
|
|
+ body, err := s.Request("GET", GUILD_MEMBER(guildID, userID), nil)
|
|
|
+ if err != nil {
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ err = unmarshal(body, &st)
|
|
|
+ return
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
|
|
|
|