Utilize the BETA Discord VC Party Games feature!
Project description
👋 Welcome!
Discord has released a BETA feature that they call Discord Party Games to only a certain hand-picked servers. This module allows you to temporarily enable such features for your servers!
As of v1.0.8, this BETA feature is only supported on web and updated PC app versions of Discord and is not supported on mobile.
🔩 Installation
Install discord-together
pip install discord-together
Package dependencies only include discord.py
🔑 Features
- Easy to use and lightweight
- Actively maintained
- discord.py support
- Dynamic error handling with custom errors
- Debug mode for invalid invites
💻 Code example
This is a simple example of code using this package.
from discord.ext import commands
from discordTogether import DiscordTogether
client = commands.Bot(command_prefix="~")
togetherControl = DiscordTogether(client)
@client.event
async def on_ready():
print(f"Bot logged into {client.user}.")
@client.command()
async def startYT(ctx):
link = await togetherControl.create_link(ctx.author.voice.channel.id, 'youtube')
await ctx.send(f"Click the blue link!\n{link}")
client.run("BOT_TOKEN_HERE")
Within cogs :
from discord.ext import commands
from discordTogether import DiscordTogether
class YoutubeTogetherCog(commands.Cog):
def __init__(self, client):
self.client = client
self.togetherControl = DiscordTogether(client)
@commands.command()
async def start(self, ctx):
link = await self.togetherControl.create_link(ctx.author.voice.channel.id, 'youtube')
await ctx.send(f"Click the blue link!\n{link}")
def setup(client):
client.add_cog(YoutubeTogetherCog(client))
🔧 General Usage
create_link() Format
link = await togetherControl.create_link(VC_ID, 'APP_ID')
# VC_ID : Integer
# APP_ID : String
- Options for APP_ID:
- Youtube
- Poker
- Chess
- Betrayal
- Fishing
-Custom Activity ID
(Only use this if you know the exact ID for an activity)
Error Handling
discordTogether.errors.InvalidChannelID
: Raised when an invalid Voice Channel ID is enterred.discordTogether.errors.InvalidActivityChoice
: Raised when an invalid activity choice is entered.discord.ext.commands.errors.BotMissingPermissions
: Raised when the bot does not have CREATE_INVITE permission.discord.errors.ConnectionError
: Raised when a connection error from Discord API occurs.discord.errors.InvalidArgument
: Raised when a custom activity ID is invalid.
📷 Image
⚠️ Advisory Note:
Atleast one person needs to click on the BLUE LINK, not the 'Play' button, in order to start the activity! Once the activity is started, people can join by clicking 'Play'.
Multiple people clicking the blue link at once can cause a "Activity Ended" error screen, however it's not a common occurence.
🚀 Others
This package is under MIT license. Appropriately tested PR's are more than welcome.
Note: This package is not affiliated with Discord pr YouTube.
If you have any problems or enquiries, you can contact: Bxllistic#4444
or join the discord-together Support Server.
This project was converted to support discord.py from the npm package discord-together made by RemyK888
Made with ❤ by Bxllistic#4444
Credits to @RemyK888 for application IDs and foundations
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for discord_together-1.0.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef22ce9017cc1112a850fc257d9aeb2a43eb0c75d579909613c6f1632344fda6 |
|
MD5 | cf3a3d672c40b7cf1d8beb31a26601bd |
|
BLAKE2b-256 | 6b7e25c5c5f34cb48f605f3ee4f87b3df98f0b0cbe26db21c190296432fc0fc2 |