Program() { //startup stuff ChatCraft.Initialize(); token = GetToken(); client = new DiscordSocketClient(new DiscordSocketConfig { // How much logging do you want to see? LogLevel = LogSeverity.Info, AlwaysDownloadUsers = true // If you or another service needs to do anything with messages // (eg. checking Reactions, checking the content of edited/deleted messages), // you must set the MessageCacheSize. You may adjust the number as needed. //MessageCacheSize = 50, // If your platform doesn't have native websockets, // add Discord.Net.Providers.WS4Net from NuGet, // add the `using` at the top, and uncomment this line: //WebSocketProvider = WS4NetProvider.Instance }); // Subscribe the logging handler to both the client and the CommandService. client.Log += Logger.Log; }
Program() { ChatCraft.Initialize(); Console.WriteLine(System.IO.Directory.GetCurrentDirectory()); foreach (string line in System.IO.File.ReadLines(System.IO.Directory.GetCurrentDirectory() + "/token.txt")) { token = line; break; } client = new DiscordSocketClient(new DiscordSocketConfig { // How much logging do you want to see? LogLevel = LogSeverity.Info, AlwaysDownloadUsers = true // If you or another service needs to do anything with messages // (eg. checking Reactions, checking the content of edited/deleted messages), // you must set the MessageCacheSize. You may adjust the number as needed. //MessageCacheSize = 50, // If your platform doesn't have native websockets, // add Discord.Net.Providers.WS4Net from NuGet, // add the `using` at the top, and uncomment this line: //WebSocketProvider = WS4NetProvider.Instance }); // Subscribe the logging handler to both the client and the CommandService. client.Log += Logger.Log; }