Struct activity::DiscordSDK
source · pub struct DiscordSDK { /* private fields */ }Implementations§
source§impl DiscordSDK
impl DiscordSDK
pub fn new(client_id: &str) -> Result<Self, JsValue>
pub fn client_id(&self) -> String
pub fn instance_id(&self) -> String
pub fn platform(&self) -> String
pub fn guild_id(&self) -> Option<String>
pub fn channel_id(&self) -> Option<String>
pub fn configuration(&self) -> SdkConfiguration
pub async fn ready(&self) -> Result<(), JsValue>
pub async fn subscribe<F, T>( &self, f: F, args: SubscribeArgs ) -> Result<EventSubscription, JsValue>
pub async fn unsubscribe(&self, event: &str) -> Result<(), JsValue>
pub fn unsubscribe_nowait(&self, event: &str)
pub async fn authenticate( &self, args: AuthenticateArgs ) -> Result<AuthenticateRes, JsValue>
pub async fn capture_log(&self, args: CaputeLogArgs) -> Result<(), JsValue>
pub async fn encourage_hardware_acceleration(&self) -> Result<(), JsValue>
pub async fn get_channel( &self, args: GetChannelArgs ) -> Result<GetChannelRes, JsValue>
pub async fn get_channel_permissions( &self ) -> Result<GetChannelPermissionsRes, JsValue>
pub async fn get_instance_connected_participants( &self ) -> Result<GetInstanceConnectedParticipantsRes, JsValue>
pub async fn get_platform_behaviors( &self ) -> Result<GetPlatformBehaviorsRes, JsValue>
pub async fn initiate_image_upload( &self ) -> Result<InitiateImageUploadRes, JsValue>
pub async fn open_external_link( &self, args: OpenExternalLinkArgs ) -> Result<(), JsValue>
pub async fn open_invite_dialog(&self) -> Result<(), JsValue>
pub async fn set_activity(&self, args: JsValue) -> Result<(), JsValue>
pub async fn set_config(&self, args: SetConfigArgs) -> Result<(), JsValue>
pub async fn set_orientation_lock_state( &self, args: SetOrientationLockStateArgs ) -> Result<(), JsValue>
pub async fn user_settings_get_locale( &self ) -> Result<UserSettingsGetLocaleRes, JsValue>
Trait Implementations§
source§impl Clone for DiscordSDK
impl Clone for DiscordSDK
source§fn clone(&self) -> DiscordSDK
fn clone(&self) -> DiscordSDK
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DiscordSDK
impl RefUnwindSafe for DiscordSDK
impl !Send for DiscordSDK
impl !Sync for DiscordSDK
impl Unpin for DiscordSDK
impl UnwindSafe for DiscordSDK
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