#🔒 Hello. Can you help me with making a discord music bot.

75 messages · Page 1 of 1 (latest)

sand seal
#

If someone could help me it would be much appreciated. Pm me for more info and requirements

tight islandBOT
#

@sand seal

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

sand seal
#

So i tried myself it didnt work than i tried with chagpt for a month didnt work

#

basically I tried almost everything but it didnt work

#

i want a music bot who can play spotify links and playlist and youtube that´s all

tawdry sparrow
#

Hello?

#

May i work with u?

true bridge
#

@sand seal show the code and describe in very explicit detail what "didn't work"

#

@tawdry sparrow what? this is the help system. not a place to find collaborators.

true bridge
#

all your messages in this thread need to be about helping the OP. Do not ask for people to work with you.

blissful hawk
#

dont fill this post with message unrelated on helping the person pls

true bridge
true bridge
#

!paste @sand seal

tight islandBOT
#
Pasting large amounts of code

If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/

After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.

true bridge
#

please always share code as text. not as screenshots.

tight islandBOT
#

file 1 line 1

import os```
sand seal
#

sorry

blissful hawk
#

my message is late for some reason

blissful hawk
#

which one is your code?

#

wait you delete the old link

sand seal
#

yeah because it was just the line1 copied

blissful hawk
#

what was your errors?

slate island
#

youve exposed your token. please delete and make a new token. never share tokens

blissful hawk
#

@sand seal the error was you paste the tocken directly

#

and you didnt put it inside the quotes

#

the code you showed me use env

sand seal
#

i made a new token and replaced it with TOKEN

blissful hawk
#

show the new error

sand seal
# blissful hawk show the new error

File "C:\Users\kissa\Desktop\spotify_discord_bot_py\bot.py", line 78, in <module>
bot.run(TOKEN)
~~~~~~~^^^^^^^
File "C:\Users\kissa\Desktop\spotify_discord_bot_py\Lib\site-packages\discord\client.py", line 929, in run
asyncio.run(runner())
~~~~~~~~~~~^^^^^^^^^^
File "C:\Users\kissa\Desktop\spotify_discord_bot_py\Lib\asyncio\runners.py", line 195, in run
return runner.run(main)
~~~~~~~~~~^^^^^^
File "C:\Users\kissa\Desktop\spotify_discord_bot_py\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "C:\Users\kissa\Desktop\spotify_discord_bot_py\Lib\asyncio\base_events.py", line 725, in run_until_complete
return future.result()
~~~~~~~~~~~~~^^
File "C:\Users\kissa\Desktop\spotify_discord_bot_py\Lib\site-packages\discord\client.py", line 918, in runner
await self.start(token, reconnect=reconnect)
File "C:\Users\kissa\Desktop\spotify_discord_bot_py\Lib\site-packages\discord\client.py", line 846, in start
await self.login(token)
File "C:\Users\kissa\Desktop\spotify_discord_bot_py\Lib\site-packages\discord\client.py", line 672, in login
raise TypeError(f'expected token to be a str, received {token.class.name} instead')
TypeError: expected token to be a str, received NoneType instead

blissful hawk
#

pls put it inside a code block

sand seal
#

did it

blissful hawk
#

your token is exposed here...

sand seal
ivory ferry
slate island
#

the content should look like this

#
TOKEN=yourtokenhere
sand seal
#

DISCORD_TOKEN=
SPOTIFY_CLIENT_ID=
SPOTIFY_CLIENT_SECRET=

#

I have it

slate island
#

rename DISCORD_TOKEN to just TOKEN

#

make sure the values after the = is filled

sand seal
blissful hawk
ivory ferry
#

Do you've virtual environment
running, Armando?

ivory ferry
blissful hawk
#

he is using env

sand seal
ivory ferry
#

I think you need additional intents.

slate island
#

just set it to '.'

#

dont really need a list of commands

sand seal
#

some problem fixed but now it show tons of new errors

#

comes in to the channel didnt play the music

slate island
#

you should have it play music from spotify. not have it download from youtube

ivory ferry
sand seal
sand seal
blissful hawk
#

where are you using the sp variable....

#

@sand seal why you dont just play the audio using youtube directly? or spotify directly?

slate island
tight islandBOT
#

5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.

slate island
#

!ytdl

tight islandBOT
#
Our youtube-dl, or equivalents, policy

Per Python Discord's Rule 5, we are unable to assist with questions related to youtube-dl, pytube, or other YouTube video downloaders, as their usage violates YouTube's Terms of Service.

For reference, this usage is covered by the following clauses in YouTube's TOS, as of 2021-03-17:

The following restrictions apply to your use of the Service. You are not allowed to:

1. access, reproduce, download, distribute, transmit, broadcast, display, sell, license, alter, modify or otherwise use any part of the Service or any Content except: (a) as specifically permitted by the Service;  (b) with prior written permission from YouTube and, if applicable, the respective rights holders; or (c) as permitted by applicable law;

3. access the Service using any automated means (such as robots, botnets or scrapers) except: (a) in the case of public search engines, in accordance with YouTube’s robots.txt file; (b) with YouTube’s prior written permission; or (c) as permitted by applicable law;

9. use the Service to view or listen to Content other than for personal, non-commercial use (for example, you may not publicly screen videos or stream music from the Service)
sand seal
#

I rewrote it a little bit as you said, I tried it, but there are still a lot of error messages

tight islandBOT
#
Python help channel closed for inactivity

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.