Advertisement
Guest User

Untitled

a guest
Jun 19th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.76 KB | None | 0 0
  1. public class rolldice : ModuleBase<SocketCommandContext>
  2. {
  3. [Command("rolldice")]
  4. public async Task rolldiceAsync()
  5. {
  6. Random rand;
  7. rand = new Random();
  8. string[] RollDice;
  9.  
  10. RollDice = new string[]
  11. {
  12. "photo/Dice1.png", // 0
  13. "photo/Dice2.png", // 1
  14. "photo/Dice3.png", // 2
  15. "photo/Dice4.png", // 3
  16. "photo/Dice5.png", // 4
  17. "photo/Dice6.png" // 5
  18. };
  19. int randomDiceIndex = rand.Next(RollDice.Length);
  20. string Dice = RollDice[randomDiceIndex];
  21. await Context.Channel.SendFileAsync(Dice);
  22. if (randomDiceIndex == 0)
  23. {
  24. await Task.Delay(1500);
  25. await ReplyAsync("1. YOU WIN! (nothing dood)");
  26. }
  27. else if (randomDiceIndex == 1)
  28. {
  29. await Task.Delay(1500);
  30. await ReplyAsync("2. What is 1+1 dood?");
  31. }
  32. else if (randomDiceIndex == 2)
  33. {
  34. await Task.Delay(1500);
  35. await ReplyAsync("3.14159265359 dood...");
  36. }
  37. else if (randomDiceIndex == 3)
  38. {
  39. await Task.Delay(1500);
  40. await ReplyAsync("4. You must be really bored to roll this dice dood?");
  41. }
  42. else if (randomDiceIndex == 4)
  43. {
  44. await Task.Delay(1500);
  45. await ReplyAsync("5. Your age dood.");
  46. }
  47. else if (randomDiceIndex == 5)
  48. {
  49. await Task.Delay(1500);
  50. await ReplyAsync("666");
  51. }
  52. }
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement