Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Threading.Tasks;
- using Discord;
- using Discord.WebSocket;
- using MyBot.Modules.Public;
- using System.IO;
- using System.Net.Sockets;
- using Discord.Commands;
- namespace MyBot
- {
- public class Program
- {
- // Convert our sync main to an async main.
- public static bool holiday = false;
- public static bool Raids = false;
- public static bool RaidInProgress = false;
- public static bool AbleToJoinRaid = false;
- public static bool RoomCountdown = false;
- public static bool Giveaway = false;
- private static string username = "";
- private static string password = "";
- public static void Main(string[] args) =>new Program().Start().GetAwaiter().GetResult();
- private DiscordSocketClient _client;
- private CommandHandler _commands;
- TcpClient tcpclient;
- StreamReader reader;
- StreamWriter writer;
- public static string version = " 2.4.0 ";
- public async Task Start()
- {
- Console.WriteLine(DateTime.Now + " [SYS] Signing into Discord...");
- Console.Title = "Ryuko - Dotnet - MGDelux v2.4.0";
- _client = new DiscordSocketClient();
- _commands = new CommandHandler();
- #region Token
- await _client.LoginAsync(TokenType.Bot, "TOKEN");
- #endregion
- await _client.StartAsync();
- string[] predictionsTexts = new string[]
- {
- "+help | V 2.4.0",
- "Try +help",
- "Version, 2.4.0"
- };
- Random rand1 = new Random();
- int playing= rand1.Next(predictionsTexts.Length);
- string displayplaying= predictionsTexts[playing];
- _client.SetGameAsync(displayplaying);
- _client.Log += Log;
- await _commands.Install(_client);
- restartmethodxd();
- restganbke();
- checkifholiday();
- await Task.Delay(-1);
- }
- private Task Log(LogMessage msg)
- {
- Console.WriteLine(msg.ToString());
- return Task.CompletedTask;
- }
- public async Task restartm()
- {
- }
- public async Task multiplayboss()
- {
- }
- public void genboss()
- {
- }
- public async Task restganbke()
- {
- await Task.Delay(240000);
- Console.WriteLine("[SYS] Gamble reset");
- Database.ClearGambleCooldown();
- restganbke();
- }
- public void checkifholiday()
- {
- try
- {
- DateTime CheckDate = DateTime.Now;
- var isitdec = CheckDate.Month;
- var day = CheckDate.Day;
- Console.WriteLine("[SYS-Holiday] M" + isitdec + " D" + day);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement