fix message edit embed, ignore pk;edit triggers
This commit is contained in:
parent
8231c57bdf
commit
7ea945b427
6 changed files with 63 additions and 15 deletions
|
|
@ -26,7 +26,6 @@ public class MessageCreateResponder(
|
|||
: IResponder<IMessageCreate>
|
||||
{
|
||||
private readonly ILogger _logger = logger.ForContext<MessageCreateResponder>();
|
||||
private static readonly Snowflake PkUserId = DiscordSnowflake.New(466378653216014359);
|
||||
|
||||
public async Task<Result> RespondAsync(IMessageCreate msg, CancellationToken ct = default)
|
||||
{
|
||||
|
|
@ -50,11 +49,11 @@ public class MessageCreateResponder(
|
|||
return Result.Success;
|
||||
}
|
||||
|
||||
if (msg.Author.ID == PkUserId)
|
||||
if (msg.Author.ID == DiscordUtils.PkUserId)
|
||||
_ = pkMessageHandler.HandlePkMessageAsync(msg);
|
||||
if (msg.ApplicationID.IsDefined(out var appId) && appId == PkUserId)
|
||||
if (msg.ApplicationID.Is(DiscordUtils.PkUserId))
|
||||
_ = pkMessageHandler.HandleProxiedMessageAsync(msg.ID.Value);
|
||||
else if (msg.ApplicationID.HasValue && appId == config.Discord.ApplicationId)
|
||||
else if (msg.ApplicationID.HasValue && msg.ApplicationID.Is(config.Discord.ApplicationId))
|
||||
{
|
||||
db.IgnoredMessages.Add(new IgnoredMessage(msg.ID.Value));
|
||||
await db.SaveChangesAsync(ct);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue