vesper/
lib.rs

1#![doc = include_str!("../README.md")]
2
3mod parse_impl;
4
5pub mod argument;
6pub mod builder;
7pub mod command;
8pub mod context;
9pub mod error;
10pub mod framework;
11pub mod group;
12pub mod hook;
13pub mod iter;
14pub mod localizations;
15pub mod modal;
16pub mod parse;
17pub mod parsers;
18pub mod range;
19pub mod wait;
20
21// Items used to extract generics from functions, not public API.
22#[doc(hidden)]
23pub mod extract;
24
25pub use vesper_macros as macros;
26
27type BoxFuture<'a, T> = std::pin::Pin<Box<dyn std::future::Future<Output = T> + Send + 'a>>;
28
29/// Useful exports to get started quickly
30pub mod prelude {
31    pub use crate::{
32        builder::{FrameworkBuilder, WrappedClient},
33        context::{AutocompleteContext, Focused, SlashContext},
34        error::*,
35        framework::{DefaultCommandResult, Framework},
36        modal::*,
37        parse::{Parse, ParseError},
38        parsers,
39        range::Range,
40    };
41    pub use async_trait::async_trait;
42    pub use vesper_macros::*;
43}
44
45#[doc(hidden)]
46pub mod twilight_exports {
47    pub use twilight_http::{
48        client::{Client, InteractionClient},
49        request::application::interaction::UpdateResponse,
50        response::DeserializeBodyError
51    };
52    pub use twilight_model::{
53        application::{
54            command::{Command, CommandOption, CommandOptionChoice, CommandOptionChoiceValue, CommandOptionType, CommandType},
55            interaction::{
56                application_command::{CommandData, CommandDataOption, CommandOptionValue, CommandInteractionDataResolved},
57                modal::ModalInteractionData,
58                message_component::MessageComponentInteractionData,
59                Interaction, InteractionData, InteractionType,
60            },
61        },
62        channel::{Message, message::{Component, component::{ActionRow, TextInput, TextInputStyle}}},
63        gateway::payload::incoming::InteractionCreate,
64        guild::Permissions,
65        http::interaction::{
66            InteractionResponse, InteractionResponseData, InteractionResponseType,
67        },
68        id::{
69            marker::{
70                ApplicationMarker, AttachmentMarker, ChannelMarker, GenericMarker, GuildMarker,
71                MessageMarker, RoleMarker, UserMarker,
72            },
73            Id,
74        },
75    };
76}