eric-yeung / Discord-Bot

Discord Bot written in Python that plays music in your voice channel
43 stars 36 forks source link

Bot prefix? #4

Closed Crossinq closed 3 years ago

Crossinq commented 3 years ago

Hi i'm new to coding and im looking to make a discord music bot. i typed in your code and found the prefix load_dotenv() client = commands.Bot(command_prefix='.') but i dont know the play command and i would like to change the prefix. can i just do "= "v!" and then use the command v!play in the discord? because i tried to do this but i dosent seem to be working, is that not an option or is the code not right? -Crossinq

eric-yeung commented 3 years ago

If you use .play, thats the function in the actual code. It’s defined as play which leads to the command to be .play but you can change the prefix to whatever you want.

Crossinq commented 3 years ago

If you use .play, thats the function in the actual code. It’s defined as play which leads to the command to be .play but you can change the prefix to whatever you want.

the way to change it is to change the '.' to the prefix i want right? and then the play command is my prefix then v!play song url

eric-yeung commented 3 years ago

Yes exactly

On Aug 19, 2021 at 2:10 PM, <Crossinq @.***)> wrote:

If you use .play, thats the function in the actual code. It’s defined as play which leads to the command to be .play but you can change the prefix to whatever you want.

the way to change it is to change the '.' to the prefix i want right? and then the play command is my prefix then v!play song url

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub (https://github.com/eric-yeung/Discord-Bot/issues/4#issuecomment-902132065), or unsubscribe (https://github.com/notifications/unsubscribe-auth/AOGKOR2TGNJMGLH7NT5NVRLT5VCKXANCNFSM5COXOFUQ). Triage notifications on the go with GitHub Mobile for iOS (https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675) or Android (https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email).

Crossinq commented 3 years ago

i didnt change the prefix bc i wanted to test the original prefix. i typed .play song url and this error came image

eric-yeung commented 3 years ago

Have you installed all the dependencies?

On Aug 19, 2021 at 2:14 PM, <Crossinq @.***)> wrote:

i didnt change the prefix bc i wanted to test the original prefix. i typed .play song url and this error came (https://user-images.githubusercontent.com/89217366/130122413-6d90a92d-69c2-4269-936f-47924b76de24.png)

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub (https://github.com/eric-yeung/Discord-Bot/issues/4#issuecomment-902134730), or unsubscribe (https://github.com/notifications/unsubscribe-auth/AOGKOR4SD6QG6U4MRLLF5ETT5VCYNANCNFSM5COXOFUQ). Triage notifications on the go with GitHub Mobile for iOS (https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675) or Android (https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email).

Crossinq commented 3 years ago

i use repl, is that a problem? but i have python 3.9 and pycharm installed but i would rather use repl since i can run it 24/7 for free if i get it working

eric-yeung commented 3 years ago

No but make sure to install the dependencies on the readme.md

On Aug 19, 2021 at 2:21 PM, <Crossinq @.***)> wrote:

i use repl, is that a problem?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub (https://github.com/eric-yeung/Discord-Bot/issues/4#issuecomment-902139125), or unsubscribe (https://github.com/notifications/unsubscribe-auth/AOGKORZALF2AKW2P7TUZYZDT5VDSNANCNFSM5COXOFUQ). Triage notifications on the go with GitHub Mobile for iOS (https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675) or Android (https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email).

Crossinq commented 3 years ago

when you say install do you mean import? if not then how do i install it... sorry if im a bother but im new to this coding thing :/

eric-yeung commented 3 years ago

https://youtu.be/MbhXIddT2YY Use this tutorial as your base to build it

On Aug 19, 2021 at 2:34 PM, <Crossinq @.***)> wrote:

when you say install do you mean import? if not then how do i install it... sorry if im a bother but im new to this coding thing :/

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub (https://github.com/eric-yeung/Discord-Bot/issues/4#issuecomment-902147285), or unsubscribe (https://github.com/notifications/unsubscribe-auth/AOGKOR3FO5HD3ZPALK2MEJDT5VFENANCNFSM5COXOFUQ). Triage notifications on the go with GitHub Mobile for iOS (https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675) or Android (https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email).

Crossinq commented 3 years ago

this dosent really help since useing a browser is from my understanding so that you dont have to download anything and i wanna use repl because then i can get 24/7 uptime so imma just find a diffrent code since this clearly isnt working

eric-yeung commented 3 years ago

Python naturally doesnt have any APIs to do things like this which is why you need to install the dependencies for the bot to use.

On Aug 19, 2021 at 2:42 PM, <Crossinq @.***)> wrote:

this dosent really help since useing a browser is from my understanding so that you dont have to download anything and i wanna use repl because then i can get 24/7 uptime so imma just find a diffrent code since this clearly isnt working

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub (https://github.com/eric-yeung/Discord-Bot/issues/4#issuecomment-902152125), or unsubscribe (https://github.com/notifications/unsubscribe-auth/AOGKOR5RZZYE5X2EFXE24LLT5VGB5ANCNFSM5COXOFUQ). Triage notifications on the go with GitHub Mobile for iOS (https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675) or Android (https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email).