Advertisement
Guest User

Untitled

a guest
Nov 21st, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.98 KB | None | 0 0
  1. using System;
  2. using System.Threading.Tasks;
  3. using Discord;
  4. using Discord.WebSocket;
  5. using MyBot.Modules.Public;
  6. using System.IO;
  7. using System.Net.Sockets;
  8. using Discord.Commands;
  9. namespace MyBot
  10. {
  11. public class Program
  12. {
  13. // Convert our sync main to an async main.
  14. public static bool holiday = false;
  15. public static bool Raids = false;
  16. public static bool RaidInProgress = false;
  17. public static bool AbleToJoinRaid = false;
  18. public static bool RoomCountdown = false;
  19. public static bool Giveaway = false;
  20. private static string username = "";
  21. private static string password = "";
  22. public static void Main(string[] args) =>new Program().Start().GetAwaiter().GetResult();
  23. private DiscordSocketClient _client;
  24. private CommandHandler _commands;
  25. TcpClient tcpclient;
  26. StreamReader reader;
  27. StreamWriter writer;
  28. public static string version = " 2.4.0 ";
  29. public async Task Start()
  30. {
  31.  
  32. Console.WriteLine(DateTime.Now + " [SYS] Signing into Discord...");
  33. Console.Title = "Ryuko - Dotnet - MGDelux v2.4.0";
  34. _client = new DiscordSocketClient();
  35. _commands = new CommandHandler();
  36. #region Token
  37. await _client.LoginAsync(TokenType.Bot, "TOKEN");
  38. #endregion
  39. await _client.StartAsync();
  40. string[] predictionsTexts = new string[]
  41. {
  42. "+help | V 2.4.0",
  43. "Try +help",
  44. "Version, 2.4.0"
  45.  
  46. };
  47. Random rand1 = new Random();
  48. int playing= rand1.Next(predictionsTexts.Length);
  49. string displayplaying= predictionsTexts[playing];
  50.  
  51.  
  52.  
  53. _client.SetGameAsync(displayplaying);
  54. _client.Log += Log;
  55. await _commands.Install(_client);
  56. restartmethodxd();
  57. restganbke();
  58. checkifholiday();
  59. await Task.Delay(-1);
  60. }
  61.  
  62. private Task Log(LogMessage msg)
  63. {
  64. Console.WriteLine(msg.ToString());
  65. return Task.CompletedTask;
  66. }
  67. public async Task restartm()
  68. {
  69.  
  70.  
  71.  
  72. }
  73. public async Task multiplayboss()
  74. {
  75.  
  76. }
  77. public void genboss()
  78. {
  79.  
  80. }
  81. public async Task restganbke()
  82. {
  83. await Task.Delay(240000);
  84. Console.WriteLine("[SYS] Gamble reset");
  85. Database.ClearGambleCooldown();
  86. restganbke();
  87. }
  88. public void checkifholiday()
  89. {
  90. try
  91. {
  92.  
  93. DateTime CheckDate = DateTime.Now;
  94.  
  95. var isitdec = CheckDate.Month;
  96. var day = CheckDate.Day;
  97. Console.WriteLine("[SYS-Holiday] M" + isitdec + " D" + day);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement