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