SHARE
TWEET

GamesModule.cs

frnathan13 Sep 19th, 2019 101 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top