pub struct VotekickPoll {
pub initiator_name: String,
pub target_name: String,
pub duration_secs: u64,
}Expand description
A poll for voting to kick a user from a voice channel.
Fields§
§initiator_name: StringThe user who initiated the votekick
target_name: StringTarget user’s display name
duration_secs: u64Poll duration in seconds
Implementations§
Trait Implementations§
Source§impl Poll for VotekickPoll
impl Poll for VotekickPoll
Source§fn description(&self) -> String
fn description(&self) -> String
The poll description/question.
Source§fn build_embed(&self) -> CreateEmbed
fn build_embed(&self) -> CreateEmbed
Build the embed shown for the poll.
Source§fn on_complete<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
message_id: u64,
yes_votes: u32,
no_votes: u32,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_complete<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
message_id: u64,
yes_votes: u32,
no_votes: u32,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Called when the poll ends with results.
yes_votes and no_votes are counts excluding the bot.
Source§fn yes_reaction(&self) -> ReactionType
fn yes_reaction(&self) -> ReactionType
The yes/positive reaction emoji.
Source§fn no_reaction(&self) -> ReactionType
fn no_reaction(&self) -> ReactionType
The no/negative reaction emoji.
Source§fn start<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
command: &'life2 CommandInteraction,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn start<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
command: &'life2 CommandInteraction,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Start the poll by sending the embed and adding reactions.
Returns the message ID of the created poll.
Auto Trait Implementations§
impl Freeze for VotekickPoll
impl RefUnwindSafe for VotekickPoll
impl Send for VotekickPoll
impl Sync for VotekickPoll
impl Unpin for VotekickPoll
impl UnsafeUnpin for VotekickPoll
impl UnwindSafe for VotekickPoll
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more