API Reference
The following section outlines the API and usage of DCActivity module.
DCActivity
class dcactivity.DCActivity(bot=Union[Client, AutoShardedClient, Bot, AutoShardedBot])
Represents DCActivity Connection class.
This class is used to interact with Discord API to create Voice Channel Invite Links to use Discord's Beta Voice Channel Activities features.
property applications
Returns a raw dict of Supported Applications with their IDs.
Type
dict
await create_invite(voice_channel, application, *, max_age=86400, max_uses=0)
This function is a coroutine.
Retrieves a discord.Invite object with Voice Channel Activities for the VoiceChannel passed.
You must have the create_instant_invite permission to do this.
Parameters
voice_channel (Union[int, VoiceChannel]) - The Voice Channel to create Voice Channel Activity Invite Link for.
application (Union[int, str, DCApplication]) - The Activity Type to create Invite Link for. Note that you should use ID only if you know the exact ID for the Application.
max_age (Optional[int]) - How long the invite should last in seconds. If it’s 0 then the invite doesn’t expire. Should be between 0 to 604800 seconds (7 days). Defaults to 86400 (24 Hours).
max_uses (Optional[int]) - How many uses the invite could be used for. If it’s 0 then there are unlimited uses. Should be between 0 to 100. Defaults to 0.
Raises
TypeError - Invalid class type passed in voice_channel or application.
ValueError - Any Value passed is Invalid/Not Acceptable.
InvalidChannel - Voice Channel passed is Invalid.
BotMissingPermissions - Bot is missing permissions to create invites.
InvalidApplicationID - Application ID passed is Invalid.
APIException - API is overloaded while creating Invite.
DCActivityException - Creating Invite link falied.
Returns
The Invite that was Created. - Invite
DCApplication
class dcactivity.DCApplication()
Available Voice Channel Target Application's IDs.
betrayal
Returns the Application ID for betrayal (Betrayal.io) Application.
Type
int
chess
Returns the Application ID for chess (CG 2 DEV) Application.
Type
int
fishing
Returns the Application ID for fishing (Fishington.io) Application.
Type
int
poker
Returns the Application ID for poker (Poker Night) Application.
Type
int
youtube
Returns the Application ID for youtube (YouTube Together) Application.
Type
int