Merge pull request #625 from Nitix/version

Add version display while starting Nadeko
This commit is contained in:
Master Kwoth 2016-09-10 23:20:26 +02:00 committed by GitHub
commit 00ed4ba6f1
2 changed files with 5 additions and 1 deletions

View File

@ -12,6 +12,7 @@ using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using NLog.Fluent;
namespace NadekoBot
{
@ -31,6 +32,9 @@ namespace NadekoBot
public async Task RunAsync(string[] args)
{
SetupLogger();
_log = LogManager.GetCurrentClassLogger();
_log.Info("Starting NadekoBot v" + typeof(NadekoBot).GetTypeInfo().Assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion);
//create client
Client = new DiscordSocketClient(new DiscordSocketConfig
@ -47,7 +51,6 @@ namespace NadekoBot
Google = new GoogleApiService();
CommandHandler = new CommandHandler(Client, Commands);
Stats = new StatsService(Client, CommandHandler);
_log = LogManager.GetCurrentClassLogger();
//init db
using (var context = DbHandler.Instance.GetDbContext())

View File

@ -8,6 +8,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("NadekoBot")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyInformationalVersion("1.0-alpha")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from