Esempio n. 1
0
        public async Task <string> GetRequestList(int gameId, int broadcasterId)
        {
            List <PartyUpRequests> partyRequestList = await _partyUpDb.GetRequestList(gameId, broadcasterId);

            if (partyRequestList == null || partyRequestList.Count == 0)
            {
                return("The party request list is empty. Request a member with !partyup [name]");
            }

            string message = "Here are the requested party members: ";

            foreach (PartyUpRequests member in partyRequestList)
            {
                message += member.PartyMember + " <-- " + member.Username + " || ";
            }

            return(message.ReplaceLastOccurrence(" || ", ""));
        }
Esempio n. 2
0
        public async Task <bool> HasUserAlreadyRequested(string username, int gameId, int broadcasterId)
        {
            List <PartyUpRequestResult> partyRequestList = await _partyUpDb.GetRequestList(gameId, broadcasterId);

            return(partyRequestList.Any(m => m.Username == username));
        }