|
|
@ -13,6 +13,10 @@ import (
|
|
|
|
var ErrMemberNotFound = errors.New("discord/backend: the requested member was not found")
|
|
|
|
var ErrMemberNotFound = errors.New("discord/backend: the requested member was not found")
|
|
|
|
|
|
|
|
|
|
|
|
func GetAllMembers(s *discordgo.Session) ([]*discordgo.Member, error) {
|
|
|
|
func GetAllMembers(s *discordgo.Session) ([]*discordgo.Member, error) {
|
|
|
|
|
|
|
|
err := s.RequestGuildMembers(config.GuildID, "", 0)
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
|
|
|
|
return nil, err
|
|
|
|
|
|
|
|
}
|
|
|
|
guild, err := s.State.Guild(config.GuildID)
|
|
|
|
guild, err := s.State.Guild(config.GuildID)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
guild, err = s.Guild(config.GuildID)
|
|
|
|
guild, err = s.Guild(config.GuildID)
|
|
|
|