This commit is contained in:
21
DiscordBotConsoleLauncher/Program.cs
Normal file
21
DiscordBotConsoleLauncher/Program.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using PluginManager.Online.Updates;
|
||||
|
||||
try
|
||||
{
|
||||
bool requireUpdate = await PluginUpdater.CheckForUpdates("DiscordBotConsoleLauncher");
|
||||
if (requireUpdate)
|
||||
{
|
||||
var update = await PluginUpdater.DownloadUpdateInfo("DiscordBotConsoleLauncher");
|
||||
if (update == Update.Empty)
|
||||
return;
|
||||
|
||||
Console.WriteLine("Found an update: ");
|
||||
Console.WriteLine(update.ToString());
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("An exception was thrown. ");
|
||||
Console.WriteLine(ex.Message);
|
||||
Environment.Exit(-2);
|
||||
}
|
||||
Reference in New Issue
Block a user