fix: .setstream and .setactivity will now pause .ropl

This commit is contained in:
Kwoth
2024-11-30 10:02:08 +00:00
parent 15709bc8fb
commit 790c36df8d
5 changed files with 124 additions and 106 deletions

View File

@@ -24,19 +24,22 @@ public partial class Administration
private readonly IMedusaLoaderService _medusaLoader;
private readonly ICoordinator _coord;
private readonly DbService _db;
private readonly IBotActivityService _bas;
public SelfCommands(
DiscordSocketClient client,
DbService db,
IBotStrings strings,
ICoordinator coord,
IMedusaLoaderService medusaLoader)
IMedusaLoaderService medusaLoader,
IBotActivityService bas)
{
_client = client;
_db = db;
_strings = strings;
_coord = coord;
_medusaLoader = medusaLoader;
_bas = bas;
}
@@ -496,10 +499,10 @@ public partial class Administration
// var rep = new ReplacementBuilder().WithDefault(Context).Build();
var repCtx = new ReplacementContext(ctx);
await _service.SetActivityAsync(game is null ? game : await repSvc.ReplaceAsync(game, repCtx), type);
await _bas.SetActivityAsync(game is null ? game : await repSvc.ReplaceAsync(game, repCtx), type);
await Response().Confirm(strs.set_activity).SendAsync();
}
}
[Cmd]
[OwnerOnly]
@@ -518,7 +521,7 @@ public partial class Administration
{
name ??= "";
await _service.SetStreamAsync(name, url);
await _bas.SetStreamAsync(name, url);
await Response().Confirm(strs.set_stream).SendAsync();
}