diff --git a/.gitignore b/.gitignore index 9671d9d..9955cf2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ *venv/ -*__pycache__/ \ No newline at end of file +*__pycache__/ +*.html +*.exe +LICENSE \ No newline at end of file diff --git a/main.py b/main.py index ccbf670..0fa3f0d 100644 --- a/main.py +++ b/main.py @@ -1,11 +1,11 @@ import argparse -from discord import Intents, Client, Member +from sys import platform +from discord import Intents, Client, Member, opus from discord.ext import commands from NoiseGatev2 import NoiseGate def main(clientId='OTQzNzQyMDQwMjU1MTE1MzA0.Yg3eRA.ZxEbRr55xahjfaUmPY8pmS-RHTY', channelId=367396189529833476, NGThreshold=50, deviceId=1): - intents = Intents.default() - intents.message_content = True + intents = Intents.default() client = Client(intents=intents) @@ -15,7 +15,16 @@ def main(clientId='OTQzNzQyMDQwMjU1MTE1MzA0.Yg3eRA.ZxEbRr55xahjfaUmPY8pmS-RHTY', channelIdToJoin = client.get_channel(channelId) print("Channel", channelIdToJoin) - channelConnection = await channelIdToJoin.connect() + + if platform == "linux" or platform == "linux2": + # linux + opus.load_opus('./opus/libopus_aarcch64.so') + + elif platform == "win32": + # Windows... + opus.load_opus('./opus/libopus_amd64.dll') + + channelConnection = await channelIdToJoin.connect(timeout=60.0, reconnect=True) print("Joined voice") streamHandler = NoiseGate( _input_device_index=deviceId, diff --git a/opus/libopus_aarcch64.so b/opus/libopus_aarcch64.so new file mode 100644 index 0000000..8359d93 Binary files /dev/null and b/opus/libopus_aarcch64.so differ diff --git a/opus/libopus_amd64.dll b/opus/libopus_amd64.dll new file mode 100644 index 0000000..74a8e35 Binary files /dev/null and b/opus/libopus_amd64.dll differ diff --git a/opus/libopus_armv7l.so b/opus/libopus_armv7l.so new file mode 100644 index 0000000..7445645 Binary files /dev/null and b/opus/libopus_armv7l.so differ