#development
1 messages · Page 1311 of 1
ok can somebody tell me the html code to add background image to description ?
Website with PayPal link
I’m under 18 so patreon if it sends to PayPal, will need like bank approval
Website with PayPal link
@rose warren PayPal .me?
Yeah. I use patreon but they take killer fees
Heroku is not stable
@earnest phoenix yes it is
What
I use it
Heroku is not ideal but it's ok when you're starting out
Using it doesn't mean it's stable
hello can somebody help me with this "ok can somebody tell me the html code to add background image to description ?"
But definitely move away from it soon
Heroku is not ideal but it’s ok when you’re starting out
@rose warren fair, my heroku can hold like bot playing music at once in 50 servers
But o think my Ffmpeg dodged
i have to buy raspberry pi to host my bot. after that, i need a fast wifi provider.
Died
Heroku wasn't meant for bot hosting, that's why you should move on
because i can't control my bot, can't see the log in heroku
Im having issues with LAVALINK
Anyone understands it? I can’t start the ll server
heroku batter than glitch
yes
Heroku has a lot of memory leaks, and also can't install a lot of packages
but i don't know if it just happen to my bot or not. it restart once per day.
Heroku has a lot of memory leaks, and also can’t install a lot of packages
@earnest phoenix wuts a mem leak?
so all the custom prefix is gone.
so all the custom prefix is gone.
@pearl trail save custom prefixes in a db
Reasons why you shouldn't use Heroku for your bot:
- Bots are not what the platform is designed for. Heroku is designed to provide web servers (like Django, Flask, etc). This is why they give you a domain name and open a port on their local emulator.
- Heroku's environment is heavily containerized, making it significantly underpowered for a standard use case.
- Heroku's environment is volatile. In order to handle the insane amount of users trying to use it for their own applications, Heroku will dispose your environment every time your application dies unless you pay.
- And due to a lot of other issues....
@pearl trail save custom prefixes in a db
@rose warren JSON FTW
i'm still searching how to save custom prefix in db 
Heroku doesn't support saving stuff
Json can corrupt
I’m joking
😂
Heroku doesn't have support for external databases, that's why it doesn't save anything
json can corrupt 
I use humandb, i lock some kids in my basement and make them remember my bots database stuff
tf lmao
I use humandb, i lock some kids in my basement and make them remember my bots database stuff
@drifting wedge sounds like a cheap alternative
JSONs are prone to corruption because of so many read and writes, the bigger it gets the worse
It’s hard to get them there, I had to offer developer badge
I use humandb, i lock some kids in my basement and make them remember my bots database stuff
@drifting wedge quick.db china edition you meant i assume
Sql
MongoDB is the best database for a bot
MongoDB is the best database for a bot
@earnest phoenix I use it pogggggggg
yes
or just don’t use heroku :)
Mongo atlas is what most of us use
You can use mongo on heroku too tho?
my bot's total size is 125mb ;-;
But atlas version of mongo requires clusters which might require money, there's a free cluster but not much to it
hi
Can someone help me out?
https://prnt.sc/uwp1gj - The console says there is an error on line 18 but doesn't know what to do, please help.
for guild in client.guilds: client not defined?
If anyone has any idea about putting a let in a code and a error bouncing back saying
"let channel = message.mentions.channels.first();
^^^
SyntaxError: Lexical declaration cannot appear in a single-statement context"
Would be helpful...
@earnest phoenix remove line 20 and 21 and add a } after line 22 (after the message.channel.send function)
Hi, I need help with shortening command if statements
Code bellow is what i use now, it works but it gets very long and i dont like it
if (cmd === "command1") {
dosomething()
}
I wanna do something like this
if for example msg.content matches "cmd1", i want to call cmd1 without explicitly calling it
var commands ['cmd1', 'cmd2']
if (msg.content matches cmd1, call command 1 without explicitly calling it) {
call[msg.content]
}
I havent tested it out yet but i have some ideas, im interested if someone has better way of handling commands
dpy or d.js?
djs, python looks nothing like that ;d
@azure jolt use this guide https://discordjs.guide/command-handling/#dynamically-reading-command-files
Should get you heading in the right direction
If anyone has any idea about putting a let in a code and a error bouncing back saying
"let channel = message.mentions.channels.first();
^^^SyntaxError: Lexical declaration cannot appear in a single-statement context"
Would be helpful...
@static wraith Are you putting that inside an if statement wthout braces?
How can I create a channel invitation and send it in en embed message ?
@sand dune Which library are you using?
discord.js?
@sand dune GuildChannel.createInvite()
https://discord.js.org/#/docs/main/stable/class/GuildChannel?scrollTo=createInvite
Anyone know why tf getting error like that TypeError: Cannot read property 'prefix' of undefined
👀
that's how you create an invite
😂
Anyone know why tf getting error like that TypeError: Cannot read property 'prefix' of undefined
@flint yew The parent object is undefined
Send the code pls
I am only doing setprefix command
Send the code pls

How do you code like that? 👀
@earnest phoenix remove line 20 and 21 and add a
}after line 22 (after the message.channel.send function)
@rose warren https://prnt.sc/uwpb9u - Is it that way?
1min lol
@earnest phoenix no that's not what i said. Look at your original screenshot
@earnest phoenix
@sand dune it literally has an example in the docs. Make your embed in the .then( part.
are there any good image generators
@earnest phoenix no that's not what i said. Look at your original screenshot
@rose warren can you write the error-free version of the incorrect part of the code because I couldn't understand what you said.
Paste your code here please (only the if (response.data.... part)
It's a syntax error
Anyone know what enmap is ?
@rose warren o shid
this helped a lot, tnx
No problem @azure jolt it's a useful website. Take a look around.
@earnest phoenix paste your code i'm not going to type it all out
Paste your code here please (only the
if (response.data....part)
if (response.data.length) {
message.channel.send('🔦 Aranıyor...'.slice(0, 256),
image:
url: response.data[Math.floor(Math.random() * response.data.length)].images.original.url
}
})
});
anyone know commando :/
const Discord = require('discord.js');
const client = new Discord.Client();
const request = require('request-promise-native');
client.on('message', msg => {
if (msg.content === 'gif'){
let Options = {
url: 'api.giphy.com/v1/gifs/search',
q: encodeURI(args.join('+')),
limit: 10,
offset: 0
};
let response = request(Options);
if (response.data.length) {
message.channel.send('🔦 Aranıyor...'.slice(0, 256),
image:
url: response.data[Math.floor(Math.random() * response.data.length)].images.original.url
}
})
});
what
TypeError: Cannot read property 'prefix' of undefined. anyone help with this if u know commando i want to do setprefix command
@earnest phoenix
TypeError: Cannot read property 'prefix' of undefined. anyone help with this if u know commando i want to do setprefix command
@flint yew show the code causing the issue and someone might be able to help. Without the code no-one can help.
https://prnt.sc/uwpjz5 - Now this error is out. :/
const { Command } = require('discord.js-commando');
const fs = require("fs");
module.exports = class setPrefixCommand extends Command {
constructor(client) {
super(client, {
name: "setprefix",
group: "admin",
memberName: "setprefix",
description: "Change the server prefix (mention will always work)",
guildOnly: true,
args: [
{
key: "newPrefix",
prompt: "Please choose the new prefix you want to set.",
type: "string",
},
],
});
}
run(message, { newPrefix }) {
if (this.client.config.prefix !== newPrefix) {
let localConf = this.client.config;
localConf.prefix = newPrefix;
fs.writeFile("../../configprefix.json", JSON.stringify(localConf, null, 3), (err) => {
if (err) throw err;
message.say(`Successfully updated prefix to \`${newPrefix}\``);
});
this.client.log(`Prefix Updated`, `New value: **${newPrefix}**`, 323295, message);
} else {
this.client.error("That already is the current prefix!", message);
}
}
};
``` anyone help TypeError: Cannot read property 'prefix' of undefined
ah, commando
this.client.config isnt a thing
anyone how to link openssl to cmake
this.client.config isnt a thing
@digital ibex wdym
this.client.config doesnt exist
https://prnt.sc/uwpjz5 - Now this error is out. :/
@rose warren, sorry about ping but i need help. :/
same way this.client.vfdjnefirjrjirefjirejfijrfjjfrjjrfirjf isnt a thing
this.client.config doesnt exist
@digital ibex then what must be
Just a FYI, MANAGE_SERVER is now MANAGE_GUILD
Try this.
const Discord = require('discord.js');
const client = new Discord.Client();
const request = require('request-promise-native');
client.on('message', msg => {
if (msg.content === 'gif'){
let Options = {
url: 'api.giphy.com/v1/gifs/search',
q: encodeURI(args.join('+')),
limit: 10,
offset: 0
};
let response = request(Options);
if (response.data.length) {
const attachment = new MessageAttachment(response.data[Math.floor(Math.random() * response.data.length)].images.original.url);
message.channel.send('🔦 Aranıyor...'.slice(0, 256), attachment)
}
}
});
@earnest phoenix
an object with prefix
the prefix in config.json
then do that then
just do
this.client.config = { prefix: 'ur prefix here' }
and if u wanna add more data to the config object do the same thing
@digital ibex but that will work for the setprefix command
Is that working for you @earnest phoenix?
It will change prefix and save it
Okay let me try
Is that working for you @earnest phoenix?
@rose warrenrequest-promise-nativemodule is now out of use, what can I do? :(
One message removed from a suspended account.
just if u misunderstood me, adding that line of code doesn't save anything @flint yew
One message removed from a suspended account.
One message removed from a suspended account.
:/
what r u tryna do, eare?
Seems fun right?
Totally didn't just accidentally change the config of 48 bots on a command and didn't notice until now
@digital ibex still same error
show ur code
I only added ur code
where
Above this.client.config
Someone help please im trying to install enmap and better-sqlite3 but it keeps coming up with this...
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! better-sqlite3@7.1.1 install:prebuild-install || npm run build-release
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the better-sqlite3@7.1.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.npm ERR! A complete log of this run can be found in:
npm ERR! /Users/harrison/.npm/_logs/2020-10-10T14_22_22_618Z-debug.log
where did u get this code from?
@flint yew
you cant just copy the code without understanding it
Yea ik
@static wraith i think that's because it can't be installed in discord.js v12
because i have the same problem before
@digital ibex it's only a small code not even need anything else
it doesnt change anything, its code which you dont understand
so @pearl trail how would i get it to work
because ive just dont all that
for it not to work?
yes i think, you need to downgrade the node.js
how do i do that?
it's the problem
Use node-fetch @earnest phoenix
@rose warren i typed "gif cat" but the bot didn't send me a GIF. https://prnt.sc/uwpthu - I added the module to the code like this.
she said use nvm but i don't know how to use it, bcause i have never use it
hi
You need to re-write the request for node-fetch. It doesn't work the same way as the module you were using before
node version manager (nvm)
Is it possible to degrade your npm?
node fetch sucks I'll use phin because my VPS has super less storage space
or discord.js i mean
yes xD
How do i go down in versions?
npm install discord.js@12.2.0
thankyou
fetch(url)
.then(r => r.json())
.then(data => {
// discord message stuff here
})```
@earnest phoenix
@static wraith checkt the versions online
You'll find some good help online @earnest phoenix
too lazy to read it one by one 
Use the GIPHY API too
Still got the fkn error

What is the recommended amount for sharding?
1000
Still got the fkn error
@static wraith the error isn't acting stupid it's you not trying to fix it 🙂
Spook wait a min
Before you get to 2,500
I'm getting up rn
Nah
To tired to work on it rn
Just disabling
It fucked up half of my bot overnight
All configurations for every server got messed up
@static wraith the error isn't acting stupid it's you not trying to fix it 🙂
@earnest phoenix Well obviously i am trying or i wouldnt be here lmao
fetch(url)
.then(r => r.json())
.then(data => {
// discord message stuff here
})```
@rose warren which line should I delete and write this in?
My bot still working like a charm @blissful coral
It fucked up half of my bot overnight
@blissful coral me and the git bois reverting back changes be vibin'
:/
VPS
Not git
@solemn leaf It was something with my db paired with the way I changed some stuff
@earnest phoenix
client.on('message', msg => {
if (msg.content === 'gif'){
// Re-write all of this using node-fetch methods
}
});```
I think I found a fix just now but still getting really annoyed and I am super tired'
client.shard.broadcastEval('this.guilds.cache.reduce((acc, guild) => acc + guild.memberCount, 0').then(console.log)
Shard is launched
And I am not getting a result
From this
i see the error maybe
My db still works lmfao
wtf does this line mean:
acc + guild.memberCount, 0'
especially the zero
accumulated value + next guild members count @earnest phoenix
that's how reduce works
huh
you have to type that
what is enmap lol
No but I am curious
shh, hindsight might see this
i try host to not work

lmao
@earnest phoenix you cant host it
i try host to not work
@earnest phoenix w h a t
its a rich presence preview
🥲
syh
not in bots :P
yes, not in bots,
but yes you can make any "application" use it
Bots are technically a sub-thingy of discord applications and rich presences are for ANY discord application so you can LITERALLY USE RICH PRESENCE FOR NOTS
client.shard.broadcastEval('this.guilds.cache.reduce((acc, guild) => acc + guild.memberCount, 0)').then(r =>
client.user.setActivity(`${r} Users!`, {type: "WATCHING"})
)
This look right?
Anyone give me application code
Spoonfeeding
@sinful tangle No we do not spoonfeed
yes, that rich presence is for you
@compact oriole i need use main ac
you can't use custom rich presence for bots
@compact oriole unless...you've got game dev license and you have a game in the exact same application as the bot

Extreme .broadcastEval returns a promise resolving to an array of anything.
Bruh
what is the problem?
@pearl trail
period.
@sudden geyser Yeah I noticed that and just now fixed it
bruh
if bots could have custom rich presence, it would be insane news
reduce the reduced 
@compact oriole bruh i meant that people can have rich presence set for themselves through botums i didn't say bots can have custom statuses
that is false too
Looks alot better then the 19 I was getting lulw
bruhhhhhh
that you run on your local machine
i-
nice typo lol
any way to view server votes? view bot votes are documented in the api, bot cant find anything regarding server votes
literally said you can have rich presence even if there is a bot associated with the application
and discord is weird
I'll be on the lookout for ways to have bots set your rich presence 🙂
no
that'll be cool tho
that's not possible
you cant do that
@blissful coral keep your index
only the user can set rich presence
You can edit your node file
only the user can set rich presence
yea
To make bot.js be node .
@compact oriole WAIT YOU HAVE GAME LICENSE
yes?
that means you develop games?
yes?
@solemn leaf I already did lol
can anyone help em insatll better-sqlite3 now because ive done enmap but i cant seem to get that one
ah, you run it in glitch
yes
yes
ah, you run it in glitch
@pearl trail thought that was to me then relized
actually, that's not my code. i'm trying to use heroku (yes, it's stupid things) so i upload it to my repo and it doesn't work
not sure for discord.js

new emoji

@pearl trail what is solution
Thx @compact oriole
i don't have any solution for now until you run it on your own computer/laptop

sad


even i download every python app in play store to run it
@pearl trail you tried installing python...from google play store...which is for android stuff...yeah it's big brain time

laptop



?????

What are you trying to do?
rich-presence
this
Are you developing a game?
you
can't
https://hastebin.com/nevuzudeyi.py there is a glitch where if you have 2 games going on in different channels or servers it will give same guess of who it is. Is there anyway of fixing this? i am using akinator.py
why?
If anyone can help me with the Better-sqlite3 Please dm me

no one?
-ask2ask
Don't ask to ask.
Just ask your question, it wastes time if you say "i need help" or "can someone help me?" instead of just saying what the problem is. Save your time and other people's time and just ask the question.
Please read https://dontasktoask.com/ for an explanation on why this is an issue.
P.S. just state your issue here
Well its just failing to install the script
Show error stack trace
quick question, do semicolons matter in js? if not used at all will it cause an unexpected error
pastebin moment
hastebin*
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! better-sqlite3@7.1.1 install: prebuild-install || npm run build-release
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the better-sqlite3@7.1.1 install script.
Semicolons aren't needed in js but it's good practice to use them, it should be used on making invokable functions @azure jolt
most important part ig
@earnest phoenix can you help me ?
how can I cast the command just by voting ?
@earnest phoenix What do you mean by that
@static wraith Do you have quick.db installed?
I have a command but I just want it used by voting
No...
😑
Is it just npm i quick.db --save?
You mean, it would only work if you vote the bot on top.gg?
yeah
You could use the dblapi.js and get the votes of your bot, if the user exists there run it, if not return, that's it
what is twitch emotes
🥲
👍
Do you need to compile markdown into HTML before it can be displayed on browsers or do modern browsers have built-in ways to display markdown files?
how do I know if DM?
@solemn leaf how do our status
like
how do I know if DM?
@carmine summit message.guild is undefined in a DM message
Do you need to compile markdown into HTML before it can be displayed on browsers or do modern browsers have built-in ways to display markdown files?
@earnest phoenix Markdowns aren't displayed by default on browsers, it should be compiled to HTML
or use channel.type
message.channel.type?
no
l
Which program do I use to compile it to HTML?
oh so thats why it aint working
@carmine summit message.channel.type returns dm for dms but it will return smth else for group dms
that's why we prefer the message.guild is undefined for dms method
you can't invite a bot to a group dm anyway
a parser code913
@pale vessel no don't parse me smh
but true

markdown isn't compiled 
you can't invite a bot to a group dm anyway
@pale vessel you can if the bot is weird enough
!message.guild
it's like calling js compiled
What is the fucking difference between compiling and parsing
They're both just converting one thing into another
compiling is translating into machine code
i.e. you compile c#, c++ etc.
but markdown to html compiling..?
no
it isn't compiling
it's parsing
I'd say compiling would be correct in that statement, but there are better words to choose from (parse).
one last thing
does GitHub have their own markdown parser?
they have their own version of markdown why won't they have a parser
github does
Does it work with normal markdown
yes
yeeeeeet
Clampy, why do you keep deleting your message
i used markdown-it in my react project
His code blocks aren't working

I Kept making errors in explaining
github flavored markdown
think i have sorted it now tho
it's not a parser
@earnest phoenix
this is a code block
` ``this is a failed code block```
do you know why it's happening?
Error: Status code: 429

Too many requests error that is
You're sending a request to an API too many times
i just turned on the bot, play music, and it appears

i need to restart the bot again
@pearl trail lower the interval between each request


hm, nvm i'm noob in js.
You're probably sending a request once every second or so right?
uh, yes i think
Send the code
Heroku sucks
They're against bots

If you REALLY NEED A FREE HOST use repl.it
it's the only free host that's actually worth it
brb, imma search that
but you should NOT use it for big bots
yep
but my wifi can't. suc
Then use an online host
the paid one
repl.it is a good TEMPORARY host but since you want a paid one I'd recommend Vultr or DigitalOcean
And Google Firebase's Firestore as a database
oh, google. wow 
😂
galaxygate is also a good option for vps's
theres also a million good db solutions.
dont use free database providers imo
I use repl.it as a host and quick.db as a database
TEMPORARY solution
(i type temporary like that so people don't scream at me)
omg thats a terrible permanant solution
what if your bot gets 1 billion users
how will quickdb handle it

the docs for your lib will tell you
is bot take a lot of cpu usage if it's in so many guilds?
omg thats a terrible permanant solution
what if your bot gets 1 billion users
how will quickdb handle it
@solemn latchliterally how people talk here
yeah
Honorable mentions:
cry, SHIVACOWO, misly, matthew, borboss
im on mysql, i can handle millions of rows with the amount of ram i have with minimal caching.
people still have told me not to use it because I will need to switch at some point.
meanwhile 6 months in i have 22k rows

oop, just passed 23k

as much as that was a joke, quickdb and free hosting can't handle 100+ active guilds lol
im on mysql, i can handle millions of rows with the amount of ram i have with minimal caching.
people still have told me not to use it because I will need to switch at some point.
meanwhile 6 months in i have 22k rows
@solemn latch i don't even have a working economy system let alone the database 🤣
but lets be honest
95% of people here that use free hosting have shitty bots that won't reach that kind of activity
i'm not using quick.db, so i'm fine 
TEMPORARY HOST YOU DON'T HAVE TO SHIT ON ME AGAIN

im on mysql, i can handle millions of rows with the amount of ram i have with minimal caching.
people still have told me not to use it because I will need to switch at some point.
meanwhile 6 months in i have 22k rows
@solemn latch YESSIR MYSQL
ew oracle
raspberry pi using linux as the operation system right?
Aye debian
oh
pretty sure they run windows now too
yup
mhm
probably a bad idea for this though
ew oracle
@earnest phoenix
Stuff lik Arc, Python, JavaScript, etc. don't suck
It's just that you don't like them
Stop screaming your opinion at other people
quoting my post from #memes-and-media that only got two stars :(
very
1,3ghz cpu with 4gb ram
oracle is a company
there's many reasons to hate them and to avoid their products
lmao
3 billion devices run oracle
@swift umbra *java
a number that hasn't changed since 2006 ™️
lol
i have to sleep bye all 
MINECRAFT IS MADE IN JAVA SO IF ORACLE DIDN'T EXIST MINECRAFT DIDN'T EXISTS AND WE WOULD BE DYING RIGHT NOW
im pretty sure minecraft ships an openjdk distribution with the launcher now
yeah it does
SO IF ORACLE DIDN'T EXIST MINECRAFT DIDN'T EXISTS what a nice future this would be
i am too lazy to eval <da message>.toLowerCase() and edit the message because i accidentally held down shift
yup
then oracle bought java from sun
@swift umbra the sun is a giant cosmic trader lmao
then came microsoft and slapped java's ass with c# 
oh hrllo code913
I didn't expect you to still be chillin
this is my last exam day AND my favourite exam day
also #general
java is good for what it is
Bot declined
Reason Eww Java...
Hello
java is getting killed by its own users
Since Java is so fucking spaghetti no dumbasses try it only the good ones with great will do
many people just avoid updating beyond JDK 8
Bot declined
Reason Eww Java...
Bruh
real question out here how do you handle a database 24/7 if you host a bot
is there any providers that is sort of "all in one"
Java:
real question out here how do you handle a database 24/7 if you host a bot
@earnest phoenix Firebase has 24/7 database solution
you can also host a database server alongside your bot
quick.db
yeah
@earnest phoenix @boreal iron
Time to yeet my post here again:
Stuff lik Arc, Python, JavaScript, etc. don't suck
It's just that you don't like them
Stop screaming your opinion at other people bitch
This time I won't delete the word at the end
slight problem my database has very much outgrown small scale
I don't even knwo how to use MongoDB
I cannot use mySQL since its sign-up requirements
so yeah
im stuck with quick.db
personal suggestions overhere, if you want to bother with SQL, postgresql is def the winner here, if not there are nosql databases i.e. mongo
currently I use Redis
smth like that
@earnest phoenix @boreal iron
Time to yeet my post here again:
This time I won't delete the word at the end
@earnest phoenix Aren't you the one saying "Java is so fucking spaghetti"
@carmine summit that's oracle but yes
Stop screaming your opinion at other people bitch Welcome to the real world.
looking at IBM Oracle for it but I don't know
this is why im super against oracle
I'd before an all in one solution
if i have 3 shards on 90 servers
Firebase's both types of databases use Bigtable by Google which is based on mongo
will it slow down the bot?
like 1 provider
So.... which DB is the best to use rn?
i'd personally suggest going for postgresql but pick whatever suits you the most
Redis does increase ram useagle
mongo
mongo wtf
I mean I use Redis since I love speed
cant even connect my bot
I get off to efficient code
lowkey
@earnest phoenix Aren't you the one saying "Java is so fucking spaghetti"
@earnest phoenix reread my message
I'm not sayingJava sucks because it's terrible to learnI'm sayingJava is good for what it is but it's still a little bad. However that doesn't mean it's a terrible piece of shit everyone should uninstall from their computers
I am sorry but any coding language in modern times are all great
like the differences are basically so minor it doesn't even matter
clojure
yes indeed Scratch is bery gud
Still, you said don't throw your opinions on other people, you still do, bruh
However that doesn't mean it's a terrible piece of shit everyone should uninstall from their computers You installed Java on your PC? lmao
Scratch best
What's going on here
you get my point, not every lang is good. Its the right tool for the right job
discussing languages and databases
c# is king of modern x64/x86 development change my mind 
just pick a language and you are good to go y'know
What's going on here
@slender thistle three conversations in the same channel turning it to spaghetti
Hail Minecraft
some langs are more powerful in specific tasks than others, compile times, flexibility, speed, theres a lot to consider
how to make efficent code
if
if
if
Oh that's the reason why.
yeah but like Erwin they are all capable
capable isnt enough though
just pick a language and you are good to go y'know
@earnest phoenix absolutely
i went for javascript because i found it easy
and so did almost everyone else while choosing their languages
try making an App in js, or a full on game, thats the wrong tool for the job
Thought Minecraft is something from 7 to 12... lel
@boreal iron fuck off fortnite player
js is much better for backend and web development
Fortnitehaha yeet another joke
yeah but like Erwin they are all capable
basic running on RISC
I mean Fake what is up with the default pfp
also from 7 to 12 I guess
Well we're moving a little into game-"development"... no problemo
i use it more for client side
the only back-end thing i have is a node.js server and a database on firebade
Still "development"
also discord bot development is not as intense as making apps
but any how, right tool for right job, langs have limitations and their pros/cons. generalising is bad, thats about it
so for making a bot they are all just as good
writing a bot in asm is actually doable
if you know asm
properly
since a bot is a glorified print statement with a database
but any how, right tool for right job, langs have limitations and their pros/cons. generalising is bad, thats about it
@opal plank @modums PIN THIS FUCKING PIN THIS
guys how do i write a discord bot in assembly?
@swift umbra You don't, you can but don't
i use it more for client side
the only back-end thing i have is a node.js server and a database on firebade
i'll never ever use node as my backend but i'm constantly using it for my frontend
I am using Script Editor of Google Forms. It is showing error in this line e.response.getItemResponses().forEach(function(i) { please help
a single language isn't the best per se ig
If all programming languages are basically human readable text compiled to binary assembly before running
is every single programming language a wrapper for machine language
yes
lmao wut
please help
isnt js written in like c#
Binary is the universal programming language, change my mind
ah
whats the matter don't code in 1s and 0s
are you weak?
are you really even a programmer?
I am using Script Editor of Google Forms. It is showing error in this line e.response.getItemResponses().forEach(function(i) { please help
Well, time to code a discord bot in binary itself
down
time to you already should be
isnt js written in like c#
@solemn latch the chrome engine is
btw it's c++ not seashark
people used to write machine code onto punch cards then feed it onto the computer
then we advanced to languages you know today, BASIC etc. that compile to asm
then C which compiles to BASIC
then C++ which compiles to C etc.
@earnest phoenix
whats the matter Volt are you new here or something?
newbie "programmers" smh
@green kestrel I am using Script Editor of Google Forms. It is showing error in this line e.response.getItemResponses().forEach(function(i) { please help
people used to write machine code onto punch cards then feed it onto the computer
then we advanced to languages you know today, BASIC etc. that compile to asm
then C which compiles to BASIC
then C++ which compiles to C etc.@earnest phoenix
@earnest phoenix stop being my computer text book
What's this guy trying to say
@earnest phoenix I must give up for this error?
Binary is the godly programming language change my mind
How do I define db in MongoDB?
Binary best lang
binary is not universal because instructions are different for each processor
this ^^
How do I define
dbin MongoDB?
@carmine summit var db = client.db("dbname");
that's it
oh
01110100 01100101 01111000 01110100 00100000 00111101 00100000 01010100 01110010 01110101 01100101 00001010 01101001 01100110 00100000 01110100 01100101 01111000 01110100 00100000 00111101 00111101 00100000 01010100 01110010 01110101 01100101 00111010 00001010 00100000 00100000 00100000 01110000 01110010 01101001 01101110 01110100 00101000 00100010 01111001 01100101 01110011 00100010 00101001
yeah I can code
@earnest phoenix I am using Script Editor of Google Forms. It is showing error in this line e.response.getItemResponses().forEach(function(i) { please help
we use high level languages today so we let the compilers behind decide which instruction sets to use, RISC vs CISC etc.
@earnest phoenix you shouldnt be @'ing random people for support, read rules
probably should stop talking about other things when people have questions 🤔
sorry
Yes
@carmine summit var db = client.db("dbname");
@earnest phoenix ifdbnamedoes not exist, will it automatically create a new?
@earnest phoenix if nobody is helping stop pinging random people
try going somewhere like discord .gg/plexidev or stackoverflow
idk the answer, otherwise i'd answer
@earnest phoenix Nice code, kappa
i dont even know google had a script something
@earnest phoenix if
dbnamedoes not exist, will it automatically create a new?
@carmine summit i don't really know
aight
ask @Tim
@earnest phoenix Show an screenshot at least
function onSubmit(e) {
var discordPayload = {
content: 'Form submitted',
embeds: [{
type: 'rich',
title: 'Form submission',
color: 7506394,
fields: []
}]
}
e.response.getItemResponses().forEach(function(i) {
var v = i.getResponse() || 'None'
discordPayload.embeds[0].fields.push({ name: i.getItem().getTitle(), value: v })
})
UrlFetchApp.fetch('youknowwhatgoeshereanywaysandimnotinthemoodtoleakstuff', {
method: 'post',
payload: JSON.stringify(discordPayload),
contentType: 'application/json'
})
}
youknowwhatgoeshereanywaysandimnotinthemoodtoleakstuff
@earnest phoenix Lmfao
Is there a binary code block
@blissful coral Yes there is
I saw Telk's pointless translate bot use that
000010101011110101```
Any colors?
MongoClient must be connected before.....
I'm on mobile can't see
How do I fix?
MongoClient must be connected before.....
@carmine summit of course
Make your code sync
or await them
And add the connect thing BEFORE you fetch databases
const MongoClient = require('mongodb').MongoClient;
const uri = "mongodb+srv://cwicks:NO@cluster0000.knta7.gcp.mongodb.net/Cluster0000?retryWrites=true&w=majority";
const clientDB = new MongoClient(uri, { useNewUrlParser: true });
clientDB.connect(err => {
const collection = clientDB.db("test").collection("devices");
// perform actions on the collection object
clientDB.close();
})
const db = clientDB.db('db')
that'll be executed before
or await them
@restive furnace who really puts setup stuff inside an async function
Put an await before clientDB.connect(...)
That's not an async function I'm 100% sure
@restive furnace who really puts setup stuff inside an async function
@earnest phoenix globalawait? and you can always go with callback hell too

await keyword can't be used outside an async function
await keyword can't be used outside an async function
@earnest phoenix node.js v14.8+
(async () => {
// Promise here
})();```
@restive furnace I'm literally on Node.js 14.9.1
brrrrrrrrrrrrrrrr
and on node.js v 14.8 and higher you can do js await /* promise here */;
@restive furnace I'm literally on Node.js 14.9.1
@earnest phoenix for me it works
so im making a giveaway command
so im making a giveaway command
@drifting wedge why
Ok
how can i make it run the "end giveaway" function when the giveaway is done?
@drifting wedge why
@earnest phoenix BECUZ I WANT TO
dbs?
Regularly check if the giveaway has ended
If it has end the giveaway
don't check too often or too late tho
@earnest phoenix for me it works
@restive furnace No
@earnest phoenix Nice code, kappa
@earnest phoenix thanks hun
pretty advanced I know
@earnest phoenix are you using child_process.exec for the exec command
quick.db not install error
npm install --global --production --vs2015 --add-python-to-path windows-build-tools
npm install --global --production --add-python-to-path windows-build-tools node-gyp
I have done these before and have done it again, but unfortunately quick.db does not load.
Lightshot
@earnest phoenix of course
@earnest phoenix npm i quick.db
@earnest phoenix Is it installed in the same folder as the bot.js file?
@earnest phoenix it doesn't work with eval
since it's not inside async function
or global scope
wtf
That's not how it works
@earnest phoenix I DID NOT UNDERSTAND
@earnest phoenix I DID NOT UNDERSTAND
@earnest phoenix why are you screaming?
since it's not inside async function
@free BRUH but you said #development message
That's not how it works
@earnest phoenix well, i don't know what prevents you doing it, but I can do.
caps-lock left open
ok
@pale vessel Talking to me or
did you run npm install quick.db in the same folder as bot.js?
It should be there in package.json file in the same folder
error
nice ping
quick.db is spaghetti on windows
@earnest phoenix edited
i can't help with that i myself have been trying so long to install it on windows
is there any alternative to json? that has less chance of getting corrupted, no dbs
Properly handling open/writes is the only option in that case 
Then use a db?
As long as you don't open it a whole fuckton of times
Which can be corrupted as well.
so everyhing can be corrupted if not handled properly
It won’t corrupt as easily as a json file
json is just a formatting, you're effectively still saving data in plaintext
handled properly just check all input/outputs for a json error and throw them "away" if so
or throw an error
is try catch a good way to do it?
#1
sql = "INSERT INTO Blacklisted_IDs(user_id) VALUES(%s);"
cursor.execute(sql, member.id)
db.commit()
#2
sql = "DELETE FROM Blacklisted_IDs WHERE user_id = %s;"
cursor.execute(sql, (member.id))
db.commit()```
Anyone know if these look right?
have you tried it
is it saving in the sql database?
idk, i've put db.commit() so i'd think so?
can you run an sql console and check if the user is actually in there
idk a way to get into the db 😂 the Browser doesn't work on mac,

SELECT * FROM Blacklisted_IDs WHERE user_id IS *
``` not an sql person but im pretty sure this would be it
if it is then its an error in your code
if it isnt, you arent saving it properly
or just ```sql
SELECT * FROM Blacklisted_IDs
how do i like make a count down in python?
have you tried googling it
pretty sure that would be something that could be answered in the first 5 results
Help me
you have a ? where it shouldnt bee
those dang bees
ye, we just don't know the location
if you regularly use a db i suggest datagrip
no Data was saved,
then you did something wrong
i cant figure out what though 😂
how do i make that my bot status will refresh every 20s
What library are you using
js
That's a language; not a library.
libraries would be like discordjs, eris, djs-lite
Use setInterval to schedule something to be run every X milliseconds. See https://nodejs.org/api/timers.html#timers_setinterval_callback_delay_args
So, in your case, pass a function that'll change the activity to something else and pass as the argument the equivalent of 20 seconds. However, I recommend you change that 20 seconds to something longer, like a minute of 2
Anyone know how to do a help command category like if I said !help fun it send only the fun command anyone know how to do that using commando :)
Ping me if you know xD
Lmaoo
check the args, if there is an arg, check if that arg is a command name
Does commando's default help command not come with searching by category for the first argument.
else if (command === 'dog') {
const fetch = require('node-fetch');
const dog = async () => {
const res = await fetch(' https://some-random-api.ml/img/dog').then(response => response.json());
const data = res;
const embed = new Discord.MessageEmbed()
.setColor("#15f153")
.setDescription(`Oh look i found a cute dog :dog:`)
.setImage(data.url)
message.channel.send(embed)
}
dog()
}
it wont send the image
you need to use .link iirc
{"link":"https://i.some-random-api.ml/3qbEVISTgQ.jpg"}
is the response
ayy it’s telk’s api
but i have a different cmd that is the same and it sends the image
how can i make a timer on a message so like it counts down by editing the message?
but i have a different cmd that is the same and it sends the image
@peak osprey different responses
or like calculate the time
ok
you have to check it per api.
args=[message.channel.id, message.id])``` wut does this do?
<!-- Put this script tag to the <head> of your page -->
<script type="text/javascript" src="https://vk.com/js/api/openapi.js?168"></script>
<script type="text/javascript">
VK.init({apiId: 7624533, onlyWidgets: true});
</script>
<!-- Put this div tag to the place, where the Comments block will be -->
<div id="vk_comments"></div>
<script type="text/javascript">
VK.Widgets.Comments("vk_comments", {limit: 20, attach: "*"});
</script>
this is widget
(comments)
1 sec
How to increase its size for phones
https://stash.aptkop.ru/rev.html just look at this widget at phone an computer
Any Java experts around?
I use media rules
https://www.w3schools.com/cssref/css3_pr_mediaquery.asp
dm me @north briar
im not getting node.js syntax in vscode after npm init
i can help with java
anyone know how to help?
@solemn latch yes but...
you just got yee haw'd
Ping me plez
Anyone know how to do a help command category like if I said !help fun it send only the fun command anyone know how to do that using commando :)
Ping me if you know xD
@flint yew
whats your css look like?
- {margin: 0; width: 100%!important; height: 100%; font-size 1000px;}
I changed the dimensions to maximum and still the Widget is very small
it isn't valid css
also
that's not you how you do responsive design
lmfao
Computer
that's not you how you do responsive design
@earnest phoenix 1 sec
first set the viewport meta tag
https://gdz.ru/class-1/matematika/moro-m-i-2011/1-4-1/ look down on this page
from phone
widget is big
<meta name="viewport" content="minimum-scale=1, initial-scale=1, width=device-width, shrink-to-fit=no" />
OH MY GOD
IT WORKS
THANKS MAN

Any Java experts around?
Any Java experts around who are willing to commit into looking into my problem, whatever that may turn out to be, even if it's not actually related to Java or if someone who doesn't know anything about Java could actually answer my question?
no
I have a question about Java but I'm too lazy to actually formalize it in words unless there's someone on the channel who might be able to answer it
Any Java experts around?
we need to start linking
https://stackoverflow.com/help/how-to-ask
Are you stupid
lol
Your question
FOOBAR
-m 743623808019202119 Idiotic trolling, sending the same question in all channels despite being told to state their issue | 5d
🤐 Muted Foobar123#9867 (@north briar)
Stop
I presume you can read
I assume you can read if you saw the mute. I also assume you understand which channel you are in.
One message removed from a suspended account.
thank you
One message removed from a suspended account.
Better yet, cut it out. I muted him for a reason. 🙃
One message removed from a suspended account.
Last warning to use appropriate channels
static void UpdatePresence()
{
DiscordRichPresence discordPresence;
memset(&discordPresence, 0, sizeof(discordPresence));
discordPresence.state = "Running";
discordPresence.details = "Developing";
discordPresence.startTimestamp = 1507665886;
discordPresence.endTimestamp = 1507665886;
discordPresence.largeImageKey = "icon2";
discordPresence.largeImageText = "";
discordPresence.smallImageKey = "jsicon";
discordPresence.smallImageText = "Djs";
discordPresence.partyId;
discordPresence.joinSecret;
Discord_UpdatePresence(&discordPresence);
}
Do I need
discordPresence.partyId;
discordPresence.joinSecret;
bot.user.setActivity(`${bot.guilds.cache.size} servers (!help)`, { type: 'PLAYING'}).catch(console.error).then (bot.setInterval(function(){
`${bot.guilds.cache.size}`
}, 10000));
})
```will it work?
Don’t do that
mans you shut him down
idk
then 20?
mines on 300 seconds on startup
https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setInterval like did you even read the docs
and 5 minutes to 1 hour after 1 day
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
Discord ratelimits, most are not known as they're dynamic
^ or only when you(the bot) join/leave guilds while not doing it more than once every 5 minutes.
or 1 minute
or whatever
Update it every 3 minutes
for guild count?



