Exemplo n.º 1
0
 public static void Main()
 {
     // Console.OutputEncoding = Encoding.ASCII;
     Console.ForegroundColor = ConsoleColor.Green;
     Console.WriteLine("+----------------------------+" + Environment.NewLine +
                       "| SilverBot                  |" + Environment.NewLine +
                       "| ©SilverDimond and The      |" + Environment.NewLine +
                       "| SilverCraft team           |" + Environment.NewLine +
                       "| Special thanks to          |" + Environment.NewLine +
                       "| ThePajamaSlime#9391        |" + Environment.NewLine +
                       "+ ---------------------------+");
     Console.ResetColor();
     config = Config.Get();
     if (String.IsNullOrEmpty(config.SentryURL))
     {
         Version.Checkforupdates();
         Commands.Giphymodule(new Giphy(config.Gtoken));
         Commands.SetConfig(config);
         Fortnite.Setapi(new FortniteApi(config.Fortnite_Api_Token));
         AudioModule.SetConfig(config);
         Imagemodule.SetConfig(config);
         Weather.SetClient(new Awesomio.Weather.WeatherClient(config.OpenWeatherMap));
         prefix = config.Prefix;
         new Program().RunBotAsync().GetAwaiter().GetResult();
     }
     else
     {
         using (SentrySdk.Init(config.SentryURL))
         {
             User user = new User
             {
                 Username = Environment.UserName
             };
             SentrySdk.ConfigureScope(s => s.User = user);
             SentrySdk.ConfigureScope(scope =>
             {
                 scope.SetExtra("Version", Version.vnumber);
             });
             Version.Checkforupdates();
             Commands.Giphymodule(new Giphy(config.Gtoken));
             Commands.SetConfig(config);
             Fortnite.Setapi(new FortniteApi(config.Fortnite_Api_Token));
             AudioModule.SetConfig(config);
             Imagemodule.SetConfig(config);
             Weather.SetClient(new Awesomio.Weather.WeatherClient(config.OpenWeatherMap));
             prefix = config.Prefix;
             new Program().RunBotAsync().GetAwaiter().GetResult();
         }
     }
 }