Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Jan 15, 2017
1 parent a66ac55 commit 3fa4a28
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
10 changes: 9 additions & 1 deletion DiscordAnnouncer/DiscordAnnouncer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,16 @@ class DiscordAnnouncer
public event Data OnServerDataRecieved;
public event EventHandler OnReadySend;

public const string NAME = "Discord Announcer";

public DiscordClient Client { get; private set; }
public Server Server { get; private set; }
public Discord.Channel Channel { get; private set; }
public CommonSettings Settings { get; private set; }
public string LogPath { get; private set; }
public bool IsRunning { get; protected set; }

public Version Version => typeof(DiscordAnnouncer).Assembly.GetName().Version;
public void SendMessage(string message)
{
Channel = Server.AllChannels.FirstOrDefault(c => c.Id == Settings.SelectedChannelItem?.ChannelId);
Expand Down Expand Up @@ -75,6 +79,9 @@ public async void Start()
{
x.LogLevel = LogSeverity.Debug;
x.LogHandler = Log;
x.AppName = NAME;
x.AppUrl = "https://github.com/alishahb/DiscordAnnouncer";
x.AppVersion = Version.ToString();
});


Expand Down Expand Up @@ -121,12 +128,13 @@ await Task.Run(() =>

private void Ready(object sender, ServerEventArgs e)
{

Application.Current.Dispatcher.Invoke(() =>
{

Log($"--- Joined Server <{e.Server.Name}>", LogType.Console);

Client.SetGame(NAME);

Log("---- SERVER INFO", LogType.ServerData);
Log($"[{e.Server.Id}] {e.Server.Name}", LogType.ServerData);
Log("---- END SERVER INFO", LogType.ServerData);
Expand Down
2 changes: 1 addition & 1 deletion DiscordAnnouncer/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public MainWindow()
Core.OnReadySend += OnReadySend;
InitializeComponent();

Title += $" -- {typeof(DiscordAnnouncer).Assembly.GetName().Version}";
Title = $"Alisha's {DiscordAnnouncer.NAME} -- {Core.Version}";
Loaded += OnLoaded;
Application.Current.Exit += OnExit;

Expand Down
4 changes: 2 additions & 2 deletions DiscordAnnouncer/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@
//
// Можно задать все значения или принять номер построения и номер редакции по умолчанию,
// используя "*", как показано ниже:
[assembly: AssemblyVersion("1.1.12.1942")]
[assembly: AssemblyInformationalVersion("Build date: 2017-01-15 19:42:13; Revision date: 2017-01-15 19:42:11; Revision(s) in working copy: 1:12.")]
[assembly: AssemblyVersion("1.1.13.2023")]
[assembly: AssemblyInformationalVersion("Build date: 2017-01-15 20:23:39; Revision date: 2017-01-15 20:17:05; Revision(s) in working copy: 1:13; WARNING working copy had uncommitted modifications.")]

0 comments on commit 3fa4a28

Please sign in to comment.