#[non_exhaustive]pub struct Resolved {
pub users: BTreeMap<UserId, Box<User>>,
pub members: BTreeMap<UserId, Box<InteractionMember>>,
pub roles: BTreeMap<RoleId, Box<Role>>,
pub channels: BTreeMap<ChannelId, Box<InteractionChannel>>,
pub messages: BTreeMap<MessageId, Box<Message>>,
pub attachments: BTreeMap<AttachmentId, Box<Attachment>>,
}Expand description
The resolved data of an interaction: the objects behind the IDs in options, select menus and file uploads, keyed by ID (D-058).
A member’s user is in users under the same ID. The values are boxed
(D-256): a B-tree leaf reserves room for 11 entries, so a one-entry map of plain values
would hold kilobytes of empty space; boxed, an interaction takes a third of the memory.
Fields and methods work through the box as usual (resolved.users[&id].username), and
the getters of CommandData and the other data types return plain references.
discord.js counterpart: the resolved structures of CommandInteractionOptionResolver and
the select menu interactions (users, members, roles, channels).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.users: BTreeMap<UserId, Box<User>>Users.
members: BTreeMap<UserId, Box<InteractionMember>>Members (without user; with their permissions in the channel).
roles: BTreeMap<RoleId, Box<Role>>Roles.
channels: BTreeMap<ChannelId, Box<InteractionChannel>>Partial channels (with the invoking member’s permissions in them).
messages: BTreeMap<MessageId, Box<Message>>Messages (the target of message commands).
attachments: BTreeMap<AttachmentId, Box<Attachment>>Attachments (attachment options, file uploads).