GithubHelp home page GithubHelp logo

tannergabriel / discord-bot Goto Github PK

View Code? Open in Web Editor NEW
587.0 23.0 402.0 554 KB

Simple discord bot to play music and manage your server

License: MIT License

JavaScript 98.27% Dockerfile 1.73%
discord discord-bot discord-js javascript music-bot

discord-bot's Introduction

Discord Music bot

A simple discord bot that helps you manage your server by providing useful commands like playing music or deleting text messages.

You can find the tutorial about building a discord music bot here.

Table of content

Requirements

Getting started

First, make sure you have all the required tools installed on your local machine then continue with these steps.

Installation

# Clone the repository
git clone https://github.com/TannerGabriel/discord-bot.git

# Enter into the directory
cd discord-bot/

# Install the dependencies
npm install

# Configure Discord Bot Token
 echo "DISCORD_TOKEN='INSERT_YOUR_TOKEN_HERE'" > .env

Required permissions

Make sure that your bot has the applications.commands application scope enabled, which can be found under the OAuth2 tab on the developer portal

Enable the Server Members Intent and Message Content Intent which can be found under the Bot tab on the developer portal

Configuration

After cloning the project and installing all dependencies, you need to add your Discord API token in the .env file.

Changing the status

You can change the status of your discord bot by editing the activity and activityType variables inside the config.json file. activityType needs to be set to an integer with the following options.

Starting the application

node index.js

Starting the application using Docker

# Build the image
docker build --tag discordbot .

# Run the image
docker run -d discordbot

Deploying commands

Before you can use the bots slash command you first need to add them to your Discord server. You can use the !deploy command to do so.

After deploying the commands you should be able to see and access them by typing a slash:

Docker

A mutliarch docker image for amd64 and arm64 based on the main branch is available from Github Container Registry:

docker pull ghcr.io/TannerGabriel/discord-bot:latest

A Github Action automatically builds and push amd64 and arm64 to ghcr.io, all builds are based on the main branch.

Only :latest tag is supported, otherwise use SHA256 from https://github.com/TannerGabriel/discord-bot/pkgs/container/discord-bot for pinning to a specific commit.

Features & Commands

Note: The repository now uses the new Discord slash commands

Play

▶️ Play music from YouTube via url or search by song name, added to the bottom of the queue.

/play YOUTUBE_URL
/play SONG_NAME

▶️ Play music via url or using song name, this places it next at the top of the queue (position 1).

/playtop YOUTUBE_URL
/playtop SONG_NAME

Pause

⏸️ Pause music

/pause

Resume

▶️ Resume playing paused music

/resume

Now Playing

🎶 Display current playing song

/nowplaying

Queue

🗒️ Display the current queue

/queue

Shuffle

🔀 Shuffle the current queue

/shuffle

Loop

🔁 Loop/Repeat controls. Off, Track and Queue

/loop MODE

Skip

⏭️ Skip the current playing song and play the next in queue

/skip

Remove

⏏ Remove song from the queue

/remove POSITION

Move

↕ Move song position. This shifts all other songs up or down one, depending on direction you move the target song.

/move TRACK_POSITION TARGET_POSITION

Swap

↔️ Swap two songs current positions with each other

/swap POSITION_1 POSITION_2

Stop

🔇 Stop playing (disconnects bot from voice channel)

/stop

Volume

🔊 Adjust the music bot volume between 0-200

/volume NUMBER

Help

❓ Display commands

/help

Userinfo

  • Get information about a user (/userinfo USER)

Ban

  • Ban a player (/ban USER)

Purge

  • Delete the latest chat messages (/purge NUM_OF_MESSAGES)

Common errors

Here is a list of common errors and how you can fix them.

Dependencies aren't up to date

The packages used in this repository get updated often, especially the ytdl-core package. That is why it is always worth a try updating those if you get an error like invalid URL: undefined or when the bot crashes when running the play command.

npm install ytdl-core@latest

FFMPEG is not installed on the machine running the bot

The play command requires FFMPEG to be installed on the machine that is running the bot. You can download it on the official FFMPEG website. Note: This isn't relevant if you use the Dockerfile because it will install FFMPEG inside of the container.

Contributing

You are welcome to contribute by submitting a Pull Request to the repository.

Author

Gabriel Tanner

Support me

Buy Me A Coffee

License

This project is licensed under the MIT License - see the LICENSE.md file for details

discord-bot's People

Contributors

asdfugil avatar bygrilinho avatar dependabot[bot] avatar frealmyr avatar hackmeany avatar letusflow avatar loganheasman200 avatar paperback avatar protogendelta avatar renovate-bot avatar samdammers avatar smclean117 avatar tannergabriel avatar youwereout avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

discord-bot's Issues

Error while running the bot on repl.it

 npm start
npm ERR! missing script: start

npm ERR! A complete log of this run can be found in:
npm ERR! /home/runner/.npm/_logs/2020-08-14T14_15_39_856Z-debug.log
exit status 1
 ^C

Issues with queue?

The bot stops playing music after a few songs, but continues adding to queue.

Bug can be recreated by playing multiple songs and skipping through them until the music stops play. Typically the music stops on it’s own, but skipping speeds up the process. If you use the !play function again it says it adds the song to the queue, but doesn’t play anything afterwards.

error "queue not defined"

Describe the bug
I get an error at the code, that queue is not defined

To Reproduce
Steps to reproduce the behavior:
I just copied the code and the error was there

Expected behavior
The shouldn't be any errors

Screenshots (optional)
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 10
  • CPU I dont know what that means but its new and modern

Dependency versions:

  • Nodejs version: [e.g. newest]
  • YTDL-core version: [e.g. newest]

Additional context (optional)
no one reported this problem, Im using glitch as coding and hosting software

Checklist:

  • I included all information required in the sections above
  • I made sure there are no duplicates of this report (Use Search)

Error: FFMPEG not found

Describe the bug
When I use the !play cmd it gives the error Error: FFMPEG not found But I did install the FFMPEG package.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A I expected the bot to play the song

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [windows]
  • Browser [firefox]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Error with play command

Describe the bug
When I try to play a song using the bot I receive the following error; "Could not find player config"

To Reproduce
Steps to reproduce the behavior:

  1. I cloned the repo
  2. installed the dependencies
  3. added my token to config
  4. and started the app with docker

Expected behavior
I expected the bot to join the voice channel and play music

Screenshots
could not find player config

Copy of the Error from CLI
Error: Could not find player config
at exports.getBasicInfo (/usr/src/app/node_modules/ytdl-core/lib/info.js:59:13)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async Object.exports. [as getBasicInfo] (/usr/src/app/node_modules/ytdl-core/lib/info.js:298:18)
at async exports.getFullInfo (/usr/src/app/node_modules/ytdl-core/lib/info.js:184:14)
at async Function.exports. [as getInfo] (/usr/src/app/node_modules/ytdl-core/lib/info.js:298:18)
at async Object.execute (/usr/src/app/commands/play.js:24:24)

Desktop (please complete the following information):

  • OS: Windows 10

Additional context
I confirmed I have the latest version of ytdl-core installed.

when i write npm install in terminal it gives me a lots of errors

PS C:\Users\Pc\Desktop\BOT1\discord-bot> npm install

@discordjs/[email protected] install C:\Users\Pc\Desktop\BOT1\discord-bot\node_modules@discordjs\opus
node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/discordjs/opus/releases/download/v0.1.0/opus-v0.1.0-node-v83-win32-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for @discordjs/[email protected] and [email protected] (node-v83 ABI, unknown) (falling back to source compile with node-gyp)
gyp ERR! find Python
gyp ERR! find Python Python is not set from command line or npm configuration
gyp ERR! find Python Python is not set from environment variable PYTHON
gyp ERR! find Python checking if "python" can be used
gyp ERR! find Python - "python" is not in PATH or produced an error
gyp ERR! find Python checking if "python2" can be used
gyp ERR! find Python - "python2" is not in PATH or produced an error
gyp ERR! find Python checking if "python3" can be used
gyp ERR! find Python - "python3" is not in PATH or produced an error
gyp ERR! find Python checking if the py launcher can be used to find Python 2
gyp ERR! find Python - "py.exe" is not in PATH or produced an error
gyp ERR! find Python checking if Python is C:\Python27\python.exe
gyp ERR! find Python - "C:\Python27\python.exe" could not be run
gyp ERR! find Python checking if Python is C:\Python37\python.exe
gyp ERR! find Python - "C:\Python37\python.exe" could not be run
gyp ERR! find Python
gyp ERR! find Python **********************************************************
gyp ERR! find Python You need to install the latest version of Python.
gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
gyp ERR! find Python you can try one of the following options:
gyp ERR! find Python - Use the switch --python="C:\Path\To\python.exe"
gyp ERR! find Python (accepted by both node-gyp and npm)
gyp ERR! find Python - Set the environment variable PYTHON
gyp ERR! find Python - Set the npm configuration variable python:
gyp ERR! find Python npm config set python "C:\Path\To\python.exe"
gyp ERR! find Python For more information consult the documentation at:
gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
gyp ERR! find Python **********************************************************
gyp ERR! find Python
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Python installation to use
gyp ERR! stack at PythonFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:307:47)
gyp ERR! stack at PythonFinder.runChecks (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:136:21)
gyp ERR! stack at PythonFinder. (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:225:16)
gyp ERR! stack at PythonFinder.execFileCallback (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:271:16)
gyp ERR! stack at exithandler (child_process.js:310:5)
gyp ERR! stack at ChildProcess.errorhandler (child_process.js:322:5)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:274:12)
gyp ERR! stack at onErrorNT (internal/child_process.js:468:16)
gyp ERR! stack at processTicksAndRejections (internal/process/task_queues.js:84:21)
gyp ERR! System Windows_NT 10.0.18363
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\Users\Pc\Desktop\BOT1\discord-bot\node_modules\@discordjs\opus\prebuild\node-v83-win32-x64\opus.node" "--module_name=opus" "--module_path=C:\Users\Pc\Desktop\BOT1\discord-bot\node_modules\@discordjs\opus\prebuild\node-v83-win32-x64" "--napi_version=6" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v83"
gyp ERR! cwd C:\Users\Pc\Desktop\BOT1\discord-bot\node_modules@discordjs\opus
gyp ERR! node -v v14.4.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\Pc\Desktop\BOT1\discord-bot\node_modules@discordjs\opus\prebuild\node-v83-win32-x64\opus.node --module_name=opus --module_path=C:\Users\Pc\Desktop\BOT1\discord-bot\node_modules@discordjs\opus\prebuild\node-v83-win32-x64 --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
node-pre-gyp ERR! stack at ChildProcess. (C:\Users\Pc\Desktop\BOT1\discord-bot\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:315:20)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1051:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
node-pre-gyp ERR! System Windows_NT 10.0.18363
node-pre-gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\Pc\Desktop\BOT1\discord-bot\node_modules\node-pre-gyp\bin\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\Pc\Desktop\BOT1\discord-bot\node_modules@discordjs\opus
node-pre-gyp ERR! node -v v14.4.0
node-pre-gyp ERR! node-pre-gyp -v v0.14.0
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\Pc\Desktop\BOT1\discord-bot\node_modules@discordjs\opus\prebuild\node-v83-win32-x64\opus.node --module_name=opus --module_path=C:\Users\Pc\Desktop\BOT1\discord-bot\node_modules@discordjs\opus\prebuild\node-v83-win32-x64 --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @discordjs/[email protected] install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @discordjs/[email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Pc\AppData\Roaming\npm-cache_logs\2020-06-25T17_39_22_076Z-debug.log
PS C:\Users\Pc\Desktop\BOT1\discord-bot>

Hi I have. issue with execute

  • OS: macOS 11.5.1/Window 10
  • CPU architecture: x86

TypeError: Cannot read property 'execute' of undefined
at module.exports. (/Users/.../Downloads/discord-bot-master/index.js:45:12)
at module.exports.emit (node:events:394:28)
at MessageCreateAction.handle (/Users/.../Downloads/discord-bot-master/node_modules/discord.js/src/client/actions/MessageCreate.js:31:14)
at Object.module.exports [as MESSAGE_CREATE] (/Users/.../Downloads/discord-bot-master/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (/Users/.../Downloads/discord-bot-master/node_modules/discord.js/src/client/websocket/WebSocketManager.js:384:31)
at WebSocketShard.onPacket (/Users/.../Downloads/discord-bot-master/node_modules/discord.js/src/client/websocket/WebSocketShard.js:444:22)
at WebSocketShard.onMessage (/Users/.../Downloads/discord-bot-master/node_modules/discord.js/src/client/websocket/WebSocketShard.js:301:10)
at WebSocket.onMessage (/Users/.../Downloads/discord-bot-master/node_modules/ws/lib/event-target.js:132:16)
at WebSocket.emit (node:events:394:28)
at Receiver.receiverOnMessage (/Users/.../Downloads/discord-bot-master/node_modules/ws/lib/websocket.js:834:20)

abort controller is not defined

when i try to run index.js i get referenceerror abortcontroller is not defined. running windows 11 22000.168
path D:\discord-bot-master\node_modules\discord.js\src\rest\RequestHandler

DiscordAPIError when deleting message after music queue ends

Describe the bug
When the music queue ends, the bot attempts to delete its messages, however instead triggers the following DiscordAPIError:
DiscordAPIError: Unknown Message at RequestHandler.execute (\node_modules\discord.js\src\rest\RequestHandler.js:170:25) at runMicrotasks (<anonymous>) at processTicksAndRejections (internal/process/task_queues.js:97:5) { name: 'DiscordAPIError', message: 'Unknown Message', method: 'delete', path: '/channels/ID-PLACEHOLDER-HERE/messages/ID-PLACEHOLDER-HERE/reactions', code: 10008, httpStatus: 404 }

To Reproduce
Steps to reproduce the behavior:

  1. Play song using the music functions.
  2. When the song ends, the bot exits the voice channel and states the music queue ended.
  3. Error appears in console, and no messages are deleted.

Expected behavior
No error should be presented, and a message should be deleted.

Desktop (please complete the following information):

  • OS: [e.g. iOS] Windows Server 2016 Standard Edition x64
  • Browser [e.g. chrome, safari] Not applicable
  • Version [e.g. 22] Latest repository copy

Additional context
This appears to be related to the following code in "\include\play.js":
if (!song) { queue.channel.leave(); message.client.queue.delete(message.guild.id); return queue.textChannel.send("🚫 Music queue ended.").catch(console.error); }
My best guess is that the third line of this section of code is causing the Discord API to not understand the output, hence the error. Unfortunately I don't know Discord.js well enough to figure this one out.

invalid url : undefined

Describe the bug
invalid url : undefined

To Reproduce
Steps to reproduce the behavior:

  1. in discord did !play (video of the song)
  2. See error

Expected behavior
A clear and concise description of what you expected to happen.
start to play the song in voice chat

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [windows]

Additional context
i haven't changed any of the code in the area it says
i also have Node, NPM, FFMPEG installed

looping songs

A feature where you do /loop (song) (times) (leave empty for indefinite looping)

Can't read a property correctly.

Describe the bug
This bug happens when you run the code and do a command

Expected behavior
the message that appears is "TypeError: Cannot read property 'execute' of undefined."

Desktop (please complete the following information):

  • Chromebook
  • Google
  • Version [e.g. 22]

play command doesnt work. Says Video Unavailable

Play command isnt working. when I give a link it says Video Unavailable
I havent changed the prefix.

it gives this error ._.

Error: Video unavailable at Object.exports.playError (D:\OTHERS\bot3\node_modules\ytdl-core\lib\util. js:444:12) at exports.getBasicInfo (D:\OTHERS\bot3\node_modules\ytdl-core\lib\info.js:7 7:22) at processTicksAndRejections (internal/process/task_queues.js:97:5) at async Map.getOrSet (D:\OTHERS\bot3\node_modules\ytdl-core\lib\cache.js:24 :19) at async exports.getInfo (D:\OTHERS\bot3\node_modules\ytdl-core\lib\info.js: 215:14) at async Map.getOrSet (D:\OTHERS\bot3\node_modules\ytdl-core\lib\cache.js:24 :19) at async Object.execute (D:\OTHERS\bot3\commands\play.js:24:24)

Please Help.

Play doesn't seem to be working

Describe the bug
the play command doesn't seem to be working for me, while it was working before

To Reproduce
Steps to reproduce the behavior:
Try the play command

Expected behavior
I expected it to play music, like it did before

Screenshots
If applicable, add screenshots to help explain your problem.
image

Desktop (please complete the following information):

  • OS: Windows 10
    Additional context
    The error text:
    TypeError: Cannot read property 'get' of undefined
    at Object.execute (C:\Users\HP\Desktop\Rei\commands\Play.js:11:48)

Discord.js V12 Error

Describe the bug
Error when executing index.js

@localhost:~/discord-bot$ node index.js
/discord-bot/node_modules/discord.js/src/client/Client.js:40
    } catch {
            ^

SyntaxError: Unexpected token {
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:616:28)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/discord-bot/node_modules/discord.js/src/index.js:8:11)

@localhost:~/discord_bot$ npm -v
3.5.2
@localhost:~/discord_bot$ node -v
v8.10.0

Tried it with a older version and it works fine.

Music Bot Issue

[Google Translate]
when I do a command, the bot repeats the same message many times, I would like to see how it can be fixed and send only one message
image

Error : queue is not defined

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:
Just copy and paste the code into your V.S.C

Expected behavior
A clear and concise description of what you expected to happen.
The command should work normally
Screenshots (optional)
If applicable, add screenshots to help explain your problem.
image

Desktop (please complete the following information):

  • OS: Windows 10
  • CPU architecture: x64

Dependency versions:

  • Nodejs version: last version
  • YTDL-core version: last too

Additional context (optional)
FFMPEG installed (full branch)
Checklist:

  • [] I included all information required in the sections above X
  • [] I made sure there are no duplicates of this report (Use Search) there's no but it doesn't answer really

Can't play

Describe the bug
Every time i use the !play command the bot says "No video id found: NAME"
and the console prints this:
Error: No video id found: hello at Object.exports.getVideoID (/discord-bot/node_modules/ytdl-core/lib/url-utils.js:66:11) at Function.exports.<computed> [as getInfo] (/discord-bot/node_modules/ytdl-core/lib/info.js:470:29) at Object.execute (/discord-bot/commands/play.js:24:35) at module.exports.<anonymous> (/discord-bot/index.js:45:12) at module.exports.emit (events.js:314:20) at MessageCreateAction.handle (/discord-bot/node_modules/discord.js/src/client/actions/MessageCreate.js:31:14) at Object.module.exports [as MESSAGE_CREATE] (/discord-bot/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32) at WebSocketManager.handlePacket (/discord-bot/node_modules/discord.js/src/client/websocket/WebSocketManager.js:384:31) at WebSocketShard.onPacket (/discord-bot/node_modules/discord.js/src/client/websocket/WebSocketShard.js:444:22) at WebSocketShard.onMessage (/discord-bot/node_modules/discord.js/src/client/websocket/WebSocketShard.js:301:10)
So i tried to run npm install ytdl-core@latest and it prints:
`+ [email protected]
updated 1 package and audited 94 packages in 2.377s

2 packages are looking for funding
run npm fund for details

found 0 vulnerabilities
`

Expected behavior
Playing a song

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Ubuntu 20.04

Additional context
every other command work

Discord application token is exposed

config.json contains your bot's application token. Anyone can take control of your bot, depending on where it's active. I would suggest changing the token in your developer settings, and hiding it here (perhaps replace it with a placeholder?).

i wan this bot sty in voice channel 24/7

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Cannot read property 'get' of undefined

I keep getting this error when ever I try and run the !play command. I am pretty new to programming and stuff and I just cannot figure this out.

here is the error message in the console:
TypeError: Cannot read property 'get' of undefined
at Object.execute (C:\Users\sketc\Desktop\SATAN BOT\commands\play.js:13:48)
at Client. (C:\Users\sketc\Desktop\SATAN BOT\index.js:73:34)
at Client.emit (events.js:322:22)
at MessageCreateAction.handle (C:\Users\sketc\Desktop\SATAN BOT\node_modules\discord.js\src\client\actions\MessageCreate.js:31:14)
at Object.module.exports [as MESSAGE_CREATE] (C:\Users\sketc\Desktop\SATAN BOT\node_modules\discord.js\src\client\websocket\handlers\MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (C:\Users\sketc\Desktop\SATAN BOT\node_modules\discord.js\src\client\websocket\WebSocketManager.js:386:31)
at WebSocketShard.onPacket (C:\Users\sketc\Desktop\SATAN BOT\node_modules\discord.js\src\client\websocket\WebSocketShard.js:436:22)
at WebSocketShard.onMessage (C:\Users\sketc\Desktop\SATAN BOT\node_modules\discord.js\src\client\websocket\WebSocketShard.js:293:10)
at WebSocket.onMessage (C:\Users\sketc\Desktop\SATAN BOT\node_modules\ws\lib\event-target.js:125:16)
at WebSocket.emit (events.js:310:20)

Bot crashes when I use "!play"

Describe the bug
When i use !play, the bot connect into my channel, and shows a message like he's playing the song but it doesnt.

To Reproduce
Steps to reproduce the behavior:
At the moment u type !play bot stop working.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots

Here are the logs:
image

Here is the code where i found the only one "null" i have:
image

Desktop (please complete the following information):
Stable 57776 (799c885)
Host 0.0.306
Windows 10 64-Bit (10.0.18363)

Dependency Dashboard

This issue provides visibility into Renovate updates and their statuses. Learn more

This repository currently has no open or pending branches.


  • Check this box to trigger a request for Renovate to run again on this repository

Need a update in the code

Hi, recently i tried to host this bot and run it on my server. However, every time when i try to play a song with !play xxxxxx, it will only show the error of not in a voice channel, which i am in 1.
When i look at the code, it seems that discord.js v12.0.1 use "message.member.voice.channel" instead of message.member.voiceChannel in your code. Maybe because of the update of discord.js causing this issue? Maybe some other code also need to be updated?

TypeError [ERR_INVALID_ARG_TYPE]: The "url" argument must be of type string.

I took everything from your website and tried it out, but there is something wrong with the code. When i join vc, the bot joins too, but he dont plays the music how it should.

The error:

TypeError [ERR_INVALID_ARG_TYPE]: The "url" argument must be of type string. Received undefined
at validateString (internal/validators.js:124:11)
at Url.parse (url.js:159:3)
at Object.urlParse [as parse] (url.js:154:13)
at Object.exports.getURLVideoID (C:\Users\gomes\Desktop\DiscordBot\node_modules\ytdl-core\lib\url-utils.js:30:22)
at Object.exports.getVideoID (C:\Users\gomes\Desktop\DiscordBot\node_modules\ytdl-core\lib\url-utils.js:63:20)
at Function.exports. [as getInfo] (C:\Users\gomes\Desktop\DiscordBot\node_modules\ytdl-core\lib\info.js:364:23)
at ytdl (C:\Users\gomes\Desktop\DiscordBot\node_modules\ytdl-core\lib\index.js:19:8)
at play (C:\Users\gomes\Desktop\DiscordBot\main.js:114:13)
at execute (C:\Users\gomes\Desktop\DiscordBot\main.js:74:9)
at processTicksAndRejections (internal/process/task_queues.js:93:5) {
code: 'ERR_INVALID_ARG_TYPE'
}
(node:16248) UnhandledPromiseRejectionWarning: DiscordAPIError: Cannot send an empty message
at RequestHandler.execute (C:\Users\gomes\Desktop\DiscordBot\node_modules\discord.js\src\rest\RequestHandler.js:154:13)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async RequestHandler.push (C:\Users\gomes\Desktop\DiscordBot\node_modules\discord.js\src\rest\RequestHandler.js:39:14)
(Use node --trace-warnings ... to show where the warning was created)
(node:16248) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:16248) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: undefined. Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.

Play function Message Return and Console Log.

Hello,

Everything works as intended, so thank you for that.

To note: my prefix is ( . )
The .play <YT URL video ID> function works perfectly, but I would like to know how to create a message return when needed:
(1) When .play is entered alone or .play <Song title>, I want to return a message to the user stating to enter a valid YT URL in order for the function to work.
(a) Also but not as important, I would like to get rid of the console errors that stem from not entering .play <YT URL video ID> exactly (unhandlePromiseRejectionWarnings).

Thank you for your time!

node index.js command fails to start bot ; results in syntax error (Unexpected token .)

Describe the bug
termial output:

me@macmini:~/discord-bot$ sudo node index.js
/home/me/discord-bot/index.js:63
if (!client.application?.owner) await client.application?.fetch();
^

SyntaxError: Unexpected token .
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)

To Reproduce
Steps to reproduce the behavior:

  1. set up oauth and permissions in discord dev portal
  2. install dependencies
  3. run node index.js in bot folder

Expected behavior
the bot should probably give a message saying it is successfully launched?

Desktop:

  • OS: Linux Mint 20.2
  • CPU architecture: x86

Dependency versions:

  • Nodejs version: 10.19.0
  • YTDL-core version: 4.9.1

Additional context (optional)
I am new to making discord bots, having been forced to create my own due to the DMCA ban youtube enacted on discord music bots. it's running on a toaster 2010 macmini converted to Mint

Checklist:

  • I included all information required in the sections above
  • I made sure there are no duplicates of this report (Use Search)

Plays fine for a minute, then crashes

As in the title, !play works and the song goes on for about a minute before the console spits this error and stops
Error: input stream: Status code: 416
at ClientRequest. (G:\Git\discord-bot\node_modules\miniget\dist\index.js:157:27)
at Object.onceWrapper (events.js:422:26)
at ClientRequest.emit (events.js:315:20)
at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:596:27)
at HTTPParser.parserOnHeadersComplete (_http_common.js:119:17)
at TLSSocket.socketOnData (_http_client.js:469:22)
at TLSSocket.emit (events.js:315:20)
at addChunk (_stream_readable.js:295:12)
at readableAddChunk (_stream_readable.js:271:9)
at TLSSocket.Readable.push (_stream_readable.js:212:10)

Error: Cannot find module

Error: Cannot find module 'C:\Users\DELL\bot'
�[90m at Function.Module._resolveFilename (internal/modules/cjs/loader.js:982:15)�[39m
�[90m at Function.Module._load (internal/modules/cjs/loader.js:864:27)�[39m
�[90m at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)�[39m
�[90m at internal/main/run_main_module.js:18:47�[39m {
code: �[32m'MODULE_NOT_FOUND'�[39m,
requireStack: []
}

cannot read property get of undefined

`const commando = require("discord.js-commando");
class Skip extends commando.Command {
constructor(client) {
super(client, {
name: "skip",
group: "music",
memberName: "skip",
description: "skips the current song",
});
}

async run(message) {
const serverQueue = message.client.queue.get(message.guild.id);
if (!message.member.voice.channel)
return message.channel.send(
"You must be in a voice channel to skip songs"
);
if (!serverQueue) return message.channel.send("There is nothing to skip");
serverQueue.connection.dispatcher.end();
}
}

module.exports = Skip;
`

so I'm adding music functionality to my already existing bot so i'm having it follow the same structure as the other commands. I am getting an error that has to do with the serverQueue variable and am wondering how in your version this doesn't seem to be an issue. The play command follows this structure as well and it works fine but when trying to implement skip for example is when the issues start to come in. Thank you for any assistance.

Invalid permissions flag

In ban.js you’re referring to a permissions flag that doesn’t exist (MANAGE_MEMBERS). For banning, the correct flag would be (BAN_MEMBERS) and for kicking it would be (KICK_MEMBERS).

Unhandled Promise Rejection Warning

How can I fix this?

TypeError [ERR_INVALID_ARG_TYPE]: The "file" argument must be of type string. Received type object
    at validateString (internal/validators.js:112:11)
    at normalizeSpawnArguments (child_process.js:398:3)
    at Object.spawn (child_process.js:534:16)
    at new FfmpegProcess (C:\Users\rehanratnaweera\node_modules\prism-media\src\transcoders\ffmpeg\FfmpegProcess.js:14:33)
    at FfmpegTranscoder.transcode (C:\Users\rehanratnaweera\node_modules\prism-media\src\transcoders\ffmpeg\Ffmpeg.js:34:18)
    at MediaTranscoder.transcode (C:\Users\rehanratnaweera\node_modules\prism-media\src\transcoders\MediaTranscoder.js:27:31)
    at Prism.transcode (C:\Users\rehanratnaweera\node_modules\prism-media\src\Prism.js:13:28)
    at AudioPlayer.playUnknownStream (C:\Users\rehanratnaweera\node_modules\discord.js\src\client\voice\player\AudioPlayer.js:97:35)
    at VoiceConnection.playStream (C:\Users\rehanratnaweera\node_modules\discord.js\src\client\voice\VoiceConnection.js:478:24)
    at Object.play (C:\Users\rehanratnaweera\Desktop\mybot\commands\play.js:78:8) {
  code: 'ERR_INVALID_ARG_TYPE'
}
(node:9000) UnhandledPromiseRejectionWarning: DiscordAPIError: Cannot send an empty message
    at C:\Users\rehanratnaweera\node_modules\discord.js\src\client\rest\RequestHandlers\Sequential.js:85:15
    at C:\Users\rehanratnaweera\node_modules\snekfetch\src\index.js:215:21
    at processTicksAndRejections (internal/process/task_queues.js:94:5)
(node:9000) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:9000) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

INVALID_TOKEN error

Describe the bug
A clear and concise description of what the bug is.
Its giving a "INVALID_TOKEN" error

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'CMD prompt, (i installed dependencies), do "node index.js", let it run, (YES i did put a valid token, i even regenerated it twice.)'
  2. See error

Expected behavior
A clear and concise description of what you expected to happen.
Start the bot

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [.Windows]
  • Browser [Opera GX]

Additional context
ive checked it over multiple times i even wrote it down it IS the right token

Finding songs

I would like the ability to search for songs by name or artist or both.
songs

It saying that the bot's token is invalid even tho i took it from discord portal

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Music ended!

When i play a music "!play iXp9xuNi0mU" the bot connect and directly disconnect,
and say "Music ended!"
help

Cmds not working

Describe the bug
An issue with running play cmd

To Reproduce
Steps to reproduce the behavior:

  1. Go to my discord and try bot when i try to play i get error
  2. See error

Expected behavior
A music bot

Desktop (please complete the following information):

  • OS: windows

Additional context
My errors i tried 2 times:
Ready! (node:25868) UnhandledPromiseRejectionWarning: Error: No video id found: play at Object.exports.getURLVideoID (C:\Users\Owner\Desktop\my-bot\node_modules\ytdl-core\lib\util.js:274:11) at Object.exports.getVideoID (C:\Users\Owner\Desktop\my-bot\node_modules\ytdl-core\lib\util.js:298:20) at Function.exports.<computed> [as getInfo] (C:\Users\Owner\Desktop\my-bot\node_modules\ytdl-core\lib\info.js:309:19) at executemusic (C:\Users\Owner\Desktop\my-bot\index.js:142:31) at Client.<anonymous> (C:\Users\Owner\Desktop\my-bot\index.js:114:5) at Client.emit (events.js:323:22) at MessageCreateAction.handle (C:\Users\Owner\Desktop\my-bot\node_modules\discord.js\src\client\actions\MessageCreate.js:31:14) at Object.module.exports [as MESSAGE_CREATE] (C:\Users\Owner\Desktop\my-bot\node_modules\discord.js\src\client\websocket\handlers\MESSAGE_CREATE.js:4:32) at WebSocketManager.handlePacket (C:\Users\Owner\Desktop\my-bot\node_modules\discord.js\src\client\websocket\WebSocketManager.js:386:31) at WebSocketShard.onPacket (C:\Users\Owner\Desktop\my-bot\node_modules\discord.js\src\client\websocket\WebSocketShard.js:436:22) (node:25868) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2) (node:25868) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. (node:25868) UnhandledPromiseRejectionWarning: Error: No video id found: play at Object.exports.getURLVideoID (C:\Users\Owner\Desktop\my-bot\node_modules\ytdl-core\lib\util.js:274:11) at Object.exports.getVideoID (C:\Users\Owner\Desktop\my-bot\node_modules\ytdl-core\lib\util.js:298:20) at Function.exports.<computed> [as getInfo] (C:\Users\Owner\Desktop\my-bot\node_modules\ytdl-core\lib\info.js:309:19) at executemusic (C:\Users\Owner\Desktop\my-bot\index.js:142:31) at Client.<anonymous> (C:\Users\Owner\Desktop\my-bot\index.js:114:5) at Client.emit (events.js:323:22) at MessageCreateAction.handle (C:\Users\Owner\Desktop\my-bot\node_modules\discord.js\src\client\actions\MessageCreate.js:31:14) at Object.module.exports [as MESSAGE_CREATE] (C:\Users\Owner\Desktop\my-bot\node_modules\discord.js\src\client\websocket\handlers\MESSAGE_CREATE.js:4:32) at WebSocketManager.handlePacket (C:\Users\Owner\Desktop\my-bot\node_modules\discord.js\src\client\websocket\WebSocketManager.js:386:31) at WebSocketShard.onPacket (C:\Users\Owner\Desktop\my-bot\node_modules\discord.js\src\client\websocket\WebSocketShard.js:436:22) (node:25868) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag--unhandled-rejections=strict(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4) (node:25868) UnhandledPromiseRejectionWarning: Error: No video id found: play at Object.exports.getURLVideoID (C:\Users\Owner\Desktop\my-bot\node_modules\ytdl-core\lib\util.js:274:11) at Object.exports.getVideoID (C:\Users\Owner\Desktop\my-bot\node_modules\ytdl-core\lib\util.js:298:20) at Function.exports.<computed> [as getInfo] (C:\Users\Owner\Desktop\my-bot\node_modules\ytdl-core\lib\info.js:309:19) at executemusic (C:\Users\Owner\Desktop\my-bot\index.js:142:31) at Client.<anonymous> (C:\Users\Owner\Desktop\my-bot\index.js:114:5) at Client.emit (events.js:323:22) at MessageCreateAction.handle (C:\Users\Owner\Desktop\my-bot\node_modules\discord.js\src\client\actions\MessageCreate.js:31:14) at Object.module.exports [as MESSAGE_CREATE] (C:\Users\Owner\Desktop\my-bot\node_modules\discord.js\src\client\websocket\handlers\MESSAGE_CREATE.js:4:32) at WebSocketManager.handlePacket (C:\Users\Owner\Desktop\my-bot\node_modules\discord.js\src\client\websocket\WebSocketManager.js:386:31) at WebSocketShard.onPacket (C:\Users\Owner\Desktop\my-bot\node_modules\discord.js\src\client\websocket\WebSocketShard.js:436:22) (node:25868) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag--unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 6)

code:
const Discord = require('discord.js'); const { prefix, token, } = require('./config.json'); const ytdl = require('ytdl-core'); const { Client, MessageAttachment } = require('discord.js'); const client = new Client(); at top and
`const queue = new Map();

client.once("ready", () => {
console.log("Ready!");
});

client.once("reconnecting", () => {
console.log("Reconnecting!");
});

client.once("disconnect", () => {
console.log("Disconnect!");
});

client.on("message", async message => {
if (message.author.bot) return;
if (!message.content.startsWith(prefix)) return;

const serverQueue = queue.get(message.guild.id);

if (message.content.startsWith(${prefix}play)) {
executemusic(message, serverQueue);
return;
} else if (message.content.startsWith(${prefix}skip)) {
skip(message, serverQueue);
return;
} else if (message.content.startsWith(${prefix}stop)) {
stop(message, serverQueue);
return;
} else {
message.channel.send("You need to enter a valid command!");
}
});

async function executemusic(message, serverQueue) {
const args = message.content.split(" ");

const voiceChannel = message.member.voice.channel;
if (!voiceChannel)
return message.channel.send(
"You need to be in a voice channel to play music!"
);
const permissions = voiceChannel.permissionsFor(message.client.user);
if (!permissions.has("CONNECT") || !permissions.has("SPEAK")) {
return message.channel.send(
"I need the permissions to join and speak in your voice channel!"
);
}

const songInfo = await ytdl.getInfo(args[1]);
const song = {
title: songInfo.title,
url: songInfo.video_url
};

if (!serverQueue) {
const queueContruct = {
textChannel: message.channel,
voiceChannel: voiceChannel,
connection: null,
songs: [],
volume: 5,
playing: true
};

queue.set(message.guild.id, queueContruct);

queueContruct.songs.push(song);

try {
  var connection = await voiceChannel.join();
  queueContruct.connection = connection;
  play(message.guild, queueContruct.songs[0]);
} catch (err) {
  console.log(err);
  queue.delete(message.guild.id);
  return message.channel.send(err);
}

} else {
serverQueue.songs.push(song);
return message.channel.send(${song.title} has been added to the queue!);
}
}

function skip(message, serverQueue) {
if (!message.member.voice.channel)
return message.channel.send(
"You have to be in a voice channel to stop the music!"
);
if (!serverQueue)
return message.channel.send("There is no song that I could skip!");
serverQueue.connection.dispatcher.end();
}

function stop(message, serverQueue) {
if (!message.member.voice.channel)
return message.channel.send(
"You have to be in a voice channel to stop the music!"
);
serverQueue.songs = [];
serverQueue.connection.dispatcher.end();
}

function play(guild, song) {
const serverQueue = queue.get(guild.id);
if (!song) {
serverQueue.voiceChannel.leave();
queue.delete(guild.id);
return;
}

const dispatcher = serverQueue.connection
.play(ytdl(song.url))
.on("finish", () => {
serverQueue.songs.shift();
play(guild, serverQueue.songs[0]);
})
.on("error", error => console.error(error));
dispatcher.setVolumeLogarithmic(serverQueue.volume / 5);
serverQueue.textChannel.send(Start playing: **${song.title}**);
}` for music bot i am running my own cmds to it and thats the other code that i didnt put

!play, !volumen, and search improvements for the bot

[100% Google Translate]:
Hi Tanner, a while ago I had made a fork of your bot and I started to improve it to use in the mini-community in which I am in discord, I went modifying the module of! Play, now you can play playlists and search for music, for that I make use of an additional module, "simple-youtube-api", although reviewing ytdl documentation well, I think it can be implemented with this one to not require the other one,
I also added a simple module to manage the volume, you can check everything from these links, I do not do PR because it has several changes that can break your original repo, and thanks for everything!
Here is a small demo of the commands:
link to : !play module

image

link to : !volumen module

image

What FFmpeg do I install and setup?

I downloaded the version already set on this link, I don't think it's working though... Any idea how?

This is my error when i try to play music:

``info.title` will be removed in a near future release, use `info.videoDetails.title` instead.
`info.video_url` will be removed in a near future release, use `info.videoDetails.video_url` instead.
Error: FFmpeg/avconv not found!
    at Function.getInfo (C:\Users\logan\Documents\GitHub\discord-bot\node_modules\prism-media\src\core\FFmpeg.js:130:11)
    at Function.create (C:\Users\logan\Documents\GitHub\discord-bot\node_modules\prism-media\src\core\FFmpeg.js:143:38)
    at new FFmpeg (C:\Users\logan\Documents\GitHub\discord-bot\node_modules\prism-media\src\core\FFmpeg.js:44:27)
    at AudioPlayer.playUnknown (C:\Users\logan\Documents\GitHub\discord-bot\node_modules\discord.js\src\client\voice\player\BasePlayer.js:47:20)
    at VoiceConnection.play (C:\Users\logan\Documents\GitHub\discord-bot\node_modules\discord.js\src\client\voice\util\PlayInterface.js:71:28)
    at Object.play (C:\Users\logan\Documents\GitHub\discord-bot\commands\play.js:77:8)
    at Object.execute (C:\Users\logan\Documents\GitHub\discord-bot\commands\play.js:47:16)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:7344) UnhandledPromiseRejectionWarning: DiscordAPIError: Cannot send an empty message
    at RequestHandler.execute (C:\Users\logan\Documents\GitHub\discord-bot\node_modules\discord.js\src\rest\RequestHandler.js:170:25)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:7344) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:7344) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.`

Help appreciated thanks!

future coding request

upon playing a song i get theses errors. can you point me in the direction of the files which these lines are located so that i can change it please?

info.title will be removed in a near future release, use info.videoDetails.title instead.
info.video_url will be removed in a near future release, use info.videoDetails.video_url instead.

Stage channel

image

can you make it so that the bot can connect to the stage channels?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.