.autodc added (Auto leave voice channel when all songs have been played)

This commit is contained in:
Master Kwoth
2017-10-22 17:16:11 +02:00
parent 65fc585a7b
commit ed32e85bac
9 changed files with 2000 additions and 11 deletions

View File

@ -332,6 +332,19 @@ namespace NadekoBot.Modules.Music
mp.Stop();
}
[NadekoCommand, Usage, Description, Aliases]
[RequireContext(ContextType.Guild)]
public async Task AutoDisconnect()
{
var newVal = _service.ToggleAutoDc(Context.Guild.Id);
if(newVal)
await ReplyConfirmLocalized("autodc_enable").ConfigureAwait(false);
else
await ReplyConfirmLocalized("autodc_disable").ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
[RequireContext(ContextType.Guild)]
public async Task Destroy()