I plan on making a discord bot using python. What are the differences between discord.py and discord.py[voice]?
the difference between discord.py and discord[voice] is just PyNaCl library. PyNaCl is used to make discord music bots. If you are currently not looking for making a music bot then you should probably use discord.py when ever you want to add like music bot features.
Then just install PyNaCl library.
In shot:
-> pip install -U discord.py for normal discord.py
-> pip install -U discord.py[voice] for voice support for your bot
++For reference++
https://github.com/Rapptz/discord.py/blob/master/setup.py
extras_require = {
'voice': ['PyNaCl==1.3.0'],
'docs': [
'sphinx==1.8.5',
'sphinxcontrib_trio==1.1.1',
'sphinxcontrib-websupport',
]
}
With discord.py[voice] an extra dependency is installed PyNaCl==1.3.0.
PyMaCl is an optional package but is needed if you want voice support for your bot.
Discord.py is the general library while discord.py[voice] is an additional library that allows the discord bot to join VC's and play music, etc...! You can install both by doing:
Discord.py: pip3 install discord.py
Discord.py[voice]: pip3 install discord.py[voice]
Pip3 means that it would use python3 instead of python! If you need more specifics on how to install it or how it works just use this link -> https://discordpy.readthedocs.io/en/latest/intro.html
By installing only discord.py, u just install the basic Module, without voice support, that is, you won't be able to use functions related to Voice Channels and other stuff
But, if you install discord.py[voice], you can also use functions related to Voice Channels and stuff like that...
Install discord.py --> pip install discord.py
Install discord.py[voice] --> pip install discord.py[voice]
in discord.py[voice] you can add voice commands
discord.py is the discord framework for making bots WITHOUT voice support so you can't make anything to music if you installed this module: pip install discord.py
discord.py[voice] is the discord framework for making bots WITH voice support so you can make a music bot with this module: pip install discord.py[voice]
Here are some tutorials on how to make a bot and a music bot:
Regular Bot: https://www.youtube.com/playlist?list=PLYeOw6sTSy6ZGyygcbta7GcpI8a5-Cooc
Music Bot: https://www.youtube.com/playlist?list=PLYeOw6sTSy6ZIfraPiUsJWuxjqoL47U3u
Discord.py is for basic stuff if you don't intend to make a music bot.
But if you're working on about it, then you must install discord.py[voice].
Otherwise, it won't work
The difference is the Dicord.py[voice] has voice support.
So ...
There is actually only one difference discord.py is the main part of writing discord bots in python discord.py[voice] is an extension. With discord.py[voice] you will have a voice_client you can use it, like the following.
guild.voice_client or ctx.voice_client. The Bot is inable to join one vc per server. The Voice Client has different attributes like play and more, if you want to just search for Discord.py Music Bot on YouTube. Another function for stuff like streaming radio is voice_client.play(discord.FFmpegPCMAudio(url)). The url should be an website which when opening instantly starts playing something.
Discord.py[voice] is the discord.py with voice support, it may be needed when you're working on a music bot. And, discord.py is the basic, you know, discord bot development language/ discord framework. Hope it helped, peace <3!
Related
My Python is 3.10.0 64-bit and I just install Microsoft Visual C++ Build Tools to solve problem about wheel.Now I can install discord package but when I building a discord bot I got this this is my problem picture
I did the following "ask deploy":
RI-mac:multiple-streams egilchri$ ask deploy
-------------------- Create Skill Project --------------------
Profile for the deployment: [default]
Skill Id: amzn1.ask.skill.cdb74c79-59a5-4e01-adb2-cad787040dd9
Skill deployment finished.
Model deployment finished.
Create Lambda error.
InvalidParameterValueException: The runtime parameter of nodejs6.10 is
no longer supported for creating or updating AWS Lambda functions. We
recommend you use the new runtime (nodejs10.x) while creating or
updating functions.
Can someone tell me how to fix this?
I think I figured it out. I haven't used this in a while. Updgrading ask cli seemed to do the trick.
On MacOS
sudo npm install -g ask-cli
When pip-installing the SFTP-lib paramiko I get multiple pyd-files and that don't work with my Google App Engine-dev_appserver.
I should be able to puzzle together a solution free from pyd, but I love how I can just delete and reinstall libraries with pip. I don't want to lose that. What options do I have?
I currently using Android Studio to built my GAE endpoints and app. However, I want to move to Xamarin, so I can build an iOS version of my app.
My plan is to continue to use Android Studio to build the endpoint client library and "migrate" it to Xamarin.
However, my challenge is finding any useful information to make this work. Can someone advise? Much appreciate it!
Step 1: Install pip if you don't have one sudo easy_install pip
Step 2: Install google client library generator pip install google-apis-client-generator
Step 3 : Hit the url in the browser by replacing the application ID https://{applicationId}.appspot.com/_ah/api/discovery/v1/apis
Step 4 : Copy the the property in the json "discoveryRestUrl" It would look like https://{applicationId}.appspot.com/_ah/api/discovery/v1/apis/{your api name}/v1/rest
Step 5: Download the file from url and save it as rest.json
Step 6: use the below line generate_library --input=rest.json --language=csharp --output_dir={your output location}
Please refer this link might be useful for you.
https://sookocheff.com/post/appengine/cloud-endpoints/generating-a-c-sharp-client/
Also Refere: https://github.com/GoogleCloudPlatform/appengine-endpoints-helloworld-dotnet
I am using qpython for programming python on android.In my script I am importing requests module and so I have tp install requests module from pip.When I run pip install requests command I get the following error:
error build/lib.linux-armv71-2.7/requests/auth.py:operation not permitted qpython
I get this error twice while installing requests and so I am not being able to run my script.
You might need to manually download requests, extract and move it to your Lib/site-packages/Requests/ folder, from there python should be able to import from it. I don't see that package available for qpython, it might work out of the box or it might still need to be ported.
After installing qpython on my current device I was able to open the app, go to My QPython ->Scripts and use pip_console.py to try to install it but as you said it fails. I'm going to test later my above recommendation. My install directory is /sdcard/com.hipipal.qpyplus/lib/python2.7/site-packages/ and that is where I'm going to drop the requests library.
To run pip on qpython just use the steps below:
import pip
pip.main(['install', 'bs4'])
The above is to install bs4 for BeautifulSoup. Worked for me :)
The newest version ( 1.3.1 ) from google play has fixed this issue.
This solution did not work or me...but I did resolve it by downloading the new beta v2.1 from
https://github.com/qpython-android/qpython/releases
Google play did not give me the latest version (I had 1.xx)
I was able to use QPYPY to install requests and it automatically installed the required library urllib3.