#development

1 messages · Page 544 of 1

buoyant void
#

oh

#

damn

sick cloud
#

true/false

buoyant void
#

i thank ya much

empty owl
#

anyone has a mongodb tutorial for storing strings

sick cloud
#

np

empty owl
#

um

blazing star
#

you insert a new document

#

with a key/value

empty owl
#

anyone has a mongodb tutorial for storing strings

blazing star
#
await collection.insertOne({ _id: "somekey", str: "some string" })```
empty owl
#

um

#

i dont know how

blazing star
#

u cant store strings directly

empty owl
#

I havent set up a database het

visual zenith
#

@sick cloud i see that ur alive

sick cloud
#

i am

#

uh

#

ok

visual zenith
#

i need help on the help menu embed thing

sick cloud
#

okay so

visual zenith
#

i have the code rn

sick cloud
#

explain whats up when you try react

#

with >

visual zenith
#

there was no error lmao

#

but it didnt edit

sick cloud
#

oh

visual zenith
#

plus i didnt want to change the code because it said so in the guide

sick cloud
#

hm

visual zenith
#

hmm

sick cloud
#

i honestly dont know whats up

visual zenith
#

am i doing it right or i did something wrong

sick cloud
#

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

visual zenith
#

ok

#

ok i did

#

do i need to refresh and test it or... wut

sick cloud
#

ig?

#

thing is you have 2 of the same code

#

but its using the first thats empty

visual zenith
#

ok

#

ok i tried it and when I react ➡ it doesnt edit

sick cloud
#

well thats good

visual zenith
#

doesnt xD

lyric talon
#

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)

visual zenith
#

idk can u?

sick cloud
#

no

keen drift
#

i m ean

#

technically you can

#

but uh, forget it

lyric talon
#

Ok, ty guys

visual zenith
#

xD

#

@sick cloud i still need help ;/

sick cloud
#

whats up now

#

is it working yet?

visual zenith
#

no its not

#

it send the embed but when i react ➡ it doesnt edit

keen drift
#

hue hue hue hue

#

@sick cloud i need help too

visual zenith
sick cloud
#

oh

#

do you have any errors

visual zenith
#

no errors at all

#

im not joking

lyric talon
#

People, i'm using the youtube_dl, but sometimes my discord bot throws me that message at the console

[matroska,webm @ 0000024e406fab00] Read error```
visual zenith
#

wtf is that Think

lyric talon
#

¯_(ツ)_/¯

visual zenith
#

never heard of that console log before

lyric talon
#

The specified session has been invalidated for some reason. Last message repeated 1 times

keen drift
#

is that the only error it prints

lyric talon
#

yup

visual zenith
lyric talon
#

It try to play the music, start playing and them BOOM

#

This error

#

And skip the music

sick cloud
#

hm

#

not sure

#

try adding a console.error to the .catch

visual zenith
#

hmm

#

just console.error thats it?

#

or console.error(e)

#

nvm

sick cloud
#

.catch(console.error)

visual zenith
#

ok

keen drift
#

not sure, try updating the youtube_dl binary

visual zenith
#

line 61 ^^^

#

page = page + 1

sick cloud
#

where it says const page = 1

#

change it from const to let

visual zenith
#

ok

lyric talon
#

FIshy, i already did it

visual zenith
keen drift
#

wew

#

not sure then

lyric talon
keen drift
#

the youtube_dl should be more verbose

#

unless there's an arg you can pass to the binary for verbose

visual zenith
keen drift
#

in whatever lib you are using

visual zenith
#

@sick cloud

lyric talon
#

ok, so should i use another lib ?

visual zenith
#

also what lib u using? @lyric talon

#

python?

#

ok

sick cloud
#

page

#

not pages

visual zenith
#

ok got it

#

ok that worked, now onto the ⬅ one

#

isnt it the same

sick cloud
#

it should work if > works

visual zenith
#

@sick cloud

prime cliff
#

You could just find out if it works by using your bot :/

sick cloud
#

it is

#

i'll respond later now, having lunch

visual zenith
#

ok then

near lintel
amber fractal
#

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.

#

🤔

sick cloud
#

¯_(ツ)_/¯

dreamy charm
#

Hey

#

So people tell me this should technically work

loud salmon
#

did you test it yourself?

dreamy charm
#

Yes

#

Nothing

loud salmon
#

oof, check the css on the site

dreamy charm
#

?

#

Help someone pls

amber fractal
#

Tony could you help when you get the chance or tomorrow?

dreamy charm
#

Uh

#

Pls help me first

#

:(

amber fractal
#

My question is different

#

But

#

I know nothing of css

dreamy charm
#

Yeah me neither

loud salmon
sick cloud
dreamy charm
#

Please halp

earnest phoenix
#

@sick cloud yes

dreamy charm
#

Why doesnt this work

sick cloud
#

thanks

loud salmon
#

smh

#

stop spamming your question :<

#

people will read it and answer if they know

dreamy charm
#

But everyone's just switching the topic

earnest phoenix
#

i may be no expert

#

but

#

pls put the color on the same line as background-color

dreamy charm
#

Already did

#

Nothing changed

earnest phoenix
#

k

dreamy charm
#

God

#

Yo guys

#

I'm not in computer

#

Is anyone here?

#

Nvm

earnest phoenix
#

hi

amber fractal
#

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

earnest phoenix
#

YEET

#

MINE GOT APPROVED

#

ok

frail terrace
#

is there a way to fix this

earnest phoenix
#

any good databases

frail terrace
#

litedb

#

tbh

#

(if you use .net languages that is)

amber fractal
#

Finally got it to work

inner jewel
#

@frail terrace wrong password

#

authentication failed = password you sent != what is in lavalink's config

frail terrace
#

it’s no longer “youshallnotpass”?

inner jewel
#

it's whatever you configure

#

don't assume any default value

keen drift
#

@inner jewel hey qt, can you send me the vc link format

#

for videos

inner jewel
#

uhhh

#

i think

keen drift
#

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

amber fractal
#

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

earnest phoenix
#

My windows explorer use 46%

#

wtf

amber fractal
#

Thats a problem

#

Is superfetch on?

earnest phoenix
#

ah no

#

its good now

#

i go sleep gn

amber fractal
#

Gn

tight mango
#

.

jagged plume
#

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

raw flint
#

thx 😄

#

jagged plume
#

np

#

then you'd just need to await that promise

earnest phoenix
#

How to write id in mysql database when a user is connecting to my website with discord?

#

So i'm using pdo connection

jagged plume
#

oh do you mean logging in through discord

#

oauth

earnest phoenix
#

yeah

jagged plume
#

ah

#

i have no idea what pdo is, no help to you ¯_(ツ)_/¯

ruby dust
#

Rood

earnest phoenix
#

So its so hard..

#

I didnt see any docs about that

jagged plume
#

php FeelsWeirdShrug

earnest phoenix
#

Yeah

#

Its so hard

#

@stray charm

stray charm
#

dunno

#

Just work with php in general

#

Not that

quartz kindle
#

you need to have the pdo extension and the pdo-mysql driver enabled

earnest phoenix
#

Wow

quartz kindle
#

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

earnest phoenix
#

I have already enabled this

quartz kindle
#

then it should be easy

#

there are many pdo guides

earnest phoenix
#

I look that

quartz kindle
#

assuming your mysql is already configured and running, just connect to it using localhost (if on the same server), database name, username and password

ruby talon
#

(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')>
prime cliff
#
  • No info about what wrapper you are using
  • No error?
earnest phoenix
#

Cookie jagthinkspin

ruby talon
#

@prime cliff look again yeet, its in python 3.6.5 btw with the DBL lib.

knotty steeple
#

i mean

#

[200 OK]

prime cliff
#

Hard to see on mobile i was looking for an error message but mkay

ruby talon
#

Ye, thats the only thing it prints, it doesn't print the upvotes what I have in the next line:

print(upvotes)
knotty steeple
#

get from the api urself

ruby talon
#

wdym?

prime cliff
#

@knotty steeple he is using the getupvote function

knotty steeple
#

dont use a wrapper

#

i know

#

i have perfectly working eyes

prime cliff
#

How many upvotes do you have already Arthur because that getvotes function gets the last 100 upvoters and no more

ruby talon
#

Nut much, like 10

#

xD

prime cliff
#

Should work then unless you are doing something wrong with the output also have you checked the github for an example?

ruby talon
#

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

earnest phoenix
#

who help me

#

please

prime cliff
earnest phoenix
#

i make welcome message with canvas

#

text is very small

ruby talon
#

Just set the sext size bigger then.
And use adobe photoshop its way bettah. xP

earnest phoenix
#

lol

#

i make with canvas?

#

name is customizable

prime cliff
#

@ruby talon photoshop is an image editor and cavas is like a image template generator for bots to do cool images

earnest phoenix
#

who help me :/

ruby talon
#

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?

earnest phoenix
#

ok but the point was that photoshop can't be used programatically

#

@ruby talon

#

name is customizable ://///

ruby talon
#

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.

earnest phoenix
#

nobody cares about photoshop jesus

prime cliff
#

@earnest phoenix canvas is a programmable photoshop hence why i said template :/

earnest phoenix
#

yeah i got it

prime cliff
#

You basically create the layout and have your bot fill in the images/text

earnest phoenix
#

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

knotty steeple
#

photoshop is an image editor thing

#

canvas is just the canvas html tag in node

ruby talon
#

'k xD

#

@earnest phoenix does it work?

dreamy charm
#

Hey! Quick question. Hiw do I change background color for the long description?

#

I've tried this

earnest phoenix
#

no

ruby talon
#

rip

#
<style>
body {
  background-color: red;
}
</style>

@dreamy charm

dreamy charm
#
<style>
body {
background-color: black;
}```
#

Arthur already tried that

earnest phoenix
#

havent you asked that question 10 times in the past 12 hours

ruby talon
#

(u can use hex colors 2)
@dreamy charm it works with that.

dreamy charm
#

Arthur am I supposed to add it at the start?

ruby talon
#

This is what I have for one of my bots and works fine.

quartz kindle
#

he wants to change the description box, not the page body

#

right click > inspect element > find the structure and target the correct element

ruby talon
#

oh

dreamy charm
#

Yea

#

Only the desc box

#

Also Tim

#

I'm on phone

ruby talon
#

When you click on the text.

quartz kindle
#

@ruby talon canvas is programmable graphics lol. it doesnt have an interface or menus to chose from

ruby talon
#

Oh

#

RIP

#

I'm so stupid

#

I tought canva

#

oml

#

xD

quartz kindle
#

@earnest phoenix js ctx.font = "30px Arial";

#

you can change font size using the font property on the 2d context

dreamy charm
#

@quartz kindle is that the long description?

quartz kindle
#

ye

dreamy charm
#

Oh ok

#

Mine doesnt look nearly as good

quartz kindle
#

what doesnt work?

dreamy charm
quartz kindle
#

you have to put it in style tags lol

dreamy charm
#

Uhhhhh

sick cloud
#

lmao

dreamy charm
#

How do I do that

sick cloud
#

learn css

quartz kindle
#

...

sick cloud
#

google

quartz kindle
#

<style> </style>

sick cloud
#

@quartz kindle have fun

dreamy charm
#

Ok

quartz kindle
#

i should teach web dev classes >.>

#

not for free

ruby talon
#

xD

#

pls do

#

😄

dreamy charm
#

Tried this

#

Didnt work

quartz kindle
#

lololololo

raw flint
#

for the description, is it just full html?

ruby talon
#

Y do you put the color in {}?

quartz kindle
#

can i kindly ask you to learn the basics of css please? xD

dreamy charm
#

Because that's how tags work

#

You told me to google it

#

Lmaoooo

ruby talon
#

@dreamy charm Tim like just even showed you the code on how to do it.

quartz kindle
#

css works like this css selector { property: value; property: value; }

raw flint
#

<style>
body{
background-color: red;
}
</style>

ruby talon
#

@raw flint It isn't that pârt.

#

Its the box xP

raw flint
#

oh

quartz kindle
#

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

ruby talon
#

Tim, do you kow if you can do interactive animated backgrounds on DBL site?

dreamy charm
#

Got it to work

#

Thanks

quartz kindle
#

so both background: black and background-color: black will work

dreamy charm
#

I'm kinda new to css and HTML

ruby talon
#

same

#

Yeet$

quartz kindle
#

@ruby talon you can use css keyframe animations

ruby talon
#

UwU

#

so no js?

quartz kindle
#

js is only for certified devs

ruby talon
#

oki

#

well, I'll be cert in 50 years.

#

Then I'll've learned js

#

xD

quartz kindle
#

xd

dreamy charm
#

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?

ruby talon
#

Yes.

sick cloud
#

color: hex

dreamy charm
#

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

sick cloud
#
.something {
    color: #ff0000;
}
#

try harder

dreamy charm
#

What would that .something be?

sick cloud
#

whatever your element is

#

class name or element

dreamy charm
#

Nvm

#

Already did it

#

You were right

#

Pretty easy

ruby talon
#

Can you add more than 1 animation to 1 object in css?

dreamy charm
#

Is link-color a thing

#

Uhhhhh

#

I think I messed something up with the links

#

Help

sick cloud
dreamy charm
#

ThatTonybo

#

I've tried

#

But I want to just find the links inside the description

night imp
#

@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:
}

dreamy charm
#

What would a do?

night imp
#

A is an anchor tag

#

That is a link

#

So it will target all links on the page

dreamy charm
#

Ok

#

Tried this

#

@night imp

#

Didnt work

night imp
#

No no,

inner jewel
#

you can't nest css like that

night imp
#

Put them on separate nests

dreamy charm
#

Yeah I assumed

#

But I only want to find the ones inside the long desc

night imp
#

Then put it after .content

#

.content a {}

#

(or after long description)

dreamy charm
#

Oh

#

@night imp sorry for bothering

#

Well it didnt

earnest phoenix
#

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

dreamy charm
#

How do I add a button like this?

earnest phoenix
#

css magic

dreamy charm
#

Yeah ik

#

But what do I have to use?

#

@earnest phoenix

languid dragon
#

CSS

dreamy charm
#

I know

#

But like

#

What style

languid dragon
#

you make the styles or you find them online

dreamy charm
#

display: inline-block;

earnest phoenix
#

Someone can help me for download the java dbl api ? I never used gradle/maven

dreamy charm
#

What display style

earnest phoenix
#

confused :(

dreamy charm
#

Why

#

Just asking

#

What display style

#

display: inline-block;

#

Of these

languid dragon
#

go research what they do

#

and you'll find out which one you need

dreamy charm
#

What do I search for

#

I searched css link styles

#

And I get no shit

languid dragon
#

"what does display mean for CSS"

dreamy charm
#

I know what it means

languid dragon
#

then why are you asking which one to use

#

😩

dreamy charm
#

I just need to know what styles it contains

#

Apart from inline-block

earnest phoenix
#

"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
#

you either get the CSS from the code

#

or you re-create it yourself

earnest phoenix
#

@languid dragon can you help me ? x)

languid dragon
#

i dont know java

earnest phoenix
#

it's gradle

#

for getting the dbl api from github

languid dragon
#

I don't know Java, why do you think i'd know anything about Gradle

earnest phoenix
#

¯_(ツ)_/¯

#

@inner jewel ?

frozen tiger
inner jewel
#

@earnest phoenix use gradle/maven

#

that's the only way

earnest phoenix
#

yes but I never use gradle

#

can you help me ?

frozen tiger
#

gradle is same as maven, just different syntax

earnest phoenix
#

I never use maven too é_è

frozen tiger
#

mais

earnest phoenix
frozen tiger
#

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)

earnest phoenix
#

#

j'comprends rien à gradle oussi

frozen tiger
#

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

earnest phoenix
#

omg jsuis con j'crois

#

j'crois que depuis talleur il est sous mes yeux le jar risisinge

inner jewel
frozen tiger
#

oops

earnest phoenix
#

Why I have build the dbl api with gradlew but when I run my jar I have a ClassNotFoundException risisinge

#

I have build with the api jar

keen drift
#

So Gradle and maven are like flavours of java?

slate kayak
#

anybody here knows how to work with canvas ?

dreamy charm
#

I have a question...

#

Can I add javascript code into the long description?

#

To like animate the description

mossy vine
#

use css

#

javascript is only for cert devs

abstract crystal
#

^

#

that said...

#

you can still use embed tag

mossy vine
#

..

keen drift
#

What

dreamy charm
#

Nvm

#

Spent like 2 hs editing my long description lmaoooo

topaz fjord
#

you can animate using css

#

keyframes

dreamy charm
#

I mean technically it looks nicer now

#

@topaz fjord ima research keyfranes

#

Brb

inner jewel
#

@keen drift gradle/maven are build tools

#

they also manage dependencies for you

keen drift
#

What's the difference syntax about then

fervent river
#

i'm not ready fot this xD

quartz kindle
#

woah

earnest phoenix
#

epic

fervent river
#

but in the data there is only 2422 users ...

whole condor
#

Please, how I get the content of a embed message ?

fervent river
#

wich library ?

whole condor
#

discord.js

amber fractal
fervent river
#

i don"t know i use Java or c#

amber fractal
#

all the properties

whole condor
#

Thanks

#

it's message.title ?

amber fractal
#

Um... I've never actually done it, but I think that'd work

whole condor
#

No, I just want get the content of a embed message of an other bot

amber fractal
#

wit

#

it*

#

wait*

#

jesus so much lag

whole condor
#

It's for create an embed no ?

#

oh no okey sorry

#

I will test that

fervent river
#

Hmm what's this server ... DBL Verification center ...

zenith moss
#

It’s the bot testing server they take your bot into to see if the bot can be added

buoyant void
#

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

whole condor
#

Thank you @amber fractal

#

@buoyant void :
message.guild.member(bot.user).hasPermissions("KICK_MEMBERS");

buoyant void
#

Thank ya much

amber fractal
#

Same thing works with my text editor

orchid horizon
#

It's probably being overwritten by some other style

amber fractal
#

So I cant center table cells ;-;

orchid horizon
#

You could add !important after center, so like text-align: center !important;

#

that should make sure that it will show as you want

amber fractal
#

Alright

#

It worked tysm

orchid horizon
#

yep, no problem

earnest phoenix
#

-invite

#

!invite

#

!invite

quartz kindle
#

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

amber fractal
#

The head isnt in the body>

#

?*

#

I didnt send the whole code because it's too big either way it works

quartz kindle
#

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>```
amber fractal
#

I didnt know that...

quartz kindle
#

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>

earnest phoenix
#

Why when I build with the gradle of the API I don't have the dependencies

#

?

empty owl
#

hey

#

can .presence.status return an offline instead of invis

#

or is it the same thing

mossy vine
#

what lib

empty owl
#

.js

mossy vine
#

i dont think so

#

wait

#

offline == invis in the eyes of the api i think

empty owl
#

AHHHHHHH

#

so people can abuse my no kil thing

mossy vine
#

yes

empty owl
#

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

mossy vine
#

what

empty owl
#

nvm

mossy vine
#

its not a question of preference, let is scope based while var is not

empty owl
#

so which one is better

#

waiot

#

nvm

mossy vine
empty owl
#

hey so im using quickdb dont judge me

#

and

#

my cooldown broke

#

NVM

waxen quest
#

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.

earnest phoenix
#

what language

waxen quest
#

JS

amber fractal
earnest phoenix
#

^

#

.length

waxen quest
#

I must be doing something wrong then pepe_PepePains

amber fractal
#

you're using the username right

waxen quest
#

yes

amber fractal
#

not a user object?

waxen quest
#

Seems to be working fine now for some reason, I probably just mispelled it everytime peepo_ThumbsUp

#

Thanks guys

amber fractal
#

Yw... I guess?

#

Lol

waxen quest
knotty steeple
#

or you can do it the dumbass way

let length = 0;
username.split("").forEach(() => length++)```
waxen quest
#

Lmao

knotty steeple
#

and yes this does work

amber fractal
#

🤔

#

So... pointless tho lmao

knotty steeple
#

thats the point

earnest phoenix
#

@inner jewel ?

earnest phoenix
#

epic

knotty steeple
#

you can make your own function with this if you want to OMEGALUL

quartz kindle
#

lmao

earnest phoenix
#

can confirm

amber fractal
#

what does the -s flag do?

knotty steeple
#

silent return

quartz kindle
#
let length = 0;
let letters = username.split("");
while(letters[length]) {
    length++;
}```
#

lmao

knotty steeple
#

makes it return output only

inner jewel
#

.length isn't always accurate tho :^)

#

that's for 1⃣

knotty steeple
#

js™

inner jewel
#

utf16™

earnest phoenix
#

this check if the user has voted no ?

knotty steeple
#

guess

#

also is that java

earnest phoenix
#

yes

knotty steeple
#

that syntax thinkEyes

earnest phoenix
#

it's a lambda

#

not the real syntax

knotty steeple
#

i think i know what a lambda is

earnest phoenix
inner jewel
#

use thenAccept

amber fractal
#

A letter of the greek alphabet?

inner jewel
#

your code would throw if there was an error

#

because whenComplete will be null

#

so the unboxing for the if would NPE

earnest phoenix
#

so you need to update your github 🤔

#

Like that ?

inner jewel
#

yes

#

if you want to handle errors instead of silently ignoring, use exceptionally()

empty owl
#

please HELP

#

i broke everyting

#

: SqliteError: database disk image is malformed

amber fractal
#

disk image malformed?

earnest phoenix
#

Not work @inner jewel

empty owl
#

yep

mossy vine
#

was that glitch

empty owl
#

yep

#

i use it to test out stuff

amber fractal
#

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

inner jewel
#

@earnest phoenix "not work" means nothing

knotty steeple
#

idea

#

dont use glitch

empty owl
#

DAMKMIT

earnest phoenix
empty owl
#

how do u get the usercount of u bt

earnest phoenix
#

langage ?

mossy vine
#

@empty owl read 👏 the 👏 docs 👏

empty owl
#

ok

amber fractal
#

Amazing what the client class can do

#

in js anyways

empty owl
#

client.users.size?

#

cause I got
Users
13896

mossy vine
#

seems correct

empty owl
#

thats alot

#

for 10 guilds bot

#

THAT DOESNT USE EXPORTS

#

and its commands are pretty much useless

vernal rivet
#

Yes it's client.users.size

empty owl
#

wow\

amber fractal
#

Is it in this server?

orchid raft
#

pls can someone teach me how to do sharding with discord.py

amber fractal
#

Cuz this server has quite the lot

empty owl
#

no wonder

#

Discord Bot List
hey fortniters
DAETH TO ALL
MKV Syndicate
Bob
Da Group Chat (Real)
The Bot Lounge
gaming
AeroWorld
yee boi

bright spear
#

client.users.size is the amount of cached users

vernal rivet
#

It gathers all members in all servers

amber fractal
#

Mines in MKV Syndicate too

empty owl
#

wow

amber fractal
#

🤔

orchid raft
#

so's mine

empty owl
#

Hmmmmmmm'

amber fractal
#

Someone invites all the bots

empty owl
#

what about the bot lounge

amber fractal
#

Lol I have 4K bots on it

#

I dont think so

orchid raft
#

my bot is in a server which has something like 381 bots and 1 human

empty owl
#

invite me @amber fractal

amber fractal
#

?

#

wym

empty owl
#

to the bot lounge

amber fractal
#

Im not in it

empty owl
#

oofo

amber fractal
#

My bot just has 4K bot accounts on it

empty owl
#

???>?>

mossy vine
#

mkv syndicate is a bot spam guild

empty owl
#

lol

amber fractal
#

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

empty owl
#

4656

#

lmaOooo

mossy vine
#

i wonder whyyyyyyyy

amber fractal
#

Its not like its in a bot dev guild

empty owl
#

XD

vernal rivet
#

It's mostly from this server

amber fractal
#

and MKV

#

if its a bot spam server

#

I might blacklist them if thats the case

mossy vine
#

mkv syndicate is a known bot spam server

vernal rivet
#

Is the bot the one spammingm

empty owl
#

2533 online bots rn

#

on discordbotslist

#

hey i store in a sqlite

#

should it be public\

orchid raft
#

someone pls teach me how to do sharding with discord.py

mossy vine
#

read 👏 the 👏 docs 👏

amber fractal
#

Lmao dont join them so many messages mmLol

#

Imma go blacklist it from there now

orchid raft
#

the docs dont explain how to do it

vernal rivet
empty owl
#

Steven

#

u have the link?

#

nope i found

vernal rivet
#

Are you going off the discord developer docs?

#

@orchid raft

orchid raft
#

but they dont actually explain how to do sharding

amber fractal
vernal rivet
#

That's because it's in the discord developer docs

empty owl
#

best database for public bots?

vernal rivet
empty owl
#

whatabout general

vernal rivet
#

Idk

empty owl
#

mk

amber fractal
#

api is just a channel for the dbl api

vernal rivet
#

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

earnest phoenix
#

that logic makes no sense

#

"cutting vegetables is the same like murdering because both require a knife"

amber fractal
vernal rivet
#

He was asking about DBL, which is an api

earnest phoenix
#

what

vernal rivet
#

Discord bot list

earnest phoenix
#

they were asking for a database, and dbl is not an api, it has an api

vernal rivet
#

Does it really matter, cause it has an API, and it is an API package,

earnest phoenix
#

it very much does matter

amber fractal
#

I mean saying DBL is and API is just wrong tho mmLol

vernal rivet
#

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

bright spear
#

@vernal rivet the #topgg-api channel is only for the dbl api not for any other api smh

vernal rivet
#

At least it was the DBL api

slate pilot
#

Is there anyone here who knows the solution to this problem I have install this module and same time show me same error

topaz fjord
#

Did you install

slate pilot
#

yes

#

show me this error when install

mossy vine
#

install it as admin

amber fractal
#

Run cmd in elevated permissions

#

(as admin lol)

orchid raft
#

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

amber fractal
#

in py do you have a .spawn part?

orchid raft
#

no

amber fractal
#

Then I cant help

orchid raft
#

i just have client.run(token) at the end of my code

#

and client already has a defined shard id

amber fractal
#

is that the same thing?

#

correct lib*

slate pilot
#

@mossy vine I have done this and still shows the same error

celest bloom
#

whats the best way to include css styling in the long desc? can i somehow include a <style> tag?

bright spear
#

yes

#

the long desc is html and markdown

#

so you can include <style> or any other html tag (although scripts will be removed)

celest bloom
#

oh ok thanks

rich sail
#

How i can apply slice here?

for(var i=5; i<bots.length; i++)
quartz kindle
#

what do you want to do?

vagrant flare
#

are onclick methods also removed in the long desc?

fossil oxide
#

for non cert devs yes

vagrant flare
#

rip okay, thanks

#

sorry i was checking profile and i sent yu a fr by accident, ignore that

bright spear
#

@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

fossil oxide
#

cc @bitter sundial

bitter sundial
#

not anymore

buoyant void
#

.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

knotty steeple
#

uh

#

title doesnt take images

buoyant void
#

jfc you're right

#

it's .setAuthor

knotty steeple
#

yes OMEGALUL

buoyant void
#

i'm a genius

knotty steeple
#

totally

heady shell
#

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

Digital Trends

Discord bots can make life a lot easier for users of the gaming-centric online chat application. Here's what you need to know to get started making your own Discord bots, from coding them to adding them to your servers.

mossy vine
#

Did you read the error? It cant find a bot.json file

heady shell
#

yeah, I have tried updating the file extension

amber fractal
#

./bot.json

#

wait

#

where is the bot file

#

the js file

heady shell
amber fractal
#

is bot.json where everything is?

inner jewel
#

that tutorial is horrible

amber fractal
#

Because it needs to be a .js file

#

then cd into the file its in and run node bot.js

inner jewel
#
  1. outdated library
  2. tells you to copypaste invalid json
heady shell
#

oh

amber fractal
#

Thonk lol

heady shell
#

well i changed the extension, also where/how do i get an updayed version

amber fractal
#

Not all of them

heady shell
#

okie

amber fractal
#

Just the file that contains the javascript

inner jewel
#

try this

amber fractal
#

^

heady shell
#

alright will thanks

amber fractal
#

package and auth should be json files btw

heady shell
#

👍

knotty steeple
#

have basic js knowledge also

heady shell
#

eeeeh what could go wrong(hopefully nothing

#

thx for the help the tutorial worked 😄

mossy vine
#

Many things

knotty steeple
mossy vine
#

Having proper js knowledge is necessary for writing js code

knotty steeple
#

and making ur bot better

waxen quest
#

You'll probably learn js the more you upgrade on your code bot's dw pepe_FeelsOkayMan

knotty steeple
#

no you wont

west raptor
#

i did

knotty steeple
#

dream ur special

#

smh

west raptor
#

ok

waxen quest
#

I learned a bit when I had to look up stuff to fix my code

knotty steeple
#

if you are just looking at a guide you wont really actually learn a language

inner jewel
#

you don't need to master js to make a bot

waxen quest
#

Yeah I just used a guide to see how to make the app, then went lone wolf

inner jewel
#

but you should learn the basics

knotty steeple
#

yes u do

inner jewel
#

before jumping into a bot

heady shell
#

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.

mossy vine
#

Sololearn is great for learning basics

heady shell
#

what does ^ mean

#

ooo bookmarks

#

is it a command for the console or as !login

sick cloud
#

thats the prefix in discord

#

like ![command]

#

the console command is always going to be along the lines of node [file].js

heady shell
#

so how does it login

#

still confused

#

or is it just to make the prefix !

bright spear
#

client.login is not related to the prefix

heady shell
#

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

sick cloud
#

read the tutorial

quartz kindle
#

client.login() is the code you write that instructs your program to attempt to connect to discord and login

woven willow
#

you can use bot.login too

quartz kindle
#

not really a matter of "you can"

sick cloud
#

only if your client is named bot

#

its [whatever].login

quartz kindle
#

more like "you have to use whatever you named it"

sick cloud
#

inb4 dbm.login(glitch.token)

quartz kindle
#

GrzegorzBrzęczyszczykiewicz.login()

inner jewel
#

pretty sure that's an invalid identifier

sick cloud
#

Natan.disconnect()

quartz kindle
short siren
#

Hi

fierce thorn
unreal smelt
#

yoshi help

earnest phoenix
#

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

knotty steeple
#

read the error

#

wdym how to format help command

earnest phoenix
#

hmmm

#

i know the error

#

embed field is too big

#

but, it will look ugly putting all the commands in multiple embed fields

#

CODEBLOCKS

knotty steeple
#

wdym how to format help command

earnest phoenix
#

fuckye

knotty steeple
#

how does your help command even look

earnest phoenix
#

pretty basic

#

sec

#

rest of the commands wont fit in

#

since code looks like this

knotty steeple
#

idea

#

categories

earnest phoenix
#

idk how to make categories

#

i saw that on one bot, looks nice and well formatted but i have no idea how

knotty steeple
#

use a description instead of fields

earnest phoenix
#

i'll just use codeblocks

knotty steeple
#

i know what a codeblock is

zealous veldt
#

ok

zenith moss
#

Just use descriptions easy

earnest phoenix
#

static help commands nowant

zenith moss
sick cloud
#

gross

zenith moss
#

I’m

earnest phoenix
#

thats just

zenith moss
#

Ik

earnest phoenix
#

fields

zenith moss
#

No

knotty steeple
#

not?

#

there is something called bold text

sick cloud
#

10x better

earnest phoenix
#

like .addField("Description", "asdads")

zenith moss
#

Lmao

#

No

sick cloud
#

thats using the discord.js embed builder lol

#

not all of us use it

knotty steeple
#

embed builder OMEGALUL

sick cloud
#

embed objects > *

earnest phoenix
knotty steeple
#

just .send({embed})

#

ez

sick cloud
#
{
    title: `hello`,
    fields: [
        {
            name: 'did you know',
            value: 'that',
            inline: true
        },
        {
            name: 'embed builders',
            value: 'suck',
            inline: true
        }
    ],
    footer: 'okay'
}
vale kindle
#

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)

quartz kindle
#

whats your host?

vale kindle
#

liquid web

#

sharing with a friend

#

so I'm not too sure about the specifics

zealous veldt
#

My help command is jank af

quartz kindle
#

cloud vps?

earnest phoenix
#

now i cant send codeblocks as bot xd

knotty steeple
#

process time?

#

dont use cloud vps kthx

quartz kindle
#

59/mo jesus christ

#

thats expensive af

knotty steeple
#

easily get a galaxygate vps

#

$3/month cheapest one

#

and its not on the cloud mmspin

vale kindle
#

is htere any way to get it to work on liquid web

quartz kindle
#

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...

zealous veldt
vale kindle
#

its just the time

#

it says the process has been running for too long

zealous veldt
#

galaxy gate is amazing

#

super low ping for discord stuff

quartz kindle
#

if your plan has limited cpu hours per day, then you need to change plan or change hosting

#

discord needs 24/7 cpu hours