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);
|
TextChannelsCount = channelsArray.Count(c => c.Type == ChannelType.Text);
|
||||||
VoiceChannelsCount = channelsArray.Count() - TextChannelsCount;
|
VoiceChannelsCount = channelsArray.Count() - TextChannelsCount;
|
||||||
|
|
||||||
NadekoBot.Client.JoinedServer += (s, e) =>
|
NadekoBot.Client.JoinedServer += async (s, e) =>
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ServerCount++;
|
ServerCount++;
|
||||||
TextChannelsCount += e.Server.TextChannels.Count();
|
TextChannelsCount += e.Server.TextChannels.Count();
|
||||||
VoiceChannelsCount += e.Server.VoiceChannels.Count();
|
VoiceChannelsCount += e.Server.VoiceChannels.Count();
|
||||||
SendUpdateToCarbon();
|
await SendUpdateToCarbon().ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
catch { }
|
catch { }
|
||||||
};
|
};
|
||||||
NadekoBot.Client.LeftServer += (s, e) =>
|
NadekoBot.Client.LeftServer += async (s, e) =>
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ServerCount--;
|
ServerCount--;
|
||||||
TextChannelsCount -= e.Server.TextChannels.Count();
|
TextChannelsCount -= e.Server.TextChannels.Count();
|
||||||
VoiceChannelsCount -= e.Server.VoiceChannels.Count();
|
VoiceChannelsCount -= e.Server.VoiceChannels.Count();
|
||||||
SendUpdateToCarbon();
|
await SendUpdateToCarbon().ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
catch { }
|
catch { }
|
||||||
};
|
};
|
||||||
|
@ -182,7 +182,7 @@ namespace NadekoBot.Modules.Administration
|
|||||||
await role.Edit(color: new Color(red, green, blue));
|
await role.Edit(color: new Color(red, green, blue));
|
||||||
await e.Channel.SendMessage($"Role {role.Name}'s color has been changed.");
|
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.");
|
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 static TimeSpan callExpire => new TimeSpan(2, 0, 0);
|
||||||
|
|
||||||
private CommandEventArgs e;
|
|
||||||
public string EnemyClan { get; }
|
public string EnemyClan { get; }
|
||||||
public int Size { get; }
|
public int Size { get; }
|
||||||
|
|
||||||
@ -89,7 +88,9 @@ namespace NadekoBot.Classes.ClashOfClans
|
|||||||
{
|
{
|
||||||
b.ResetTime();
|
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);
|
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);
|
await Task.Delay(new TimeSpan(24, 0, 0), endTokenSource.Token);
|
||||||
}
|
}
|
||||||
catch { }
|
catch { }
|
||||||
|
Loading…
Reference in New Issue
Block a user