slight changes
This commit is contained in:
parent
4bc7ec9d47
commit
ba0cc29bd3
@ -50,25 +50,25 @@ namespace NadekoBot
|
||||
TextChannelsCount = channelsArray.Count(c => c.Type == ChannelType.Text);
|
||||
VoiceChannelsCount = channelsArray.Count() - TextChannelsCount;
|
||||
|
||||
NadekoBot.Client.JoinedServer += (s, e) =>
|
||||
NadekoBot.Client.JoinedServer += async (s, e) =>
|
||||
{
|
||||
try
|
||||
{
|
||||
ServerCount++;
|
||||
TextChannelsCount += e.Server.TextChannels.Count();
|
||||
VoiceChannelsCount += e.Server.VoiceChannels.Count();
|
||||
SendUpdateToCarbon();
|
||||
await SendUpdateToCarbon().ConfigureAwait(false);
|
||||
}
|
||||
catch { }
|
||||
};
|
||||
NadekoBot.Client.LeftServer += (s, e) =>
|
||||
NadekoBot.Client.LeftServer += async (s, e) =>
|
||||
{
|
||||
try
|
||||
{
|
||||
ServerCount--;
|
||||
TextChannelsCount -= e.Server.TextChannels.Count();
|
||||
VoiceChannelsCount -= e.Server.VoiceChannels.Count();
|
||||
SendUpdateToCarbon();
|
||||
await SendUpdateToCarbon().ConfigureAwait(false);
|
||||
}
|
||||
catch { }
|
||||
};
|
||||
|
@ -182,7 +182,7 @@ namespace NadekoBot.Modules.Administration
|
||||
await role.Edit(color: new Color(red, green, blue));
|
||||
await e.Channel.SendMessage($"Role {role.Name}'s color has been changed.");
|
||||
}
|
||||
catch (Exception ex)
|
||||
catch (Exception)
|
||||
{
|
||||
await e.Channel.SendMessage("Error occured, most likely invalid parameters or insufficient permissions.");
|
||||
}
|
||||
|
@ -37,7 +37,6 @@ namespace NadekoBot.Classes.ClashOfClans
|
||||
{
|
||||
private static TimeSpan callExpire => new TimeSpan(2, 0, 0);
|
||||
|
||||
private CommandEventArgs e;
|
||||
public string EnemyClan { get; }
|
||||
public int Size { get; }
|
||||
|
||||
@ -89,7 +88,9 @@ namespace NadekoBot.Classes.ClashOfClans
|
||||
{
|
||||
b.ResetTime();
|
||||
}
|
||||
#pragma warning disable CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
|
||||
Task.Run(async () => await ClearArray()).ConfigureAwait(false);
|
||||
#pragma warning restore CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
|
||||
await Task.Delay(new TimeSpan(24, 0, 0), endTokenSource.Token);
|
||||
}
|
||||
catch { }
|
||||
|
Loading…
Reference in New Issue
Block a user