#development
1 messages ยท Page 1143 of 1
hmmm @paper cliff
wait
write python3 in your cmd
why does its send that with the id in the title?
did you save the code and restart your bot
smh
write python3 in your cmd
@paper cliff nothing comes up
ah yes it sends the mention lol
@ashen widget can you try to install python3 may be it can help
not sure about that
is username a property of message.mentions.users.first()?
it's probably unrelated at all
is username a property of message.mentions.users.first()?
@earnest phoenix want to see the code?
@ashen widget maybe quick.db doesn't work on node.js 13 try using ONLY node.js 12
@earnest phoenix want to see the code?
no i asked Danny Hpy
oh
smh
can someone tell me why its sends the mention in the title?
quick.db has easier installation on stuff other than Windows
can someone tell me why its sends the mention in the title?
@stiff stream maybe try.user.username
lemme go see the docs
idk how to fix my args problem
It's already an user @earnest phoenix
it's a user
i'm so triggered rn
.setTitle(`${message.mentions.users.first().username} info`)
@earnest phoenix ?
@stiff stream As I can see
that should work
the title is not shown
but!
In the setAuthor
you put message.mentions.users.first()
without username
@ashen widget maybe quick.db doesn't work on node.js 13 try using ONLY node.js 12
@earnest phoenix mine is v14.5.0.
then
that makes it the mention since user.toString() is a mention
downgrade
you put message.mentions.users.first()
@paper cliff wherE?
@pale vessel why u triggered
downgrade
@earnest phoenix telling me?
@left nacelle dude stop chatting or pinging random people if you aren't helping/asking for help
yup
i was asking for help
will my old bot stop working @earnest phoenix if i downgrade?
i don't think this is an issue
@ashen widget Lemme try to compile it using Node.js 14
@paper cliff sure
@paper cliff ty. thats fixed that
@left nacelle what was your request already lol
will my old bot stop working @earnest phoenix if i downgrade?
@ashen widget discord.js require v12 atleast
idk how to fix my args
so it probably won't
i read everythiing on guide
@ashen widget discord.js require v12 atleast
@earnest phoenix ok
i was asking for help
@left nacelle no
i did some of it
of course if you try you'll learn
scroll up if u dont think i didnt ask for help
@ashen widget It seems to work
@paper cliff ok
but it's compiling
@stiff stream message.mentions.users.first().username is supposed to be correct
i read the docs
it IS correct
he already fixed his problem
yep there we go

are you on windows
using node.js v14.7.0
@paper cliff ok so is there any manual way to setup quick.db
quick.db is easier to install on stuff other than Windows
yupp
what you're doing is manual
@earnest phoenix means someway in which we can manually install and add it to places where needed like some file or stuff
including ALL of its dependencies
do you have node-gyp globally installed
@earnest phoenix doneeeeeeeeeeeeeeeeeeeeeeeee
Yes he already have it
@earnest phoenix doneeeeeeeeeeeeeeeeeeeeeeeee
@ashen widget why you screaming
cause it's boring lol
sorry lol
yup am kind of like i wanna die or else kill quick.db
@earnest phoenix i need halp fast
im having trouble with weather-js
@mild flower Explain your issue please :)
you asked that 2020 times then left
@ashen widget Still the same error?
(`**${result.current.skytext}**`)
yup
@paper cliff are you on WIndows
No I'm not
@ashen widget Still the same error?
@paper cliff yes sirr
(`**${result.current.skytext}**`)
it shows that skytext is undefined
I ran the quick.db build on an Alpine Linux container (build output: http://ix.io/2tSm)
cannot show skytext of undefined
I know?
uh
cannot show skytext of undefined
@mild flower then current is not smth
bruh
wait
join my discord server https://discord.gg/pMxhD2a
Github: https://github.com/kenrag24
https://nodejs.org/en/
link to install node
if you still can't find developer portal here's the link
https://discordapp.com/developers/app...
discord bot
discord.js
discord.js v12
weat...
its a part of weather-js
follow ๐ the ๐ f||hey||ing ๐ tutorial ๐ correctly
It's in their docs?

@slender thistle
Then why are you referring to an object's property that doesn't exist in their documentation?
Installing Python 3 didn't help? @ashen widget
i lost the code from yesterday is
embed.set_thumbnail(url=f"{ctx.message.author.avatar_url}")
embed.set_author(name=f"{ctx.message.author.name}", icon_url=f"{message.author.avatar_url}")
embed.add_field(name=f"Prefix Changed", value=f"Prefix was changed to: {prefix}")
embed.set_footer(text=f"{member.guild}", icon_url=f"{client.guild.icon_url}")
embed.timestamp = datetime.datetime.utcnow()``` correct?
Give me an hour to assemble my brain...
I feel that
bruh
alr
accidentally clicked gif picker
f"{message.author.avatar_url}"
ctx.message not used
@mild flower heres the script for weather.js iff youre using a command handler .just install one package for it to work weather-js const weather = require('weather-js');
const Discord = require('discord.js');
module.exports = {
name: "weather",
description: "Checks a weather forecast",
async run (client, message, args){
weather.find({search: args.join(" "), degreeType: 'C'}, function (error, result){
// 'C' can be changed to 'F' for farneheit results
if(error) return message.channel.send(error);
if(!args[0]) return message.channel.send('Please specify a location')
if(result === undefined || result.length === 0) return message.channel.send('**Invalid** location');
var current = result[0].current;
var location = result[0].location;
const weatherinfo = new Discord.MessageEmbed()
.setDescription(`**${current.skytext}**`)
.setAuthor(`Weather forecast for ${current.observationpoint}`)
.setThumbnail(current.imageUrl)
.setColor(0x111111)
.addField('Timezone', `UTC${location.timezone}`, true)
.addField('Degree Type', 'Celsius', true)
.addField('Temperature', `${current.temperature}ยฐ`, true)
.addField('Wind', current.winddisplay, true)
.addField('Feels like', `${current.feelslike}ยฐ`, true)
.addField('Humidity', `${current.humidity}%`, true)
message.channel.send(weatherinfo)
})
}
}
ouchhhhhhhhhhhh
member isn't defined last time I saw your code
Installing Python 3 didn't help? @ashen widget
@paper cliff nope
client.guild doesn't exist
lol
Three issues pointed out
wtf
@mild flower heres the script for weather.js iff youre using a command handler .just install one package for it to work
weather-jsconst weather = require('weather-js');const Discord = require('discord.js');
module.exports = {
name: "weather",
description: "Checks a weather forecast",async run (client, message, args){ weather.find({search: args.join(" "), degreeType: 'C'}, function (error, result){ // 'C' can be changed to 'F' for farneheit results if(error) return message.channel.send(error); if(!args[0]) return message.channel.send('Please specify a location') if(result === undefined || result.length === 0) return message.channel.send('**Invalid** location'); var current = result[0].current; var location = result[0].location; const weatherinfo = new Discord.MessageEmbed() .setDescription(`**${current.skytext}**`) .setAuthor(`Weather forecast for ${current.observationpoint}`) .setThumbnail(current.imageUrl) .setColor(0x111111) .addField('Timezone', `UTC${location.timezone}`, true) .addField('Degree Type', 'Celsius', true) .addField('Temperature', `${current.temperature}ยฐ`, true) .addField('Wind', current.winddisplay, true) .addField('Feels like', `${current.feelslike}ยฐ`, true) .addField('Humidity', `${current.humidity}%`, true) message.channel.send(weatherinfo) }) }}
from my bots script

ok can you re-send me the actual error, I lost it
@paper cliff lol
@ashen widget https://github.com/nodejs/node-gyp#on-windows
error
he already have node-gyp
On Windows you may need to configure some stuff manually
installed version 2017 but 2015 gives this error
@ashen widget try doing npm install quick.db and see what dependencies it wants
@ashen widget try doing
npm install quick.dband see what dependencies it wants
@earnest phoenix sure
then we can do stuff correctly
ty
???
did you run the windows-build-tools install as administrator?
ah yes mybad
heres quick.db install error
ah windows-build-tools installs 2015 or 2017 build tools for you
so it's unnecessary I guess?
i mean he already have 2017 build tools
Danny ๐ already ๐ tolda ๐ how ๐ to ๐ fix ๐ it
ah windows-build-tools installs 2015 or 2017 build tools for you
@paper cliff need both buttttttttttt 2015 gives errors
ฤฐ @paper cliff say vds Info
i mean he already have 2017 build tools
@paper cliff hmmm
can you fix it
Where did you see that you need both?
?
I don't see that?
troubleshooting for sqlite
Where did you see that you need both?
@paper cliff https://github.com/JoshuaWise/better-sqlite3/blob/master/docs/troubleshooting.md
thanks
troubleshooting
thanks
@paper cliff wlcm
Who help me?
why the hell a module needs two build tools
that's insane
How do I fix it? @paper cliff
why the hell a module needs two build tools
@paper cliff hmm
Can you fix it if I give it to you?
like honestly
How do I fix it? @paper cliff
@haughty igloo f||hey||ing ๐ stop ๐ spam ๐ pinging
lolzy
Can you fix it if I give it to you?
@haughty igloo 
@haughty igloo increase the events limit as I already told you before lol
I do not understand
no?
as i can see its one message event, probably per command
Where do I fix it?
Yes I know
you can split them into multiple events listeners if you know what you're doing
in his case it's fine
god save me from this dumbness hell
I'd still move it all to else ifs
it's different events
@misty sigil U know node.js
as I said
yes i know danny
it's not related to multiple "message" events, so it's not one event per command
next breaking news a person died because of quick.db error and broke his pc and killed the quick.db devloper the name of the person was @ashen widget
see you in my jail
see you in my jail
@paper cliff no ill suicide lol
shit
lol
i'll be lonely forever in my jail
๐
i don't know
did you follow that already?
client.commands.get('apex').execute(message, args);
```this format is not working with it throws error ```js
TypeError: Cannot read property 'execute' of undefined```
client.commands.get('apex').execute(message, args);
```this format is not working with it throws error ```js
TypeError: Cannot read property 'execute' of undefined```
@wheat hornet tfw client.commands
your syntax will probably be
client.commands.get(client.aliases.get('apex')).execute(message, args)
i'm assuming you followed a default basic tutorial
embed.set_author(name=f"{ctx.message.author.name}", icon_url=f"{ctx.message.author.avatar_url}")
embed.add_field(name=f"Prefix Changed", value=f"Prefix was changed to: {prefix}")
embed.set_footer(text=f"{member.guild}", icon_url=f"{ctx.guild.icon_url}")
embed.timestamp = datetime.datetime.utcnow()
so this?
that implements client.commands, client.aliases
What's member.guild
@drifting wedge what's the error
congratulation for first successfull command still much left PS C:\WINDOWS\system32> npm install --global --production windows-build-tools
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
windows-build-tools@5.2.2 postinstall C:\Users\Chitraksh Maheshwari\AppData\Roaming\npm\node_modules\windows-build-tools
node ./dist/index.js
Downloading vs_BuildTools.exe
[> ] 0.0% (0 B/s)
Downloaded vs_BuildTools.exe. Saved to C:\Users\Chitraksh Maheshwari.windows-build-tools\vs_BuildTools.exe.
Starting installation...
Launched installers, now waiting for them to finish.
This will likely take some time - please be patient!
Status from the installers:
---------- Visual Studio Build Tools ----------
Successfully installed Visual Studio Build Tools.
------------------- Python --------------------
Python 2.7.15 is already installed, not installing again.
Now configuring the Visual Studio Build Tools..
All done!
@paper cliff
@earnest phoenix
whats the guild name?
ok
?
member.guild returns the name
yes
client.commands.get(client.aliases.get('apex')).execute(message, args)
@paper cliff can't read property of get of undefined
thats what i want
@wheat hornet then i don't know how you implemented your bot
try quick.db?
@paper cliff error
are you not mapping your commands? @wheat hornet
i give up
he probably followed a tutorial
it gives me an error
fuck quick.db on windows
embed.set_author(name=f"{ctx.message.author.name}", icon_url=f"{ctx.message.author.avatar_url}")
embed.add_field(name=f"Prefix Changed", value=f"Prefix was changed to: {prefix}")
embed.set_footer(text=f"{member.guild}", icon_url=f"{ctx.guild.icon_url}")
embed.timestamp = datetime.datetime.utcnow()```
fuck windows*
it not a proper error
fuck quick.db on windows
@earnest phoenix dont know gender cant sorry
fuck not using postgres
but just a useless error
the guild name
???
Why is member. there
like the name of the guild the command is run in
that's it
yes
ctx.guild
There's no member in commands
@ashen widget
hmmmm
what's the output of that: node "C:\node\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild --release
embed.set_author(name=f"{ctx.message.author.name}", icon_url=f"{ctx.message.author.avatar_url}")
embed.add_field(name=f"Prefix Changed", value=f"Prefix was changed to: {prefix}")
embed.set_footer(text=f"{ctx.guild.name}", icon_url=f"{ctx.guild.icon_url}")
embed.timestamp = datetime.datetime.utcnow()``` so i have this
i think i still have error
ill restart bot
get('apex').execute(message, args)
``` worked for me
How'd I evenly spread the contents of a span/display flex across the screen?
U h
more details maybe?
What do you need
justify-content: space-between for flexbox?
:o ty
There's something else that I can't remember, search up justify-content values
Works
gtg please don't spam ping me for help i have a life too
oh ok i didn't understand your question sry
nothing
will it be able to join more after?
no
?
it will not
how would o verify then?
unless you verify it
ok well can i still verify after oct 6?
yes
Correct
yes
you'll get messaged by discord when your bot has grown enough to be qualified for verification
and i have to be 13+?
yes
even just to be here
i am
im 15
i just have no idea how i would get id lol
hey mom, can i get my passport to send on a socal platform to get a blue badge?
hello, I need help my bot invites manager is disconnected on my server while on others it works is it noramal?
Thank you
ok and how long will it last a bit because on another server it works their bot while on mine not?
we don't know
ETA: when it's ready
sorry if i express myself badly i'm french and i use google translate
ok thank you very much for the information
We don't use Invite Manager and unfortunately, we are not their support server
ah ok because when I went to their site it took me to this discord link
you clicked in the wrong button
you're supposed to click "support server" below the bot's avatar, not "join discord" on the header
I just found thank you very much
Shiv can I dm? I need your honest opinion on my site and I kinda don't want everyone else to see it jajajajaja
In what context?

:o
like ```js
some code
if (h) {
if (!j) somehox exit the f function but continue the code
}
code
^
return makes the code stops iirc
uHm
what are you even talking about
Not returning
what is your actual problem, cause this is probably a case of http://xyproblem.info/
Asking about your attempted solution rather than your actual problem
client.commands.get('apex').execute(message, args);
```this format is not working with it throws error ```js
TypeError: Cannot read property 'execute' of undefined```
@wheat hornet help
im probably just dumb
get is returning undefined
yeah that sounds like that
There's no command with the name apex
@pure lion it is
Show file
@faint prism so update on linux
how can i exit a if function without stopping the entire code again
@tight plinth ```js
if (something) {
blablablabla;
}
//will continue here
```js
if (something) {
blablablabla;
return;
}
//won't continue here
i did a patch from windows to linux
changed literally nothing
and im having the for each bullshit
Shiv can I dm? I need your honest opinion on my site and I kinda don't want everyone else to see it jajajajaja
@pure lion Personally I'd suggest getting sincere feedback from multiple people rather than just me but sure
hm
Thankya
help me ๐ญ
Command named apex either returns undefined or client.commands doesn't have a .get method
Or the command apex doesn't exist
he said it
If client.commands didn't have a get method it would throw a different error which is client.commands.get is not a function
Therefore the apex command doesn't exist.
are u sure the command is name "apex" and not "Apex"?
he said it
@lyric mountain but why it is returning it undefined
There's cases where I would do return None in Python so I assumed the command not existing is a different error
Therefore the apex command doesn't exist.
@golden condor
see
but is it exported as "apex"?
Doesn't mean you set it
do you add the commands in the first place
Where do you set your commands?
in commands folder
don't put return then
whata bt continue?
What
I mean like where do you do client.commands.set
Yeah continue unless it's a forEach iirc
index.js
Can you show it
omfg
are you yanderedev son
no lol
and im having the for each bullshit
@honest perch No idea. Maybe the code is the issue then. I've never had an issue other than dependencies across OSs
he's coding as badly (aka with a lot of if/else) as you
Use a handler
f(command === "roleall"){
if (!message.guild.me.hasPermission('MANAGE_ROLES')) {
message.channel.send(`I don't have permissions to do this!`);
return;
}
let role = message.guild.roles.cache.find((r) => r.name == args.slice(0).join(" "));
if (!message.member.hasPermission('ADMINISTRATOR')) {
message.channel.send(
`You need \`Manage Roles\` permission to use this command!`
);
return;
}
if (!role)
return message.channel.send(
`**${message.author.username}**,No role not found with name ${args.slice(0).join(" ")} `
);
message.guild.members.cache
.filter((m) => !m.user.bot)
.forEach((member) => member.roles.add(role.id));
message.channel.send(
`**${message.author.username}**, role **${role.name}** was added to all members`
);
}```
Just don't hard code it please
Does it have permissions?
?*
Also that will get you rate limited
Just don't hard code it please
@golden condor what should i do
Does it have permissions.
admin
Also that will get you rate limited
i will add 10 mins cooldown
You are still adding a role to all members
Dyno is on special terms
dyno is a huge bot and has its ratelimits adjusted
@honest perch No idea. Maybe the code is the issue then. I've never had an issue other than dependencies across OSs
@faint prism genuinely dont have a clue either
dyno is a huge but and has its ratelimits adjusted
@earnest phoenix Due to Whitelisting?
@golden condor bro u gona tell me how to do this
i literally didnt change anything changed in the index file
but it worked yesterday
I am not the only person here
even after a restart
even after a restart
@honest perch Are you locally or on a host, If on a host, Contact your host if they updated something.
God this place makes me have brain aneurysms sometimes
Also, Added an eval command also ruins the code.
im stuck on a basic problem aaaaaaaa. i have a code like this, where search is the args, but somehow the secnd line seems to always returns false, even when I execute it. any idea why? js if (search[0] === ("eval")) { if (msg.author.id !== "6353837825763574070") return searchf(); try { let evaled = require('util').inspect(eval(search.slice(1).join(' '))) return msg.reply(evaled, { code: "js" }) } catch (e) { return msg.reply(e) } }
@honest perch Are you locally or on a host, If on a host, Contact your host if they updated something.
@pallid igloo locally
Dyno is on special terms
@golden condor due to whitelisting?
No
also im not stupid enough to use a host that would look at my shit
Then how?
Because it has over a certain amount of servers
It doesn't has a limit of servers
They also get special sharders
its not like dynos src was leaked
ok
Sharders can be not "special"
they can 
its not like dynos src was leaked
@honest perch lmao
Omfg
That is exclusive to bug bots
i hear dyno src
was it ?
where's dyno src
*big
it was
If you even save it, you can get sued
im stuck on a basic problem aaaaaaaa. i have a code like this, where search is the args, but somehow the secnd line seems to always returns false, even when I execute it. any idea why?
js if (search[0] === ("eval")) { if (msg.author.id !== "6353837825763574070") return searchf(); try { let evaled = require('util').inspect(eval(search.slice(1).join(' '))) return msg.reply(evaled, { code: "js" }) } catch (e) { return msg.reply(e) } }
@tight plinth Try using The id without the string.
no
no
id is a string
So I made a repo with it :^)
no
@golden condor i just have the 7z
@golden condor solved it thx for ur help
YOu cunt
you probably won't get sued but just get a DMCA takedown
dirty fucker
So, how many of you fell for it?
lol
๐ณ
@delicate shore What.
me
its a fat zip
YOu cunt
@delicate shore Pretty rude
It's a rickroll, I guessed it.
bruh
Yes
xD
Because I am not risking that shit
why
yeah don't
we want the code
callum you dick
No way I am putting the actual src of dyno on my GitHub
it's in the internet somewhere
i would rather not have github police at my front door
It's just a joke because people were looking for it
github police
i saw it in some dude's github
xD
๐ .
@flap'link
add a + to the link and boom
@misty sigil I am not a dick. Because I'm never gonna give you up
I just made a rickroll bot, It's dressed like Rythm and when you play ANYTHING, it rickrolls you.
xD
OOOOHHHOOHOHOHHOHOHOHOHOHOOHOHOHOHOHOHOHOHOHOHOHOHOHIOHOho
E
>play command is basically rickroll
xD
@faint prism wow it was less than a month ago? Wow I thought it was more than that
Kinda feeling like #memes-and-media in here
^
yeh
Ikr
I wonder why more people aren't using Discord.NET
Other than the obvious bit about new coders
I'm getting RangeError [BITFIELD_INVALID]: Invalid bitfield flag or number. when trying to use intents.
const myIntents = new Intents();
myIntents.add('GUILD_CREATE', 'GUILD_DELETE', 'GUILD_MESSAGES', 'MESSAGE_CREATE', 'MESSAGE_REACTION_ADD');```
It isn't the most intuitive. Using objects' properties sometimes feels like I'm going down a recursive rabbit hole @earnest phoenix
Anyone with experience related to this could give me a hand?
Can you modify a const in JS?
Not sure, changed it to var and still the same
Doesn't add take an array
It is using that code in the discordjs guide
So I guess it is not read only somehow
Why don't you just set intents to an array of the intents you want instead
Anyways, using var and still same error
How can I check if the user is on mobile (express)
Already tried that alexis and same error
What is the error
RangeError [BITFIELD_INVALID]: Invalid bitfield flag or number.
Hello
Well yeah because some of those aren't valid intents
Huh
I copied them from here https://discord.com/developers/docs/topics/gateway#list-of-intents
Integrate your service with Discord โ whether it's a bot or a game or whatever your wildest imagination can come up with.
Can someone help me - How do I embed a website like iframes but with markdown?
Check out discord.js docs
Not Discord itself
Oh nevermind, I got all wrong
@fierce arch wdym
you want to convert markdown -> html?
I can only use GUILDS for example, not just GUILD_CREATE
Correct
Ok, that should solve my issue
The docs kinda don't explain that very well
No my bots description is an IFRAME of its docs which obvs is html so what i want to do is convert it into markdown
Thanks for pointing me in the right direction @strange trout!
๐
wha-
can i somehow check weather a navigator is on mobile or pc?
navigator
coooool
So does anybody know how I can embed a website into my bots desc. using markdown?
Markdown is very basic stuff
You can add iframes
Well, markdown can only do a few basic things
I'm using one in my description
wtf, dbl allows iframes?
cool thx i didn't know
Was going to send you a link to my bot for you to see the iframe but not sure if I can do that
Smh
run it in the right folder
it will error
Oh yeah
?
run it in the right folder
Technically you need to run it OUTSIDE src folder
Becaude you're mentioning the src folder in it
yes thats what I mean
if you want to get rid of this just you can use path built-in module
what
fs.readdir(path.join(__dirname, 'src', ''commands'), ...)
it avoid these stupid issues
i mean if the index file is in the src folder, it's just __dirname, 'commands'
oh yeah
what if there was a folder in src
called handlers
__dirname, '../commands'
```?
i guess you want to make a command handler, is that right?
i already have one
it's just relative path
is your src/handlers/commands.js file supposed to load it
path.join(__dirname, '..', '..', 'commands')
__dirname = current directory where your file is located
.. = go parent twice
commands = commands folder
Does anybody know how to make a solid color background to cover up the whole screen and not only a fragment of it?
on the bot page
ah yes
imagine
ok dude
I don't speak square
that's an ad ^
i just did
body {
background-color: #121212;
}
but it just doesn't cover the whole background you see
it's okay on mobile though
wait it's dbl?
yeah?
you can edit css layout on dbl?
i feel stupid to only know that today
@paper cliff am i meant to define path
const path = require('path')
yes
@unreal cape can you try body { height: 100%; } ?
TypeError [ERR_INVALID_CALLBACK]: Callback must be a function. Received undefined
ah lol
Let me try
fs.readdir(path.join('..', 'wow'), function (err, files) { ... })
the function shouldn't be in path.join
Nah, that didn't do anything
It fills the entire page on Firefox
wtf
ah ok i see
the blank thing is the ad container
@paper cliff thanks
Are heroku apps private?
yes
how to do if bot leave's vc the music queue end
Depends on your lib/language and how you handle music queues
i am using js @solemn latch
Okay.
Depends on your lib still, and how you handle music queues
Hi how can i get dat from a functions?
Okay.
Depends on your lib still, and how you handle music queues
@solemn latch using command handler for music command's and have a main file musicsystem
@pine aspen dat?
data
wdym by data
sry i'm not used to this keyboard.
Like returning stuff from a function?
wtf
return
return valuehere;
const getData = function (amount) {
client.getMessages(message.channel.id, (amount)).then(messages => {
let data = messages;
return data;
});
};
@solemn latch using command handler for music command's and have a main file musicsystem
๐
const getData = function (amount) {
return client.getMessages(message.channel.id, amount)
}
await getData()
here is the thing
Still to broad for me to help tbh
ty
@low marlin ok but how do you want us to help you
I'll try ^^
what the fuck
why do you place a .then
if you're using await
already
const data = await getData(number + 1)
@low marlin ok but how do you want us to help you
@paper cliff yes
ok
how to do if bot leave's vc the music queue end
number++
ok but how do you want us to help you
no
imagine this
number = 0
number++ returns 0
Lol
i was using ++1
but anyway just use number + 1
it's cleaner
and works with numbers directly
Suffix and prefix increments always trip me up
There are some situations where num++ is wanted than ++num
Which actually can be really useful
num = 0;
func(num++) returns 0 (but it increments later)
func(++num) returns 1
returns then increment vs. increments then returns
that's why i don't like this syntax lol
why
ye
Its makes a lot of sense imo
it doesn't make any sense to use that when you can num + 1?
It's weird syntax. Even my professor says it causes a lot of errors in code because of dev mistakes while using it
it's just a useless syntax
It's shorter, makes more sense if you just read it if that's your jam, etc.
Like
These are all (almost) the same: js num += 1 num = num + 1 num++ ++num
its a semantic indicator that the value should be incremented, not simply adding X to it
not all the same functionally
Really it's up to the developer or team behind it to choose which syntax they want to use
^ yes
I rarely increment within arguments for that reason
++num and num++ is not the same
++num increments it before num++ increments after https://oliy.is-just-a.dev/ufcw0a_5560.png
const VC = msg.member.voice.channel;
if (!VC) return msg.channel.send("I'm sorry, but you need to be in a voice channel to play a music!");
VC.join()
.then(connection => {
const dispatcher = connection.playFile('./assests./airhorn.MP3');
dispatcher.on("end", end => {VC.leave()});
})
.catch(console.error);
}```
bytestreams
isn't it just play?
is playFile mentioned in the docs containing the connection object?
u spelt assets correctly?
and anyone here who uses glitch
what a syntax
because i wanna know that i haev to uplaod file in assets folder
and is it how i access it ?
upload it using your bot?
Glitch, making lives harder, for no reason.
yes that's why it's called glitch
glitch is meant for websites and follows website architecture lol
True
well
People, using glitch for the wrong purpose, for no reason
because people don't know what to use or can't use anything else
I mean, it is called dumb hosting
Ah, probably why its so slow
if you're uploading airhorn.mp4 to /home/container
probably doesnt help its offline
yes
@solemn latch i turned it off myself
google cloud? free?
yeah
yes
^
See, I've thought about suggesting gCloud
wtf
how to make webhooks
yt
Ok, but personnaly I won't recommend google at all but why not
create it your server settings, James
discord webhooks are not the only webhooks
you need to have a valid card and an id to claim the gcloud free trial
I assume it's on Discord 'cause u know discord bot list
but help i want to set webhooks for my bot
so does most apis
hey
youd have to be more specific james
docs
as i cannot find Playfiles on docs
search for "play"
i want webhooks like #discord-news
thats not webhooks
or maybe it is, just not user createable ones iirc
#bids is webhooks
follow announcement channels in some guilds if you want that, see #announcements
but do i need to require('path')?
also
https://discord.js.org/#/docs/main/stable/class/StreamDispatcher
has some info too.
oohok
kk
bruh
wtf
Error: Cannot find module 'opusscript'
Error: Cannot find module 'discord.js'
what's dis
install it
fortnite
i cant make a discord bot that plays fortnite
why
why there is no 3D engine on discord yet
Sounds fun
the problem with battleship is placing ships. itll have to be randomized or youll have to visit my website to make your board
Not very user friendly in that case
ah yes ok
i was planning on making it so you can type cords to place ships, but users where too dumb to do it
Will it text based or canvas
do both Woo
alright where
$10 for it, going for the EA business model
shit
can't afford it
btw honestly, what would be the best way to make a 3D Renderer on Discord
youd have to render things server side
then upload them to discord
you couldnt have real time 3d rendering client side
../deps/opus/silk/macros.h:59:5: warning: this use of "defined" may not be portable [-Wexpansion-to-defined]
../deps/opus/silk/macros.h:69:5: warning: this use of "defined" may not be portable [-Wexpansion-to-defined]
#if OPUS_FAST_INT64
^~~~~~~~~~~~~~~```
my bot keeps spamming this
in logs
again
and again
@solemn latch any idea why?
is it due to my vps?
i havent worked with music bots in a long time
wha
just wait for it to finish lol
let it do its work
but it is spamming ../deps/opus/silk/macros.h:59:5: warning: this use of "defined" may not be portable [-Wexpansion-to-defined]
../deps/opus/silk/macros.h:59:5: warning: this use of "defined" may not be portable [-Wexpansion-to-defined]
../deps/opus/silk/macros.h:69:5: warning: this use of "defined" may not be portable [-Wexpansion-to-defined]
#if OPUS_FAST_INT64
^~~~~~~~~~~~~~~this sgaian and again
same
ok
WTF
compiling* i mean
ideally, you should have a test bot for testing new systems
then when you know things are working, you move the main bot
he doesn't even have a vps for it's main bot lol
testing in production is a joke that people say, you shouldn't actually do it
ideally, you should have a test bot for testing new systems
@solemn latch i was having on glitch
glitch is a diffrent platform
lol

