|
|
@ -6,6 +6,7 @@ import (
|
|
|
|
|
|
|
|
|
|
|
|
"github.com/bwmarrin/discordgo"
|
|
|
|
"github.com/bwmarrin/discordgo"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"TerraOceanBot/db"
|
|
|
|
"TerraOceanBot/discord/config"
|
|
|
|
"TerraOceanBot/discord/config"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
@ -59,5 +60,17 @@ func GetMemberFromUserFriendlyName(s *discordgo.Session, user string) (*discordg
|
|
|
|
return v, nil
|
|
|
|
return v, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
for _, v := range allMembers {
|
|
|
|
|
|
|
|
mcUsername, err := db.GetMinecraftUsername(v.User.ID)
|
|
|
|
|
|
|
|
if err == db.ErrNotFound {
|
|
|
|
|
|
|
|
continue
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
|
|
|
|
return nil, err
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if mcUsername == user {
|
|
|
|
|
|
|
|
return v, nil
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
return nil, ErrMemberNotFound
|
|
|
|
return nil, ErrMemberNotFound
|
|
|
|
}
|
|
|
|
}
|
|
|
|