.die should now stop all music players, #1329
This commit is contained in:
@ -15,6 +15,7 @@ using Microsoft.EntityFrameworkCore;
|
||||
using NadekoBot.Services.Administration;
|
||||
using System.Diagnostics;
|
||||
using NadekoBot.DataStructures;
|
||||
using NadekoBot.Services.Music;
|
||||
|
||||
namespace NadekoBot.Modules.Administration
|
||||
{
|
||||
@ -29,14 +30,16 @@ namespace NadekoBot.Modules.Administration
|
||||
private readonly SelfService _service;
|
||||
private readonly DiscordSocketClient _client;
|
||||
private readonly IImagesService _images;
|
||||
private readonly MusicService _music;
|
||||
|
||||
public SelfCommands(DbService db, SelfService service, DiscordSocketClient client,
|
||||
IImagesService images)
|
||||
MusicService music, IImagesService images)
|
||||
{
|
||||
_db = db;
|
||||
_service = service;
|
||||
_client = client;
|
||||
_images = images;
|
||||
_music = music;
|
||||
}
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
@ -268,6 +271,7 @@ namespace NadekoBot.Modules.Administration
|
||||
// ignored
|
||||
}
|
||||
await Task.Delay(2000).ConfigureAwait(false);
|
||||
try { await _music.DestroyAllPlayers().ConfigureAwait(false); } catch { }
|
||||
Environment.Exit(0);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user