Advertisement
frnathan13

GamesModule.cs

Sep 19th, 2019
262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.87 KB | None | 0 0
  1. using DSharpPlus;
  2. using DSharpPlus.Entities;
  3. using DSharpPlus.CommandsNext;
  4. using DSharpPlus.CommandsNext.Attributes;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Linq;
  8. using System.Text;
  9. using System.Threading.Tasks;
  10. using SkyLar.Entities.Games;
  11.  
  12. namespace SkyLar.Modules
  13. {
  14.     public class GamesModule : BaseCommandModule
  15.     {
  16.         public IReadOnlyList<string> Cache { get; } = new List<string>
  17.         {
  18.             "Ovelha",
  19.             "Bloco",
  20.             "Som",
  21.             "Chuva",
  22.             "Cadeira",
  23.             "Caixa",
  24.             "Fogão",
  25.             "Frio",
  26.             "Calor",
  27.             "Tapete",
  28.             "Grama",
  29.             "Servidor",
  30.             "Bot",
  31.             "Discord",
  32.             "Minecraft",
  33.             "Overwatch"
  34.         };
  35.  
  36.         public Random Rnd { get; } = new Random();
  37.  
  38.         [Command]
  39.         public async Task Hangman(CommandContext ctx)
  40.         {
  41.             var word = this.Cache[this.Rnd.Next(0, this.Cache.Count)];
  42.             await HangmanGame.StartAsync(ctx, word);
  43.         }
  44.     }
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement