[][src]Struct spectacles_rest::GuildView

pub struct GuildView { /* fields omitted */ }

A view for interfacing with a Discord guild.

Methods

impl GuildView[src]

pub fn modify(
    &self,
    opts: ModifyGuildOptions
) -> impl Future<Item = Guild, Error = Error>
[src]

Modifies the settings of this guild.

pub fn delete(&self) -> impl Future<Item = (), Error = Error>[src]

Deletes this guild from Discord.

pub fn get_channels(&self) -> impl Future<Item = Vec<Channel>, Error = Error>[src]

Fetches all channels in the current guild.

pub fn create_channel(
    &self,
    opts: CreateChannelOptions
) -> impl Future<Item = Channel, Error = Error>
[src]

Creates a new channel in this guild.

pub fn modify_channel_positions(&self)[src]

Modifies a set of channel positions in this guild.

pub fn get_webhooks(&self) -> impl Future<Item = Webhook, Error = Error>[src]

Gets a list of webhooks that belong to this guild.

pub fn get_member(
    &self,
    id: &Snowflake
) -> impl Future<Item = GuildMember, Error = Error>
[src]

Gets a guild member of the specified user id.

pub fn list_members(
    &self,
    opts: ListMembersOptions
) -> impl Future<Item = Vec<GuildMember>, Error = Error>
[src]

Lists all guild members in the current guild.

pub fn add_member(
    &self,
    id: &Snowflake,
    opts: AddMemberOptions
) -> impl Future<Item = GuildMember, Error = Error>
[src]

Adds a member to the guild, using an Oauth2 access token.

pub fn add_member_role(
    &self,
    member: &Snowflake,
    role: &Snowflake
) -> impl Future<Item = (), Error = Error>
[src]

Adds a role to the specified guild member.

pub fn get_emojis(&self) -> impl Future<Item = Vec<Emoji>, Error = Error>[src]

Gets a list of emojis in the guild.

pub fn get_emoji(
    &self,
    emoji: &Snowflake
) -> impl Future<Item = Emoji, Error = Error>
[src]

Gets a a single emoji by snowflake in the guild.

pub fn create_emoji(
    &self,
    opts: CreateEmojiOptions
) -> impl Future<Item = Emoji, Error = Error>
[src]

Creates a new emoji in this guild, with the provided options.

pub fn modify_emoji(
    &self,
    id: &Snowflake,
    opts: ModifyGuildEmbedOptions
) -> impl Future<Item = Emoji, Error = Error>
[src]

Modifies the provided emoji with the given options.

pub fn delete_emoji(
    &self,
    id: &Snowflake
) -> impl Future<Item = (), Error = Error>
[src]

Deletes the provided emoji from the guild.

pub fn get_audit_log(
    &self,
    opts: GetAuditLogOptions
) -> impl Future<Item = GuildAuditLog, Error = Error>
[src]

Fetches the audit log for this guild.

pub fn get_bans(&self) -> impl Future<Item = Vec<GuildBan>, Error = Error>[src]

Gets a list of bans in the guild.

pub fn get_ban(
    &self,
    user: &Snowflake
) -> impl Future<Item = GuildBan, Error = Error>
[src]

Gets a a single ban for the provided user in the guild.

pub fn remove_ban(
    &self,
    user: &Snowflake
) -> impl Future<Item = (), Error = Error>
[src]

Removes a ban for the provided user from the guild.

pub fn get_roles(&self) -> impl Future<Item = Vec<Role>, Error = Error>[src]

Gets a collection of roles from the guild.

pub fn create_role(
    &self,
    opts: CreateRoleOptions
) -> impl Future<Item = Role, Error = Error>
[src]

Creates a role in the guild.

pub fn modify_role(
    &self,
    role: &Snowflake,
    opts: ModifyRoleOptions
) -> impl Future<Item = Role, Error = Error>
[src]

Modifies the provided role in the guild.

pub fn get_prune_count(
    &self,
    days: i32
) -> impl Future<Item = GuildPrune, Error = Error>
[src]

Gets the number of members who would be pruned in a prune operation.

pub fn prune_members(
    &self,
    days: i32,
    compute: bool
) -> impl Future<Item = GuildPrune, Error = Error>
[src]

Prunes guild members, according to the provided options.

pub fn get_voice_regions(
    &self
) -> impl Future<Item = Vec<VoiceRegion>, Error = Error>
[src]

Gets a list of voice regions for the guild.

pub fn get_invites(&self) -> impl Future<Item = Vec<Invite>, Error = Error>[src]

Gets a list of guild invites.

pub fn get_integrations(
    &self
) -> impl Future<Item = Vec<GuildIntegration>, Error = Error>
[src]

Gets a list of guild integrations.

pub fn add_integration(
    &self,
    kind: &str,
    id: &Snowflake
) -> impl Future<Item = (), Error = Error>
[src]

Attaches an integration from the current user to the guild.

pub fn modify_integration(
    &self,
    id: &Snowflake,
    opts: ModifyGuildIntegrationOptions
) -> impl Future<Item = (), Error = Error>
[src]

Modifies the behavior and settings of a guild integration.

pub fn delete_integration(
    &self,
    id: &Snowflake
) -> impl Future<Item = (), Error = Error>
[src]

Deletes a guild integration by the provided ID.

pub fn sync_integration(
    &self,
    id: &Snowflake
) -> impl Future<Item = (), Error = Error>
[src]

Syncs guild integration by the provided ID.

pub fn get_embed(&self) -> impl Future<Item = GuildEmbed, Error = Error>[src]

Gets the embed object of this guild.

pub fn modify_embed(
    &self,
    opts: ModifyGuildEmbedOptions
) -> impl Future<Item = GuildEmbed, Error = Error>
[src]

Modifies the current guild embed.

pub fn modify_role_positions(&self)[src]

Modifies a set of role positions in the guild.

pub fn remove_member_role(
    &self,
    member: &Snowflake,
    role: &Snowflake
) -> impl Future<Item = (), Error = Error>
[src]

Removes a role from the specified guild member.

pub fn modify_member(
    &self,
    id: &Snowflake,
    opts: ModifyMemberOptions
) -> impl Future<Item = (), Error = Error>
[src]

Modifies a guild member in this guild.

pub fn remove_member(
    &self,
    member: &Snowflake
) -> impl Future<Item = (), Error = Error>
[src]

Removes a guild member from the guild.

pub fn set_current_user_nick(
    &self,
    nick: &str
) -> impl Future<Item = String, Error = Error>
[src]

Sets the nickname of the current client user.

Auto Trait Implementations

impl Send for GuildView

impl Sync for GuildView

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Erased for T

impl<T, U> TryInto for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err