#development
1 messages Β· Page 1087 of 1
@opal plank kicked lol
thank god

not only leveling system messages, it has the balls to dm users
hello
could've added free nitro on the bottom to put the cherry ontop
a lot of bots dm when they cant chat in the channel
they shouldnt output leveling messages either way 
from definition, bots should reply to commands
not any message
yes
you know how many level up bots there are
doesnt make it right though
allowed, not proper
Discord has a very loose interpretation of API abuse; as quoted by them:
American Jake01/21/2018
@βDanny automating the API in that way /is/ abuse. Automatically doing "X" every N is generally not a good idea. Where X could be posting a message, changing someone's nickname, renaming a role, changing a channel topic, etc...
Generally bots should only react to user actions...
Although, for very large N we generally don't care. But for small N, we do care. Think rainbow bots, etc....
"N" is not really defined, as rate limits are not a good thing to try to get very close to. You're going to have to mostly use common sense here, compare how close you are the rate limit, how often you do this, etc.
this is from Jake
I've seen that messages multiple times
while it mentions status
You still dont see the point
grey territory
just usually not
anyone know how can i ratelimit u the way eris and discord.js does?
which is what a level system is
it usually doesnt tell you about it
until you level up
leveling system is fine, outputing is the problem
which is the usually
mee6 is a great example of how much of a shitshow it turns in a populated server
@ HEY YOPU LEVELED UP!
And as I said, the top bots do it and are in hundreds of thousands if not millions of servers, so discord clearly doesnt care if they have them
every 5th message
smaller bots follow the precedent of larger bots
being allowed doesnt make it right though, lots of things are overlooked cuz it isnt bothering them
same for automated status
automation of api bad. period
though they allow to some degree
indeed
I have a Discord.MessageCollector that doesn't seem to be following the integer option for max messages to process; it keeps reading messages. How do I have it stop after a certain amount of messages come in? Or what's the appropriate way to close it out?
you can look at the source code of those libs
im not talking about how they code it
im asking how to do something to stop users from doing something like sending 5 messages a second
i may be completely blind, but why does this return undefined?
https://i.callumdev.pw/8f689.png
maybe it's the result of client.db.fetch(...) in your last statement.
how do i get the squiggley embed to be satisfied
hover over it. what does it say?
@sudden geyser
add a value="some value" to the kargs
Well you need some sort of value to pass
Can I hv multiple image files attached to a single message?
yes
If Iβm using on_message(message) is it possible to make it only check if a message was sent in a specific channel?
yes, just get the message channel property and then its id
Maybe something like message.channel.id===YOUR_ID in the first line
message.member.voice.channel &&
!message.member._roles.includes(client.db.fetch(`cmb.config.${message.guild.id}.djRole`)) &&
message.member.voice.channel.members.filter(m => m != client.user.id).size != 1 &&
(command.config.djOnly && client.db.fetch(`cmb.config.${message.guild.id}.djOnly`))
https://i.callumdev.pw/7peh0.png
https://i.callumdev.pw/4gi2c.png
How would I get a list of all the text channels in a specific server
By id or name I donβt care
refer to your library's docs
if you put client infront make sure client is infront on your index too
@opal plank well now the other commands don't work if I don't put client on their parameters... any way to fix this or is or do I just have to ignore it?
cause it's not like it'll ruin the code putting client even on the ones that don't need it
just annoying lol
hey will this work?
NodeJS
console.log("Hey, will this work?");
no
ic
?
So I am trying to turn my bot online for the first time but "node ." isnt working, does anyone know any other ways to turn the bot online?
is it giving any error text when you run "node ."?
No it just puts to like next line thing
hmm
screenshot all (or as much as you can) of your code and send it to me
if it has your token you can blur or whatever
well okay not much as it is just been made
so atm the screen shot isnt working but here is what i have
const client = new Discord.Client();
bot.once('ready', () =>{
console.log('Creator is online!');
});
bot.login('token');```
did you have node installed and added to your path (windows)
yes
what does node -v print?
it's because your variable is client but you're trying to call it as bot
I do believe so, I have Visual Studio code and node.js, all i was told to download
either change the second line "client" to bot
oh
also this
or change all of the "bot"s to client
you probably need to install discord.js
so you installed the required packages
yes
okay so i did change it all to bot but it doesnt work let me try all client
no nothing lol
uh no
ctrl s saves the code
not knowing something doesn't make you dumb π
be nice to yourself
Why is it showing?
lol
I can't make my bot online
npm i discord.js --save
thanks though much appreciated, have a good day/night imma go to bed β€οΈ
you did do npm i discord.js --save right?
did you know javascript basics?
In cmd?
what would the regex be to match the letter x, if there is no character to its left or the character to its left is not a letter
so 3x3 and x+x match (the latter twice)
but sinx does not match
It shows error @bright dove
Wait
waiting
install windows build tools
npm install -g windows-build-tools
in a shell with admin permissions
(can easy take 30+minutes depending on your Internet/PC)
he still needs the build tools
I didn't
Which is the best of the best
And not expensive
Vpa
VPS
Which gives remote access as well
That can be installed
@silver raptor do npm init and just hit enter on all of the prompts, and then do npm i discord.js --save
But not some of them
Same was problem with me
I installed Windows build tool s
And it worked
Error
Next?
wait until it is finished
?
@lusty quest he is doing in cmd prompt but the Windows build tools have to be installed by powershell
it can work in a CMD too if you run it with Admin permissions
How long will it wait?
It took me 30+ minutes
(can easy take 30+minutes depending on your Internet/PC)
Still waiting for installer log file...
did you run it with Admin Permissions?
Idk
Yes
and open a powershell with administrator permissions
I didn't have to do that stuff
so idk why they're making you
but idk I've only been doin this for a day π¨
tell me exactly what you did after that downloaded
what did you put into command prompt?
@silver raptor
did you ran npm init before installing modules @silver raptor
^
how do i make that in a field it will be empty after the field and wont say undefine
?
add \u200b as value for the field
lol
It's him choice
Send the json rant thing
stop using json as your database because it isn't a database in the first place, it's a notation meant to quickly exchange object structure and data
not to be used as a database
refactor your code to not use json
@pure lion json is fine for static data
see <#development message>
json is fine to be used as a config file for lets say, startup instructions
Anyway, if the bot suddenly gets 100 servers, that's 100 writes and probably more in a short period of time
Anyway, if the bot suddenly gets 100 servers, that's 100 writes and probably more in a short period of time
json is fine for static data. but can get corrupted if used for dynamic data
stop using json as your database because it isn't a database in the first place, it's a notation meant to quickly exchange object structure and data
@earnest phoenix what should we use instead? (not even close to needing databases yet, just curious for the future)
from my experience I'd suggest sqlite for small scale, postgresql for large scale
there are also nosql alternatives like mongodb
define "small scale" and "large scale" like I'm 5 pls π¨
id suggest looking up pros and cons of each and picking the one that's best for you
basically small scale is low usage, you aren't doing anything super big, large scale is big usage, having to constantly write and edit data
its easyer to build a prober database integration before you need it -> Sharding across mutiple machines
also idk how a Json DB reacts if you have mutiple processes accessing it at once
you cant 
you can choose to lock the file, if you do so then all other requests to access the file will be denied
or you don't lock it
this will just cause cascading issues
oh
correct, each request will write their own data without being aware of each other, which causes overwriting which is the main cause of data loss
uh no
you can get a Free MongoDB instance
almost all database software is free
as example
ok
get noobed, i have played 0 microseconds of vsc
bruh
can someone help me to continue my eval command, so I can open the marked information in my picture?
1337eval message.channel.messages.fetch({limit: 1}).then(msg => console.log(message.channel._typing))
when I console.log() this, I get a [object promise]
how should I resolve an object promise? I couldnt really find anything helpful on stackflow
await
I can not use then?
that should return a collection, so use collection#first()
you can
try changing message to msg.first() since it returns a collection (you used the limit option)
and for channel._typing, what are you trying to do?
channel#startTyping()?
i'm not sure what you're trying to do
yeah, something like that flazepe, but first of all, I try to understand how to open those marked position, I just want to learn how to^^(I am training atm)
msg.first().timeout._onTimeout
?
hmm, let try that out, thanks
@pale vessel I tried your method
1337eval message.channel.messages.fetch({limit: 1}).then(msg => console.log(msg.first().timeout._onTimeout))
this did not work.
The furthest I have came was this:
1337eval message.channel.messages.fetch({limit: 1}).then(msg => console.log(msg.first())
What I am wondering tho is, where u got that function first(), but besides that, I am still not able to get all the information I want.
messages#fetch(option) returns a collection of message(s). you can use the method first() to get the first element in a collection
so that gets the first and only message that you fetched
size of what
@pale vessel ok, got it, thanks for that
the window? the font? a penis?
the regrets of atmod
ok, I will do that. ty
that only returns an array tho
timeout isn't there
ok, yeah, that is why it did not work
hmm
1337eval message.channel.messages.fetch({limit: 1}).then(msg => console.log(msg.first().channel))
this worked
because it's available for you to access
Hi
How to make an image url visible on the discord.
@earnest phoenix ?
hola
@pale vessel sry for ping, can I ask you last question? π€
aSkToAsK
1337eval message.channel.messages.fetch({limit: 1}).then(msg => console.log(msg.first().channel._typing))
this gives me a unresolved promise, if I do it like this:
1337eval message.channel.messages.fetch({limit: 1}).then(msg => console.log(msg.first().channel._typing)).then(msg => console.log(msg))
I receive undefined
yeah askToAskxD
you already pinged me might as well ask but okay
why do you want to access channel#_typing
no reason, just want to access it π
console.log the channel
I did
show
when I do this, I get a unresolved promise tho, dont I have to resolve the promise in order to access stuff like _onTimeout
?
1337eval message.channel.messages.fetch({limit: 1}).then(msg => console.log(msg.first().channel._typing))
I get this what I have just screenshoted
#development message this is msg.first().channel? just to be sure
yep
that looks like a message
why would a channel be a map
or have the property user

no idea :> I am just console.log()
did you seriously try 1337eval message.channel.messages.fetch({limit: 1}).then(msg => console.log(msg.first().channel))
also, isn't msg.first().channel just message.channel
lol
I did when you scroll up message.channel
but then you told me I should try to change that to msg.first()
and I continued with that
msg.first() is a message
1337eval message.channel.messages.fetch({limit: 1}).then(msg => console.log(msg.first().channel._typing))
to make it clear, the screenshot was this
how to import glitch to github?
oh
I get it flazepe, but dont u see what I am trying? It doesnt really matter what it is
that's the _typing property
I just want to open the stuff that they display me
what do you want to do with channel#_typing is what i don't get
to open _onTimeout
for example
just to get further and see what we can find in {Function}
make sure you can access them by using Object.getOwnPropertyNames(msg.first().channel._typing)
[ function]
oh
just toString it
msg.first().channel._typing.timeout._onTimeout.toString()
omit the () so that you don't invoke the function
i'm assuming you want to see the function code
since there's no such thing as properties inside a function
it's literally a function
1337eval message.channel.messages.fetch({limit: 1}).then(msg => console.log(msg.first().channel._typing.timeout._onTimeout.toString()))
I have tried this and when I do stuff like that, I get an error
let me show it to you
warning unhandled promise rejection, that is why I have aksed before, how to resolve the promise
means that msg.first().channel._typing.timeout._onTimeout is undefined
did you do #development message
yep
show
empty array
1337eval message.channel.messages.fetch({limit: 1}).then(msg => console.log(Object.getOwnPropertyNames(msg.first().channel._typing)))
I dont see tho how it is empty, when you can see that there are stuff, when you console.log it normally
oh yeah it's a map
should I use map() function?
no, that's for arrays
and for maps?
wut am i doing wrong to get the username of the person
Okay I have a weird issue and I hope one of you can solve it. I think the problem gets clear when I explain it.
First situation:
bot: js const role = guild.roles.cache.get('id'); role.d = 'hi';
console.log(role); => role.d returns 'hi'
eval: guild.roles.cache.get('id').d => undefined
Second situation: (after restart)
eval: guild.roles.cache.get('id').d = 'hi';
eval: guild.roles.cache.get('id').d; => returns 'hi'
Why does it work if I add the property through eval and it doesn't work when the bot does it?
try console.log([...msg.first().channel._typing.entries()])
const server = http.createServer(app);
const dbl = new DBL(`lmaokeyhere`, { webhookAuth: 'auth', webhookServer: server });
dbl.webhook.on('ready', hook => {
console.log(`Webhook running with path ${hook.path}`);
});
dbl.webhook.on('vote', vote => {
const voted = new Discord.MessageEmbed()
voted.setColor(`RANDOM`)
voted.setAuthor(`XBot DBL Webhook`)
voted.setDescription(`${vote.user.tag} just voted for XBot!\nID: ${vote.user.id}\nThank you and don't forget to vote again!`)
voted.setTimestamp()
voted.setThumbnail(vote.user.displayAvatarURL({ format: "png",dynamic: true, size: 1024 }))
bot.guilds.cache.get(`652474899511640074`).channels.cache.get(`736862394466304011`).send(voted);
});``` hey anyone know what i did wrong here?
it doesnt send anything after a user voted
@earnest phoenix is this correct then?
Yes
ok
thanks a bunch
@pale vessel 1337eval message.channel.messages.fetch({limit: 1}).then(msg => console.log([...msg.first().channel._typing.entries()]))
I get an empty array again π€
console.log(`Webhook running with path ${hook.path}`);
});``` hmm this doesnt clog anything ehh
i just couldnt figure it ou
but why tho hmm
same
i need to know how to randomize embed color
oh
And by random message, you mean message with random string?
const server = http.createServer(app);
const dbl = new DBL(`lmaokeyhere`, { webhookAuth: 'auth', webhookServer: server });
dbl.webhook.on('ready', hook => {
console.log(`Webhook running with path ${hook.path}`);
});
dbl.webhook.on('vote', vote => {
const voted = new Discord.MessageEmbed()
voted.setColor(`RANDOM`)
voted.setAuthor(`XBot DBL Webhook`)
voted.setDescription(`${vote.user.tag} just voted for XBot!\nID: ${vote.user.id}\nThank you and don't forget to vote again!`)
voted.setTimestamp()
voted.setThumbnail(vote.user.displayAvatarURL({ format: "png",dynamic: true, size: 1024 }))
bot.guilds.cache.get(`652474899511640074`).channels.cache.get(`736862394466304011`).send(voted);
});``` hey anyone know what i did wrong here?
it doesnt send anything after a user voted
@pale vessel
If I do this:
1337eval message.channel.messages.fetch({limit: 1}).then(msg => console.log([...msg.first().channel._typing]))
I get this screenshot.
Your did it wrong
it's not that i don't want to help, it's just that i don't see the point in doing that
you're trying to access private properties at this point
array is a list of data
append [0][1]
aight, but I was just wondering why it was empty
for example
["Data", 123, true]
how do i get the username of the guy who sent the message using ${}
with your command
you put all of the link into an array
["url1", "url2"]
what is the thingy to get the username using ${}
@pale vessel I know how to access that actually π thanks and I think I am more or less done, just a last question
1337eval message.channel.messages.fetch({limit: 1}).then(msg => console.log([...msg.first().channel._typing.entries()]))
This was your command, but as I showd in my screenshot, it retruned an empty array, you have an idea why?
i tried getting the map entries
seems like you didn't have to do that
look at the code difference
ess em esch
then you need math.random
have you turn those link into array?
alright
SA
VSA
i don't like feeding you code
so
uh
you have to make a variable
let urlList = []
that's how you define a variable
bruh i couldnt find anything related to discord.js in the list
could you PLEASE just tell me the tag for saying a user's username
got it?
so
user is an instance of author righjt?
@π $hadow οΎα΅Λ‘βΏ
#0001
π $hadow οΎα΅Λ‘βΏ
#0001
alright
@earnest phoenix
you can access item array like this
array[0]
array[1]
so to get a random message
we have to get a random number between 0 and message length
that's why we need math.random
so do that
urlList[randomnumber]
uh
@pale vessel
1337eval message.channel.messages.fetch({limit: 1}).then(msg => console.log([...msg.first().channel._typing][0][1].timeout._onTimeout))
this is how far I got
what I get in the console π
()
I guess I wont be able to see what they have inside that
.setFooter(`Poll initiated by : ${user.tag}`)
^
ReferenceError: Cannot access 'user' before initialization```
Wut
how do i specify user
@mild flower do you know what variable is?
yes
how do i make it so that the person who send the ;poll message gets specified as user?
bru
.setFooter(`Poll initiated by : ${message.author}`)
.setFooter(`Poll initiated by : ${message.author.username}`)
^
choose one
or message.author.tag
message author gives there id
${message.author} normally mentions the user, but I'm not sure it works in the footer
yes its giving the id
message.author.username just types the name
nice
Nice ^^
I wanna make a suggestions command for a server but I'm not sure how I would get my bot to react on a message, Anyone know how?
What I use:
have you tried reading docs?
messageReaction.react("π");
messageReaction.react("β");
messageReaction.react("π");```
^
seriously
or if you use await
yeah
o shit
await is easier
let message = await message.channel.send(embed);
message.react("π");
i have a simple question: why didn't you read docs
also that won't work
you need the unicode for normal emojis
tbh i think why people here need help, is because that don't know it exist in the docs OR don't know how to read the docs OR too lazy to read logs;
dude i am sorry
that's how mafia works
they need to be hand fed
simple and solved
@analog roost spoonfeeding is obviously simpler compared to explaining
so true
but it's a bad practice and makes the person ask for more instead of learning for themselves
and totally not against our rules.
you read me like a book
also name variables a bit more concise
so true
totally not against the rules
it is lol
sarcasm intensifies
because it's Math.random()

k
Define "can't use"
messageReaction is kinda confusing specially d.js has messageReaction class
@pale vessel yeah, bad habbid. I can tell. People shouldnt ask too much 
blocked
Do you get any errors
array[the_random_number]
uh
LOL
wha
nani kure
π© fuck this channel
well, you tried
Well you JS gang sort this out yourself
oh noes flazepe
memeurls[Math.random()]
no.
you will grab a random item in the array
still wrong lmao
lmao
using math.random math.floor then the times length of that array dude
oh wait
FUCK
nvm
@quartz kindle explain it please ty
i am dumb
i need info
saya did
oof
im not spoonfeeding anything but I said what you need to use
const server = http.createServer(app);
const dbl = new DBL(`no`, { webhookPort: no, webhookAuth: 'no' });
dbl.webhook.on('ready', hook => {
console.log(`Webhook running at http://${hook.hostname}:${hook.port}${hook.path} - Works`)
});
dbl.webhook.on('vote', vote => {
let voter = bot.users.get(vote.user)
console.log(`2`)
const voted = new Discord.MessageEmbed()
voted.setColor(`RANDOM`)
voted.setAuthor(`XBot DBL Webhook`)
voted.setDescription(`${voter.tag} just voted for XBot!\nID: ${vote.user}\nThank you and don't forget to vote again!`)
voted.setTimestamp()
voted.setThumbnail(voter.displayAvatarURL({ format: "png",dynamic: true, size: 1024 }))
bot.guilds.cache.get(`652474899511640074`).channels.cache.get(`736862394466304011`).send(voted);
});``` this still doesnt send the message tho, anyone know why?
i don't wanna spoonfeed you
or a simple google how to pick random item from an array will work
oh yeah
wth
in javascript
no
no, i said "k"
Math.floor((Math.random() * 10) + 1);
Return a random number between 1 and 10:
I dont really see what problem you have with random numbers
Is that spoonfeeding?
It is bad
@earnest phoenix lol
i am done
would putting 1 inside the floor make a difference?
asking just in case
uh can anyone help me for vote logging
@novel fable xD nice question, how about you are more specific?
@earnest phoenix javascript does not have a built in way of selecting a random item from an array, therefore you have to build your own method using a random number
when you use Math.random(), it gives you a random number from 0 to 9.9999.
if you multiply this random number by the number of items you have, for example 10 if you have 10 items, then you will get a random number between 0 and 9.9999
but array indexes need whole numbers, without decimals, so you have to convert the new random number into a whole number. there are many functions that can do this, for example Math.floor() which rounds the number down to the nearest whole number, for example Math.floor(9.3545) becomes 9.
so basically you get a random number, multiply it by the number of items, then floor it into a whole number. then you can use the resulting number to get the item from the list using memeurls[final number here]
holy shit
have you tried reading first
to pick a data from that array
@earnest phoenix how about you read what he has written
For all those people who find it more convenient to bother you with their question rather than search it for themselves.
you literally got a free stackoverflow answer
const server = http.createServer(app);
const dbl = new DBL(`no`, { webhookPort: no, webhookAuth: 'no' });
dbl.webhook.on('ready', hook => {
console.log(`Webhook running at http://${hook.hostname}:${hook.port}${hook.path} - Works`)
});
dbl.webhook.on('vote', vote => {
let voter = bot.users.get(vote.user)
console.log(`User with ID ${vote.user} just voted!`)
const voted = new Discord.MessageEmbed()
voted.setColor(`RANDOM`)
voted.setAuthor(`XBot DBL Webhook`)
voted.setDescription(`${voter.tag} just voted for XBot!\nID: ${vote.user}\nThank you and don't forget to vote again!`)
voted.setTimestamp()
voted.setThumbnail(voter.displayAvatarURL({ format: "png",dynamic: true, size: 1024 }))
bot.guilds.cache.get(`652474899511640074`).channels.cache.get(`736862394466304011`).send(voted);
});``` this doesnt send a message to the channel or log anything, do you know why?
(only for the vote part)
@novel fable nobody is going to spoonfeed you like that bruh xD
hi guys
or did you actually have opened ports on ur server?
how do i create google?
i just need to know why it doesnt send eh
@earnest phoenix go step by step, you can start by creating a variable for each step, in order to understand
for example
@earnest phoenix
ehh ports idk oof
try adding vote.user.username or something since that could be the entire object instead of a mention (since this is from the api, not discord.js)
@earnest phoenix
https://stackoverflow.com/questions/4550505/getting-a-random-value-from-a-javascript-array
https://timonweb.com/tutorials/how-to-get-a-random-value-from-a-javascript-array/
https://thisinterestsme.com/javascript-random-array-value/
https://attacomsian.com/blog/javascript-get-random-value-from-array
https://www.codespeedy.com/get-a-random-item-from-an-array-in-javascript/
@novel fable
#development message
and this https://discordjs.guide/
if you dont know array, then I suggest you learning what array is
what the fukc lmao
please surround your links with <>
and this
cause you actually made an areay
@pale vessel ok π
try adding vote.user.username or something since that could be the entire object instead of a mention (since this is from the api, not discord.js)
@novel fable do this
o
yes
but i thought someone said vote.user gives ID
oh it does
i am a dumbo again
gotta learn discord markdown
o
How will I know if they rejected/accepted my bot?
are you sure this exists?
The bot @gilded plank will dm you
@silver raptor
let voter = bot.users.get(vote.user)
o
The bot @gilded plank will dm you
@earnest phoenix it DM to keep patience
it's users.cache.get()
just wait
you're on v12
How long?
3-4+ weeks
oh feck i forgot
Oof
is there a way to test this tho
Any one interested in free Tournamente pl
i uh have no more friends to help me vote
there is a test button
on your bot's edit page
also, you need to configure it there
o
else it wont work
ye i added webhook url and authorization key there
i want emojis to post as this but how do i do it? example :
πππ i want this
π π π its posting as this
theres a space in between
in the second one which i dont want
view-appearance-zoom in
or out
dont wanna copy exaclty
then?
just wanna paste them without spaces
then dont add spaces?
it sends the same message you write
show code actually
you might be doing join()
./memes.js
const server = http.createServer(app);
const dbl = new DBL(`no`, { webhookPort: no, webhookAuth: 'no' });
dbl.webhook.on('ready', hook => {
console.log(`Webhook running at no - Works`)
});
dbl.webhook.on('vote', vote => {
console.log(`User with ID ${vote.user} just voted!`)
let voter = bot.users.cache.get(vote.user)
const voted = new Discord.MessageEmbed()
voted.setColor(`RANDOM`)
voted.setAuthor(`XBot DBL Webhook``)
voted.setDescription(`${voter.tag} just voted for XBot!\nID: ${vote.user}\nThank you and don't forget to vote again!`)
voted.setTimestamp()
voted.setThumbnail(voter.displayAvatarURL({ format: "png",dynamic: true, size: 1024 }))
bot.guilds.cache.get(`652474899511640074`).channels.cache.get(`736862394466304011`).send(voted);
});``` ehh idk why but this still doesnt send
@novel fable did you want to use the Webhook?
ye
you need to set a port
and the webhook auth is a random string you generate and add to your bot and your bots page
yes as exmple
did you allow the port to communicate throu the firewall?
http ://yourip:port/dblwebhook
?
you just define a port
you can use 6969 if you want
it needs to be a free port
help me please
var queue = [];
var list = [];
bot.registerCommand("play", async(msg, args) => {
if (!msg.member.voiceState.channelID) { // Check if the user is in a voice channel
bot.createMessage(msg.channel.id, "You are not in a voice channel.");
return;
}
if (queue.length >= 2) {
return "You can't have more than 3 list of songs";
}
var url = args[0].replace('<', '').replace('>', '');
var vcID = msg.member.voiceState.channelID;
var mcID = msg.channel.id;
let info = await ytdl.getInfo(url);
var title = info.videoDetails.title.replace("'", "").replace('"', '');
queue.push({
title: title,
url: url,
voicechannelID: vcID,
msgchannelID: mcID,
requester: msg.member.id
});
bot.createMessage(msg.channel.id, `> Success adding **${title}** into music queue`);
await playMusic();
}, {
description: "add a song to the queue",
fullDescription: "add a song to the queue",
usage: "<url>",
hidden: true,
argsRequired: true,
invalidUsageMessage: "Please specify url"
});
async function playMusic() {
bot.joinVoiceChannel(queue[0]["voicechannelID"]).catch((err) => { // Join the user's voice channel
bot.createMessage(queue[0]["msgchannelID"], "Error joining voice channel: " + err.message); // Notify the user if there is an error
console.log(err); // Log the error
}).then(async(connection) => {
if (connection.playing) {
return "yo i cant play right now";
} else {
try {
bot.createMessage(queue[0]["msgchannelID"], `> Playing **${queue[0]['title']}** \nRequested by <@${queue[0]["requester"]}>`);
var stream = await ytdl(queue[0]["url"], {
filter: 'audioonly'
});
connection.play(stream);
connection.once("end", () => {
bot.createMessage(queue[0]["msgchannelID"], `> Finished Playing **${queue[0]['title']}**`);
queue.shift();
connection.stopPlaying();
if (queue.length > 0) {
playMusic();
} else {
return "finished all"
}
});
} catch (err) {
bot.createMessage(queue[0]["msgchannelID"], "something is error");
console.log(err);
}
}
});
}
somehow my command must be called twice because it always skip the first song, like instantly
and it always skip the next song
bot still waiting for approvalllllll
im using eris, please if you know what i'm doing wrong please tell me
@tender cargo 3-4+ Weeks
is there a way to change Category or Channel settings to Private Category or Channel that was created?
change the permission overwrites
your welcome
would you mind explaining what your issue is? @snow urchin
I expect the response to be true|false but it returns null
What is ```js
client.db.fetch(cmb.config.${message.guild.id}.djOnly)
true
hmm, what about message.member.voice.channel
I think you should experiment, testing each condition by itself to see where your null comes in. Bulky condition checks in one can be hard to debug.
I have done this, I do not see why it returns null as none of the conditions themselves do.
would it make a difference if you enclosed the entire thing in brackets?
or just double check your brackets to ensure the correct things are being assessed
lmao
Put a space
- Remove the double-space you add between each command.
- Only bold the title
General Commands. <command name> - description, not<command name>-description
So I'm going to start working on an Leveling/XP system for my bot, what would be a good xp time lock, so like the user has to wait a certain amount of time before gaining xp again
60 seconds
Yeah seems reasonable, thanks
a few minutes also sounds reasonable
Yeah I'm just planning it all out first, deciding how much xp to give like a randint of 15-25 or smth
are discord ids always 18 numbers long?
17 or 18
17-21 iirc
yeah
how do you know that?
from what I've heard
jw

i heard it can be 17 or 18, but probably better to trust moderator :D
Anyone will host my bot for free? π
no
maybe but chances are close to 0
I mean, you've got plenty of time until the length grows to 20 characters anyway
i tried checking it out on a brand new account someone made and it was still 18, i had no clue it could be anything other than that lol
-verifybot
Hi! It seems like you are looking for information on how to get your bot verified.
Once your bot reaches 75 servers or more, you are eligible for bot verification. On October 7, 2020, bots with 100 servers or more that are not verified will not be able to be invited to any more servers. You verify your bot on your bot's application page, under the "Bot" section in the sidebar.
If you need more information, check out this article written by Discord about The Future of Bots on Discord and you can ask questions in the Discord Developer Server.
We cannot provide support on how to get your bot verified.
Use the command
?
-verifybot
Oh I saw
What is needed
But after 100+ server how to verify
Or automatically
-verifybot
Xd
you give them your id and answer questions about how your bot uses discord's data
Hmm
then they review that and hopefully accept you
g r o w
you can apply at just 75
I need aomeone to make me a custom bot
So if it has less then 100 servers do you still need to verify?
That is also so much
For fivem server
if it's less than 100, you technically don't need to verify, but your bot can't grow past 100 guilds after the deadline
Yeah
Oh
So if it has less then 100 servers do you still need to verify?
@gleaming canyon no, but it wont be able to join more then 100 servers, starting 07 october 2020
Oh
Need a custom bot
Damn
Need a custom bit
@pallid glen code
hire someone
I heard the name Wolfy before
@wary flame yes
π€
Hire me, I'll make a basic bot and charge you lots
-needdev
DBL is not a place to find developers for jobs. You can try and put a request on Fiverr or Freelancer. Please do not post the request again. Doing so may result in punishment.
@wary flame yes
@pallid glen i meant code it yourself
Change my name to Destruc @split hazel
We don't do custom name changes
Thats why im asking
I can create a basic bot
@split hazel will they make for free?
I dont know how
@pallid glen learn to
I can create a basic bot
@gleaming canyon type?
Be more gentle @wary flame
Lmao
Please move to DMs when discussing commission work
Hmm
what would the regex be to match the letter x, if there is no character to its left or the character to its left is not a letter
so 3x3 and x+x match (the latter twice)
but sinx does not match
-needdev
DBL is not a place to find developers for jobs. You can try and put a request on Fiverr or Freelancer. Please do not post the request again. Doing so may result in punishment.
@sonic lodge i think this is what you're looking for, finally after 30 tests got it
/(\d|\W)x?(\d|\W)/
Need a custom bot
Is the x optional?
no it's required
@pallid glen if you need to hire a dev, fiverr
Dev work costs money
that regex doesn't seem to work
What's the issue with it
it matches 3x3, but not x+x
Didn't you say the x was required
Hes trying to get math from text
i can make one file custom bot for 0.01$ xD
it doesn't matter what's to the right of the x
No i mean
as long as there's nothing on the left or the character on the left is not a number
what's x actually supposed to be?
Not a number?
ye not a number
yes, everything but numbers
I'm confused
So /D is not numbers
So like
=> Not a number<x is whatever idk what's it supposed to be>A number <= ???
I'm absolutely confused

"not a number OR no character" + "x" + "anything, doesn't matter here"
What the hell am I even reading right now? This is confusing
ah makes sense
and a nightmare to communicate
I hate regex anyways
i realized i changed my regex's definition since i first posted the question lmao
π€¦ββοΈ
this will match, anything thats not a char on the left, optionally
x
then anything of one on the right
alright coolios π
ah
regex is fun
a curse and a blessing
it returns a collection iirc
collected is probably an array/collection of messages
collected.first().author
collected is map no?
i have it filtered
lemme double check
just to include what i want
yeah, it still returns a collection though
ty
hi i need help

