Exemple #1
0
 public Task Execute(SocketUserMessage e, string gameName, bool highlight)
 {
     if (WeeklyEvents.AddGame(gameName, highlight))
     {
         return(TaskResult(WeeklyEvents.allGames.Find(x => x.name == gameName), "Succesfully added game to list of possible event games!"));
     }
     else
     {
         return(TaskResult(null, "Failed to add game - It might already be on the list."));
     }
 }
Exemple #2
0
 public Task <Result> Execute(SocketUserMessage e, string gameName)
 {
     if (WeeklyEvents.HighlightGame(gameName))
     {
         return(TaskResult(WeeklyEvents.allGames.Find(x => x.name == gameName), $"Succesfully toggled game highlighting on {gameName}!"));
     }
     else
     {
         return(TaskResult(null, "Failed to toggle highlight - Game might not be present."));
     }
 }
Exemple #3
0
 public Task <Result> Execute(SocketUserMessage e, string gamename)
 {
     WeeklyEvents.Game game = WeeklyEvents.allGames.Find(x => x.name.ToUpper() == gamename.ToUpper());
     if (game != null)
     {
         int index = WeeklyEvents.allGames.IndexOf(game);
         WeeklyEvents.RemoveGame(index);
         return(TaskResult(index, "Succesfully removed " + gamename + " from game list"));
     }
     else
     {
         return(TaskResult(-1, "Failed to remove game " + gamename + " from game list, since it could not be found."));
     }
 }