Code Monkey home page Code Monkey logo

master-bot's Issues

cannot read property

Structures.extend('Guild', Guild => {
^

TypeError: Cannot read property 'extend' of undefined

Cannot read property Hits

TypeError: Cannot read property 'hits' of undefined
at LyricsCommand.run (C:\Users\Nicholas Lee\Downloads\Master-Bot-master\commands\music\lyrics.js:56:38)
at runMicrotasks ()
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async CommandoMessage.run (C:\Users\Nicholas Lee\Downloads\Master-Bot-master\node_modules\discord.js-commando\src\extensions\message.js:235:20)
at async CommandDispatcher.handleMessage (C:\Users\Nicholas Lee\Downloads\Master-Bot-master\node_modules\discord.js-commando\src\dispatcher.js:143:19)

Hi, if you can help me with that, i will feel appreciated

Users should know about volume being changed

I don't know how to do pull requests so sorry for that :D

./commands/music/volume.js >

from:

message.guild.musicData.volume = volume;
    message.guild.musicData.songDispatcher.setVolume(volume);

to:

message.guild.musicData.volume = volume;
    message.guild.musicData.songDispatcher.setVolume(volume);
	message.say(`Current volume is: ${wantedVolume}%`);

TypeError: Cannot read property 'username' of undefined

I have no idea why I miss this error, could you help me?
Error:
(node:8031) DeprecationWarning: Collection#filterArray: use Collection#filter instead
Running command music:play.
TypeError: Cannot read property 'username' of undefined
at owners.map (/root/discord-bots/d4rkn3ss/node_modules/discord.js-commando/src/commands/message.js:239:48)
at Array.map ()
at CommandMessage.run (/root/discord-bots/d4rkn3ss/node_modules/discord.js-commando/src/commands/message.js:237:37)
at process._tickCallback (internal/process/next_tick.js:68:7)

Embed Help Command

Hi, can you help me to make help command that send embed in channel and not dm the user.

Thats it only...

fields.flat is not a function

I don't know why I get this error, I cloned it using glitch and when I do !play, it says "fields.flat is not a function." If you could help me, thank you.

Cannot read property 'leave' of undefined

TypeError: connection.play is not a function
at queue.(anonymous function).voiceChannel.join.then.connection

(C:\Users\Roman\Desktop\INPGT-BOT\commands\music\play.js:241:10)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:13548) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'leave' of undefined
at queue.(anonymous function).voiceChannel.join.then.catch.e

(C:\Users\Roman\Desktop\INPGT-BOT\commands\music\play.js:273:27)
at process._tickCallback (internal/process/next_tick.js:68:7)

(node:13548) 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: 1)

(node:13548) [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.

Hi how can i change the messages

Hi greetings. i'm using your bot at my discord server but i have to translate to Turkish
I translated commands but i can't edit help command. For example when i write //help bot says "Sent you a DM with information." but i want to change it. I can not find it at files can you help me? (:

Error

PS E:\Elite Online\elite bot\Community Bots\Master-Bot-master> node .
internal/modules/cjs/loader.js:1181
    throw err;
    ^

SyntaxError: E:\Elite Online\elite bot\Community Bots\Master-Bot-master\config.json: Unexpected token / in JSON at position 21
    at parse (<anonymous>)
    at Object.Module._extensions..json (internal/modules/cjs/loader.js:1178:22)
    at Module.load (internal/modules/cjs/loader.js:993:32)
    at Function.Module._load (internal/modules/cjs/loader.js:892:14)
    at Module.require (internal/modules/cjs/loader.js:1033:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (E:\Elite Online\elite bot\Community Bots\Master-Bot-master\index.js:4:27)
    at Module._compile (internal/modules/cjs/loader.js:1144:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1164:10)
    at Module.load (internal/modules/cjs/loader.js:993:32)
PS E:\Elite Online\elite bot\Community Bots\Master-Bot-master>

Music Trivia only plays one song

When starting a music trivia the bot only plays one song, after it either hitting the 30 second timeout or the correct answer is given the bot doesn't play a second song.

I've tried running !end-trivia but this also does nothing. Running !music-trivia again just says one is already running.

TypeError: Cannot read property 'channel' of undefined

when i do the command [p]play url it says in the channel on discord: @user, An error occurred while running the command: TypeError: Cannot read property 'channel' of undefined
You shouldn't ever receive an error like this.
Please contact user
In the txt edition im using it says: (node:22516) DeprecationWarning: Collection#filterArray: use Collection#filter instead

Please note i switch my username for user above

Add spotify.

Hey, Add spotify and also can i get your discord name with tag, I want to ask something important

How do I translate everything?

Hello there. I don't really like opening "issues" for just questions but since it's almost the only way to discuss, here I am.
First of all, your bot is awesome with all these features and stuff(translate option and news especially), so thank you very much for that. Would be happy to donate you some amount of money but I don't have much.
So basically how do I translate the bot completely? As I understand, I need to translate ./commands and discord.js-commando. Is there anything more I need to know? Thanks.

Before opening "Cannot read property 'xyz' of undefined" or any issue

Many users copy commands from this bot to their existing bots and get the classic "Cannot read property 'xyz of undefined" or something else is undefined. This happens because this bot uses the master branch of discord.js which has new voice changes . Before opening an issue about the said error please try these 2 solutions:

  1. Do not open an issue if you simply "copied" code over from this repository to your bot/existing bot. This is absolutely not recommended and will not work as expected. If you did so, the next steps won't assist you.

  2. Did you install discord.js-commando and discord.js#master correctly? When running npm view discord.js version you should get 12.5.1, and you should get 0.12.2 from running npm view discord.js-commando version.

  3. Go to your dependencies section in your package.json, you should see discord.js and discord.js-commando listed like this:
    "discord.js": "github:discordjs/discord.js#stable",
    "discord.js-commando": "github:discordjs/Commando"
    If there are numbers instead of "github....", replace them with the "github" versions and hit npm install.

  4. Make sure you have installed python 2.7 correctly.

TypeError: Cannot read property 'client' of undefined

When I try the play command, always after I say the name of the song it says in chat that something went wrong with the search of said song and then when I look in the console it says
"TypeError: Cannot read property 'client' of undefined
at new MessageEmbed
\node_modules\discord.js\src\structures\MessageEmbed.js:10:60)
at PlayCommand.run
\commands\music\play.js:144:21)
at processTicksAndRejections (internal/process/task_queues.js:85:5)
at async CommandMessage.run
\node_modules\discord.js-commando\src\commands\message.js:212:19)
at async CommandDispatcher.handleMessage
\node_modules\discord.js-commando\src\dispatcher.js:127:19)
events.js:194"
Btw I took out where it says my name as a user like C:\Users\NAME\Docs\NAME.OF.FOLDER\ANOTHER.NAME

Command issues

The bot won't play songs that have been added to the queue, instead, it plays the first song and stops. And if you use the %play again it just adds it to the queue unless you restart the bot.

UnhandledPromiseRejectionWarning [TOKEN_INVALID]

Added config.json and changed user id in index.js
when compiling this is the error i get.
i have all the correct dependencies installed and didnt even change anything


(node:23408) UnhandledPromiseRejectionWarning: Error [TOKEN_INVALID]: An invalid token was provided.
at WebSocketManager.connect (D:\eoic-bot\Master-Bot\node_modules\discord.js\src\client\websocket\WebSocketManager.js:132:26)
at CommandoClient.login (D:\eoic-bot\Master-Bot\node_modules\discord.js\src\client\Client.js:210:21)
(node:23408) 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: 1)
(node:23408) [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.

TypeError: fields.flat is not a function

Im hosting my bot in glitch.com
Its working before idk why i get this error

Ready!8:26 PM

Oops! Error: 400 Bad Request8:26 PM

/rbd/pnpm-volume/2fe8ac4a-1d04-4487-bf4a-df3ec67ce89f/node_modules/discord.js/src/structures/MessageEmbed.js:4338:26 PM

.flat(2)8:26 PM

^8:26 PM

8:26 PM

TypeError: fields.flat is not a function8:26 PM

at Function.normalizeFields (/rbd/pnpm-volume/2fe8ac4a-1d04-4487-bf4a-df3ec67ce89f/node_modules/discord.js/src/structures/MessageEmbed.js:433:8)8:26 PM

at MessageEmbed.setup (/rbd/pnpm-volume/2fe8ac4a-1d04-4487-bf4a-df3ec67ce89f/node_modules/discord.js/src/structures/MessageEmbed.js:68:50)8:26 PM

at new MessageEmbed (/rbd/pnpm-volume/2fe8ac4a-1d04-4487-bf4a-df3ec67ce89f/node_modules/discord.js/src/structures/MessageEmbed.js:11:10)8:26 PM

at embeds.map.e (/rbd/pnpm-volume/2fe8ac4a-1d04-4487-bf4a-df3ec67ce89f/node_modules/discord.js/src/structures/Message.js:101:48)8:26 PM

at Array.map ()8:26 PM

at CommandoMessage._patch (/rbd/pnpm-volume/2fe8ac4a-1d04-4487-bf4a-df3ec67ce89f/node_modules/discord.js/src/structures/Message.js:101:39)8:26 PM

at new Message (/rbd/pnpm-volume/2fe8ac4a-1d04-4487-bf4a-df3ec67ce89f/node_modules/discord.js/src/structures/Message.js:43:20)8:26 PM

at new CommandoMessage (/rbd/pnpm-volume/2fe8ac4a-1d04-4487-bf4a-df3ec67ce89f/node_modules/discord.js-commando/src/extensions/message.js:14:4)8:26 PM

at MessageManager.add (/rbd/pnpm-volume/2fe8ac4a-1d04-4487-bf4a-df3ec67ce89f/node_modules/discord.js/src/managers/BaseManager.js:49:32)8:26 PM

at MessageManager.add (/rbd/pnpm-volume/2fe8ac4a-1d04-4487-bf4a-df3ec67ce89f/node_modules/discord.js/src/managers/MessageManager.js:29:18)

Feature Requests

Hey,

It'd be great to have the following features added to the music-trivia if at all possible:

  • When a song isn't guessed correctly it says the artist and song name in chat.
  • Show a leader-board of the top 5 people from the quiz instead of just the winner.
  • After starting a trivia I'd like it to play a preset sound file to give a countdown (i can get the file)

Many thanks

Where?

Where the config.json ?

cannot read property

PS C:\Users\Avyaan\Desktop\Discord Bot> node .
C:\Users\Avyaan\Desktop\Discord Bot\index.js:6
Structures.extend('Guild', Guild => {
^

TypeError: Cannot read property 'extend' of undefined
at Object. (C:\Users\Avyaan\Desktop\Discord Bot\index.js:6:12)
?[90m at Module._compile (internal/modules/cjs/loader.js:959:30)?[39m
?[90m at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)?[39m
?[90m at Module.load (internal/modules/cjs/loader.js:815:32)?[39m
?[90m at Function.Module._load (internal/modules/cjs/loader.js:727:14)?[39m
?[90m at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)?[39m
?[90m at internal/main/run_main_module.js:17:11?[39m
PS C:\Users\Avyaan\Desktop\Discord Bot> npm view discord.js version
11.5.1
PS C:\Users\Avyaan\Desktop\Discord Bot> npm view discord.js-commando version
0.10.0
PS C:\Users\Avyaan\Desktop\Discord Bot>

Cannot read property 'extend' of undefined

C:\botBounceGaming\Master-Bot\index.js:6
Structures.extend('Guild', Guild => {
^

TypeError: Cannot read property 'extend' of undefined
at Object. (C:\botBounceGaming\Master-Bot\index.js:6:12)
�[90m at Module._compile (internal/modules/cjs/loader.js:956:30)�[39m
�[90m at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)�[39m
�[90m at Module.load (internal/modules/cjs/loader.js:812:32)�[39m
�[90m at Function.Module._load (internal/modules/cjs/loader.js:724:14)�[39m
�[90m at Function.Module.runMain (internal/modules/cjs/loader.js:1025:10)�[39m
�[90m at internal/main/run_main_module.js:17:11�[39m

song playing error

Whenever I try to play a song, I get this error,
TypeError: fields.flat is not a function
I only get this error after responding with the song query.
I am hosting my bot on glitch
Screenshot 2020-04-30 at 12 55 09 PM

Command Request

Could you maybe add a mute and unmute command? Would be very useful.

Cannot read property 'extend'.

module.exports = Structures.extend('Message', Message => {
TypeError: Cannot read property 'extend' of undefined
at Object. (/home/container/node_modules/discord.js-commando/src/extensions/message.js:7:29)
at Module._compile (internal/modules/cjs/loader.js:816:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10)
at Module.load (internal/modules/cjs/loader.js:685:32)
at Function.Module._load (internal/modules/cjs/loader.js:620:12)
at Module.require (internal/modules/cjs/loader.js:723:19)
at require (internal/modules/cjs/helpers.js:14:16)
at Object. (/home/container/node_modules/discord.js-commando/src/registry.js:5:25)
at Module._compile (internal/modules/cjs/loader.js:816:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10)

2 errors

Structures.extend('Guild', Guild => {
^
and,

TypeError: Cannot read property 'extend' of undefined
at Object. (/app/index.js:6:12)

Feature: Playlist :D

Hi, Your code helps me out a lot.

I would love to see the playlist feature write by you.

I did the url.match for the playlist but it didn't work. If you have free time please help me out, if not it's totally fine :)

Many thanks,

ECONNRESET error when trying to play certain youtube videos

I'm getting this error when trying to play some songs :

Error: read ECONNRESET
    at TLSWrap.onStreamRead (internal/stream_base_commons.js:201:27) {
  errno: 'ECONNRESET',
  code: 'ECONNRESET',
  syscall: 'read'
}

How to reproduce

I'm getting the error when trying this command:

!play https://www.youtube.com/watch?v=Y5tjtUFL0j4

Environment informations

$ node -v
v12.14.0
$ npm -v
6.14.4
$ python2.7 --version
Python 2.7.16
$ ffmpeg -version                                                                                                                                                                               
ffmpeg version 4.1.4-1~deb10u1 Copyright (c) 2000-2019 the FFmpeg developers

A strange issue popped up

Hello, first of all, thank you for creating this amazing bot.
I followed your guide based on this link.
And It seems that after running node index.json, it returns an error of:

internal/modules/cjs/loader.js:1195
    throw err;
    ^

SyntaxError: /home/pi/Master-Bot/config.json: Unexpected token / in JSON at position 20
    at parse (<anonymous>)
    at Object.Module._extensions..json (internal/modules/cjs/loader.js:1192:22)
    at Module.load (internal/modules/cjs/loader.js:1002:32)
    at Function.Module._load (internal/modules/cjs/loader.js:901:14)
    at Module.require (internal/modules/cjs/loader.js:1044:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object.<anonymous> (/home/pi/Master-Bot/index.js:4:27)
    at Module._compile (internal/modules/cjs/loader.js:1158:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
    at Module.load (internal/modules/cjs/loader.js:1002:32)

Message for unknown command

Hello,
I can't find where is defined message "Unknown command. Use !help.....". How I can change it, I want to use another text.

Playing music no works

Hello,
when I use !play (youtube link), bot joins to voice channel but there isn't sound.

Bot have correct permissions on Discord server, so it shouldn't be problem. API keys are also correct.

Large playlists error

I removed the playlist limit however whenever I play a large playlist I get this error:

Error: resource youtube#videoListResponse not found
    at C:\Users\Kuba\Desktop\luv\node_modules\simple-youtube-api\src\Request.js:35:68
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async PlayCommand.run (C:\Users\Kuba\Desktop\luv\commands\music\play.js:58:25)
    at async CommandoMessage.run (C:\Users\Kuba\Desktop\luv\node_modules\discord.js-commando\src\extensions\message.js:235:20)
    at async CommandDispatcher.handleMessage (C:\Users\Kuba\Desktop\luv\node_modules\discord.js-commando\src\dispatcher.js:143:19)

Any help please?

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.