-
Notifications
You must be signed in to change notification settings - Fork 7
Core
discorsdk.Discord
This is the core class in the SDK, you must instantiate this to interact with the other components of this module.
__init__(client_id: int, flags: discordsdk.CreateFlags)
-
client_id: int
- The ID of your application. -
flags: discordsdk.CreateFlags
- The flags to create the instance with:-
CreateFlags.default
- Makes sure that Discord is currently running, and if not it will close the app, start Discord then reopen the application. Note that this behaviour may not work as intended depending on how you run your program. -
CreateFlags.no_require_discord
- Will returnResult.internal_error
.
-
set_log_hook(min_level: LogLevel, hook: Callable[[LogLevel, str], None])
Registers a logging callback function with the minimum level of message to receive.
-
min_level: LogLevel
- The minimum level of message to receive. -
hook: Callable[[LogLevel, str], None]
- The function to log to.
run_callbacks()
Runs any callbacks for the SDK, will raise a DiscordException
if the callback result is not ok.
get_activity_manager() -> ActivityManager
Fetches an instance of the manager for interfacing with activies in the SDK.
ActivityManager
- The activity manager instance.
get_relationship_manager() -> RelationshipManager
Fetches an instance of the manager for interfacing with relationships in the SDK.
RelationshipManager
- The relationship manager instance.
get_image_manager() -> ImageManager
Fetches an instance of the manager for interfacing with images in the SDK.
ImageManager
- The image manager instance.
get_user_manager() -> UserManager
Fetches an instance of the manager for interfacing with users in the SDK.
UserManager
- The user manager instance.
get_lobby_manager() -> LobbyManager
Fetches an instance of the manager for interfacing with lobbies in the SDK.
LobbyManager
- The lobby manager instance.
get_network_manager() -> NetworkManager
Fetches an instance of the manager for interfacing with networking in the SDK.
NetworkManager
- The network manager instance.
get_overlay_manager() -> OverlayManager
Fetches an instance of the manager for interfacing with overlays in the SDK.
OverlayManager
- The overlay manager instance.
get_application_manager() -> ApplicationManager
Fetches an instance of the manager for interfacing with applications in the SDK.
ApplicationManager
- The application manager instance.
get_storage_manager() -> StorageManager
Fetches an instance of the manager for interfacing with storage in the SDK.
StorageManager
- The storage manager instance.
get_store_manager() -> StoreManager
Fetches an instance of the manager for interfacing with SKUs and entitlements in the SDK.
StoreManager
- The store manager instance.
get_voice_manager() -> VoiceManager
Fetches an instance of the manager for interfacing with voice chat in the SDK.
VoiceManager
- The voice manager instance.
get_achievement_manager() -> AchievementManager
Fetches an instance of the manager for interfacing with achievements in the SDK.
AchievementManager
- The achievement manager instance.