fixed .ropl toggle response
This commit is contained in:
		@@ -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 (_service.BotConfig.RotatingStatuses)
 | 
					                if (enabled)
 | 
				
			||||||
                    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);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user