pub struct GuildView { /* private fields */ }Expand description
A view for interfacing with a Discord guild.
Implementations§
Source§impl GuildView
impl GuildView
Sourcepub fn modify(
&self,
opts: ModifyGuildOptions,
) -> impl Future<Item = Guild, Error = Error>
pub fn modify( &self, opts: ModifyGuildOptions, ) -> impl Future<Item = Guild, Error = Error>
Modifies the settings of this guild.
Sourcepub fn get_channels(&self) -> impl Future<Item = Vec<Channel>, Error = Error>
pub fn get_channels(&self) -> impl Future<Item = Vec<Channel>, Error = Error>
Fetches all channels in the current guild.
Sourcepub fn create_channel(
&self,
opts: CreateChannelOptions,
) -> impl Future<Item = Channel, Error = Error>
pub fn create_channel( &self, opts: CreateChannelOptions, ) -> impl Future<Item = Channel, Error = Error>
Creates a new channel in this guild.
Sourcepub fn modify_channel_positions(&self)
pub fn modify_channel_positions(&self)
Modifies a set of channel positions in this guild.
Sourcepub fn get_webhooks(&self) -> impl Future<Item = Webhook, Error = Error>
pub fn get_webhooks(&self) -> impl Future<Item = Webhook, Error = Error>
Gets a list of webhooks that belong to this guild.
Sourcepub fn get_member(
&self,
id: &Snowflake,
) -> impl Future<Item = GuildMember, Error = Error>
pub fn get_member( &self, id: &Snowflake, ) -> impl Future<Item = GuildMember, Error = Error>
Gets a guild member of the specified user id.
Sourcepub fn list_members(
&self,
opts: ListMembersOptions,
) -> impl Future<Item = Vec<GuildMember>, Error = Error>
pub fn list_members( &self, opts: ListMembersOptions, ) -> impl Future<Item = Vec<GuildMember>, Error = Error>
Lists all guild members in the current guild.
Sourcepub fn add_member(
&self,
id: &Snowflake,
opts: AddMemberOptions,
) -> impl Future<Item = GuildMember, Error = Error>
pub fn add_member( &self, id: &Snowflake, opts: AddMemberOptions, ) -> impl Future<Item = GuildMember, Error = Error>
Adds a member to the guild, using an Oauth2 access token.
Sourcepub fn add_member_role(
&self,
member: &Snowflake,
role: &Snowflake,
) -> impl Future<Item = (), Error = Error>
pub fn add_member_role( &self, member: &Snowflake, role: &Snowflake, ) -> impl Future<Item = (), Error = Error>
Adds a role to the specified guild member.
Sourcepub fn get_emojis(&self) -> impl Future<Item = Vec<Emoji>, Error = Error>
pub fn get_emojis(&self) -> impl Future<Item = Vec<Emoji>, Error = Error>
Gets a list of emojis in the guild.
Sourcepub fn get_emoji(
&self,
emoji: &Snowflake,
) -> impl Future<Item = Emoji, Error = Error>
pub fn get_emoji( &self, emoji: &Snowflake, ) -> impl Future<Item = Emoji, Error = Error>
Gets a a single emoji by snowflake in the guild.
Sourcepub fn create_emoji(
&self,
opts: CreateEmojiOptions,
) -> impl Future<Item = Emoji, Error = Error>
pub fn create_emoji( &self, opts: CreateEmojiOptions, ) -> impl Future<Item = Emoji, Error = Error>
Creates a new emoji in this guild, with the provided options.
Sourcepub fn modify_emoji(
&self,
id: &Snowflake,
opts: ModifyGuildEmbedOptions,
) -> impl Future<Item = Emoji, Error = Error>
pub fn modify_emoji( &self, id: &Snowflake, opts: ModifyGuildEmbedOptions, ) -> impl Future<Item = Emoji, Error = Error>
Modifies the provided emoji with the given options.
Sourcepub fn delete_emoji(
&self,
id: &Snowflake,
) -> impl Future<Item = (), Error = Error>
pub fn delete_emoji( &self, id: &Snowflake, ) -> impl Future<Item = (), Error = Error>
Deletes the provided emoji from the guild.
Sourcepub fn get_audit_log(
&self,
opts: GetAuditLogOptions,
) -> impl Future<Item = GuildAuditLog, Error = Error>
pub fn get_audit_log( &self, opts: GetAuditLogOptions, ) -> impl Future<Item = GuildAuditLog, Error = Error>
Fetches the audit log for this guild.
Sourcepub fn get_bans(&self) -> impl Future<Item = Vec<GuildBan>, Error = Error>
pub fn get_bans(&self) -> impl Future<Item = Vec<GuildBan>, Error = Error>
Gets a list of bans in the guild.
Sourcepub fn get_ban(
&self,
user: &Snowflake,
) -> impl Future<Item = GuildBan, Error = Error>
pub fn get_ban( &self, user: &Snowflake, ) -> impl Future<Item = GuildBan, Error = Error>
Gets a a single ban for the provided user in the guild.
Sourcepub fn remove_ban(
&self,
user: &Snowflake,
) -> impl Future<Item = (), Error = Error>
pub fn remove_ban( &self, user: &Snowflake, ) -> impl Future<Item = (), Error = Error>
Removes a ban for the provided user from the guild.
Sourcepub fn get_roles(&self) -> impl Future<Item = Vec<Role>, Error = Error>
pub fn get_roles(&self) -> impl Future<Item = Vec<Role>, Error = Error>
Gets a collection of roles from the guild.
Sourcepub fn create_role(
&self,
opts: CreateRoleOptions,
) -> impl Future<Item = Role, Error = Error>
pub fn create_role( &self, opts: CreateRoleOptions, ) -> impl Future<Item = Role, Error = Error>
Creates a role in the guild.
Sourcepub fn modify_role(
&self,
role: &Snowflake,
opts: ModifyRoleOptions,
) -> impl Future<Item = Role, Error = Error>
pub fn modify_role( &self, role: &Snowflake, opts: ModifyRoleOptions, ) -> impl Future<Item = Role, Error = Error>
Modifies the provided role in the guild.
Sourcepub fn get_prune_count(
&self,
days: i32,
) -> impl Future<Item = GuildPrune, Error = Error>
pub fn get_prune_count( &self, days: i32, ) -> impl Future<Item = GuildPrune, Error = Error>
Gets the number of members who would be pruned in a prune operation.
Sourcepub fn prune_members(
&self,
days: i32,
compute: bool,
) -> impl Future<Item = GuildPrune, Error = Error>
pub fn prune_members( &self, days: i32, compute: bool, ) -> impl Future<Item = GuildPrune, Error = Error>
Prunes guild members, according to the provided options.
Sourcepub fn get_voice_regions(
&self,
) -> impl Future<Item = Vec<VoiceRegion>, Error = Error>
pub fn get_voice_regions( &self, ) -> impl Future<Item = Vec<VoiceRegion>, Error = Error>
Gets a list of voice regions for the guild.
Sourcepub fn get_invites(&self) -> impl Future<Item = Vec<Invite>, Error = Error>
pub fn get_invites(&self) -> impl Future<Item = Vec<Invite>, Error = Error>
Gets a list of guild invites.
Sourcepub fn get_integrations(
&self,
) -> impl Future<Item = Vec<GuildIntegration>, Error = Error>
pub fn get_integrations( &self, ) -> impl Future<Item = Vec<GuildIntegration>, Error = Error>
Gets a list of guild integrations.
Sourcepub fn add_integration(
&self,
kind: &str,
id: &Snowflake,
) -> impl Future<Item = (), Error = Error>
pub fn add_integration( &self, kind: &str, id: &Snowflake, ) -> impl Future<Item = (), Error = Error>
Attaches an integration from the current user to the guild.
Sourcepub fn modify_integration(
&self,
id: &Snowflake,
opts: ModifyGuildIntegrationOptions,
) -> impl Future<Item = (), Error = Error>
pub fn modify_integration( &self, id: &Snowflake, opts: ModifyGuildIntegrationOptions, ) -> impl Future<Item = (), Error = Error>
Modifies the behavior and settings of a guild integration.
Sourcepub fn delete_integration(
&self,
id: &Snowflake,
) -> impl Future<Item = (), Error = Error>
pub fn delete_integration( &self, id: &Snowflake, ) -> impl Future<Item = (), Error = Error>
Deletes a guild integration by the provided ID.
Sourcepub fn sync_integration(
&self,
id: &Snowflake,
) -> impl Future<Item = (), Error = Error>
pub fn sync_integration( &self, id: &Snowflake, ) -> impl Future<Item = (), Error = Error>
Syncs guild integration by the provided ID.
Sourcepub fn get_embed(&self) -> impl Future<Item = GuildEmbed, Error = Error>
pub fn get_embed(&self) -> impl Future<Item = GuildEmbed, Error = Error>
Gets the embed object of this guild.
Sourcepub fn modify_embed(
&self,
opts: ModifyGuildEmbedOptions,
) -> impl Future<Item = GuildEmbed, Error = Error>
pub fn modify_embed( &self, opts: ModifyGuildEmbedOptions, ) -> impl Future<Item = GuildEmbed, Error = Error>
Modifies the current guild embed.
Sourcepub fn modify_role_positions(&self)
pub fn modify_role_positions(&self)
Modifies a set of role positions in the guild.
Sourcepub fn remove_member_role(
&self,
member: &Snowflake,
role: &Snowflake,
) -> impl Future<Item = (), Error = Error>
pub fn remove_member_role( &self, member: &Snowflake, role: &Snowflake, ) -> impl Future<Item = (), Error = Error>
Removes a role from the specified guild member.
Sourcepub fn modify_member(
&self,
id: &Snowflake,
opts: ModifyMemberOptions,
) -> impl Future<Item = (), Error = Error>
pub fn modify_member( &self, id: &Snowflake, opts: ModifyMemberOptions, ) -> impl Future<Item = (), Error = Error>
Modifies a guild member in this guild.
Auto Trait Implementations§
impl Freeze for GuildView
impl !RefUnwindSafe for GuildView
impl Send for GuildView
impl Sync for GuildView
impl Unpin for GuildView
impl !UnwindSafe for GuildView
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more