Skip to main content

zaun_community_protocol/command/
object.rs

1//! Object shapes shared by command bodies, responses and events (specification §8–§10).
2//!
3//! Enum convention (§7): values the spec writes bare (`category`, `pause_joins`, …) or as
4//! `{t, c}` use the tagged form `{"t": .., "c": ..}`. SPEC: values the spec writes as quoted
5//! string alternatives (`"open" | "reviewing"`, `"invite" | "request"`, `"stored"`,
6//! `"access_gained"`, and `"community"`/`"member"`/`"channel"` in the §10 JSON examples) are
7//! plain JSON strings here, because the §10.1 and §10.3 examples show them that way. §7 says
8//! every enum inside a body is tagged; the two rules disagree for these fields.
9
10mod admission;
11mod app_command;
12mod audit;
13mod bot;
14mod channel;
15mod community;
16mod component;
17mod embed;
18mod interaction;
19mod invite;
20mod lockdown;
21mod member;
22mod message;
23mod presence;
24mod report;
25mod role;
26mod sync;
27mod voice;
28
29pub(crate) use admission::check_newcomer_mask as admission_mask;
30pub use admission::{
31    AdmissionPolicy, InviteCreation, JoinRate, PolicyLevel, PolicySummary, PolicyView,
32};
33pub use app_command::{
34    ApplicationCommand, Choice, ChoiceValue, CommandOption, CommandType, OptionType, check_commands,
35};
36pub use audit::{AUDIT_ACTIONS, AuditChange, AuditEntry, AuditTarget};
37pub use bot::events as bot_events;
38pub use bot::{
39    BotCard, BotKind, BotState, Capabilities, ConfigKey, Grants, Manifest, ManifestLimits,
40    config_key_ok, host_pattern_ok, local_address_ok,
41};
42pub use channel::{Channel, ChannelPosition, Override, OverrideTarget, Retention};
43pub use community::{Binding, CommunityProfile, Empty, NewProfile, SignedRotation};
44pub use component::{
45    ActionRow, Button, ButtonStyle, Checkbox, CheckboxGroup, Component, Container, DefaultValue,
46    DefaultValueKind, EntitySelect, FileComponent, FileUpload, Label, MediaGallery, MediaItem,
47    RadioGroup, Section, SelectOption, Separator, StringSelect, TextDisplay, TextInput,
48    TextInputStyle, Thumbnail, check_message_components, check_modal, component_attachments,
49    find_interactive, modal_inputs,
50};
51pub use embed::{
52    Embed, EmbedAuthor, EmbedField, EmbedFooter, check_embeds, check_pictures, message_json_len,
53    message_json_len_with,
54};
55pub use interaction::{
56    Interaction, InteractionData, InteractionMetadata, InteractionType, MessageBody, OptionValue,
57    OptionValueKind, Resolved, SubmittedInput, flags,
58};
59pub use invite::{AdmissionOverrides, InviteLink, InviteSummary, InviteUse};
60pub use lockdown::{Lockdown, LockdownPublic, LockdownView, Restriction};
61pub use member::{Admission, AdmissionVia, Ban, Member};
62pub use message::{Attachment, Availability, Mentions, Message, ReactionCount, UploadFailure};
63pub use presence::{Activity, ActivityType};
64pub use report::{
65    Evidence, Outcome, Report, ReportCategory, ReportStatus, ReportTarget, Resolution,
66};
67pub use role::{COLOR_MAX, Role, RolePosition};
68pub use sync::{ChannelAfter, ChannelCursor, ChannelFloor, ChannelHead, Cursors, Resync, Stream};
69pub use voice::{IcePolicy, IceServer, Opaque, VoiceParticipant};