Afk messages should now be sent in DMs to prevent abuse

Also updated EllieBot.sln
This commit is contained in:
Toastie 2024-08-08 13:37:39 +12:00
parent 7a82f262f8
commit 6e0a129bc0
Signed by: toastie_t0ast
GPG key ID: 27F3B6855AFD40A4
2 changed files with 3 additions and 3 deletions
src/EllieBot/Modules/Utility

View file

@ -74,7 +74,7 @@ public sealed class AfkService : IEService, IReadyExecutor
private Task TryTriggerAfkMessage(SocketMessage arg)
{
if (arg.Author.IsBot)
if (arg.Author.IsBot || arg.Author.IsWebhook)
return Task.CompletedTask;
if (arg is not IUserMessage uMsg || uMsg.Channel is not ITextChannel tc)
@ -126,9 +126,10 @@ public sealed class AfkService : IEService, IReadyExecutor
{
var st = SmartText.CreateFrom(msg);
st = "The user is AFK: " + st;
st = $"The user you've pinged ({arg.Author}) is AFK: " + st;
var toDelete = await _mss.Response(arg.Channel)
.User(arg.Author)
.Message(uMsg)
.Text(st)
.Sanitize(false)