Updated Expressions module

This commit is contained in:
Toastie (DCS Team) 2024-06-27 17:14:55 +12:00
parent 00f8c70de0
commit eb1ebc72db
Signed by: toastie_t0ast
GPG key ID: 27F3B6855AFD40A4
4 changed files with 9 additions and 9 deletions

View file

@ -42,7 +42,7 @@ public static class EllieExpressionExtensions
() => canMentionEveryone
? ctx.Content[substringIndex..].Trim()
: ctx.Content[substringIndex..].Trim().SanitizeMentions(true));
var text = SmartText.CreateFrom(cr.Response);
text = await repSvc.ReplaceAsync(text, repCtx);

View file

@ -1,4 +1,4 @@
#nullable disable
#nullable disable
using EllieBot.Db.Models;
namespace EllieBot.Modules.EllieExpressions;

View file

@ -124,11 +124,11 @@ public sealed class EllieExpressionsService : IExecOnMessage, IReadyExecutor
newguildExpressions = guildItems.GroupBy(k => k.GuildId!.Value)
.ToDictionary(g => g.Key,
g => g.Select(x =>
{
x.Trigger = x.Trigger.Replace(MENTION_PH,
_client.CurrentUser.Mention);
return x;
})
{
x.Trigger = x.Trigger.Replace(MENTION_PH,
_client.CurrentUser.Mention);
return x;
})
.ToArray())
.ToConcurrent();
@ -259,7 +259,7 @@ public sealed class EllieExpressionsService : IExecOnMessage, IReadyExecutor
"ACTUALEXPRESSIONS",
expr.Trigger
);
if (!result.IsAllowed)
{
var cache = _pc.GetCacheFor(guild.Id);

View file

@ -1,4 +1,4 @@
#nullable disable
#nullable disable
using EllieBot.Db.Models;
namespace EllieBot.Modules.EllieExpressions;