#development
1 messages Β· Page 1177 of 1
Whats i?
i is a variable
Yeah i know
you should NOT be coding a bot without js experience
But i thing you didnt declare it
at readdirSync (fs.js:955:3)
at E:\Panda\handlers\command.js:13:26
at Array.forEach (<anonymous>)
at module.exports (E:\Panda\handlers\command.js:11:32)
at E:\Panda\server.js:21:35
at Array.forEach (<anonymous>)
at Object.<anonymous> (E:\Panda\server.js:20:13)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Module.load (internal/modules/cjs/loader.js:985:32) {
errno: -4052,
syscall: 'scandir',
code: 'ENOTDIR',
path: './commands/approve.js/'
}
E:\Panda>```
oh Erwin
what should i do
sup shiv
I think you didnt declare "i"
@weak rain - Remove the trailing /?
sup
π€£
i pasted my site code
Its full of APIs
now what should i do
So yeah
If you want to work with APIs, you will need more knowledge of JSONs, HTTP requests, and how to process them accordingly
@weak rain - Remove the trailing
/?
@paper phoenix from where
Dats html
yes
blindly getting into Discord bot development is STRONGLY unadvised
If you want to work with APIs, you will need more knowledge of JSONs, HTTP requests, and how to process them accordingly
@slender thistle i have already made the APIs and it works perfectly
No errors
"No errors" nice word
I assume you're just lacking the general idea of for loops then?
@weak rain - According to the error, you're trying to access ./commands/approve.js/.
Yeah
I assume you're just lacking the general idea of
forloops then?
@slender thistle affirmative
eh
I doubt approve.js is a folder
To be fair, have you tried Google?
No?
@paper phoenix no
Why not?
commands is a folder
Im too lazy to readπ€£
if you dont put effort, why should we?
If you are not willing to read, how do you expect to learn?
@weak rain you're trying to read a file, not a dir
By reading
I'll give you a snippet of code, I'm asking you to break it down in details
okay?
I wanna read at the same time i dont...

Well, you're the one who's supposed to make decisions for yourself
is this for me?
let a = 0;
const array = ['a', 'b'];
for (let i of array) {
a++
}
log(a) //returns 2
@opal plank how may I declare i?
nah, i dont know what you're even doing @delicate shore
its anything
Aight
I know now
it just needs a variable to loop thru
following this guide
<= scrub windows user
Why not use "while" instead?
you could very well do that
though i remember you had a big af array
hence why i used an array as example
cuz im assuming you'll be doing somthing similar
hey ervin i have a doubt @opal plank
wusup
my status gets removed after a certain period of time
It's too easy to create an infinite while loop so it's unadvisable for beginners
until i restart it
cuz im assuming you'll be doing somthing similar
Yep
are you looping statuses by any chance?
Yeah
no
Ok no
show the snippet you using @weak rain
Wait no. I changed my mind
ok
client.on("ready", async (member) => {
console.log('I m ready to Go')
client.user.setActivity("Mention Me or tr!help | A all in one bot made by Thunder OP")
const API = new DanBotHosting.Client("api-key", client);
let initalPost = await API.autopost();
if (initalPost) {
console.error(initalPost);
}
})
Lmao
it requires 2 fields
one is a string and the second is type
though i could be wrong
but i think the second field(object) isnt optional
lemme check on the docs rq
actually, no they both optional
You can set the bot activity in the client options, BTW
well yeah, that too

i cant see why the activity would go away though
i dont see it using like client activity where it expires
im not even sure theres a char limit either
@weak rain try reducing char count, or check if you accidently used another activity()
though i doubt either of those are the culprits
my bot is in 6 servers now. with 41 members overall
my bot is in 6 servers now. with 41 members overall
@carmine summit nice
my bot is in a server with 41k mem
its bad
should i flex?
only 41k
hell no @opal plank

ask @opal plank
u have more
how mach
and u r pro too @opal plank
?
pro? far from it
haw mach
still improving everyday
hawmachhhhhh
what?
@opal plank can u tell me how should i set random statuses
lemme tag spoiler then, sec
using your bot
@weak rain setInterval and then do some logic
LMao

Serving 75 servers.
Channels
Serving 5572 channels.
Server Users
Serving 145167
Ping
110ms
Join Date
Sun Jun 21 2020 16:32:04 GMT+0000 (Coordinated Universal Time)```
@opal plank hell no
54 guilds and users --------
and i also cleared a lot of small servers
i think i removed 30 servers that had less than 10 people
so i cleared them
that brought it down to 50
@opal plank nice
i think i removed 30 servers that had less than 10 people
@opal plank how
π
bruh
<guild>.leave() is the actual thing
i went full chad and didnt give a single F
@weak rain:
const client = new Discord.Client( {
presence: {
activity: {
name: 'Zzz',
type: 'PLAYING'
},
status: 'online'
}
} );
oh ty @paper phoenix
whats n.eval?
thats an ecval
eval command
if its public
cuz you can do anything
i dont get that
image me doing this
WHATS EVAL
eval import fs from 'fs';
fs.unlink('./')
@carmine summit GOOGLE
Running code in real-time
eval is magix
@carmine summit GOOGLE
@earnest phoenix What is Google?
ASK UR MOM
eval import fs from 'fs';
fs.unlink('./')```
this would ruin your day good time
can eval command hack tokens
Basically giving a code to your interpreter to run
dont ask me what is mom
yes
wtf its danger
because any sensible mother fucker restricts it to owner
as you saw with my example, i can delete my own servers with that
it's not if you know what you're doing
but normaly u dont have perms to acess another bots eval
@weak rain - Eval can grant full access to the device it's hosted on. Access DBs, delete files and folders, etc
https://cdn.discordapp.com/attachments/272764566411149314/746711432841920552/unknown.png
imagine someone doing this with your bot, bt for all servers
Β―_(γ)_/Β―
@weak rain - Eval can grant full access to the device it's hosted on. Access DBs, delete files and folders, etc
@paper phoenix wuh
it can edit code? @opal plank
yea probably
yeah
image there is a Eval bot
lol
allow us to use eval command
lolo
if(author id != "your id")return message.channel.send("right u fuckin twat you aren't allowed tae use this command")
rly
@misty sigil - Just use Commando and ownerOnly.
its not public, clearly
commando?
commando π©
wut
I mean, you can reinvent the wheel.
π΄ π΅
commando is bleh
repos updated β
database data β
database clone β
configs β
dependencies package β
ready to move

presence: {
activity: {
name: "Thunder",
type: 'PLAYING'
},
status: 'Mention Me or tr!help | A all in one bot made by Thunder OP'
}
})```Where should i add this its giving errors f
In your source code where it's appropriate. What error are you getting
isnt it in 'name'?
um @opal plank the code you sent works but i have to change it to console.log(i)
rather than status?
@weak rain - Add the presence object to your current client options.
SyntaxError: Identifier 'client' has already been declared
its called an example
how is it an example if its wrong
you dont declare it again
yeah
example aint wrong fam
can someone help me with how to set up webhooks (i tried to do it myself and im too confused rn and its better if i restart)
i dont declare again
it works when I change the a to an i
you log a not i
but when its a the log said numbers
can you please stop hitting me with newspaper
no
you copying snippets rather than learning from them
sec
:bonkcat:

i have gotten enough brain damage
oh big people Lmao
it's in stable
is it?
π
scam?
im just curious if its risky
no its not
doing a database?
π
yo scan this qr and u can get nitro
@dense haven gimme qr
there we go
@dense haven gimme qr
@carmine summit ur idp will be taken
'FREE NITRO! just give me your credit card numbers and the 4 digits in that back to join the giveaway"'
JSON file
Sounds like every JS YT tutorial video. Lol
and u will try after some time
wait up
only use JSON for configs
'FREE NITRO! just give me your credit card numbers and the 4 digits in that back to join the giveaway"'
@opal plank lol
and constants
only use JSON for configs
@opal plank my friend is using json for warns
yeah thas about it
lol
373375127822182 the 4 digits is 5334
tell him he lost his coding privileges @weak rain
can someone help me with how to set up webhooks (i tried to do it myself and im too confused rn and its better if i restart)
π
yea
js?
yea eris
yea
got your port 3000 open?
yep
or whatevre port you going to use
yea
when you just realize you doing testing stuffs in your stable bot then there is error then you cannot fix it in time: Uptime go brrrrrr
lemme grab the api doc, sec
Hey
spent all my day till i realised that port needs to be whitelisted
ip
loving the 'yea' on every question
Hello π eberyone
@dense haven tu parzival ko janta
@weak rain ha
good, aight
nice vai @dense haven
Everyone
pata nhi
Hello π eberyone
@delicate shore hallo π
tere friends m h @dense haven
you can blatently copy this btw, should work fine cuz its in the docs @dense haven
Lmfao
mila hoga khu
hm
const DBL = require('dblapi.js');
const dbl = new DBL(yourDBLTokenHere, { webhookPort: 5000, webhookAuth: 'password' });
dbl.webhook.on('ready', hook => {
console.log(`Webhook running at http://${hook.hostname}:${hook.port}${hook.path}`);
});
dbl.webhook.on('vote', vote => {
console.log(`User with ID ${vote.user} just voted!`);
});
change port to 300(or whatevr you want)
and AUTH is passwor
which you set in your bot page on top.gg
thats it
you can blatently copy this btw, should work fine cuz its in the docs @dense haven
@opal plank it says that i will have to use webhooks if ot goes above 1000 votes
i don't wanna leave that for then
i wanna add my friend as a collaborater to my npm package but i couldn't find anything on the docs related to it. I tried npm owner add thedoom kinda-useless and it said it added it as a maintainer of the package (which he already is). halp
u can use
wait what?
vote bot also
i havent heard anything about that vote thing
uh
i saw in one server
they had a bot which notifys voting
nd it was public lmfao
im trying to figure out what im supposed to do
@dense haven u code on mobile?
ok

@dense haven u code on mobile?
@weak rain nah i got tired of going through all my codes
just make sure you change the variables to fit what you're doing
yea yea
wait u had dev badge? @dense haven
yea i left his team
mr cyber squad p role bhi tha
i will never need that
thx π
then you should be 100% fine
https://ptb.discordapp.com/channels/264445053596991498/272764566411149314/746716401955242055
@opal plank why u add ptb
ip link
Lmfao
||just dont 300IQ like me and forget to put https:// infront of the domain @slender thistle ||
i dont, im using ptb
@opal plank
sry my head is really tired coz i didn't sleep yesterday (i was trying to look for a memory leak coz cpu usage peaks till my vps provider mailed that they were having issues) π
ptb from my experience is the most stable without being annoying


can they?
Yeah
canary be like:
hey, here's an update
5 mins later: hey, heres the same update from before, but we reverted the chnges
5 mins later: erm, we changed our minds, we put it back
i like the new stuff on canary but ffs they update too often
ptb is my cozy middle ground
i read this somewhere node_modules is like, like a car: you don't know what's inside it but all you know is that it works
I don't remember where
is using codes given by npm official staff is copying?
i wanna add my friend as a collaborater to my npm package but i couldn't find anything on the docs related to it. I tried
npm owner add thedoom kinda-uselessand it said it added it as a maintainer of the package (which he already is). halp
official staff?
β
removed star
is anyone having any probs with genius api
i read this somewhere
node_modules is like, like a car: you don't know what's inside it but all you know is that it works
I don't remember where
@delicate shore thats cool
lol
also does npm fetch collaboraters from the git repository in package.json or do you manually add em or both
make sure to catch up on the yt tutorials

π
π
they work perfectly till you realise the bot will not always be locally hosted and stay in ur test server
people : u can fuck someone and say sorry i did for fun
Parents : 
r is four letters away from o on the keyboard how the fuck did i type it accidentally
^ thats rape
lol @earnest phoenix
thats suspicious
LOLCODE
...is an actual language wtf
Yup, and it's fun
chef is better
halp pls
how do i parse this response https://api.alexflipnote.dev/filter/blur?image=https://media.discordapp.net/attachments/657599422305402900/746717572061200444/floor.png
like how do i get the image in my code
using axios
given <request> is my request obj
@earnest phoenix why is this package for
@earnest phoenix i can help you
lmfao
in bytes
we start by deleting it, then we can move on
.read() it
so request.read()?
or, well, something like .read
the fuck
nope
@earnest phoenix See axios' method to parse request body
anyone heard c++ ?
anyone heard c++ ?
its spreading, kill it with fire
@earnest phoenix why is this package for
@weak rain the name says "useless" it is literally useless but might come handy so i named itkinda-useless
its spreading, kill it with fire
@opal plank you mean my package
Hi 
@weak rain the name says "useless" it is literally useless but might come handy so i named it
kinda-useless
@earnest phoenix lol
got 1000+ downloads in a week
Jesus
Larsh
Ooof
me now spams codes with ```css, js etc
13 yr old me ```css wow cool colours
wtf
Karsh
@earnest phoenix yea?
luckily luca got this
He's spamming
who?
@earnest phoenix tell me this website, i'll leave a -5 star review, clearly it isnt working
why am i asking who
wait, since they are changing the name of the badge, will the VERIFIED_DEVELOPER flag change too or nah
lol
@earnest phoenix tell me this website, i'll leave a -5 star review, clearly it isnt working
@opal plank ?????
what do u need help with tho, all jokes aside
Lmao
anyone heard c++ ?
@weak rain yes why? + im using it
@earnest phoenix no
@weak rain yes why? + im using it
@restive furnace oh ok here is my meme then
its poor nevermind
'How to make professional website' @earnest phoenix
also code:
https://cdn.discordapp.com/attachments/272764566411149314/746718879421825054/unknown.png
get the joke now?
lmfao
wait, since they are changing the name of the badge, will the
VERIFIED_DEVELOPERflag change too or nah
@earnest phoenix Bitfield value will probably be the same
what meme lol -> #memes-and-media?
or they might change it
@earnest phoenix i still dont know what u need help with tho
adding a guy as a collaborater to a package
well, there ya go ^^
being on phone still feels better than being on pc
it is a public package
i like ebing on pc
Can I have like a python file and js file?
what would it contain?
Mix of JS and Python code?
Then, no. It's either JS or Python
just implement it on python
Can I like import a JS file?
technically could run an api
No
Ok
i dont think thats what you want though
JS is a different programming language so you'd have to convert the code yourself
Is mongo hard tho?
is downloading random packages dangerous?
and if u keep getting excited with yt vids i would suggest to switch to js
not really
π
Ok cool lol
you could run them separately and use IPC or an API to talk to eachother
It's more of an experience kind of thing
I run my bots with discord.py and pymongo combined just fine
i wanna try cassandra someday

I run my bots with discord.py and pymongo combined just fine
@slender thistle is it hard?

Cuz like I will have a ton of use for it
For me personally, no. It's time consuming, but not that hard
I am a Noob 
time for food and then port the youtube bot to Ts
the new ts api?
nah, just Ts
oo
its written in js, and i gott port it to strict
hm have fun π
typescript
typusscruptus, indeed
debating if its even worth it tbh
theres like, 4 people using the youtube cuz it isnt publicly available yet
shit is standing on two thin stick legs rn
How do i add the number of items i have bought in this code:
let purchase = args.join(" ");
if (!purchase) return message.channel.send('Please provide an item to buy')
let items = await db.fetch(message.author.id, { items: [] });
let price = await db.fetch(`money_${message.guild.id}_${message.author.id}`)
let amount = await db.fetch(`money_${message.guild.id}_${message.author.id}`)
if (purchase === 'ThunderboltVII') {
if (price < 3500) return message.channel.send('You do not have enough money to buy this item. Please try another one');
db.subtract(`money_${message.guild.id}_${message.author.id}`, 500);
db.push(message.author.id, "Car");
message.channel.send(`Successfully bought ${items}`)
}
if (purchase === 'scarf') {
if (price < 300) return message.channel.send('You do not have enough money to buy this item. Please try another one');
db.subtract(`money_${message.guild.id}_${message.author.id}`, 250);
db.push(message.author.id, "scarf");
message.channel.send('Successfully bought')
}
}
}
yeah
i prefer mongoengine over pymongo
well you will have to test for another parameter so do amount = args.shift() and then do purchase = args.join(" ")
π
Or parseInt()
if none of your items have numbers in them, of course
Uh
parseInt() cant take from that i dont think
Scarf_quality1
only parseFloat()
No
π€
Both can turn it into a number
Wait if i put this
let amount = await db.fetch(`money_${message.guild.id}_${message.author.id}`)
it's not right?
π
nope
thats how much money the user has
@earnest phoenix
i think
oh right
parse int doesnt ignore non numbers
It says it's not a number
yeah, thats what im saying
Right
actually
no
parseFloat wont work either
there was a cheeky way without regex
to take only numbers from a string
i forgot the method tho
e
it has to start with a number, i was half right
it does ignore after it
but there was another way to grab it
can always loop args and check isNaN() too
Yea i was trying to say both works only on strings starting with numbers
npm or yarn?
npm
the package is public
u guys have cool eval commands
sankyu
@earnest phoenix you mean like
<item> <amount>?
my eval output is also parsed
@earnest phoenix you mean like
<item> <amount>?
@earnest phoenix Yeah
Then item can be thr first argument
And Amount the second
my eval output is also parsed
@opal plank um can u share ππ
is it just impossible to add collaboraters to public npm packages
uh
let price;
for (let a of args) {
if(!isNaN(parseInt(a))) price = parseInt(a)
}
that'd work too
my eval output is also parsed
@opal plank Parsed?
unordered args
Wot

lol
aight, gotta go grab a bite of something
ok
ok?
There is an npm docs page on it
no (for the docs)
yes
Anybody know a perfect way of detecting if the user is browsing through a mobile browser to set the menu icon to appear on mobile and not on pc?
I know how to set the icon and stuff, just detecting it perfectly is the hard part
GLITCH
WHAT
THE
QUF
It's for temporary hosting
I'll be moving to a vps, chose glitch just to test
Well
liar
You should make it responsize
The wot
Like people with mini laptop screens should see the navbar icon
Its needs to be chosen my res of screen
Not device
That's what i think is the best
You can do it with a bit of javascript
Hmm might work tho, i know how to
I literally used a regex to check it that's longer than my life span
Jesus Christ
@earnest phoenix what does it matter do u if heβs using glitch or not
glitch sucks
And?
um
they take forever to start projects
Whats the point
So?
@earnest phoenix just stop..
which means if the app goes down we'll need to wait 1000 hours to get it back up and see the websute
idk
Its his site
I dont see anyone caring or asking about that
He is making it and testing it
Bruh cut it out, i just hosted it on glitch for a test, this is not the final version of the website that's why
Yes
@earnest phoenix clientStatus is a thing for me idk about you
Your not even supposed to go on the site now LOL
Uhh it's a website? @dense haven
don't use glitch even for testing
not as much restrictions as glitch
<Time to fucking buy a vps for 5$ and host it on it just to test and if it fails where have the money has gone>
in the void
@earnest phoenix thanks for the input, but you are getting very offtopic so just stop
in the void???
Actually, you said repl.it, but i like to remind you, that repl is worse than glitch
Bruh i code on mobile, and you know how hard it's to code on repl than glitch
or we could stop
Why on earth would you code on mobile
But yes i agree
cuz
We should stop
mobile is kool
lol
I started Coding on mobile, i coded my entire bot and website on mobile
Big Brain time
me also sometimes codes on mobile
Why on earth would you code on mobile
@sudden geyser <You realize not everybody has a pc right>
Do you really not have at least a laptop or desktop
Discord bot designer....
No
Meh
Actually, you said repl.it, but i like to remind you, that repl is worse than glitch
@earnest phoenix worse in what terms
and why is Glitch bad generally
Glitch is bad.
Explain why
You got me
You're just stating without explaining Asterki
"x is bad because I said so" isn't a valid point
Anybody know a perfect way of detecting if the user is browsing through a mobile browser to set the menu icon to appear on mobile and not on pc?
@earnest phoenix I did that with CSS for the text size I think it can be done for the image I just didnβt try yet
Nah, glitch is good for rl smol bots
It's not intended to be used for Discord bots
I didn't say glitch is bad, and repl is worse because as i code on mobile, when i tried repl, it was deleting whatever i type in, not possible to code on it, stop defending repl
Oh, fuck. I forgot to mention whoever said "Glitch is bad'
That is because developing on mobile is 99% unideal most of the time
don't forget repl is newer then glitch
don't use glitch even for testing
ah, it was code913
Just report the bug, and then they will probs try fix it. Or just stay at glitch why does it care that much?
Yes
@slender thistle code913 always takes things offtopic smh
When u use a high cap letter the letter before deletes on mobile
Nah they won't fix it, who tf cares about mobile developers these days 
We work harder but this is what we get
Have you tried actually doing it
....
instead of being this hopeless
@earnest phoenix you actually develop on mobile?
Like actual code
Yes
Oh shit you must be the god of programming
^
But what would be the point of reporting this bug since i'll never use it
I can't imagine coding in phone - i am used to big screens
As i host on a vps
You could potentially help someone who would be unable to properly file a report
I mean at least true but idk if i should tho
I can't imagine coding in phone - i am used to big screens
@restive furnace it's generally a pain in the ass, especially with C-like syntax languages
Uhmmm
dev, as in test?
yea
Well unless you use like a vm or something
I think Apple disallows that but
Β―_(γ)_/Β―
@restive furnace it's generally a pain in the ass, especially with C-like syntax languages
yeah
module.exports = function format(content, guildName, botId) {
if (content.includes("{user}")) {
content.replace("{user}", `<@!${botId}>`)
}
if (content.includes("{user_name}")) {
content.replace("{user_name}", `Bot Cool`)
}
if (content.includes("{server}")) {
content.replace("{server}", guildName)
}
return content;
}
@restive furnace it's generally a pain in the ass, especially with C-like syntax languages
@slender thistle The thing is, as i code on mobile, sometimes it becomes so hard that i just give up on some projects, but not easily tho, Coding on a small screen/unable to copy a lot of things that you need/No tabs
why it didnt get replaced
:((
I think it's not about the small screen, but rather the limitations you are forced to put up with
I think Apple disallows that but
@celest schooner it doesn't allow it yeah, but my experience making iOS apps hasn't been that bad
There's limitations but you can break them in some way
But Coding on mobile in general is just pain
It's still inconvenient in the end, is it not?
Idk
u can just get keyboard for phones too
yeah you canβt just slap Bulma on it and call it a day
u can just get keyboard for phones too
@restive furnace I donβt know whyβd you do it for a phone
Tablet makes sense
u can just get keyboard for phones too
@restive furnace Ah yes lemme get a telescope to see the smol screen too
I'm getting the error
C:\Users\Jon\Desktop\SpiderBot Project\index.js:1057
await message.channel.messages.fetch({ limit: amount }).then(messages => {
^^^^^
SyntaxError: await is only valid in async function``` making a d.js bot, Even though I think ive made a valid async function
code
```js
await message.channel.messages.fetch({ limit: amount }).then(messages => {
message.channel.bulkDelete(amount)
})```
You're sort of missing out. Do you have access to all the dev tools you'd usually get from a desktop IDE compared to devleoping on mobile
on a phone thereβs barely any space
Amarzi show more of your code upwards
buy a keyboard, mouse and another screen for phone, ez mini pc
You're not in an async function from where your function scope is
just buy a desktop
Oh, Thanks
my phone costs more then my gaming pc
just buy a desktop
@celest schooner Just
how much though
module.exports = function format(content, guildName, botId) {
if (content.includes("{user}")) {
content.replace("{user}", `<@!${botId}>`)
}
if (content.includes("{user_name}")) {
content.replace("{user_name}", `Bot Cool`)
}
if (content.includes("{server}")) {
content.replace("{server}", guildName)
}
return content;
}
why this return same content
Itβs $800 for the computer
It was somewhere around 1k retail price for the phone
My parents got a deal tho
From sprint
@earnest phoenix Why check for them and not just split them right away?
:0
so i dont need if() anymore
right ?
let contentToReturn = content.split("{user}").join(`<@!${botId}>`).split("{user_name}").join(`Bot Cool`).split("{server}").join(guildName);
return contentToReturn;```
:0
ohhhh
@earnest phoenix it's returning the same content because .replace(..., ...) returns a new string
You'd need to use a variable (or use content) and assign it the new value
hello everyone
i checked the docs but i couldn't find any properties to let my discord bot copy the link of a post
can you help me with this?
It doesn't return the new string because replace doesn't modify the original string
Variables could help but split join does it
I don't know so much about that split and join chain as it doesn't look good performance wise or just from a readability perspective.
@ashen shard link of a post?
What library are you using Muco
I don't know so much about that split and join chain as it doesn't look good performance wise or just from a readability perspective.
@sudden geyser <Faster than 3 replaces with 3 if statements>
i'm using discord.js
You don't even need the ifs: js return myString .replace("{flowers}", "1") .replace("{are}", "2") .replace("{blooming}", "3")
Yea i know
@earnest phoenix yeah, the one after you enable dev options
it works on videos and images
@ashen shard You mean id of a message or their url?
well my main purpose is to paste the image/vid to another server so i'm guessing url @earnest phoenix
Yes
<Message>.url```
@sudden geyser but if there is not flowers
: /
That's all
The day I vanish is the day sunflowers go extinct.
And if you're talking about if nothing matches.
Yes
thank you @earnest phoenix
Np
It'll just return a copy of the string with no modification.
are you talking to me @sudden geyser ?
no
My YTDL doesn't seem to work...
Code: https://paste.pythondiscord.com/yarocikiho.py
Hmm im still unsure how to do the amount
https://paste.pythondiscord.com/rilicazolo.py
The YTDL doesn't seem to be able to extract the full video data...
Use a web server like express
nonono
i need to send data from site to node.js client
site=>node.js plugin=>node.js bot
i can connect python, but idk, i need it?
Use a web server like express, for example if you want to send a user input number to your bot, set up a express web server with a basic route and in your website add the number to header
Of the post request
hmm
Why would you need Python in this case?
So im making a nuke command and im confused as how do i make the command wait after it sends the embed to clone then delete the channel
python socket module
can i use .setTimeout(3000)
Use a web server like express, for example if you want to send a user input number to your bot, set up a express web server with a basic route and in your website add the number to header
hmm, start node.js server to listen POST packets? ill try
but there many be more ws packages than that
node.js should have socket.io
in node sockets - web server
in python - listener on port
node.js should have socket.io
Yes, but why would you, setting up a simple REST server is easier
So im making a nuke command and im confused as how do i make the command wait after it sends the embed to clone then delete the channel
@sharp thicket anyone please
a nuke command?
a command that clones the channel then deletes it so it purges all messages
and last
If you use discordjs, ```javascript
await Discord.Util.waitFor(ms time)
Something like that not 100% sure if that is what they called it
anyone knows method better async.series to create task queue? (for dinamic loading plugins need wait for loading bots)
.setTimeout(3000) ??
@sharp thicket no
That is for executing a specified function after specified time in milliseconds
setTimeout(function, miliseconds)
https://paste.pythondiscord.com/rilicazolo.py
The YTDL doesn't seem to be able to extract the full video data...
Hello, does anyone know where I can put my bot to be 24/7?
https://paste.pythondiscord.com/rilicazolo.py
The YTDL doesn't seem to be able to extract the full video data...
@leaden rover be more patient, this is the 3rd time you ask this in ~15 min
ok
Hello, does anyone know where I can put my bot to be 24/7?
hosting? :/
yea
Hello, does anyone know where I can put my bot to be 24/7?
@earnest phoenix pay for a vps
yea
vps
dont turn off your PC :d
mhh, how to see all object data in node-inspect?
Just use node's built in inspect(..., ...) function in the util module.
Gets the same job done and is typically all you need.
Hey I wrote that code to alert server owners on raids. For some reason, it doesn't recognize the fact that the user already exists on thelist. Help?
if(client.raidusers[exe.entries.array()[0].executor.id] >= 0) {
client.raidusers[exe.entries.array()[0].executor.id] = client.raidusers[exe.entries.array()[0].executor.id]+1
console.log("added 1 to the ban count of: "+exe.entries.array()[0].executor.id+` now it's ${client.raidusers[exe.entries.array()[0].executor.id]}`)
} else {
client.raidusers[exe.entries.array()[0].executor.id] = 0
console.log("added user to raiding list")
}
if(client.raidusers[exe.entries.array()[0].executor.id == 10]) {
const raidEmbed = new Discord.MessageEmbed()
.setTitle("Your server may be raided")
.setDescription(`
Raiding user: ${client.users.cache.get(exe.entries.array()[0].executor.id)}
Make sure to check if everything is ok with your server because it might be raided right now.
`)
.setTimestamp()
guild.owner.user.send({embed: raidEmbed})
}```
message.channel.send('Ping is being calculated...').then(msg => {
msg.edit('Ping: ' + Math.round((msg.createdTimestamp - message.createdTimestamp) - message.client.ws.ping))``` can someone help with my ping command
It sometimes sends 477
lol
and also you were pinging your bot like every second
this ping is broken
I fixed it
how can I make that my bot will send a message to a specific channel when he gets online?
Language?
Library?
Shush
Experience with programing?
Β―_(γ)_/Β―
past couple day there were an awful amount of people asking some REALLY basic stuff
like how to declare variables levels of basic
yea so how do i declare variables
just write a .txt and require it bro 
ty
yea so how do I make bot send message in specific channel 
Still waiting for person to reply back 
get the channel from cache
client.channels.cache.get("channel id")
then send to it
channel.send("Message")
No u
ill do it for you
Ok











