#development
1 messages ยท Page 1383 of 1
it should be if reddit.subreddit.over18:
there's no over18 attribute to subreddit object then
oh ok
look how it should be retrieved in the lib's docs
Ok
how can i add a cname record for a like domain.com/thingy?
cloudflare doesnt allow /
i do that through apache2 configurations because I'm different ๐ฅถ
Hi
Do you know of another panel to host node js app?
what
@earnest phoenix a panel to setup on my vps
why would you need a panel for that
I need it for a project
why would you need a panel for that
I need a panel for a private project ๐
why would you need a panel for that
To host many bots
why would you need a panel for that
literally just download node with your distro's package manager and use it lol
you don't need a panel
you're not making any sense
is there anyone here who might be able to tell me how much I can sell my laptop for?
what's a good tutorial for programming tutorial for discordgo
https://pkg.go.dev/github.com/bwmarrin/discordgo (documentation), or maybe you're looking into learning Go as a language.
i wanna learn go
Go has this tutorial on its official website https://golang.org/doc/tutorial/getting-started.
My bot hit 75 servers and when I apply it asks me for a government-issued ID, which I don't currently have. Is there any other way I could submit one?
no
nah you need a way to proof that you is you
which is what government-issued ID are for
well, theoretically you could transfer ur bot to one of ur parents/friends
then have them verify
but it'll be permanently theirs
o ok
forgot how to refresh it every 10s
bot.user.setActivity(`a!help | ${bot.guilds.cache.size} Servers.`, { type: 'PLAYING'}).catch(console.error);
setInterval
is running flask enough to run the vps webserver?
also, 10s is too fast
like just literally running it?
hey guys i need help with a loop im trying to figure out
mhmmm
also, 10s is too fast
@lyric mountain then what i should do? 30?
setInterval(() => {
const interval = setTimeout(() => {
const newInterval = setTimeout(() => {
console.log("this is a new interval")
x--;
}, 2000);
console.log("outside")
}, 2000);
console.log("outisdeasdasd")
}, 2000)```
so basically what im trying to do here is i wanna exec the inner statements in a while look based on some value x, and then wait for some functions to exec, those funcs have inner funcs that need to wait for 200secs and then when the val x is 0 i want while loop to break, obviously using the "while" loop here will sit in an infinite loop... and im stuck trying to figure it out
uh
i dont wanna use a custom "sleep" because it'll stop the execution of everything, if itry to access other commands becasue of the sleep the response is slow
im using sleep for now, but it isnt eficient
There's something called periods and sentence structure that would help
seems unreliable
@lyric mountain then what i should do? 30?
@tardy hornet mine updates every hour
@hollow sedge why did i block u lmao
what i want to do is, start a function and then inside those functions i need them to wait
Because I pinged you in testing to annoy you @young flame
nobody:
mee6 reviews: https://cdn.hopefuls.de/zk7m
ohhh
literally every review
LOL
sounds like a timeout
;-;
@tardy hornet mine updates every hour
@lyric mountain arg i forgot how to do setInterval
YEAH
You should be able to.
the func inside the timeout also needs to wait after its called
because your calling the timeout but since theres two you didn't spesify wich one to call
setInterval(() => {
//doStuff
}, 60000) //every minute
i get that
you have two timeouts but it's a timeout in a timeout
but inside that interval
i have a func
which needs to wait
so if i use another interval there
so you do await?
the next loop will cause it displayat same time
Like, unless I'm misunderstanding this: js setInterval(() => { // Let's say this function is called every 5 seconds. setTimeout(() => { // Let's delay this by 2 seconds. 5 + 2 = 7 console.log(":)") }, 2000) }, 5000)
wait @young flame is it like that:
setInterval(() => {
bot.user.setActivity(`a!help | ${bot.guilds.cache.size} Servers.`, {type: 'WATCHING'});
}, 60000);
})
yeah
okay
god please no
that should work @tardy hornet
what im trying to say is, inside that timeout func i need to wait xD
it'll create an uncontrollable overflow of intervals
is it ms's right?
yeah
@crystal wigeon sort of
you cant call a interval in a interval
okay
is it ms's right?
@tardy hornet yeah
50000 is 50 seconds
ect
uhhh
okkay my turn to complain
i'm making a ban command where you can mention someone or use there id but uhhh
(wait 2sec, (wait 2sec after the outter func exec ( wait 2sec after middle func exec))
but the middle func has dependant values from the inner most func
i'll try using await
it just keeps saying i need to mention someone
i'll try using await
@crystal wigeon you cant use await in two funnctions
have one function
then await setInterval
or whatever
mhm i'll give it a shot
nobody:
mee6 reviews: https://cdn.hopefuls.de/zk7m
@rustic nova i'm weakkk
remember that the interval is called every 5 seconds and the timeout is called 2 seconds after the interval is called. The interval is forever repeating and both are non-blocking. This can cause overlaps as in it won't be like a 7-second delay between each console log.
If you have an understanding of threading/concurrency, it'll probably be easier to understand. If this is okay for your use case, then go ahead and use it.
- = represents interval. A different symbol represents execution.
+ = represents timeout. A different symbol represents execution.
-----==---==-==----==--====-----==
goes on
if (!user) return false;
var mentionedUser = message.guild.member(
message.mentions.users.first() ||
(await message.guild.members.fetch({ query: user, limit: 1 })).first()
);
if (!mentionedUser) return false;
return mentionedUser;
},```
you can use this to get either the author or the mentions
this works even if you just type "moon chan"
or "moon"
@rustic nova its funny because it had 120 likes before but top.gg did a like sweap and all my likes went away but they started to come back
(wait 2sec, (wait 2sec after the outter func exec ( wait 2sec after middle func exec))
but the middle func has dependant values from the inner most func
@crystal wigeon react has a lib with something called cascade, see if there isn't a lib that does something similar for node
ah thanks
cascade basically chain stuff with an optional delay between steps
remember that the interval is called every 5 seconds and the timeout is called 2 seconds after the interval is called. The interval is forever repeating and both are non-blocking. This can cause overlaps as in it won't be like a 7-second delay between each console log.
If you have an understanding of threading/concurrency, it'll probably be easier to understand. If this is okay for your use case, then go ahead and use it.
-= represents interval. A different symbol represents execution.
+= represents timeout. A different symbol represents execution.-----==---==-==----==--====-----==
goes on
@sudden geyser yep i understand how this works, but i kinda need it to execute alternatively, im thinking maybe if i double the delay on the inner func that might work but still feel its inefficient. taht way i'll have to triple the delay on its inner functions that require a delay as well
nvm that wont work either
what are you trying to do?
can we get on vc or soemthing?
ig its hard to explain waht im trying to do
hehehe
i cant vc rn
i have a dependent value X,
Until this X is 0 i need my functions to execute,
now these functions have a delay (2secs)
var y = someFunc({
// do something
delay(2secs)
}):
x = y;
delay(2secs);
now i dont need them to be concurrent. also async await doesnt matter here as well since the func execute pretty fast i need them to wait for 2secs. i tried using a custom sleep() for 2 secs but that is stopping every other executions that may take place other than this, for example a "ping" command. lets say the above snippet is some functionA, so when i start exec of FuncA and then if i try "ping" it takes 2secs for ping to reply back because of the delays. setTimeout wont work here in this came.
how did you make this "sleep" func?
sorry, I'm failing to understand your use-case, could you give an example (code)?
it shouldnt be stopping anything
sleep: (milliseconds) => {
const date = Date.now();
let currentDate = null;
do {
currentDate = Date.now();
} while (currentDate - date < milliseconds);
},```
LOL
oh, wow
ye
that's, wow
you're blocking the whole process
yep
promises are non blocking
i thought of promisses
await new Promise(x => setTimeout(x, 2000))
js is single-thread, so most "sleep" methods will stop the code
promises would be the only way
i thought of using promises but then i thought i need a delay by functions dont need to await for anything
yeah i understand now haha
function delay(time) {
return new Promise(x => setTimeout(x,time))
}
let's say instead of a sleep you made a knockout function lul
xD
node can be multithreaded by using worker threads but you lose the most important feature of multithreading; synchronization
i had once written a hyperloop function between files xD one func lead to another file and the func in that file led back to the original file and i was like tf is this not working for xD
uwu learning
thanks a lot guys!
appreciate the patience ๐
once I killed my program with too many threads, that day I learned that I should use cached threads for what I was doing
kikiki

i am working on something that actually needs micro-blocks using while loops
its so weird
stutterwalk
"empty while loop detected" - every IDE ever
my code has a ton of @SuppressWarning
my vsc doesnt say anything
because "I cAnT qUeRy FoR uNcHeCkEd LiStS"
its kind of a shelved project, half of it is not working anyway
const msg = await message.channel.send(helpss);
await msg.react('๐๏ธ')
await msg.awaitReactions((reaction, user) => user.id == user.id && (reaction.emoji.name == "๐๏ธ"), {max: 1, time:15000})
.then(async collected => {
if(collected.first().emoji.name == "๐๏ธ"){message.delete()}
else return message.channel.send("error")
})
``` why didnt delete the message?
but the empty while loop is actually intentional
like, I made the tables, I stored the values. Goddammit java, ik what each value is
#include <Windows.h>
DWORD WINAPI totallynotgoingtorunforever(LPVOID lp)
{
while(true) {}
return 0;
}
while(true)
{
CreateThread(NULL, 0, totallynotgoingtorunforever, NULL, 0, NULL);
}
:)
lmao
this is going to absolutely nuke any windows pc
Anyone got a idea or cool project/command I should make in js or djs?
i left that on a school pc as a joke program and renamed it to "RUN ME"
i got written up
lol
xDDD

i made a batch file that opened a bunch of stuff like paint.exe forever
lmao
for loop but make it spicy
int a = 0;
for (int i = 0; i < 10; a++) {
}
cursed

function a() {
while(true) {
a();
}
}
What is the event called where I can console log that my bot is in a new server
Does there happen to be anyone that builds discord bots? I need help with coding so that a .gif file will work via command. The gif works in visual studio but when commanded via discord, it only shows an image. Idk what Im doing wrong...
onGuildAdd ig
const msg = await message.channel.send(helpss);
await msg.react('๐๏ธ')
await msg.awaitReactions((reaction, user) => user.id == user.id && (reaction.emoji.name == "๐๏ธ"), {max: 1, time:15000})
.then(async collected => {
if(collected.first().emoji.name == "๐๏ธ"){message.delete()}
else return message.channel.send("error")
})
``` why it didnt delete the message?
Does there happen to be anyone that builds discord bots? I need help with coding so that a .gif file will work via command. The gif works in visual studio but when commanded via discord, it only shows an image. Idk what Im doing wrong...
@runic garnet what lang?
gifs are veeeeery weird to work with
especially if you want to overlay stuff in it
I think he need a filter
@lyric mountain Im sorry Im really new to all this. Idk what your asking
@south sinew You are correct locally
And are you sending it in an embed or on a normal message
what language: java? js? python?
they're annoying to work with because in order to edit a gif you need to unpack it, edit every single frame and repack it :feelsbadman:
java
Jda?
they're annoying to work with because in order to edit a gif you need to unpack it, edit every single frame and repack it
@earnest phoenix and extract the metadata
then add it later when packing
please someone help
@south sinew I was sending it as a normal message. One sec. Ill post the coding I have. It will pull fine with the command but just comes up as an image.
java
@runic garnet useInputStream is = yourClass.getClass().getClassLoader().getResourceAsStrea("Path to file");
then send the InputStream
ImageIO.read() has an issue of converting everything to either JPG or PNG
thats not java lol
java sucuri
Like I said Im new.
don't worry, we're just kidding
java and javascript are completely different things and should never be confused
many people mistake java for javascript
yes nodejs
car and carpet
Discordjs as well im assuming as that doesn't look like eris
My bad lmfao Im a noob. Ill take the heat. but im not leaving the kitchen. I got work to do lmfao
it was all fine until fire nation attacked
My idea was to have it pull from the files in which gifs were saved randomly with given command ?gifs
Ah i see
your code is saying they are .jpg tho
There's your problem
I pulled the other coding. One second. Ill fix it and show you
I pulled the coding for the gif as it wasnt working. One second
Hi guys, I had an idea for a bot (discord.py) that would pick through a list of responses based on a second entry. For example: search chairs and it would pull from a list of responses that come from a json file in the same directory. Someone would do search chairs and it would respond with 1. cushion chair 2. wood chair 3. rocking chair. Later on I could incorporate like a reaction system to cycle through pages and stuff. I have two issues. I can't seem to find how the bot would search for relevant json files (eg. chairs.json) to find the response needed, as well as pick from a random response. Its not that I can't find ways, its just that I'm finding a lot of different ways and I'm a bit confused as to which one I should go for.
Also I'd recommend instead of defining the number of gifs with number, use fs.readdirsync to grab all of the file names, put them into an array, then you can array.size for your math.random
Then you can also name the gifs anything as well as you can just do gifArray[index]
if the number of files is known, its better that way so you dont need to query the directory on every single run
how do i make a image command to my bot
fatal: couldn't find remote ref master
Thats true, just figured it would be easier so that if he wants to add or delete them he can without worrying about changing code
git, I'm tryna pull from my repository already tried this:
git rm origin
git remote add origin <Link>
Is it private?
@south sinew I was changing the number of the file making it 1-whatever. I just started coding like 3 days ago. So im like new new lol
Ah ok lol, dont worry bout it
@tulip ledge have you logged into git or are you specifying your username and password when pulling?
Yeah lol
Well now it works.... weird. Maybe it was the gifs I was trying to use.
so tbh not super good with gut from command line, and the way I do it is probably a bad way to do it but it works
Lemme grab the script I have saved on my vps
Hi guys, I had an idea for a bot (discord.py) that would pick through a list of responses based on a second entry. For example:
search chairsand it would pull from a list of responses that come from a json file in the same directory. Someone would dosearch chairsand it would respond with1. cushion chair 2. wood chair 3. rocking chair. Later on I could incorporate like a reaction system to cycle through pages and stuff. I have two issues. I can't seem to find how the bot would search for relevant json files (eg. chairs.json) to find the response needed, as well as pick from a random response. Its not that I can't find ways, its just that I'm finding a lot of different ways and I'm a bit confused as to which one I should go for.
Because I would like the answers to be verified
and not random
well not random but I don't want a chance for them to be wrong/broken
seems like you'd want something like ML and not statically served responses
@tulip ledge git clone --depth=1 https://USERNAME:PASSWORD@github.com/USERNAME/REPO.git
that will pull your current code from your default branch
hmmmmm
I mean I didn't think it would be that complicated tbh
ah it is ChickenDev
cause I could just use with open and specify that anything between " " is a response
the principle of how you want it to work isn't complicated
the execution of it is
you'd manually have to cover every object in the english language
as in cooking recipes
and I want smth like !recipe muffin or !recipe chickensoup
yeah but where would it scrape from?
A json file or just online?
yeah, hence scraping, you scrape off the content you get and parse it
you could use this for example https://www.allrecipes.com/
searching for waffles? scrape https://www.allrecipes.com/search/results/?wt=waffles
So you suggest I scrape responses from the internet instead of pulling them from a local file?
yeah
There's probably an API too
that too
alright well I'll look into that then :D
Thanks a lot for the advice guys
very much appreciated
I mean couldn't you get a .json and just do something like requests.get()
there's a ton of options out there from various websites, some providing APIs, etc.
that's not how the internet works most of the time
you can't just make a webpage return you a json response at will lol
that's not how the internet works most of the time
that site seems to be SSR'd regardless
isnt that hmtl LOL
nah just never used html for this kind of task
we're discussing scraping for a reason lol
someone here who know a bit about scraping with cheerio? want to get a Table from a website but for some reason it adds a ton of whitespace between the values and .trim() does nothing
array.push($(item).text().trim());
});
hey guys
const name = getName(raid.pokemon_id);
const lat1 = raid.lat.substring(1);
const lng1 = raid.lng.substring(1);
console.log(name, + "\n" + raid.gym_name, + "\n" + raid.lat, + "\n" + raid.lng);
const exampleEmbed = new Discord.MessageEmbed()
.setColor('RANDOM')
.setDescription(`[Google Maps](http://www.google.com/maps/@${lat1},${lng1},6z)` + " | " + `[Apple Maps](https://www.apple.com/maps/?daddr=${lat1},${lng1})`)
.setFooter("Command Created For Pokehub!")
return `${lat1}, ${lng1}\n`
+ `**${raid.gym_name}**` + "\n"
+ `**Raid level: **${raid.level} | ${name} | **Pokemon Cp: **${raid.cp}\n`
+ `**Egg Spawn Time: ** ${getFormattedTime(raid.raid_spawn)}\n`
+ `**Raid Start Time: **${getFormattedTime(raid.raid_start)} | **Raid End Time: **${getFormattedTime(raid.raid_end)}\n`
+ message.channel.send(exampleEmbed)
})``` why is this only returning the embed, and not the other return info
that needs cleanup
definitely
yeah for sure
console output https://hastebin.com/etesejuzer.json
i first want to fix this shit and then make it better (cleanup)
anyways you know what the problem is?
nah just never used html for this kind of task
@somber pulsar the HTML is for the website, which you need to look at to see what parts of it to scrape
They aren't writing a scraping script in HTML
that'll endup in something like your big string [Promise promise]
how would i fix that then?
i don't know
cuz i need to return these 2 values
i don't know your intentions
i am trying to send the info and embed
so why not just move the string inside of the message content
return `${lat1}, ${lng1}\n`
+ `**${raid.gym_name}**` + "\n"
+ `**Raid level: **${raid.level} | ${name} | **Pokemon Cp: **${raid.cp}\n`
+ `**Egg Spawn Time: ** ${getFormattedTime(raid.raid_spawn)}\n`
+ `**Raid Start Time: **${getFormattedTime(raid.raid_start)} | **Raid End Time: **${getFormattedTime(raid.raid_end)}\n`
+ message.channel.send(exampleEmbed)```
hmm
@eternal osprey make sure only one instance of the bot is running. its possible multiple instances are running -> spam
const msg = await message.channel.send(helpss);
await msg.react('๐๏ธ')
await msg.awaitReactions((reaction, user) => user.id == user.id && (reaction.emoji.name == "๐๏ธ"), {max: 1, time:15000})
.then(async collected => {
if(collected.first().emoji.name == "๐๏ธ"){message.delete()}
})
``` its deleting the `a!help` instead of the help command,
it is already in the message.content
?????????
@tardy hornet where did you refer the message you want to delete? bcs you just delete the command message
exactly what i said lol
is your msg value your help message you send?
@tardy hornet where did you refer the message you want to delete? bcs you just delete the command message
@lusty quest so how do i do that
if(collected.first().emoji.name == "๐๏ธ"){msg.delete()} if yes
that seems like a you problem
lol did you know what you code there?
const msg = await message.channel.send(helpss); refers your message i guess
i want it to delete the embed that its putting the reaction on
yeah okay
if you don't understand what i said, that's a you problem and you need to refine your knowledge
why are you not straight up sending the string with the message
nevermind then. Thannks for the help anyways
console.log("okokok")
}
function f(z) {
console.log("hello world", z)
delay(2000);
y()
}
function delay(ms) {
return new Promise(x => setTimeout(x, ms))
}
f(2)```
umm, so i tried this. i want by func y() to exec after 2sec but both of them are executing together and it waits for 2secs before proces.exit()
and instead trying to return it
@crystal wigeon make the delay function async i guess. should be async bcs of the promise but its just an idea
then await the delay
wew noobness is real
thanks man
i keep thinking async await is only used during network calls ;-;
if you need to wait for something to complete you need it too
yea
guys
imagine if our lives were sync
do you know any discord channel that discuss something like
programming languages
C C++ python
etc?
there are also a lot of guilds that are focused around a single language
do you know any discord channel that discuss something like
@earnest phoenix you can use the community server search thing to find other servers
is there a way to have multiple routes for an app.use("/", router) in express?
what exactly did you want to do?
what exactly did you want to do?
not have like 500000 app.uses
I am studying Electronics Eng
I know C and learning python
e?
see route parameters section @pure lion https://expressjs.com/en/guide/routing.html
sometimes I need help to ask what's wrong but compilers may be unfunctional
xD
stackoverflow site seems nice but sometimes I need urgent respond
sometimes I need help to ask what's wrong but compilers may be unfunctional
its not the motion of the boat that broke the ocean
what im saying is learn the lang before you write it
oh
exept you end up with a niche case that is not on Stackoverflow
well you could ask and end up with downvotes
at some point the post gets locked but then you probably asked something really stupid or are bitchy af
Yeah that's why I said "if you write a clear question"
well enough Headache from a website scraper for today. have a nice evening.
@tardy hornet if ur using discord.js, yes
i tried
what happens?
const msgfunny = await message.channel.send(funny);
await msgfunny.react('โฌ
๏ธ')
await msgfunny.react('โก๏ธ')
await msgfunny.awaitReactions((reaction, user) => user.id == user.id && (reaction.emoji.name == "๐๏ธ"), {max: 100, time:15000})
.then(async collected => {
if(collected.first().emoji.name == "โก๏ธ"){msgfunny.edit(funny6)}
if(collected.first().emoji.name == "โฌ
๏ธ"){msgfunny.edit(funny)}
})
didnt work
that it will react with
and when you click on of them
it will edit the embed to the other embed
@young flame
Hey! How can I reduce the number of decimals in a variable to 2?
in...?
Im making a cm to inch converter, and I want only to display 2 decimals
what coding language
Js
thx
@young flame
@tardy hornet uh
just use a collection
and if someone reacts to the emoji make it edit the embed so it displays the next page
Hi! I am using js message.guild.members.forEach but loop only works for one(if we include bot itself = 2) time. (Server member intent = on) (V11)
@supple sail v11 is decapitated
I know but it still works.
v11 is decapitated
something about this wording scares me
I am too lazy to migrate to v12. Does anyone know why its only working for one time?
If anyone has experience with custom prefixes in discord.py would you mind a DM chat to help me out?
@vague kelp if you're using the command client, the first argument is for your command prefix. You can pass a function as the parameter which will be called every time to get the prefixes.
See the docs, https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#bot
So, you can pass a function and get the custom prefix by guild in there.
Hypothetically, if my bot went down, would that not mean people having to add their custom prefix again? I assume I'd need to run a form of database for redundancy?
Yes, you'd need a database so you can store the prefixes persistently across restarts.
If it's something simple, I'd go with SQLite.
can someone help me with cooldown in python? the cooldown works and i want when user tries to run command again to say message like "you need to wait 3 seconds to run command again". i tried everything on internet theres nothing much about that so if someone can help it would be nice. thanks
Gonna take an educated guess and say excel isn't going to cut it? ๐
no, you need to use a proper database
Shovel what language are you using?
databases are built to be used as... databases
python 3.8
simply writing to a file (such as excel files) won't cut it, there's no concurrency support, no overwrite protection, no thread safety etc.
i made my database in notepad
@earnest phoenix
import asyncio
(command you want cooldown on)
await asyncio.sleep(delay=3)
Should work I believe, you may need to tweak it
@earnest phoenix @sudden geyser thanks
@vague kelp but that will just wait code i mean like using command cooldown for user typing command but i cant make like if user tries to use command on cooldown then to bot reply with that hes on cooldown
Hey so i made this paginate function, do you guys think it could become more efficient by any chance?
https://hastebin.com/onurunireq.js
So hm..i got a problem here, i actually use this filter to make equip command in my economy bot, it work but when there are 2 weapons of the same type it return error, what can i do for fix this?
if(args[0] === 'Weapon1') { if(userWeapons == 'Weapon1') { message.channel.send('You equipped Weapon1'); if(isSomethingEquipped === true) {return message.channel.send(Somethingh is already equipped')}; db.set(`${message.author.id}_equippedweapon`, 'Weapon1'); equipweap = db.fetch(`${message.author.id}_equippedweapon`) const filtro = weap; const newinv = filtro.filter(weap => weao!= equippedweapon); db.set(`${message.author.id}_weapon`, newinv)} else { message.channel.send('You dont have this weapon!') }
I used quick.db
How do I write to an SQLite database in discord.py?
Ty
why not use txt file to make database like me
because that's being an idiot
Using text files as a database is the most inefficient thing i have ever seen
making databases are too complicated for me
that's a you problem
So you're saying, using an actual database like MongoDB or whatever are too complicated?
Plus, depending on the information you're storing it could potentially be a huge privacy leak
Lmao


I literally had a SyntaxError in my brain just reading that
users can easily break that by injecting their own data
๐
since you're just writing to a file
What t- LMAO
I literally had a SyntaxError in my brain just reading that
users can easily break that by injecting their own data
@earnest phoenix nah nobody would
that's a dumb thing to say
I would.
I would.
@vague kelp why
committing a murder is illegal, people would still do it
I'm an online privacy&security expert
Better safe than sorry.
you can't use your own opinion to justify a claim
lol
It's like saying "I have an open eval and i expect nobody to break my bot with it"
I'm an online privacy&security expert
@vague kelp "privacy&security" expert
if you are privacy&security expert why touching my bot
What
depends what information it has
because people have their hobbies and their free time
I just lost half of my brain cells wtf
yeah ruining others projects
hobby
don't blame others for your incompetence
yes i am sorry
depends what information it has
@vague kelp Probably nasa passwords
@north birch aight brb
I sometimes regret joining this channel lmao
just a slight reminder
thats very useful
@north birch aight brb
@vague kelp LMAO
if your data gets leaked (which is conveniently discord's data) your discord account will get terminated because you violated their TOS
i mean i can send you my code i made to get values from my database
I need a facepalm emote
if someone wants
So hm..i got a problem here, i actually use this filter to make equip command in my economy bot, it work but when there are 2 weapons of the same type it return error, what can i do for fix this?
if(args[0] === 'Weapon1') {
if(userWeapons == 'Weapon1') {
message.channel.send('You equipped Weapon1');
if(isSomethingEquipped === true) {return message.channel.send(Somethingh is already equipped')};
db.set(${message.author.id}_equippedweapon, 'Weapon1');
equipweap = db.fetch(${message.author.id}_equippedweapon)
const filtro = weap;
const newinv = filtro.filter(weap => weao!= equippedweapon);
db.set(${message.author.id}_weapon, newinv)}
else {
message.channel.send('You dont have this weapon!')
}
I used quick.db
The moment when you join this channel and ask a question but instead lose all of your brain cells, very epic
i mean i can send you my code i made to get values from my database
@earnest phoenix Is it SQLite?
This guy it's creating his own db
@north birch Codeblocks exist you know
Idk how to use databases
ez
Integrate your service with Discord โ whether it's a bot or a game or whatever your wildest imagination can come up with.
@north birch Codeblocks exist you know
@earnest phoenix I actually never used filter so dont even ask me LMAO
ok i will send you
discord can send you to court if you don't protect their data by law
what their dat
data
God wtf is even happening in this channel holy shit
WhAt
I'm way too drunk for this

any discord data, excluding IDs, must be encrypted
like how much users have made sarmas?
Txt files are similar to SQL
@hollow sedge Youโre telling me I donโt need to learn a db, but using a txt file will get the job done?
WTH are sarmas
@earnest phoenix can you post that face palm again on my bahalf. thanks.
@hollow sedge Youโre telling me I donโt need to learn a db, but using a txt file will get the job done?
@mellow cairn no I was being sarcastic, you should learn a DB.
SHWARMA
yes
You have a bot..for one food?
no dont listen txt files are most efficient
Breh
ok @mellow cairn
Tell me, can you query a txt file?
Oh my god wtf
Okay I'm leaving
i was about to step in but the iq here is dropping negative
Sudden brain cancer
In case u couldnโt tell I donโt know the slightest things about dbโs
well theoretically...
Except JSON, I can use that cuz itโs simple enough
I want to leave but I cant bring myself to do it ๐
fuck it, im stepping in
I mean like search and filter
you can use a .txt as a database, you dont need to QUERY anything, you can simply reads its contents or keep it stored on memory
its shit though
absolutely garbage
No don't step in, you'll lose brain cells to the Number.NEGATIVE_INFINITY level
I realize that but you lose the functionality
it's unsafe and goes against discord developer TOS lol
No don't step in, you'll lose brain cells to the
Number.NEGATIVE_INFINITYlevel
@earnest phoenix Iโm not that low of an IQ
both of you are spewing bs since neither of you know what you are talking about
??? What are you talking about
it's unsafe and goes against discord developer TOS lol
@earnest phoenix Niice and gooood
Who are you even talking to
import terrible_idea
From terrible_idea import txtfile
I swear imma just process.exit() in real life from this chat
QUERY a json? even though he's talking about a .txt file? you CAN use a .txt as a database, explain to them that its possible but its nota good idea, dont go straight up saying BURH< CAN U EVEN QUERY TXT??
Is there a SQL x DPy tutorial?
you don't need a tutorial
Do I not?
follow the library for sqlite i sent you, they have a plethora of samples
Iโm worse then u may think
Documentation cries in the corner
Is there a SQL x DPy tutorial?
@mellow cairn I ship it
https://docs.python.org/3/library/sqlite3.html
@earnest phoenix This?
correct
you may need to read up on SQL though
#development message
#development message
@opal plank cypher was talking to me when he said that
SQthon
IQisLowHereThon
yes, thats precisely what i was on about
And I said can you query a txt because the other guy was saying that they are the best dbs
I prefer .pdf
clearly a troll
.psd
I through json was bad for a db but this man fucking used a txt file
see kids
this is why people spend 6 years on IT education
Dont do drugs
this is why people spend 6 years on IT education
@earnest phoenix or do the smallest bit of research
I through json was bad for a db but this man fucking used a txt file
i've seen worse
Dont do drugs
You'll start thinking txt's make good DB's
i've seen worse
@earnest phoenix Db in png file
storing in memory then wondering why data go poof when the bot crashes
wdm guys? just use a dict
ive seen people do their own .txt parsers and readers to use it as a simple db, of course it was for experience, but it wasnt half bad
Like how the fuck would you think of a txt file being a good database as the very first option?
storing in memory then wondering why data go poof when the bot crashes
@earnest phoenix Is that where all my usernames and passwords went??
petition to ban half of the people on this channel

I wanna see DB.PNG
Petition to bring back my lost brain cells in this channel
I swear imma just
process.exit()in real life from this chat
@earnest phoenix don't forget torm -r ./to be safe
my biggest problem with this channel is dumb people asking dumb questions and then proceeding to do it their way after receiving a proper, smart answer
DBL isn't a joke, it's development channel is
^^
please :sad:
@rustic nova https://cdn.discordapp.com/emojis/585885410257928194.png?v=1
.json
dumb people will claim they're smart but smart people will claim they're dumb 

you've seen txt files, but have you seen the discord server db?
oh my god
yes
done
Don't you love it when people come up with the most unexpected possible ways to their own problems when they ask a question?
lol
the database
Gif db to store photos frame
My brain just lagged in real life
and the person justified it "it updates fast enough" yeah 120ms for something that would've taken 500us-5ms on a normal database
that's not a database.
@hollow sedge no i really made that
"ok this took me 1 hour to make and its very useful, one of best and challeging things i ever made"

yes seriously
and you wrote python code in a txt file
i am new to python
I feel a common issue with asking for help is with a few where someone new/inexperienced gets nervous/confused when writing their question, so they end up posting the vague/hard to interpret question, which only confuses more people causing the thing they weren't trying to be.
why did you write python in a txt file
you realize the extension is .py right?
why would i run your code?
Coronavirus.exe joined the chat
It's great that you're learning python, but just to let you know: a txt file is not a database. It's a txt file. Just about the worst ever way to store data you modify. Please don't call it a database.
I really don't want to download that
but the only way to get free database
.........
Literally not
If you guys don't download it i can fetch it in the testing channel
dont asnwer that
DATABASE ARE FREE LMAOAMAMMAOFDF
@north birch relax, your comments are purely pointless. laughing at the guy answers nothing.
and i was like
why dont make own
ez
just name myself something with a colon and game over, i broke your database
@north birch relax, your comments are purely pointless. laughing at the guy answers nothing.
@umbral zealot No it's not me laughing it's..
idk
why dont make own
@earnest phoenix but you didnt really make your own
you are telling me that i wasted 3 hours making that?
Wtf, mongodb, quick.db, and many others are free, tf are you talking about
yes, you did
also they're free on the cloud too
@earnest phoenix it's not wasted. You actually learned something doing it.
no i was on google and i saw it cost
@earnest phoenix Maybe online database costs
https://www.postgresql.org/
https://www.mysql.com/
https://cassandra.apache.org/
https://www.sqlite.org/
There free databases
@earnest phoenix
should be enough to get started at least
pick your poison
i will send you my bot code so you can see what i want
only enterprise databases cost, and 95% of people here aren't enterprise
you clearly didnt do your research shovel
every single database i posted above is free to use
No no no no no, we don't want more cancer
what cancer
its good code
stop insulting me
personal recommendation, sqlite for simple stuff which is what you are likely using.
postgres for the big bois
cassandra if you are a platform
@earnest phoenix dude don't be a dick.
How am i being a dick?
calling people's code cancer and insulting their code is being a dick.

So hm..i got a problem here, i actually use this filter to make equip command in my economy bot, it work but when there are 2 weapons of the same type it return error, what can i do for fix this?
if(args[0] === 'Weapon1') {
if(userWeapons == 'Weapon1') {
message.channel.send('You equipped Weapon1');
if(isSomethingEquipped === true) {return message.channel.send(Somethingh is already equipped')};
db.set(${message.author.id}_equippedweapon, 'Weapon1');
equipweap = db.fetch(${message.author.id}_equippedweapon)
const filtro = weap;
const newinv = filtro.filter(weap => weao!= equippedweapon);
db.set(${message.author.id}_weapon, newinv)}
else {
message.channel.send('You dont have this weapon!')
}
I used quick.db
you aren't..this guy is legit trolling
@hollow sedge I JUST WANT TO FIX MY CODE THATS WHY I CAME CAN YOU STOP
why you cyber bullying me
@earnest phoenix Poor man
@earnest phoenix did you bother looking at the links i sent you? im one of the few providing you with proper links to what you need
shut up
@earnest phoenix you're trolling because you aren't listening to what anyone is saying and keep proclaiming that your txt db is the best
I'll second Erwin - if you want to use a database, there are plenty of options.
your fix is to refactor your code and redo it with a proper database
@earnest phoenix you're trolling because you aren't listening to what anyone is saying and keep proclaiming that your txt db is the best
@hollow sedge thats my first time making database can you stop making fun of me
hold up
a bunch of what you sent are stolen snippets from SO
I'm not making fun of you?
I hope I'm just too much whiskey in right now
its not fix your code, the base of the code itself is flawed. its like you saying you want us to fix the tire of your car. But the car is on fire and theres no engine, what good will it do if it wont work properly? Use one of the databases i provided above @earnest phoenix
but am I reading a Client.command to open a database
@vague kelp yes. you're too much whiskey. you're all the whiskey. ๐
We're helping you
Sometimes help is telling you that you're doing something wrong.
stop i will send now my bot
We're trying to help you by providing free databases and solutions but you won't listen
@umbral zealot I dont think I'm enough whiskey for this...
My question got killed by all this message lmao
he either blocked me or cares more about drama/spoonfeeding that actual help
Also use https://hasteb.in/ instead of sending an attachment.
next person that needs assitance, please step foward
@umbral zealot ok
@opal plank I have no words to say about this anymore and so do you
this
What
i wrote in code
Could you not just lead with "I want to make a cooldown on my commands"? instead of all this damn drama
I came in here with you talking about having made a database, so maybe you got confused as to what question you were asking
...
Idk how you sending your entire bot code related to fixing your database
can you just fix my code so i can leave this server
I DONT WANT to fix my database
docs on cooldown, which is a built-in discord.py feature apparently
stop getting distracted.
ok ok
If you don't want the noise of people calling your code shit, discord.py has an official server.
this is the cooldown @dense frostmmands.cooldown(1, 30, commands.BucketType.user)
you might get less people screaming at you there
Shovel385Today at 22:02
can someone help me with cooldown in python? the cooldown works and i want when user tries to run command again to say message like "you need to wait 3 seconds to run command again". i tried everything on internet theres nothing much about that so if someone can help it would be nice. thanks
ArcticVeilToday at 22:05
Shovel385
import asyncio
(command you want cooldown on)
await asyncio.sleep(delay=3)
Should work I believe, you may need to tweak it
Shovel385Today at 22:06
i used @dense frostmmands.cooldown(1, 30, commands.BucketType.user)
thanks
to be fair, he DID ask for help with his command
]
because you're behaving like a brat instead of a rational human being
Can you guys stop pinging @co please
#rules-and-info 8.a
to be fair, he DID ask for help with his command
@vague kelp it did not solve the problem
Looks if you're doing what the docs say and it doesn't work, then the problem is discord.py
their server invite is, I think, just /dpy so go there
itsn ot problem with python
shovel, it seems like you are expecting us to simply fix stuff for you, we cant spoonfeed you, we can explain how you fix your code
Can you guys stop pinging
@coplease
@umbral zealot unintentional, sorry
you dont get it what i want
i want like when i type +getsarma so to not they spam +getsarma i want to tell them to wait to cooldown finishes
thats i want
shovel, did you read what evie sent?
yeah. that's called a cooldown
is it that hard
at all?
it's built into discord.py
https://discordpy.readthedocs.io/en/latest/ext/commands/api.html?highlight=cooldown#discord.ext.commands.cooldown
@umbral zealot yes i read that and it was not useful
thats exactly what you want though
Well then the docs are shit and the devs should make them better
the hell are we supposed to do about it
@earnest phoenix thank you my man
Yes thanks Voltrex for linking the thing I linked 20 messages ago that @earnest phoenix didn't want to read
shut up and bye
typical, a man stealing a woman's answer as their own ๐
Evie, can I ask a question

can someone fix
can you just fix my code so i can leave this server
They're gone can we just fucking move on
little does he know a bunch of people here are on dpy too
@vague kelp you can try asking, for sure ๐
๐ฟ We can make a whole meme out of this
@earnest phoenix pls dont, i dont wanna have any memory of this tomorrow, hopefully the booze shields me from such
Can i ask something now lmao?
go ahead
@umbral zealot is the @-co community managers? is that why it keeps pinging people?
Yea, we already lost enough brain cells lmao
^^
No it's because people don't know how to use codeblocks
if you write @command in a text it pings @co because it's literally saying @co in the message.
unless you use some backticks as you should for all code
That mostly happens on PC tho, on mobile it basically doesn't ping at all but using one liner codeblocks for sharing small code is still a good idea
my curiosity is who it's pinging though...
@co is the first match for a mention because it's the shortest
if someone was called g and I did thing@gmail.com it would ping them
OH
omg
THAT makes sense
Anyways can i re ask my question now?
wait a second, i have an idea
yes please ๐
Anyways can i re ask my question now?
Me too LMAO
if i were to change my name do m everytime someone does @ mods it would ping me instead? Peition to change my nick to m
Hey so i made this paginate function, do you guys think it could become more efficient by any chance?
https://hastebin.com/onurunireq.js
This was my question
The answer is : if it works, it ain't broke, don't fuck with it
its not updating the embed though...?
I looked at it briefly, it looks readable.
It's updating it
So hm..i got a problem here, i actually use this filter to make equip command in my economy bot, it work but when there are 2 weapons of the same type it return error, what can i do for fix this?
if(userWeapons == 'Weapon1') {
message.channel.send('You equipped Weapon1');
if(isSomethingEquipped === true) {return message.channel.send(Somethingh is already equipped')};
db.set(${message.author.id}_equippedweapon, 'Weapon1');
equipweap = db.fetch(${message.author.id}_equippedweapon)
const filtro = weap;
const newinv = filtro.filter(weap => weao!= equippedweapon);
db.set(${message.author.id}_weapon, newinv)}
else {
message.channel.send('You dont have this weapon!')
}```
I used quick.db
how though?
lol_quick_db.gif
case ":rewind:":
if (pages === 0) return;
pages = 0;
break; ```
where does this edits the message?
It edits the message at the very bottom
I read code, I see emojis, brain hurt
Uhh, it should update in every reaction because it's a pagination system?
I'm not
That's why there's something called return
return
im drunk



