#development
1 messages ยท Page 824 of 1
under it says db is undefined again there is nothing else
like it keeps repeating
I have a question...
(In discord.js)
Is the filter method has been changed to something else or deleted?
@earnest phoenix listen, the error can be ANYWHERE in your code. The full error will show exactly what part of the code the error comes from. If you're sure that there is no full error, then you need to look for it yourself, in ALL your code, not in the code you posted, the error is not there
Did you find the error
๐
ok, finally some more information
this confirms that the error is NOT in the code you showed
please show your OTHER code
i been saying it but no one seen it
thats the only code i have to get server count
THIS IS NOT A SERVER COUNT ERROR
bruh
the error is in your code, it has nothing to do with server count
search for db in ALL of your bot's files
What commands should I charge coins for? You get coins by voting for my bot
What commands do you have
What's your bot about? What does it have?
@quartz kindle tim why are you screaming?
scroll up and you'll understand
lemme see
It's a general purpose bot... It has Image, Joke, and vote commands. I was just working on a bunch of helper code to make admin commands exist.
Admin:
set
Eco:
balance, free
Fun:
advice, chuck, joke, trivia
Images:
giphy, imgur, meme, random
Misc:
help, ping, stats, support
Utility:
vote
@cursive dagger ^^
Eco multipliers?
wrong channdl
No
help
const Discord = require('discord.js')
const prompt = require('../prompt.js')
module.exports.run = async (bot, message, args) => {
let questions = bot.apply.get("Questions")
let final = new Discord.RichEmbed()
.setTitle("New Application")
.setDescription(`New Application from ${message.author.tag} - ${message.author.id} - <@${message.author.id}>`)
questions.forEach(async question => {
let answer = await prompt(message, question)
final.addField(question, answer)
})
bot.channels.get("688889149897572375").send({embed: final})
}
module.exports.help = {
name:"apply"
}```
discord.js
uh
soo im try8ing to make a apply thing
and it just sends every question all at once
it doesnt wait for an answer
and it sends the final thing when i do the command
Trying to set up temp mute command and I keep getting the same error.
case 'mute':
if (!msg.member.hasPermission('BAN_MEMBERS'))
return msg.reply('you do not have permissions to use this command!')
let person = msg.guild.member(msg.mention.user.first() || msg.guild.members.get(args[1]))
if (!person) return msg.reply("Couldn't find that user");
let mainrole = msg.guild.roles.get(role => role.name === "Bot Tester");
let muterole = msg.guild.roles.get(role => role.name === "Muted");
if (!muterole) return msg.reply("Couldn't find the mute role!");
let time = args[2];
if (!time) {
return msg.reply("You didn't soecify a time!");
}
person.removeRole(mainrole.id);
person.addRole(muterole.id);
msg.channel.send(`@${person.user.tag} has now been muted for ${ms(ms(time))}!`);
setTimeout(function(){
person.addRole(mainrole.id);
person.removeRole(muterole.id);
msg.channel.send(`@${person.user.tag} has been unmuted!`)
}, ms(time))
break;```
if you could could you @ me when you respond because I have this server muted and will most likly forget that I put this here
likely*
If only it told you what was wrong and which line ๐
@dapper hill you need to check if the message actually contains mentions otherwise it will error
Thank u guys for the help but it seems it still won't work. Luckily a new error though.
I tried .find
and that doesnt work either
@dapper hill remember
Its not .get, its .some in V12
And the cache
.roles.cache.some
so would it be msg.roles.cache.some?
Yes
ok thank u
Just like the bot tester role

@earnest phoenix U gotta have ' or " at the start and end of ur token
@earnest phoenix line 9 also nice half of your token leaked 
No the other parts contain . and -
Nein. It says that "cache is not defined"
in the original code it said that it was supposed to be msg.guild.roles.find has that changed since 11v?
Yea some parts of the cache changed in v12 due to gateway intents
I would do the role ID again @dapper hill
@earnest phoenix not helpful on what you want
But would the cache this have to do with weather or not I have a role id?
@zenith terrace
cache thing*
@dapper hill Probably not but IDs would be better incase role names ever change
msg.roles is not a thing, messages dont have roles
.some will return true or false if one or more elements pass the condition, not the role itself
uh
Uuggghhh im trynna load up my laptop but its slow af since it was doing an update
would I use .find?
no
so it still says that cache is not a thing. So instead of msg.roles.cache.find what should I do?
messages dont have roles
if (!msg.member.hasPermission('BAN_MEMBERS'))
return msg.reply('you do not have permissions to use this command!')
let person = msg.guild.member(msg.mentions.users.first() || msg.guild.members.get(args[1]))
if (!person) return msg.reply("Couldn't find that user");
let mainrole = msg.roles.cache.find(role => role.id === "579799065676742666");
let muterole = msg.roles.cache.find(role => role.id === "688897222930464804");
if (!muterole) return msg.reply("Couldn't find the mute role!");
let time = args[2];
if (!time) {
return msg.reply("You didn't soecify a time!");
}
person.removeRole(mainrole.id);
person.addRole(muterole.id);
msg.channel.send(`@${person.user.tag} has now been muted for ${ms(ms(time))}!`);
setTimeout(function () {
person.addRole(mainrole.id);
person.removeRole(muterole.id);
msg.channel.send(`@${person.user.tag} has been unmuted!`)
}, ms(time))
break;```
message.guild.roles.cache.find
I must be blind then since I didnt see .find in the V12
So that section of my code is no longer a error
but
it now says that .remove role is not a function
and keep in mind I am watching a guy do a toutrial on this that is using v11
.role.remove if I remember
roles
O
o
roles
ok
ahhh
ok
how do I explain this
sp
so*
it sends the message saying that he is muted (without actully pinging this person) it also doesnt give him the muted role, doesnt remove the role I want it to remove and it says that I dont have the perms do mute him
even tho I do
so
case 'mute':
if (!msg.member.hasPermission('BAN_MEMBERS'))
return msg.reply('you do not have permissions to use this command!')
let person = msg.guild.member(msg.mentions.users.first() || msg.guild.members.get(args[1]))
if (!person) return msg.reply("Couldn't find that user");
let mainrole = msg.guild.roles.cache.find(role => role.id === "579799065676742666");
let muterole = msg.guild.roles.cache.find(role => role.id === "688897222930464804");
if (!muterole) return msg.reply("Couldn't find the mute role!");
let time = args[2];
if (!time) {
return msg.reply("You didn't soecify a time!");
}
person.roles.remove(mainrole.id);
person.roles.remove(muterole.id);
msg.channel.send(`@${person.user.tag} has now been muted for ${ms(ms(time))}!`);
setTimeout(function () {
person.addRole(mainrole.id);
person.roles.remove(muterole.id);
msg.channel.send(`@${person.user.tag} has been unmuted!`)
}, ms(time))
break;```
U did person.user.tag thats why
Try
msg.channel.send(person + `has been muted!`)
Unless that had changed in V12
Lemme look
It takes it from the let person
ยฏ\_(ใ)_/ยฏ

this is me when I realize how many discord bot tutorials are obsolete because of the v12 update
v12 is a major version, its supposed to be breaking
:/
let person = message.mentions.members.first() || ...
if you dont like it, stay with v11
I just started to code my bot and I think I am too deep to just switch back to v11 lol @quartz kindle
I mean my bot isnt "big"
then dont complain lul
You do know there's a complete guide of everything that changed from v11 to v12 right?
but just to many lines for me to justify going threw and changing eveything back
yes I am aware but that has helped 75 % of the time
You did something wrong 25% of the time then
yes
SHUSH
They break the tostring method on a member?
dont think so
`${member} message` would work.
how
how what?
this might sound, confusing but
how will I send a Web request to python code for it to then store in a db
what
if this is what you mean
you have to do a request
store body
then store it in db?
How do I fix fields.flat is not a function in discord.js? I am using discord.js v12.0.2 and node v13.9.0
nvm I solved in by restarting
๐ค
lol
restarting solves 90% of problems
yea ofc
anyone else having issues with running their bot? client.login(token) is taking quite some time for my bot.
nah
how many servers is your bot in?
@wide ridge wdym
35
does anything happen tho?
it just takes very long for it to connect
how long
what are u running it on?
uh
digitalocean
might be a vps problem
client.login(token);
may be your vps, or what language and library (or framework) are you using?
DiscordJS 11.5 and DigitalOcean
ah yes
maybe its the vps slow
im also having issues with logging in the bot in on d.js 11.5.1
850 servers for my bot
on v12 it works fine
is your vps big?
try restarting ur vps?
or simply disconnect the bot for ~10mins
then start it up
helped for me when i had similar issue
restart the vps
im having troubles
i would use visual studio code but i have no idea if it will work on windows 7
It would work just fine, But I'm not sure if what you're asking fits in this channel
@frosty sierra this question would be more suited for #memes-and-media but yes, VS Code should have support for windows 7 if I remember correctly.
A
case 'mute':
if (!msg.member.hasPermission('BAN_MEMBERS'))
return msg.reply('you do not have permissions to use this command!')
let person = msg.guild.member(msg.mentions.users.first() || msg.guild.members.get(args[1]))
if (!person) return msg.reply("Couldn't find that user");
let mainrole = msg.guild.roles.cache.find(role => role.id === "579799065676742666");
let muterole = msg.guild.roles.cache.find(role => role.id === "688897222930464804");
if (!muterole) return msg.reply("Couldn't find the mute role!");
let time = args[2];
if (!time) {
return msg.reply("You didn't soecify a time!");
}
person.roles.remove(mainrole);
person.roles.add(muterole);
msg.channel.send(`${person} has now been muted for ${ms(ms(time))}!`);
setTimeout(function () {
person.roles.add(mainrole);
person.roles.remove(muterole);
msg.channel.send(`${person} has been unmuted!`)
}, ms(time))
break;``` Where in this would I add a unmute command and how would I go about doing this? I have tried to look for good totorials for it but I can't find one that works with my code.
Statuts for node.js?
yes
You mean, set a custom game for your bot?
yes
I'll try, please wait
this error :
TypeError: Cannot read property 'setGame' of null
at Object.<anonymous> (C:\Users\RecuvaPum\Desktop\Discordjs\Test\index.js:109:15)
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)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
at internal/main/run_main_module.js:18:47
PS C:\Users\RecuvaPum\Desktop\Discordjs\Test>
@tight plinth please help
miss
Yes I know
wait, I will take a look
What discord.js version you havr
"discord.js": "^12.0.2",
"dotenv": "^8.2.0"
Maybe 'client.user.setActivity('YouTube', { type: 'WATCHING' }); '
12
Hm
in v12
it would be setPresence
no
error
TypeError: Cannot read property 'setActivity' of null
at Object.<anonymous> (C:\Users\RecuvaPum\Desktop\Discordjs\Test\index.js:108:15)
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)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
at internal/main/run_main_module.js:18:47
PS C:\Users\RecuvaPum\Desktop\Discordjs\Test>
Hm
Bot.user maybe?
when I put the bot so it also writes that it does not exist, I have to say client
client.user.setPresence({ activity: { name: 'RecuvaPum | Developing' }, status: 'idle' })
.then(console.log)
.catch(console.error);
not working
:c
@torn nebula
Hm
No error in log?
Hmm
TypeError: Cannot read property 'setPresence' of null
at Object.<anonymous> (C:\Users\RecuvaPum\Desktop\Discordjs\Test\index.js:108:15)
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)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
at internal/main/run_main_module.js:18:47
PS C:\Users\RecuvaPum\Desktop\Discordjs\Test>
of null
Client.user is not defined for you
it's telling you the error right there, client.user is returning in a null.
How
Is the bot logging in first before it runs the event @radiant parcel?
I'd personally suggest registering the presence on the ready event. to validate that it's logged in and no error will return
oh wait
it works ! but the status game won't show up ..
client.on("ready", () => {
console.log(Jsem online, moje jmรฉno je ${client.user.username});
client.user.setPresence({
status: "online",
activities: {
name: "Developuje mฤ RecuvaPum",
}
});
})
client.user.setPresence({
status: "online",
activities: {
name: "Developuje mฤ RecuvaPum",
}
});
activity*
not what the api doc that I'm looking at says...
Ah.

Well these docs have got it wrong then... 
oh
lmao
not funny?
I don't work with v12 so 
why don't you just refer to the docs directly instead of reading shitty guides
he just misread
It's normal for people to misread @earnest phoenix.
that's what she said
^ agreed read official guides
easier guides if possible
i was referring to the fact that they're using some other third party guide instead of the official docs
use stackflow

stackflow is for help with code issues not docs.
I'll take the ban then.
stack is full of outdated information
yt too
ehm.. what create embed message ? for discord.js (node.js)
I hope one of them is jot u
please refer docs
Shouldn't this go to #memes-and-media now?
@radiant parcel version?
12
messageEmbed
docs
MessageEmbed instead of RichEmbed
depend upon how u set it
ok
duck man why can't people read the docs. it's easy af
thx
np.
actually nah
MessageEmbed*
yeah
not messageEmbed
Capital M not lowercase...
yes
is there any way to set bot to have more game status?
array
btw saying discord.js is enough since it's using node.js
"Something took too long"
I've been getting this error for the past few days. There is no change in my code. My bot shuts down and it takes too long to log in.
full error?
@pale vessel ok.
๐
is better discord.js or discord.py?
up to you
yes only this error "Something took too long"
if you're more proficient at js, then djs it is and so is vice versa
I mean from your point of view
i like js so discord.js
@quartz hill there should be a full error
like with the traceback
2020-03-16T08:32:54.414016+00:00 app[web.1]: Error: Something took too long to do.
2020-03-16T08:32:54.414051+00:00 app[web.1]: at /app/node_modules/discord.js/src/client/ClientManager.js:40:57
2020-03-16T08:32:54.414052+00:00 app[web.1]: at Timeout._onTimeout (/app/node_modules/discord.js/src/client/Client.js:436:7)
2020-03-16T08:32:54.414053+00:00 app[web.1]: at listOnTimeout (internal/timers.js:549:17)
2020-03-16T08:32:54.414054+00:00 app[web.1]: at processTimers (internal/timers.js:492:7)
this full error
h e r o k u
yes
Likewise, I cannot log in from cmd.
I haven't changed the code and this has been happening for the past few days.
how to create join / left message in discord.js version 12
how can I get a video thumbnail using ytdl_core?
@radiant parcel by using the events in discord.js version 12
Should still be guildMemberAdd & guildMemberRemove
@radiant parcel https://discordjs.guide/additional-info/changes-in-v12.html
However you won't be able to use the default channel anymore so you'll need some sort of pre-set from the server admins.
it outputs a paragraph
here u go docs https://github.com/fent/node-ytdl-core/blob/master/README.md
@tight plinth
DELETE IT, It has your API key in it
10:06:07 AM worker.1 | innertube_api_key: 'AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_<filter>',
never heard of innertube
Try outputting info.player_response.videoDetails now see if that outputs the exact videoDetail.
with the player_response?
there you go
then I do .thumbnail
that has the collection of the thumbnails from all the queries
thumbnail: { thumbnails: [ [Object], [Object], [Object], [Object], [Object] ] },```
{
10:27:09 AM worker.1 | thumbnails: [
10:27:09 AM worker.1 | {
10:27:09 AM worker.1 | url: 'https://i.ytimg.com/vi/Xokx96yxEws/hqdefault.jpg?sqp=-oaymwEiCKgBEF5IWvKriqkDFQgBFQAAAAAYASUAAMhCPQCAokN4AQ==&rs=AOn4CLCcaQArTP2cMF2vflyEwrGgXY4c2Q',
10:27:09 AM worker.1 | width: 168,
10:27:09 AM worker.1 | height: 94
10:27:09 AM worker.1 | },
10:27:09 AM worker.1 | {
10:27:09 AM worker.1 | url: 'https://i.ytimg.com/vi/Xokx96yxEws/hqdefault.jpg?sqp=-oaymwEiCMQBEG5IWvKriqkDFQgBFQAAAAAYASUAAMhCPQCAokN4AQ==&rs=AOn4CLCYIb4NZvs572b1WPlIt6os2I9S2g',
10:27:09 AM worker.1 | width: 196,
10:27:09 AM worker.1 | height: 110
10:27:09 AM worker.1 | },
10:27:09 AM worker.1 | {
10:27:09 AM worker.1 | url: 'https://i.ytimg.com/vi/Xokx96yxEws/hqdefault.jpg?sqp=-oaymwEjCPYBEIoBSFryq4qpAxUIARUAAAAAGAElAADIQj0AgKJDeAE=&rs=AOn4CLAAVNbb6T2ZNKSnQGT5kIZlGdDvKQ',
10:27:09 AM worker.1 | width: 246,
10:27:09 AM worker.1 | height: 138
10:27:09 AM worker.1 | },
10:27:09 AM worker.1 | {
10:27:09 AM worker.1 | url: 'https://i.ytimg.com/vi/Xokx96yxEws/hqdefault.jpg?sqp=-oaymwEjCNACELwBSFryq4qpAxUIARUAAAAAGAElAADIQj0AgKJDeAE=&rs=AOn4CLDsbeBO-KqcilX5vh4dWl_mMn6W8g',
10:27:09 AM worker.1 | width: 336,
10:27:09 AM worker.1 | height: 188
10:27:09 AM worker.1 | },
10:27:09 AM worker.1 | {
10:27:09 AM worker.1 | url: 'https://i.ytimg.com/vi/Xokx96yxEws/maxresdefault.jpg',
10:27:09 AM worker.1 | width: 1920,
10:27:09 AM worker.1 | height: 1080
10:27:09 AM worker.1 | }
10:27:09 AM worker.1 | ]
10:27:09 AM worker.1 | }```
and then I have to choose one
yes.
That's your choice, those are the lists songs thumbnails.
thanks for help!
No problem Lumap.
other problem: https://prnt.sc/rh3ivl
how can I transform the 5 in 05
Duration is 3:05
make a leading 0 function
i usually do like this:
let minutes = min < 10 ? "0"+min : min
this is the beggining of my music function to queue songs. Everything works, except if the song is invalid (video.player_respone doesn't exist). if the song is invalid, the scrpit stops at the line 104. How can I handle invalid videos?
line 104 is "artist:"
I tried doing if (!video.player_response) return, but it says that the song has been added to the queue, but it's not
my bot is suposed to play the song after it's being queued, but nothing happens too
it doesnt even connect into the vc
does video exist?
yes
video always exist
the actual error is "can't read propriety videoDetails of udefined"
hmm, are you pushing it to the server queue?
yes
okay hmm, try this:
if (!video.player_response.videoDetails) return;```
// ignore that code, I was blind
it'll say player_response is undefined
shouldnt work
okay uh... if it's not defined then that's something on video...
your bot worked fine before. what did you do now?
bruh
huh? for what?
cannot read propriety videoDetails of undefined line 104 (where I define song artist)
but it says that the song has been added to the queue, but it's not
where did you make the bot say that?
Your for (const video of videos) is returning with the await queueSong, after it does that if the song is added or not the message will be edited.
You need to add {} around the for method and the message edit.
like for (const videos of videos) {code} ?
yes.
I was going to write it out but I'm not a code feeder so I'm letting you figure it out yourself.

what's your current code
https://prnt.sc/rh4v2h the result
LOL
player_response is undefined
yes
console.log video and see what you get
aight so
player_response: {
10:06:07 AM worker.1 | playabilityStatus: {
10:06:07 AM worker.1 | status: 'OK',
10:06:07 AM worker.1 | playableInEmbed: true,
10:06:07 AM worker.1 | liveStreamability: [Object],
10:06:07 AM worker.1 | contextParams: 'Q0FFU0FnZ0M='
10:06:07 AM worker.1 | },
10:06:07 AM worker.1 | streamingData: {
10:06:07 AM worker.1 | expiresInSeconds: '21540',
10:06:07 AM worker.1 | adaptiveFormats: [Array],
10:06:07 AM worker.1 | dashManifestUrl: 'https://manifest.googlevideo.com/api/manifest/dash/expire/1584371166/ei/fkFvXuaPKYuO1wKlm46gDg/ip/144.91.118.171/id/5qap5aO4i9A.0/source/yt_live_broadcast/requiressl/yes/tx/23813230/txs/23813225%2C23813226%2C23813227%2C23813228%2C23813229%2C23813230%2C23813231/as/fmp4_audio_clear%2Cwebm_audio_clear%2Cwebm2_audio_clear%2Cfmp4_sd_hd_clear%2Cwebm2_sd_hd_clear/vprv/1/pacing/0/keepalive/yes/fexp/23842630%2C23882514/itag/0/playlist_type/DVR/sparams/expire%2Cei%2Cip%2Cid%2Csourc
10:06:07 AM worker.1 | > e%2Crequiressl%2Ctx%2Ctxs%2Cas%2Cvprv%2Citag%2Cplaylist_type/sig/ADKhkGMwRAIgbsa-kurIT1YbLJoPvBcQfJlGDUnvUXOOSoXZmh6vQu0CIB4iEZtmThpxBLqmTQ1qWBwYlZUvCi75kt6-jruoJm_e',
10:06:07 AM worker.1 | hlsManifestUrl: 'https://manifest.googlevideo.com/api/manifest/hls_variant/expire/1584371166/ei/fkFvXuaPKYuO1wKlm46gDg/ip/144.91.118.171/id/5qap5aO4i9A.0/source/yt_live_broadcast/requiressl/yes/tx/23813230/txs/23813225%2C23813226%2C23813227%2C23813228%2C23813229%2C23813230%2C23813231/hfr/1/maudio/1/vprv/1/go/1/keepalive/yes/fexp/23842630%2C23882514/dover/11/itag/0/playlist_type/DVR/sparams/expire%2Cei%2Cip%2Cid%2Csource%2Crequiressl%2Ctx%2Ctxs%2Chfr%2Cmaudio%2Cvprv%2Cgo%2Citag%2Cplaylist_t
10:06:07 AM worker.1 | > ype/sig/ADKhkGMwRgIhALEsxe0GZGjTebYy_OnC1wFyZrJjy0cgpo_ohlBf0nq5AiEA0rBmvEp8ILmu-SZAo_ADCnI3_B6ZQaAHilsH1gPw4Fs%3D/file/index.m3u8'
10:06:07 AM worker.1 | },
there's more
I mean
you should be able to access them
2 days i have this error
And some shards does not work
client n*x become ready took to long
Wtf
if (message.content === '$play hot girl bummer') {
if (message.channel.type !== 'text') return;
const voiceChannel = message.member.voice.channel;
if (!voiceChannel) {
return message.reply('please join a voice channel first!');
}
voiceChannel.join().then(connection => {
const stream = ytdl('https://www.youtube.com/watch?v=k-T4Odb-r5c', { filter: 'audioonly' });
const dispatcher = connection.play(stream);
dispatcher.on('end', () => voiceChannel.leave());
});
}
});```
i need to make my bot play music when i put a link in the command
this plays the song that i've already linked
with args
args
2 days i have this error
And some shards does not work
client n*x become ready took to long
Wtf
@lofty hamlet no repost plz
^
oh okay
i tried css
but you dont need to be certified
but i'm not too experimented in css so idk what class or id i should edit
Bot gotta be certified
@zenith terrace that is bot card
.page-wrapper {
background-image : url("");
}
ask then like this: "How to edit bot page with css"
@summer torrent Oh
@uncut rose the class you're looking for is shapes-background shapes-1
not page-wrapper
.shapes-background {
background-image: url("https://miro.medium.com/max/1024/1*9WeJrBj6pp-qnGjRGg2NUw.png);
}
this doesn't works
it's a random img
FeelsQuotationMarkMissing
welp im stuck at url thing
That's what syntax highlight is for
helping you find your code easier and point out mistakes!
i'm triggered
@uncut rose missing "
still don't work
star eval (1 + 1) = 2
maybe it just don't work in preview mode ?
oop
try #bot-details-page
ok cool thx
owo thanks
Is there difference between numpy matrices and arrays in Python?
tldr stop using free hosting
below qt
if you want the best solution for everything, ask cri
he sounds harsh but it's rational
@earnest phoenix how to fix this issue Error: girlfriend is not defined
A reminder: this is #development
Anyone any ideas why this isn't working? it's puzzleing me
js if(![config.ownerID, config.validDevs].includes(msg.author.id)) return msg.react("451795217914396676")
is that legal in js?
if(!config.validDevs.includes(msg.author.id) || !config.ownerID.includes(msg.author.id)) return msg.react("451795217914396676")
that works too
nope
it wouldn't work
if the id is on config.ownerID it would still return
you need &&
so that if one of them is valid, it wouldn't return.
So why wouldn't this work then? js if(![config.ownerID, config.validDevs].includes(msg.author.id)) return msg.react("451795217914396676")
Ah
so this:js if(!config.validDevs.includes(msg.author.id) && !config.ownerID.includes(msg.author.id)) return msg.react("451795217914396676")
Yeah that seems to have worked, thank you for the assistance.
you could do ```js
if(!config.validDevs.concat(config.ownerID).includes(msg.author.id))
or simply ```js
if(![...config.validDevs,config.ownerID].includes(msg.author.id))
I still can't solve my problem with playlists (starting with https://canary.discordapp.com/channels/264445053596991498/272764566411149314/689066231675748353). After further testing, only playlists are affected, even if they dont have any invalid song
cAnary diScOrD
update any packages you have
youtube had a change recently
or if you're using youtube-dl, download a newer version
apparently ytl is not the issue
according to his creator
ytpl hasent been updated since a month
My bot plays fine
or simply ```js
if(![...config.validDevs,config.ownerID].includes(msg.author.id))
@quartz kindle what is the function of ...
it clones the array into the new one
Lavalink keeps crashing on playlists and livestreams, any idea why?
Its also not searching properly
wait for an update, this is a yt issue
update lavalink
gotta wait for an update then ig
rip
lavalink is trash anyways
what should I use lmao
i dont get why people use it over ffmpeg and youtube-dl/any other youtube scraping lib
I heard LL is more performant
I hope you dont mean for playing music ๐
lOL
it is, but its borked
imagine saying lavalink is is performant
...it isn't
ffmpeg is, because it's native code
as borked as my bot
Im not sure how to use ffmpeg
Never played with YT scraping libs, don't know
any wrappers for it? (that aren't terrible)
you don't need a wrapper
never used it lmao ok lemme google
it's quite literally inputting your arguments and specifying where ffmpeg should output it
i use pipes
can you input a file or a link?
yes
-i <url>
but i don't do that since i want to buffer my content and make it seekable
so instead i process the file/link in my code to buffer it and then send the bytes to ffmpeg via pipes
-i pipe:0
so I can download a file temporarly of like the mp4
and play it through discord?
I mean you can do that with opusscript
well, you can't
opusscript is just bindings for opus
the whole point of using ffmpeg is to convert the input audio to a format discord accepts
ok
so I can download a file temporarly of like the mp4
you don't need to directly download the file
do you think rythm uses ffmpeg?
it's going to be a bit harder to migrate to ffmpeg
Its okay, im making a huge update anyway
rythm uses LL
I just migrated to shoublahblah idk the name of it
it uses lavalink though
But Im probably gonna use ffmpeg
its probably faster and less resource heavy?
shoukakou
im literally trying to act smart but ive never used it lmao
what do you use to search?
youtube-search?
yt-search yes
and some weird stuff
const ytsr = (url) => new Promise((resolve, reject) => ytsearch(url, (err, r) => err ? reject(err) : resolve(r)))
really,really weird
the syntax
true lmao
<rejected> { Error: Client network socket disconnected before secure TLS connection was established
at TLSSocket.onConnectEnd (_tls_wrap.js:1095:19)
can anyone help me out here
code? context?
that is usually related to outdated libraries or system
eloguyz
does anyone know how to check if a string is a playlist?
ytpl?
yes
Yeah
cry do you still host your bot though?
Hey, what's wrong?
TypeError: message.guild.channels.find is not a function
discord.js@12.0.2
How do you pipe with ffmpeg (youtube URL to discord)
ytdl core
no
like pure ffmpeg
no ytdl
thats gross
lmao
@tight plinth do you use ffmpeg?
yes
could you guide me in the right direction?
ffmpeg + ytdl-core + sodium + @cosmic surgejs/opus
cry do you still host your bot though?
i killed my bot ageees ago
no
nvm, we ARE in dev
avatarURL is now a function
use it like this : ```js
.avatarURL({format: 'jpg', dynamic: true, size: 2048})
@gritty frost
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sodium@3.0.2 install: `node install.js --install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sodium@3.0.2 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\jnsho\AppData\Roaming\npm-cache\_logs\2020-03-16T15_22_12_828Z-debug.log``` (sorry for the random error)
@gritty frost that comma
Hydrahttps://cdn.discordapp.com/avatars/547905866255433758/6db57ae216790490f53cbd9e2a49d486.png?size=2048
@tight plinth
that error
no show it
erm, yes?
it worked! ๐
I should add author to all my embeds lol
gl with that lmao
@gritty frost n
@earnest phoenix that's actually sad. i was about to add your bot to my server to test but it was private. you seemed very enthusiastic about bot-developing so that was unexpected. at least the patreon is still there.
Depends
I mean I don't like people spamming me asking how X works
because they don't read the error
What is best compiled language for discord bot that have command handler in-built library?
Would making a bot that track discord invite links (scan messages for the link) be too weird?
stop using free hosting
then get some
a vps is like
but 1 is always get error
get a proper vps
i do not have money
ok
do aws connect with github ?
got error
Error: Something took too long to do.
I cant run it from vps and from local machine..
Didn't found real solution in history here.
Who could explain what is going on?
where are you hosting your bot
vps
yes but what provider
how do i make a command without the bot having to tag you?
i try to use aws
im using node.js
discord probably flagged that providers ip too
I can't find a way to add a json styled req.body in my code
app.post("/", (req, res) => {
console.log(req.body)
res.send(req.body)
});
<html>
<body>
<form action="/" method="post">
<div>
<label for="username">Username</label>
<input type="text" id="name" name="username" aria-describedby="username" placeholder="Enter Username">
</div>
<input type="submit" name="submit" value="Login">
</form>
</body>
</html>
app.use(express.json({
inflate: true,
limit: '100kb',
reviver: null,
strict: true,
type: 'application/json',
verify: undefined
}))
@earnest phoenix but i cant run it from my local machine also
then it's your code
mine?
I didn't changed anything for 2 weeks.
And it was working properly.
Right now it just doesn't go to "ready" state
@shy turret you can't send JSON data via a html form raw
so i think =))
you have to use js to make a request
@earnest phoenix do you have any ideas about my issue?
It shouldn't be any provider ip issues , as i can't run it from my machine.
your ip on your local machine might be flagged too
wat
never say that
=)))
there's a low chance that it actually is, but if the issue persits it's your code @native thunder
ok. but what should i do?
how to unflag it?
worked now gotta find a way to get back data
It cant be my code - as code wasnt changed for 2 weeks and worked properly.
It cant be my code - as code wasnt changed for 2 weeks and worked properly.
can't you request for a new ip?
i guess the only thing you can do is contact discord and let them know about your issue
that only works with providers which allow dynamic ips
many don't and make you pay for it instead
cant it be stringified?
Bot started(become online)
client.on("guildDelete", guild => {
but doesn't reach
client.on("ready", () => {
State
wat
wat
it seems that covid-19 is also lowering iq
https://discord.js.org/#/docs/main/stable/class/StreamDispatcher?scrollTo=e-start (theres a start here, wheres the end event?)
what
the event
once a stream is started, it's started and it's... there, it doesn't end unless you terminate the connection
how do I check when the song ends?
what
i mean no one care me
when it starts
see the duration
the previous one ends
well some are livestreams so I guess when duration = 0 then dont end?
@earnest phoenix > it seems that covid-19 is also lowering iq
100% true
yes @mystic violet
How would I make a skip command then? because if it goes on duration im so confused lmao
@cerulean pebble did u try checking console logs?
https://discord.js.org/#/docs/main/stable/class/VoiceBroadcast?scrollTo=e-unsubscribe this might be it @mystic violet
[Support Server](`https://discord.gg/${bot.support}`) how write this correctly
i'm not a hundred percent sure if it actually is, test for it
you're using the wrong quotations @gritty frost
yes
well
pls
@finite bough
@finite bough can wait 9 hours and restart
but what is your
@cerulean pebble any errors?
fucking issue
lmao cry
Could anyone help me with a "Something took too long to do" Websocket connection error?
your ip got flagged; stop using free hosting
@sturdy hamlet error pls
@earnest phoenix you know how to write it correctly
bruh why dont they just have an end event like v11
@cerulean pebble discord is banning heroku and glitch ips, i already told you
@gritty frost ???? what's your issue in the first place
other bot is running
it doesn't mean that they have the same ip
HEROKU AND GLITCH HAVE MORE THAN ONE IP
@cerulean pebble users r irreverent unless u r using any high dbs
I'm literally hosting from my rasperry pi
@earnest phoenix why they ban my ip ? i do notthing wrong
it's not your ip
[Support Server](`https://discord.gg/${bot.support}`)
how write this correctly @earnest phoenix
BUT
@modest maple oke what should i do to restart my enormuos bot
this is the most aids development chat ever
I use paid and known hosting..
It doesnt become "ready"(no logs from it appears)
@native thunder name?
@earnest phoenix my bot is running and it suddenly off
@earnest phoenix i suppose, same as i have ๐
no any fucking error
@finite bough name of what? Bot?
i wasn't referring to you, i was referring to blackcat
@earnest phoenix quotations
@cerulean pebble did u update the discord.js
what about them???
@native thunder host
ahah.. so mach spam ๐
@finite bough Error is the timeout error off of the Websocket Connection method "Something took too long to do" Error message
@sturdy hamlet full error
@cerulean pebble what
@native thunder no u have to change ur code then
no
try moving onto another project if possible and try there
When using a DBL module as Python, what should be added to the main code? It's hard to understand in a document.
That's the full error lmao. Running on discord.js 11.6.2- here, this is the full path of the error if you want
@eternal ermine its setup to be added as a cog
@sturdy hamlet a screen shot of the error pls
Error: Something took too long to do.
at C:\Users\raphael\Documents\Work\Den-Bot\node_modules\discord.js\src\client\ClientManager.js:40:57
at Timeout._onTimeout (C:\Users\raphael\Documents\Work\Den-Bot\node_modules\discord.js\src\client\Client.js:436:7)
at listOnTimeout (internal/timers.js:531:17)
at processTimers (internal/timers.js:475:7)
ยป I'm running Discord.js version 11.5.1.
@sturdy hamlet make sure you havent got blocking code
no
almost 80% of the people r here with time outbiasues
Discord is dying
@pale vessel what
this is the only discord chat that i ever go to trying to help people and actually get dumber the longer i watch
discord is flagging ips, chances are they flagged some ISP ips because sometimes it doesn't work locally. it's most likely the result of your ISP being shit and scamming you
ytdl keeps skipping back its so annoying lmaoo

It's just weird- started on the weekend, initially thought my rpi was dying as my bot hit 1500+ servers, but I can't get it to run on anything, not just my rpi
@gritty frost ```js
[Support Server](https://discord.gg/${bot.support})
the bot went down?
@pale vessel I fix it Thanks
fucking markdown
wrong server @earnest phoenix
holy shit
schools being cancelled in most regions means we get a huge influence of stupidity

this is the result
fun
@earnest phoenix bro u r hilarious xD
sometimes
i'm honestly just being realistic
So Discord is dying then?



๐