forked from EllieBotDevs/elliebot
Afk messages should now be sent in DMs to prevent abuse
Also updated EllieBot.sln
This commit is contained in:
parent
7a82f262f8
commit
6e0a129bc0
2 changed files with 3 additions and 3 deletions
src/EllieBot/Modules/Utility
|
@ -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)
|
||||
|
|
Reference in a new issue