mirror of
https://github.com/tribufu/ServerManagers
synced 2026-05-18 09:35:48 +00:00
Discord Bot Scaffolding
This commit is contained in:
parent
ceb3ab73c4
commit
c4bf4906ea
24 changed files with 1119 additions and 5 deletions
21
src/ServerManager.Discord/Services/ShutdownService.cs
Normal file
21
src/ServerManager.Discord/Services/ShutdownService.cs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
using Discord.WebSocket;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ServerManagerTool.Discord.Services
|
||||
{
|
||||
public class ShutdownService
|
||||
{
|
||||
private readonly DiscordSocketClient _discord;
|
||||
|
||||
public ShutdownService(DiscordSocketClient discord)
|
||||
{
|
||||
_discord = discord;
|
||||
}
|
||||
|
||||
public async Task StopAsync()
|
||||
{
|
||||
await _discord.StopAsync();
|
||||
await _discord.LogoutAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue