fix interactions in DMs
This commit is contained in:
parent
a8727f474b
commit
def39b7bc5
@ -14,7 +14,8 @@
|
|||||||
public ApplicationCommandInteractionData? Data { get; init; }
|
public ApplicationCommandInteractionData? Data { get; init; }
|
||||||
public ulong GuildId { get; init; }
|
public ulong GuildId { get; init; }
|
||||||
public ulong ChannelId { get; init; }
|
public ulong ChannelId { get; init; }
|
||||||
public GuildMember Member { get; init; }
|
public GuildMember? Member { get; init; }
|
||||||
|
public User? User { get; init; }
|
||||||
public string Token { get; init; }
|
public string Token { get; init; }
|
||||||
public Message? Message { get; init; }
|
public Message? Message { get; init; }
|
||||||
}
|
}
|
||||||
|
@ -22,8 +22,8 @@ namespace PluralKit.Bot
|
|||||||
|
|
||||||
public ulong ChannelId => _evt.ChannelId;
|
public ulong ChannelId => _evt.ChannelId;
|
||||||
public ulong? MessageId => _evt.Message?.Id;
|
public ulong? MessageId => _evt.Message?.Id;
|
||||||
public GuildMember Member => _evt.Member;
|
public GuildMember? Member => _evt.Member;
|
||||||
public User User => _evt.Member.User;
|
public User User => _evt.Member?.User ?? _evt.User;
|
||||||
public string Token => _evt.Token;
|
public string Token => _evt.Token;
|
||||||
public string? CustomId => _evt.Data?.CustomId;
|
public string? CustomId => _evt.Data?.CustomId;
|
||||||
public InteractionCreateEvent Event => _evt;
|
public InteractionCreateEvent Event => _evt;
|
||||||
|
@ -80,7 +80,7 @@ namespace PluralKit.Bot
|
|||||||
MessageUpdateEvent e => e.Author.HasValue ? e.Author.Value.Id : null,
|
MessageUpdateEvent e => e.Author.HasValue ? e.Author.Value.Id : null,
|
||||||
MessageReactionAddEvent e => e.UserId,
|
MessageReactionAddEvent e => e.UserId,
|
||||||
MessageReactionRemoveEvent e => e.UserId,
|
MessageReactionRemoveEvent e => e.UserId,
|
||||||
InteractionCreateEvent e => e.Member.User.Id,
|
InteractionCreateEvent e => e.User?.Id ?? e.Member.User.Id,
|
||||||
_ => null,
|
_ => null,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user