From 5324cc2229f26c1dd9a81be9501e560a6698ac7b Mon Sep 17 00:00:00 2001 From: Kwoth Date: Thu, 8 Dec 2016 17:20:35 +0100 Subject: [PATCH] Cleanup --- .../Commands/StreamNotificationCommands.cs | 5 +--- src/NadekoBot/ShardedDiscordClient.cs | 28 +++++++++---------- 2 files changed, 15 insertions(+), 18 deletions(-) diff --git a/src/NadekoBot/Modules/Searches/Commands/StreamNotificationCommands.cs b/src/NadekoBot/Modules/Searches/Commands/StreamNotificationCommands.cs index 245081b4..39b60c2b 100644 --- a/src/NadekoBot/Modules/Searches/Commands/StreamNotificationCommands.cs +++ b/src/NadekoBot/Modules/Searches/Commands/StreamNotificationCommands.cs @@ -111,10 +111,7 @@ namespace NadekoBot.Modules.Searches try { await channel.EmbedAsync(fs.GetEmbed(newStatus).Build()).ConfigureAwait(false); } catch { } } } - catch (Exception ex) - { - - } + catch { } })); FirstPass = false; diff --git a/src/NadekoBot/ShardedDiscordClient.cs b/src/NadekoBot/ShardedDiscordClient.cs index e7b43881..014f0edc 100644 --- a/src/NadekoBot/ShardedDiscordClient.cs +++ b/src/NadekoBot/ShardedDiscordClient.cs @@ -13,20 +13,20 @@ namespace NadekoBot private DiscordSocketConfig discordSocketConfig; private Logger _log { get; } - public Func UserJoined { get; internal set; } = delegate { return Task.CompletedTask; }; - public Func MessageReceived { get; internal set; } = delegate { return Task.CompletedTask; }; - public Func UserLeft { get; internal set; } = delegate { return Task.CompletedTask; }; - public Func UserUpdated { get; internal set; } = delegate { return Task.CompletedTask; }; - public Func, IMessage, Task> MessageUpdated { get; internal set; } = delegate { return Task.CompletedTask; }; - public Func, Task> MessageDeleted { get; internal set; } = delegate { return Task.CompletedTask; }; - public Func UserBanned { get; internal set; } = delegate { return Task.CompletedTask; }; - public Func UserUnbanned { get; internal set; } = delegate { return Task.CompletedTask; }; - public Func UserPresenceUpdated { get; internal set; } = delegate { return Task.CompletedTask; }; - public Func UserVoiceStateUpdated { get; internal set; } = delegate { return Task.CompletedTask; }; - public Func ChannelCreated { get; internal set; } = delegate { return Task.CompletedTask; }; - public Func ChannelDestroyed { get; internal set; } = delegate { return Task.CompletedTask; }; - public Func ChannelUpdated { get; internal set; } = delegate { return Task.CompletedTask; }; - public Func Disconnected { get; internal set; } = delegate { return Task.CompletedTask; }; + public event Func UserJoined = delegate { return Task.CompletedTask; }; + public event Func MessageReceived = delegate { return Task.CompletedTask; }; + public event Func UserLeft = delegate { return Task.CompletedTask; }; + public event Func UserUpdated = delegate { return Task.CompletedTask; }; + public event Func, IMessage, Task> MessageUpdated = delegate { return Task.CompletedTask; }; + public event Func, Task> MessageDeleted = delegate { return Task.CompletedTask; }; + public event Func UserBanned = delegate { return Task.CompletedTask; }; + public event Func UserUnbanned = delegate { return Task.CompletedTask; }; + public event Func UserPresenceUpdated = delegate { return Task.CompletedTask; }; + public event Func UserVoiceStateUpdated = delegate { return Task.CompletedTask; }; + public event Func ChannelCreated = delegate { return Task.CompletedTask; }; + public event Func ChannelDestroyed = delegate { return Task.CompletedTask; }; + public event Func ChannelUpdated = delegate { return Task.CompletedTask; }; + public event Func Disconnected = delegate { return Task.CompletedTask; }; private IReadOnlyList Clients { get; }