forgot some awaits
This commit is contained in:
parent
1000934135
commit
7b95ff5d08
@ -71,7 +71,7 @@ namespace NadekoBot.Modules.Permissions.Commands
|
|||||||
var chan = string.IsNullOrWhiteSpace(chanStr)
|
var chan = string.IsNullOrWhiteSpace(chanStr)
|
||||||
? e.Channel
|
? e.Channel
|
||||||
: PermissionHelper.ValidateChannel(e.Server, chanStr);
|
: PermissionHelper.ValidateChannel(e.Server, chanStr);
|
||||||
PermissionsHandler.SetChannelFilterInvitesPermission(chan, state);
|
await PermissionsHandler.SetChannelFilterInvitesPermission(chan, state).ConfigureAwait(false);
|
||||||
await e.Channel.SendMessage($"Invite Filter has been **{(state ? "enabled" : "disabled")}** for **{chan.Name}** channel.")
|
await e.Channel.SendMessage($"Invite Filter has been **{(state ? "enabled" : "disabled")}** for **{chan.Name}** channel.")
|
||||||
.ConfigureAwait(false);
|
.ConfigureAwait(false);
|
||||||
return;
|
return;
|
||||||
@ -80,7 +80,7 @@ namespace NadekoBot.Modules.Permissions.Commands
|
|||||||
|
|
||||||
foreach (var curChannel in e.Server.TextChannels)
|
foreach (var curChannel in e.Server.TextChannels)
|
||||||
{
|
{
|
||||||
PermissionsHandler.SetChannelFilterInvitesPermission(curChannel, state);
|
await PermissionsHandler.SetChannelFilterInvitesPermission(curChannel, state).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
await e.Channel.SendMessage($"Invite Filter has been **{(state ? "enabled" : "disabled")}** for **ALL** channels.")
|
await e.Channel.SendMessage($"Invite Filter has been **{(state ? "enabled" : "disabled")}** for **ALL** channels.")
|
||||||
.ConfigureAwait(false);
|
.ConfigureAwait(false);
|
||||||
@ -102,7 +102,7 @@ namespace NadekoBot.Modules.Permissions.Commands
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
var state = PermissionHelper.ValidateBool(e.GetArg("bool"));
|
var state = PermissionHelper.ValidateBool(e.GetArg("bool"));
|
||||||
PermissionsHandler.SetServerFilterInvitesPermission(e.Server, state);
|
await PermissionsHandler.SetServerFilterInvitesPermission(e.Server, state).ConfigureAwait(false);
|
||||||
await e.Channel.SendMessage($"Invite Filter has been **{(state ? "enabled" : "disabled")}** for this server.")
|
await e.Channel.SendMessage($"Invite Filter has been **{(state ? "enabled" : "disabled")}** for this server.")
|
||||||
.ConfigureAwait(false);
|
.ConfigureAwait(false);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user