#development
1 messages · Page 544 of 1
true/false
i thank ya much
anyone has a mongodb tutorial for storing strings
np
um
anyone has a mongodb tutorial for storing strings
await collection.insertOne({ _id: "somekey", str: "some string" })```
u cant store strings directly
I havent set up a database het
@sick cloud i see that ur alive
i need help on the help menu embed thing
okay so
i have the code rn
oh
plus i didnt want to change the code because it said so in the guide
hm
hmm
i honestly dont know whats up
https://pastebin.com/1U6cdJB9 <--- code
am i doing it right or i did something wrong
i see
your defining the code after
its using the top code
which does nothing
you need to remove the top block
so delete this part
well thats good
doesnt xD
People, can i write a file in JS and use it in my python file ? (i'm trying to code my music bot in JS but i have some parts written in Python)
idk can u?
no
Ok, ty guys

People, i'm using the youtube_dl, but sometimes my discord bot throws me that message at the console
[matroska,webm @ 0000024e406fab00] Read error```
wtf is that 
¯_(ツ)_/¯
never heard of that console log before
The specified session has been invalidated for some reason. Last message repeated 1 times
is that the only error it prints
yup
@sick cloud this is what i see in my console
It try to play the music, start playing and them BOOM
This error
And skip the music
.catch(console.error)
ok
ok


the youtube_dl should be more verbose
unless there's an arg you can pass to the binary for verbose
like this?
in whatever lib you are using
@sick cloud
ok, so should i use another lib ?
it should work if > works
You could just find out if it works by using your bot :/
ok then

Yo, I decided to try making that thing, help reactions, and it sends the first page, I just cant get reactions to work on changing the page, I tried logging filter, await reactions and remove reactions nothing logs so nothing ran... obviously.
🤔
¯_(ツ)_/¯
did you test it yourself?
oof, check the css on the site
Tony could you help when you get the chance or tomorrow?
Yeah me neither
#development is basically a worse google
ok #development tell me , is the moon made of cheese?
@sick cloud yes
Why doesnt this work
thanks
But everyone's just switching the topic
k
hi
Im so confused rn
m.reactions.find(...).users.remove is not a function is the error Im getting its so close to working, it just doesnt
any good databases
Finally got it to work
@frail terrace wrong password
authentication failed = password you sent != what is in lavalink's config
it’s no longer “youshallnotpass”?
yes got it
thx
feels bad, it can't detect my second monitor
nvm
i have to scroll down to see my second monitor
what in the world
Detect monitors should work on any Windows computer, if you use Windows 🤔
What is a good ram usage, obviously this varies but where is high usage considered
Gn
.
you can make your own function that creates a timeout then resolves a promise once its done
such as
return new Promise((resolve, reject) => {
setTimeout(resolve, 1000);
})
thats not the entire thing, but you get the point
How to write id in mysql database when a user is connecting to my website with discord?
So i'm using pdo connection
yeah
Rood
php 
you need to have the pdo extension and the pdo-mysql driver enabled
Wow
if you are on webhosting, you can enable them in cpanel. if you are on vps, you need to build php with them enabled, im not sure if they are on by default
I have already enabled this
I look that
assuming your mysql is already configured and running, just connect to it using localhost (if on the same server), database name, username and password
Whuts wrong with this code?
(python)
And returns this:
client_response: <ClientResponse(https://discordbots.org/api/bots/509068382633459718/stats) [200 OK]>
<CIMultiDictProxy('Date': 'Sun, 30 Dec 2018 12:05:30 GMT', 'Content-Type': 'application/json; charset=utf-8', 'Content-Length': '2', 'Connection': 'keep-alive', 'Set-Cookie': '__cfduid=dac78a7a58607da55f80b914114ce4a8b1546171530; expires=Mon, 30-Dec-19 12:05:30 GMT; path=/; domain=.discordbots.org; HttpOnly; Secure', 'X-Powered-By': 'Express', 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Headers': 'Authorization', 'Etag': 'W/"2-vyGp6PvFo4RvsFtPoIWeCReyIC8"', 'X-Varnish': '1069712465', 'Age': '0', 'Via': '1.1 varnish-v4', 'Accept-Ranges': 'bytes', 'Strict-Transport-Security': 'max-age=15552000; includeSubDomains; preload', 'X-Content-Type-Options': 'nosniff', 'Expect-Ct': 'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"', 'Server': 'cloudflare', 'Cf-Ray': '4914600049b8bf39-AMS')>
- No info about what wrapper you are using
- No error?
Cookie 
@prime cliff look again yeet, its in python 3.6.5 btw with the DBL lib.
Hard to see on mobile i was looking for an error message but mkay
Ye, thats the only thing it prints, it doesn't print the upvotes what I have in the next line:
print(upvotes)
get from the api urself
wdym?
@knotty steeple he is using the getupvote function
How many upvotes do you have already Arthur because that getvotes function gets the last 100 upvoters and no more
Should work then unless you are doing something wrong with the output also have you checked the github for an example?
Can't find an example.
I'll look again.
Nop
the only thing on git is how to post ur server count.
But I already wrote something for that so.
And this is what I found from another github page from another guy, (non dbl staff)
upvotes = await self.dblpy.get_upvote_info(days=1)
I'll ttry to remove the bot_id only and check if it works.
Posts its from all time

Just set the sext size bigger then.
And use adobe photoshop its way bettah. xP
@ruby talon photoshop is an image editor and cavas is like a image template generator for bots to do cool images
who help me :/
Photoshop isn't just an image editor lol.
You have a lot of templates too, but isn't it more fun to create something from start in photoshop.
Ok Illustrator was created for creating logo's ect but you can do it fine in photoshop too.
I recently created a proffesional gift voucher in adobe photoshop from scratch.
It isn't just an image "editor"
@earnest phoenix was ur text already on the image or did you write it using the text tool?
ok but the point was that photoshop can't be used programatically
@ruby talon
name is customizable ://///
IDK, I've worked with canvas in the past.
It was my first thingie to work with, I preffer PS now tho.
@earnest phoenix if you click on the text their should pop up a text settings on the top or left side.
You will see the text type (font) and the size, colors and more.
Select the size and improve it, if it has already reached the 'max' double click on the number in the square and type the size you want it to be.
nobody cares about photoshop jesus
@earnest phoenix canvas is a programmable photoshop hence why i said template :/
yeah i got it
You basically create the layout and have your bot fill in the images/text
i know plenty about image generation, been working with imagemagick for over a year now
saying that, every image generation library works in it's own way
Hey! Quick question. Hiw do I change background color for the long description?
I've tried this
no
havent you asked that question 10 times in the past 12 hours
(u can use hex colors 2)
@dreamy charm it works with that.
Arthur am I supposed to add it at the start?
he wants to change the description box, not the page body
right click > inspect element > find the structure and target the correct element
oh
Sorry, tought u wanted to change the color for the whole page.
@earnest phoenix You should see this:
When you click on the text.
@ruby talon canvas is programmable graphics lol. it doesnt have an interface or menus to chose from
@earnest phoenix js ctx.font = "30px Arial";
you can change font size using the font property on the 2d context
@quartz kindle is that the long description?
ye
what doesnt work?
you have to put it in style tags lol
Uhhhhh
lmao
How do I do that
learn css
...
<style> </style>
@quartz kindle have fun
Ok
lololololo
for the description, is it just full html?
Y do you put the color in {}?
can i kindly ask you to learn the basics of css please? xD
@dreamy charm Tim like just even showed you the code on how to do it.
css works like this css selector { property: value; property: value; }
<style>
body{
background-color: red;
}
</style>
oh
background is a shorthand for everything in the background set of properties
for example, there is background-color, background-size, background-url and many others
you can just use background to set several rules at once
Tim, do you kow if you can do interactive animated backgrounds on DBL site?
so both background: black and background-color: black will work
I'm kinda new to css and HTML
@ruby talon you can use css keyframe animations
js is only for certified devs
xd
I've tried to use text: below background: but for some reason it only changed one of the lines
Is it possible to change text color?
Yes.
color: hex
Sorry I wanted to send this message like 19 mins ago but I'm on a trip
And the connection is horrible
@sick cloud I've tried
But for some reason it only changed one of the lines
What would that .something be?
Can you add more than 1 animation to 1 object in css?
Is link-color a thing
Uhhhhh
I think I messed something up with the links
Help
google.com @dreamy charm
@dreamy charm you need to select the links then change the color
Use inspect element to find the class name
Or just use a
ex
a {
color:green:
}
What would a do?
No no,
you can't nest css like that
Put them on separate nests
i save the data looks like:
{
"987654321: {
"ownerID": "123456789", // owner leave
"botID": "987654321" // kick this bot
},
{
"123456: {
"ownerID": "123456789", // owner leave
"botID": "123456" // another to kick
}
}
i want that 2 botID wile be kicked when 1 ownerID leave, But idk how can I do that, Someone help me pls?
use a loop that goes over every one of the objects and compare their ownerID to 123456789
How I get the Java DBL Api without gradle/maven ?
or just store bot ids per owner
which is kinda dumb
css magic
CSS
you make the styles or you find them online
display: inline-block;
Someone can help me for download the java dbl api ? I never used gradle/maven
What display style
confused :(
"what does display mean for CSS"
I know what it means
"how to make buttons in CSS" have fun, css is literally like a coloring book, if you can't understand it no one can help you
@languid dragon can you help me ? x)
i dont know java
I don't know Java, why do you think i'd know anything about Gradle
@inner jewel @keen drift went better than expected 
gradle is same as maven, just different syntax
I never use maven too é_è
mais


basically, you tell mave.gradle where to get dependancies and which to take
(si t'es français, on peut en parler en français si tu préfère)
en grooos tu choisis tes "repository" donc les serveurs qui stockent les dépendances et ensuite tu choisis tes "dependancy" donc les librairies que tu veux ajouter à ton programme
#memes-and-media for other languages
oops
Why I have build the dbl api with gradlew but when I run my jar I have a ClassNotFoundException 
I have build with the api jar
So Gradle and maven are like flavours of java?
anybody here knows how to work with canvas ?
I have a question...
Can I add javascript code into the long description?
To like animate the description
..
What
What's the difference syntax about then
woah
epic
but in the data there is only 2422 users ...
Please, how I get the content of a embed message ?
wich library ?
discord.js
i don"t know i use Java or c#
all the properties
Um... I've never actually done it, but I think that'd work
No, I just want get the content of a embed message of an other bot
Hmm what's this server ... DBL Verification center ...
It’s the bot testing server they take your bot into to see if the bot can be added
What would I do to check if my bot has permissions to kick someone?
I was thinking using
client.user.hasPermissions("KICK_MEMBERS");
But .user doesn't have the .hasPermissions method available to it
Thank you @amber fractal
@buoyant void :
message.guild.member(bot.user).hasPermissions("KICK_MEMBERS");
Thank ya much
I know dbl lets you use HTML but can anyone tell me why my table wont align correctly?
Same thing works with my text editor
It's probably being overwritten by some other style
So I cant center table cells ;-;
You could add !important after center, so like text-align: center !important;
that should make sure that it will show as you want
yep, no problem
smh
when will people stop abusing !important and learn css specificity properly
lmao
also, dont use head tags, you're working in the body, you're just injecting head tags inside the body for no reason
The head isnt in the body>
?*
I didnt send the whole code because it's too big either way it works
oh you're working on your own website? that was for discordbots long description
because discord bots injects everything into the .longdescription element
so if you write head tags in your long description, it will be injected into the .longdescription element, which is inside the body
<html>
<head>
</head>
<body>
<div class="longdescription">
<-- long description inserted here
</div>
</body>```
I didnt know that...
so if you write head tags and body tags in your long description, you're basically doing this html <html> <head> </head> <body> <div> <head> </head> <body> your long description </body> </div> </body>
what lib
.js
yes
wow
ok
then no shield for everyone
is there a way to get a percentage of a number
.js
nvm
which one do u perfer
prefer
Let
what
nvm
its not a question of preference, let is scope based while var is not

This might be a primitive question, but how do I get the length of someone's username? What I try doesn't seem to work and I can't really find it in the docs.
what language
JS
I must be doing something wrong then 
you're using the username right
yes
not a user object?
Seems to be working fine now for some reason, I probably just mispelled it everytime 
Thanks guys

or you can do it the dumbass way
let length = 0;
username.split("").forEach(() => length++)```
Lmao
and yes this does work
thats the point
@inner jewel ?
epic
you can make your own function with this if you want to 
lmao
can confirm
what does the -s flag do?
silent return
let length = 0;
let letters = username.split("");
while(letters[length]) {
length++;
}```
lmao
js™
utf16™
yes
that syntax 
i think i know what a lambda is

use thenAccept
A letter of the greek alphabet?
your code would throw if there was an error
because whenComplete will be null
so the unboxing for the if would NPE
disk image malformed?
Not work @inner jewel
yep
was that glitch
I would read this article if I had time before I posted it, but I dont have time
That might help
But like I said no time to read it
@earnest phoenix "not work" means nothing
DAMKMIT
how do u get the usercount of u bt
langage ?
@empty owl read 👏 the 👏 docs 👏
ok
seems correct
thats alot
for 10 guilds bot
THAT DOESNT USE EXPORTS
and its commands are pretty much useless
Yes it's client.users.size
wow\
Is it in this server?
pls can someone teach me how to do sharding with discord.py
Cuz this server has quite the lot
no wonder
Discord Bot List
hey fortniters
DAETH TO ALL
MKV Syndicate
Bob
Da Group Chat (Real)
The Bot Lounge
gaming
AeroWorld
yee boi
client.users.size is the amount of cached users
It gathers all members in all servers
Mines in MKV Syndicate too
wow
🤔
so's mine
Hmmmmmmm'
Someone invites all the bots
what about the bot lounge
my bot is in a server which has something like 381 bots and 1 human
invite me @amber fractal
to the bot lounge
Im not in it
oofo
My bot just has 4K bot accounts on it
???>?>
mkv syndicate is a bot spam guild
lol
client.users.filter(u => u.bot == true).size
See how many bots you got
I recommend making an eval command to do this easier. Make sure you restrict it to trusted people tho
i wonder whyyyyyyyy
Its not like its in a bot dev guild
XD
It's mostly from this server
mkv syndicate is a known bot spam server
Is the bot the one spammingm
2533 online bots rn
on discordbotslist
hey i store in a sqlite
should it be public\
someone pls teach me how to do sharding with discord.py
read 👏 the 👏 docs 👏
the docs dont explain how to do it
IDK discord.py, I only know Jda and do.js
i like the discord.py docs and use them a lot
but they dont actually explain how to do sharding

That's because it's in the discord developer docs
best database for public bots?
Bob that would be best asked in #topgg-api
whatabout general
Idk
mk
You can ask API stuff for your not there
Asking for a database is consider asking about api, since you need a key to use most API stuff
that logic makes no sense
"cutting vegetables is the same like murdering because both require a knife"
I was lied to :(
He was asking about DBL, which is an api
what
Discord bot list
they were asking for a database, and dbl is not an api, it has an api
Does it really matter, cause it has an API, and it is an API package,
it very much does matter
I mean saying DBL is and API is just wrong tho 
Tbh it doesn't matter right now, if it's not then ok, if it is, ok. Just go back to what you were doing
@vernal rivet the #topgg-api channel is only for the dbl api not for any other api smh
At least it was the DBL api
Is there anyone here who knows the solution to this problem I have install this module and same time show me same error
Did you install
install it as admin
so i figured out how to do a single shard in discord.py - @obsidian oak temporarily has 3 shards, only one of which is actually connected
in other words, shakespeare now only works on a third of its servers
idk how to make more than 1 shard work though because client.run is blocking
in py do you have a .spawn part?
no
Then I cant help
i just have client.run(token) at the end of my code
and client already has a defined shard id
@mossy vine I have done this and still shows the same error
whats the best way to include css styling in the long desc? can i somehow include a <style> tag?
yes
the long desc is html and markdown
so you can include <style> or any other html tag (although scripts will be removed)
oh ok thanks
How i can apply slice here?
for(var i=5; i<bots.length; i++)
what do you want to do?
are onclick methods also removed in the long desc?
for non cert devs yes
rip okay, thanks
sorry i was checking profile and i sent yu a fr by accident, ignore that
@fossil oxide are certified devs supposed to be able to use scripts in any bot? Since I tried it on a non cert bot and it worked for a while but stopped working later
cc @bitter sundial
not anymore
.setTitle(${message.author.username} says..., message.author.avatarURL)
Why would this not work?
Of course, it's apart of a bigger embed, but I just don't see why the message.author.avatarURL won't display the users avatar beside the message
yes 
i'm a genius
totally
hi, this is probably a silly question, but I am trying to make a bot for friends using
https://www.digitaltrends.com/gaming/how-to-make-a-discord-bot/
and I'm running into an error when I try to take the bot online
Did you read the error? It cant find a bot.json file
yeah, I have tried updating the file extension
sorry its not cropped
is bot.json where everything is?
that tutorial is horrible
Because it needs to be a .js file
then cd into the file its in and run node bot.js
- outdated library
- tells you to copypaste invalid json
lol
well i changed the extension, also where/how do i get an updayed version
Not all of them
okie
Just the file that contains the javascript
^
alright will thanks
package and auth should be json files btw
👍
have basic js knowledge also
Many things

Having proper js knowledge is necessary for writing js code
and making ur bot better
You'll probably learn js the more you upgrade on your code bot's dw 
no you wont
i did
ok
I learned a bit when I had to look up stuff to fix my code
if you are just looking at a guide you wont really actually learn a language
you don't need to master js to make a bot
Yeah I just used a guide to see how to make the app, then went lone wolf
but you should learn the basics
yes u do
before jumping into a bot
what did I start XD
I mean i did a liiiittle bit of ciding in elementary school it will be fine probably not
anyways I am puzzled about this
Now you can simply do client.login(config.token) to login! If you want to use a different prefix than !, you can change that as well.
Sololearn is great for learning basics
thats the prefix in discord
like ![command]
the console command is always going to be along the lines of node [file].js
client.login is not related to the prefix
Now you can simply do client.login(config.token) to login! If you want to use a different prefix than !, you can change that as well.
so does ^ mean that I can login from somewhere
read the tutorial
client.login() is the code you write that instructs your program to attempt to connect to discord and login
you can use bot.login too
not really a matter of "you can"
more like "you have to use whatever you named it"
inb4 dbm.login(glitch.token)
GrzegorzBrzęczyszczykiewicz.login()
pretty sure that's an invalid identifier
Natan.disconnect()
Hi

yoshi help
any idea on how to format help command
(node:2190) UnhandledPromiseRejectionWarning: RangeError: RichEmbed field names may not exceed 256 characters.
i didnt think of this and now im fucked
hmmm
i know the error
embed field is too big
but, it will look ugly putting all the commands in multiple embed fields
CODEBLOCKS
wdym how to format help command
fuckye
how does your help command even look
pretty basic
sec
rest of the commands wont fit in
since code looks like this
idk how to make categories
i saw that on one bot, looks nice and well formatted but i have no idea how
i'll just use codeblocks
i know what a codeblock is
ok
Just use descriptions easy
static help commands 
My help command using description
gross
I’m
thats just
Ik
fields
No
like .addField("Description", "asdads")
embed builder 
embed objects > *

{
title: `hello`,
fields: [
{
name: 'did you know',
value: 'that',
inline: true
},
{
name: 'embed builders',
value: 'suck',
inline: true
}
],
footer: 'okay'
}
I have my discord bot on a server - however, I keep getting emails about excessive resource use with process time
I'm wondering how I might fix this (using Discord.js)
whats your host?
My help command is jank af
cloud vps?
now i cant send codeblocks as bot xd
is htere any way to get it to work on liquid web
i mean, it should work regardless of those emails
but it really depends on your setup
how much ram/cpu is your bot using, what else is running on the same server, etc...
fresh dose of janky code https://upldr.party/wHSEOcnz.png







