Skip to content

Commit

Permalink
Merge pull request #342 from starshine-sys/audit-log-event-fix
Browse files Browse the repository at this point in the history
Add GuildID to GuildAuditLogEntryCreate event
  • Loading branch information
Nihlus authored Oct 3, 2024
2 parents dfde371 + e1a5fc5 commit eda67ed
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,18 @@

using JetBrains.Annotations;
using Remora.Discord.API.Abstractions.Objects;
using Remora.Rest.Core;

namespace Remora.Discord.API.Abstractions.Gateway.Events;

/// <summary>
/// Represents the creation of an audit log entry.
/// </summary>
[PublicAPI]
public interface IGuildAuditLogEntryCreate : IGatewayEvent, IAuditLogEntry;
public interface IGuildAuditLogEntryCreate : IGatewayEvent, IAuditLogEntry
{
/// <summary>
/// Gets the ID of the guild the audit log entry is from.
/// </summary>
Snowflake GuildID { get; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ namespace Remora.Discord.API.Gateway.Events;
[PublicAPI]
public record GuildAuditLogEntryCreate
(
Snowflake GuildID,
string? TargetID,
Optional<IReadOnlyList<IAuditLogChange>> Changes,
Snowflake? UserID,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"s": 3,
"op": 0,
"d": {
"guild_id": "999999999999999999",
"target_id": "999999999999999999",
"changes": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"s": 3,
"op": 0,
"d": {
"guild_id": "999999999999999999",
"target_id": "999999999999999999",
"user_id": "999999999999999999",
"id": "999999999999999999",
Expand Down

0 comments on commit eda67ed

Please sign in to comment.