fixed .ropl toggle response
This commit is contained in:
parent
cb5fdde6d0
commit
8f5c63a057
@ -27,17 +27,15 @@ namespace NadekoBot.Modules.Administration
|
|||||||
[OwnerOnly]
|
[OwnerOnly]
|
||||||
public async Task RotatePlaying()
|
public async Task RotatePlaying()
|
||||||
{
|
{
|
||||||
lock (_locker)
|
bool enabled;
|
||||||
{
|
|
||||||
using (var uow = _db.UnitOfWork)
|
using (var uow = _db.UnitOfWork)
|
||||||
{
|
{
|
||||||
var config = uow.BotConfig.GetOrCreate();
|
var config = uow.BotConfig.GetOrCreate();
|
||||||
|
|
||||||
config.RotatingStatuses = !config.RotatingStatuses;
|
enabled = config.RotatingStatuses = !config.RotatingStatuses;
|
||||||
uow.Complete();
|
uow.Complete();
|
||||||
}
|
}
|
||||||
}
|
if (enabled)
|
||||||
if (_service.BotConfig.RotatingStatuses)
|
|
||||||
await ReplyConfirmLocalized("ropl_enabled").ConfigureAwait(false);
|
await ReplyConfirmLocalized("ropl_enabled").ConfigureAwait(false);
|
||||||
else
|
else
|
||||||
await ReplyConfirmLocalized("ropl_disabled").ConfigureAwait(false);
|
await ReplyConfirmLocalized("ropl_disabled").ConfigureAwait(false);
|
||||||
|
Loading…
Reference in New Issue
Block a user