dev: Fixed a build warning and small cleanup

This commit is contained in:
Kwoth
2024-05-12 19:00:16 +00:00
parent 1d0f3d3fd6
commit 1c540476d3
3 changed files with 12 additions and 34 deletions

View File

@@ -202,12 +202,6 @@ public class GreetService : INService, IReadyExecutor
if (!users.Any())
return;
// var rep = new ReplacementBuilder().WithChannel(channel)
// .WithClient(_client)
// .WithServer(_client, (SocketGuild)channel.Guild)
// .WithManyUsers(users)
// .Build();
var repCtx = new ReplacementContext(client: _client,
guild: channel.Guild,
channel: channel,
@@ -244,17 +238,11 @@ public class GreetService : INService, IReadyExecutor
if (users.Count == 0)
return;
// var rep = new ReplacementBuilder()
// .WithChannel(channel)
// .WithClient(_client)
// .WithServer(_client, (SocketGuild)channel.Guild)
// .WithManyUsers(users)
// .Build();
var repCtx = new ReplacementContext(client: _client,
guild: channel.Guild,
channel: channel,
users: users.ToArray());
var text = SmartText.CreateFrom(conf.ChannelGreetMessageText);
text = await _repSvc.ReplaceAsync(text, repCtx);
try