Updated Expressions module
This commit is contained in:
parent
00f8c70de0
commit
eb1ebc72db
4 changed files with 9 additions and 9 deletions
|
@ -42,7 +42,7 @@ public static class EllieExpressionExtensions
|
||||||
() => canMentionEveryone
|
() => canMentionEveryone
|
||||||
? ctx.Content[substringIndex..].Trim()
|
? ctx.Content[substringIndex..].Trim()
|
||||||
: ctx.Content[substringIndex..].Trim().SanitizeMentions(true));
|
: ctx.Content[substringIndex..].Trim().SanitizeMentions(true));
|
||||||
|
|
||||||
var text = SmartText.CreateFrom(cr.Response);
|
var text = SmartText.CreateFrom(cr.Response);
|
||||||
text = await repSvc.ReplaceAsync(text, repCtx);
|
text = await repSvc.ReplaceAsync(text, repCtx);
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#nullable disable
|
#nullable disable
|
||||||
using EllieBot.Db.Models;
|
using EllieBot.Db.Models;
|
||||||
|
|
||||||
namespace EllieBot.Modules.EllieExpressions;
|
namespace EllieBot.Modules.EllieExpressions;
|
||||||
|
|
|
@ -124,11 +124,11 @@ public sealed class EllieExpressionsService : IExecOnMessage, IReadyExecutor
|
||||||
newguildExpressions = guildItems.GroupBy(k => k.GuildId!.Value)
|
newguildExpressions = guildItems.GroupBy(k => k.GuildId!.Value)
|
||||||
.ToDictionary(g => g.Key,
|
.ToDictionary(g => g.Key,
|
||||||
g => g.Select(x =>
|
g => g.Select(x =>
|
||||||
{
|
{
|
||||||
x.Trigger = x.Trigger.Replace(MENTION_PH,
|
x.Trigger = x.Trigger.Replace(MENTION_PH,
|
||||||
_client.CurrentUser.Mention);
|
_client.CurrentUser.Mention);
|
||||||
return x;
|
return x;
|
||||||
})
|
})
|
||||||
.ToArray())
|
.ToArray())
|
||||||
.ToConcurrent();
|
.ToConcurrent();
|
||||||
|
|
||||||
|
@ -259,7 +259,7 @@ public sealed class EllieExpressionsService : IExecOnMessage, IReadyExecutor
|
||||||
"ACTUALEXPRESSIONS",
|
"ACTUALEXPRESSIONS",
|
||||||
expr.Trigger
|
expr.Trigger
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!result.IsAllowed)
|
if (!result.IsAllowed)
|
||||||
{
|
{
|
||||||
var cache = _pc.GetCacheFor(guild.Id);
|
var cache = _pc.GetCacheFor(guild.Id);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#nullable disable
|
#nullable disable
|
||||||
using EllieBot.Db.Models;
|
using EllieBot.Db.Models;
|
||||||
|
|
||||||
namespace EllieBot.Modules.EllieExpressions;
|
namespace EllieBot.Modules.EllieExpressions;
|
||||||
|
|
Loading…
Reference in a new issue