v+t fixed

This commit is contained in:
Kwoth 2016-10-23 09:12:06 +02:00
parent 54f37219b8
commit 120be816a9
2 changed files with 17 additions and 1 deletions

View File

@ -128,9 +128,9 @@ namespace NadekoBot.Modules.Administration
isEnabled = conf.VoicePlusTextEnabled = !conf.VoicePlusTextEnabled; isEnabled = conf.VoicePlusTextEnabled = !conf.VoicePlusTextEnabled;
await uow.CompleteAsync().ConfigureAwait(false); await uow.CompleteAsync().ConfigureAwait(false);
} }
voicePlusTextCache.Add(guild.Id);
if (!isEnabled) if (!isEnabled)
{ {
voicePlusTextCache.TryRemove(guild.Id);
foreach (var textChannel in guild.GetTextChannels().Where(c => c.Name.EndsWith("-voice"))) foreach (var textChannel in guild.GetTextChannels().Where(c => c.Name.EndsWith("-voice")))
{ {
try { await textChannel.DeleteAsync().ConfigureAwait(false); } catch { } try { await textChannel.DeleteAsync().ConfigureAwait(false); } catch { }
@ -138,6 +138,7 @@ namespace NadekoBot.Modules.Administration
await channel.SendMessageAsync("Successfuly removed voice + text feature.").ConfigureAwait(false); await channel.SendMessageAsync("Successfuly removed voice + text feature.").ConfigureAwait(false);
return; return;
} }
voicePlusTextCache.Add(guild.Id);
await channel.SendMessageAsync("Successfuly enabled voice + text feature.").ConfigureAwait(false); await channel.SendMessageAsync("Successfuly enabled voice + text feature.").ConfigureAwait(false);
} }

View File

@ -0,0 +1,15 @@
{
"ClientId": 123123123,
"BotId": null,
"Token": "",
"OwnerIds": [
0
],
"LoLApiKey": "",
"GoogleApiKey": "",
"MashapeKey": "",
"OsuApiKey": "",
"SoundCloudClientId": "",
"Db": null,
"TotalShards": 1
}