#development

1 messages Β· Page 353 of 1

quiet bobcat
#

ooo

#

ok let me update πŸ˜‰

tawny lava
#

it has some code breaking changes so you're gonna need to change some stuff

quiet bobcat
#

I tried it

#

Still says 11.2.1

#

Do I need newest node aswell?

tawny lava
#

run npm i hydrabolt/discord.js

quiet bobcat
#

Hydrabolt?

#

Ok

tawny lava
#

that's the name of the guy who made d.js

quiet bobcat
#

ok

#

It says I dont have git but I have it in my path

quiet bobcat
#

Thanks @tawny lava got it to work

umbral pelican
#

@tawny lava my bot is just dnd, help

tawny lava
#

you ask it nicely to not be dnd

#

or just delete it

umbral pelican
#

ok

tawny lava
#

wouldn't matter anyways cuz trash

umbral pelican
#

I'll delet

tawny lava
#

πŸ‘Œ

quiet bobcat
#

Somehow ffmpeg stopped working

#

πŸ”«

trim cedar
#

Question!

thorny hinge
#

Answer!

topaz fjord
#

anyone know how to make like a loading screen

#

for a webpage

thorny hinge
#

Anyone know how to make your website embed on discord when you send it

topaz fjord
#

like this?

abstract mango
#

use ogp

topaz fjord
#

anyone know the thing to check if you cant dm someone

quasi marsh
#

What dbl non-cert union says, those are meta tags

#
<meta property="og:title" content="TItle"/>
<meta property="og:description" content="Description"/>
<meta property="og:url" content="yoursiteurl"/>
<meta property="og:site_name" content="sitename"/>
<meta property="og:image" content="image_if_you_like.png"/>
<meta property="og:type"   content="website" />
#

Place them between <head> and </head>

pale light
#

My bot resets its token continuously

#

wtf is this

inner jewel
#

every time you refresh the page it shows a new token

#

but it's not being resetted

abstract mango
#

nah, it might be a constant reconnection bug

#

but idk

pale light
#

nvm

earnest phoenix
#

how would i change the background? and also add buttons?

queen violet
#

you could change the background-image of the body or some div

#

or add an image setting it to fill the screen

earnest phoenix
#

uh.. how would add an image?

queen violet
#

<img src="<your image url>" />

earnest phoenix
#

lol

#

and how would i make it cover the entire screen?

glossy sand
#

...you mean a background image?

earnest phoenix
#

yes.

glossy sand
#

use the background-image css rule

earnest phoenix
#

any of you know whats going wrong here

#

im using a passport discord strategy

#

however once i get to discords authentication

#

it wont go to the callback

jagged plume
#

did you set the redirect url to the callback

earnest phoenix
#

yea looky here

jagged plume
#

and in the url?

earnest phoenix
#

oh whoops

#

time for a new secret

jagged plume
#

can it redirect to localhost

earnest phoenix
#

should be able to

jagged plume
#

oh wait it should be able to

earnest phoenix
#

i did it successfully once

#

idk why it just is broken now

#

litterally have no clue

#

whats wrong

jagged plume
#

hm

#

let me check my code

earnest phoenix
#

@jagged plume any luck?

#

also srry about the whole keeping routing and passport stuff on main file

#

this isnt a big project meant for production or anything just something stupid

jagged plume
#

mine looks basically the same

earnest phoenix
#

this is frusturating as heck

jagged plume
#

except i have successRedirect as well as failureRedirect ?

#

i havent used it in ages

#

might be something to try

earnest phoenix
#

i do have a success redirect and a failure one

jagged plume
#

where it says failureRedirect

#

mine also has a successRedirect prop

earnest phoenix
#

oh

#

i think the problem is with discords redirect

jagged plume
#

probably

earnest phoenix
#

because it goes to discord fine and dandy

#

but not back

#

ill just make a new app

bitter sundial
#

if I see correctly, clicking authorize does nothing?

jagged plume
#

it might be trying to redirect and the page isnt responding

bitter sundial
#

exactly

earnest phoenix
#

yea

#

ok um hold on

#

ill output if discord tries to redirect ect

#

nope

#

the authorize button wont click

#

i even tried manually putting in the callback into url

#

when i change the redirect to google.com it still dosnt work

#

it has to be discord

bitter sundial
#

redirect to google would be invalid

#

give me that link

earnest phoenix
#

mk

bitter sundial
#

ah

#

you're missing scopes

earnest phoenix
#

AHA!

#

you did it

#

@bitter sundial i owe you my life

#

time to go to sleep

#

gnight

bitter sundial
#

lol

earnest phoenix
#

got school tom and its 12:30

earnest phoenix
#

Ok

earnest phoenix
#

How do I get users in my playing

rich kiln
#

wich lib

earnest phoenix
#

py

fervent goblet
#

Alright I got a scenario

#

I have a React app

#

which I want to serve at ip.ip.ip.ip/

#

and an api I have running on the same server at port 1234 which I want to serve at ip.ip.ip.ip/api

#

how do I do this with an apache vhost?

next pasture
#

e

quiet bobcat
#

Can someone help me? I updated my discord.js to version 12.0.0 but I couldn't get anything to work so I downgraded back to version 11.2.1 and when I try to play music it says fix Error: FFMPEG not found To make sure it was installed I even installed it globally. Same issue. So how do I get node to recognize ffmpeg again?

#

It worked before I updated discord.js

north fog
#

is the executeble still on the same location ΒΏ

quiet bobcat
#

Yes?

north fog
#

yes with a question mark, go check it

quiet bobcat
#

Do you mean the FFMPEG executable?

north fog
#

yes

quiet bobcat
#

I can check

north fog
#

if windows its ffmpeg.exe

#

on linux/mac i dont know what excension

quiet bobcat
#

I found it but it's in the node_modules folder

#

I don't know if it was there before

north fog
#

try moving it a folder up

tawny lava
#

npm i ffmpeg-binaries @quiet bobcat

quiet bobcat
#

I already have it installed Lizard

#

I tried updating it same problem

#

What do you mean try moving it a folder up @north fog ?`

north fog
#

out of the folde node_modules folder

#

that it is placed by the same files where the bot self is

quiet bobcat
#

ok

#

Same thing

#

I'll try adding ffmpeg to my path

#

Still the same :/

north fog
#

then i dont know

quiet bobcat
#

😦

#

I tried doing ffmpeg

#

in cmd

#

and it says its not recognized as an internal or external command, operable program or batch file.

#

So ffmpeg isnt even installed

#

🀦🏻

#

I tried installing ffmpeg and adding it to my path and then restarting cmd

#

but still the same thing

crystal void
#

try restarting ur pc @quiet bobcat it helped me πŸ˜›

fervent goblet
#

Alright I got a scenario
I have a React app
which I want to serve at ip.ip.ip.ip/
and an api I have running on the same server at port 1234 which I want to serve at ip.ip.ip.ip/api
how do I do this with an apache vhost?

naive hazel
#

Is there a way to play xspf, pls or m3u files through vc?

earnest phoenix
#

@fervent goblet i dont think you can but you can redirect ip.ip.ip.ip/api to ip.ip.ip.ip:1234

#

And maybe it will work

fervent goblet
#

yes you can do that

#

with proxy

quiet bobcat
#

Can someone help me? I'm trying to make a pause and resume command. I've got the pause down but I can't resume it. The code I've got so far is fix message.member.voiceChannel.connection.dispatcher.resume()

abstract mango
#

@fervent goblet that would be much easier with nginx

#

since you could use proxy_pass

fervent goblet
#

its not "easier" with nginx

faint cedar
#

@quiet bobcat Stilll having the issue?

quiet bobcat
#

Yeah

faint cedar
#

s>ev msg.guild.music

#

shhoot forgot

#

Instead of dispatcher try doing it on connection

#

Not sure why your having that issue while it works for me.

quiet bobcat
#

me niether

#

It's not a function

faint cedar
#

Where are you testing this at?

quiet bobcat
#

What

#

it works on discord bot list

#

but not on my server

faint cedar
#

Does anyone have a recommendation on how to modify a Opus Encoded Stream's volume

lethal sun
#

How to make Jimp to merge two pictures? Yes i did tried everything

next bluff
earnest phoenix
#

i used jimp to make a program that puts messages onto potatoes

next bluff
#

like superimposes text onto a picture of a potato?

earnest phoenix
#

yeah

#

thats not the issue im having

#

the package installs with its dependencies

next bluff
#

oh damn

earnest phoenix
#

and the dependencies show up in references

#

but not the package

rich kiln
#

@lethal sun first of all DONT use jimp

next bluff
#

I wonder if there's a version mismatch between the package and the VS project

#

that's really all I can think of

quiet bobcat
#

How can I make so if my embed exceeds 2048 characters it continues on a new embed?

#

Using discord.js

quasi eagle
#

my bot completely stopped writing to console

#

when anything happens

quasi eagle
#

nvm

#

i accidentally removed
_client.Log += Log;

earnest phoenix
#

hey\

#

is it ok to like

#

i dont know

next bluff
#

is that the discord api access token?

earnest phoenix
#

no its for passport

#

oauth stuff

#

creating a login with discord for my program

next bluff
#

oh, then yeah that looks pretty normal

earnest phoenix
#

so its ok to litterally store all of it on a cookie

#

for user sessions

next bluff
#

it's okay, but I would consider storing a single user identifier and then retrieving it on the backend

earnest phoenix
#

so like append a randomly generated token to that data, store it to a database and give the users that token

#

i guess that would be better and more practical

next bluff
#

that's what I did

bitter sundial
#

ooh

#

dont store the data like that in a cookie

#

use sessions

earnest phoenix
#

kk

thorny hinge
#

k so I wanna make users be able to login to my website with their discord acc but don't know where to start bloblul

glossy sand
#

serverside sessions?

#

DansGame

earnest phoenix
#

google passportjs, express-sessions, and discord-passport strategy @thorny hinge

thorny hinge
#

Seems like alot

earnest phoenix
#

@bitter sundial yea guna use express sessions god bless

thorny hinge
earnest phoenix
#

@thorny hinge yea sorta i guess i can send you some boilerplate i just wrote if u want

thorny hinge
#

Yeah

quasi eagle
#

how do i do Syntax Highlighting on my bot

earnest phoenix
thorny hinge
#

Nice

earnest phoenix
#

socket stuff is because its a game

#

i pass realtime data to users ect

thorny hinge
#

So much semi colon neglect

#

cri everytiem

earnest phoenix
#

semicolons are only necessary if you have sameline code

thorny hinge
#

I know

#

But

#

Still

earnest phoenix
#

its not necessary so why bother

thorny hinge
earnest phoenix
#

lol

#

also the xss module

#

is to filter usernames ect

#

it basically turns <>& ect ect into their html equivilant

#

xss(string here) returns html safe text

#

its lovely

#

i need to read express sessions docs now to get that done

#

ffs

earnest phoenix
#

i store all my passwords plaintext in a cookie

#

:^)

next bluff
#

Secureβ„’

earnest phoenix
#

i joke ofc

#

im having a bitch of a time setting session data

#

with express sessions

next bluff
#

I'm sorry to hear that

#

ah, nodejs

#

never used that

earnest phoenix
#

really?

next bluff
#

yeah

earnest phoenix
#

its only the coolest thing in town

next bluff
#

I use npm for front end but that's about it

#

I've been using Scala lately

#

it's my jam

earnest phoenix
#

i use node for pretty much everything

#

cuz im a nerd

#

when making desktop apps

#

i just use node + electron

#

lol

next bluff
#

oh wow haha

#

that's a lot of js

earnest phoenix
#

lol

#

yea

#

but i mean

#

the mean stack is like

#

crazy awesome

#

for scalable and easy programming

#

mongo expresse and node are my shit

#

angular not so much

#

feels way to corporate compared to things like react ect

next bluff
#

yeah I love react

#

angular feels too dependency injectiony

earnest phoenix
#

angular is like

#

a wannabe

#

react

#

but its stuck in the past

next bluff
#

that's a good way of putting it

#

wannabe react with lots of extra crap that I don't want

earnest phoenix
#

ye more makeup dosnt make an ugly person beutiful

#

lol

#

right there

next bluff
#

that's a good secret

earnest phoenix
#

yea

#

no one will ever guess it because its not true

#

:^)

uncut slate
#

fix ur indentation pls

quasi eagle
#

for some reason my bot is getting slower and slower

#

until i restart it

#

but only this one specific command

#

when its ran it freezes the whole bot

earnest phoenix
#

oh yea im sorry

#

just changed secret

quasi eagle
#

im not sure you should be sharing the secret

earnest phoenix
#

already changed it

#

its ok

next bluff
#

it's just a decoy

uncut slate
#

is that Python

earnest phoenix
#

nodejs

#

:^)

next bluff
#

pythonjs

earnest phoenix
#

^

quasi marsh
#

I want to build a dashboard

earnest phoenix
#

wa

quasi marsh
#

But Python is my best lang (actually maybe the only lang)

#

And I know jack shit about Django

earnest phoenix
#

suxman

#

learn the mean stack and fun stuff like passport ect

quasi marsh
#

That is JS right?

earnest phoenix
#

yea

#

dont use that as an example

quasi marsh
#

JS sounds doable

earnest phoenix
#

js can do anything

quasi marsh
#

But couldn't you see a JS file?

#

So if I load in a JS file

#

Couldn't my user see all that?

earnest phoenix
#

nodejs is a diffrent situation

#

then regular js

quasi marsh
#

Or could I just use something like a chmod

earnest phoenix
#

its this weird thing

#

you can run js files basically

#

not in browser

#

but server side

#

like uh

#

a file that listens on a port and responds files ect

#

maybe this will help

#

nodejs is a neat thing

#

2017

icy lynx
#

NodeJS is JS on v8 without browser API

#

NodeJS is server-side, meaning clients wouldn't - of couse - see the source code

#

But yea, imo, Python code is more readable

earnest phoenix
#

python is more readable but not as practical imo

restive silo
#

python isn't that bad for backend api stuff, but node.js is also dam usefull

earnest phoenix
#

!<HELP

#

!<help

#

is there a way to pass session data from req.sessions to socketio?

earnest phoenix
#

finally got my boilerplate template done

#

i need helpio

#

xd

heady bough
#

How can I make my bot just continue to try connecting to the internet, rather than stopping after about 3 tries?

#

using Discord.js

restive silo
#

you cant

#

and its not 3 tries

#

its actually 20 times

#

after that it wont try to reconnect again

earnest phoenix
#

u are mom gay

restive silo
#

what

earnest phoenix
#

what

heady bough
#

what

restive silo
heady bough
#

So what can I do instead to keep trying to connect? I want the bot to connect as soon as it gets an internet connection

restive silo
#

listen to the disconnect event and exist the process, use pm2 and let it restart

#

thats what most do

earnest phoenix
restive silo
#

cmon stop memeing in here

earnest phoenix
#

ok

heady bough
#

I've never used pm2, I'll have to look into it

#

Thanks!

restive silo
#

its a process manager what restart your bot automatical when it crashes/exists

#

pretty usefull in production

earnest phoenix
#

pm2 is based s fuck

#

i love it

#

i use it for litterally everything

restive silo
#

same

earnest phoenix
#

i have never made anything for production before :/ or done any unit testing of any sort

#

i should learn that up

#

like automatic deployment

#

ect

heady bough
#

I should too, it'd be nice to edit with Notepad++ rather than Nano in a PuTTY prompt

earnest phoenix
#

what

shell bane
#

huh I've just been using an

    bot.connect();
});```
earnest phoenix
#

everythign about that

#

@shell bane no

#

just

#

no

#

delet dis

#

and use pm2

#

@heady bough notepad++ or nano

#

what are you

heady bough
#

What do you expect me to use, my main PC is Windows and the server my bot is running on is FreeBSD

earnest phoenix
#

vscode or something better then notepad++ lol

#

like atom

heady bough
#

I've never used Atom

earnest phoenix
#

its neat

#

super modular

#

and hackable

#

which is nice

#

i prefer vscode

heady bough
#

It looks quite tidy

#

tidier than notepad++

earnest phoenix
#

atom runs off of electron which can be a bit laggy sometimes

#

vscode is nice but not near as modular ect as atom

heady bough
#

Doesn't vscode require the whole visual studio installation?

earnest phoenix
#

no

#

vscode is its own thing

#

its super neat and lightweight imo

#

this is vs code

heady bough
#

ooh

#

That's neat

#

I think I'll try both

earnest phoenix
#

if you are trying out atom i recommend looking up some of the more popular plugins

#

like beutify

#

which automatically indents and properly spaces everything ect when you save

#

ect ect

heady bough
#

ooh

earnest phoenix
heady bough
#

hmm

#

actually

#

I think I have tried Atom on Arch Linux before

earnest phoenix
#

yea since its written on electron its all platform

#

idk bout vscode im pretty sure its only windows

heady bough
#

ARM too?

earnest phoenix
#

yea

#

i mean

heady bough
#

neat

earnest phoenix
#

electron is litterally

#

just a webbrowser

heady bough
#

ohh, I see

earnest phoenix
#

yea its like

#

its like a website with access to nodes functions like writing files ect

#

electron is neat

#

i played with it a few times

#

i also have some boilerplate scripts ect on github for bots & projects if u ever need it

#

im super lazy so i make boilerplate codes for later use

heady bough
#

Alright

#

Do I need to use any code for pm2, or just install and launch my main.js with it?

earnest phoenix
#

nonono so like

#

do npm install pm2 -g

#

navigate to your js script

#

type pm2 start main.js --name "BLAH"

#

then type pm2 list

heady bough
#

ooh

#

wow

earnest phoenix
#

yea it has a 0 downtime restart

heady bough
#

Can I now access the console for the server somehow?

earnest phoenix
#

meaning if you restart it it will be down for only a few ms

#

right so once its started in pm2

#

you can close ect

#

its like

#

a screen

#

and whenever it errors or crashes

#

it will autorestart

heady bough
#

I see

earnest phoenix
#

its pretty neat

heady bough
#

Does it autorestart when the system restarts, too?

earnest phoenix
#

system restart? as in hard restart?

#

or like you close console

heady bough
#

Like, hard restart

#

as in, the host reboots, and the jail gets rebooted as well

earnest phoenix
#

no but theres a way to do that

#

let me pull it up

#

its like

#
pm2 startup ubuntu
pm2 save
#

these are the os options

#
[ubuntu | ubuntu14 | ubuntu12 | centos | centos6 | arch | oracle | amazon | macos | darwin | freebsd | systemd | systemv | upstart | launchd | rcd | openrc]
heady bough
#

So has it now run the commands, or do I have to go through what it output and run the commands?

earnest phoenix
#

what do you mean?

#

are you trying to see the output"?

heady bough
#

Like, it produced a lot of output

#

I was wondering if it did everything to make it autostart

earnest phoenix
#

er not sure i dont have it restart like that automatically

#

if you want to see your scripts output

#

do pm2 logs yourprocessname

#

for auto startup

abstract mango
#

@heady bough at the end it should have something to run if you did it with no sudo

#

else it's now fine

earnest phoenix
#

tonkku is best badmin

earnest phoenix
#

what is inquired to be a certified developer?

#

on here

queen violet
#

you need to have a bot thats very distinct

#

from all the others

earnest phoenix
#

ah

#

got ya

#

i should probably make a proper discord bot

heady bough
#

Mine will probably never be proper until I implement databases

fervent goblet
#

you don't "implement" dbs

heady bough
#

true

quiet bobcat
#

How can I get the total time of a song? Using discord.js.

earnest phoenix
#

Hey guys, I'm having weird exceptions thrown. My bot is using JDA. It starts working at first, but then I get 'Stream closed' and 'RestAction queue returned falure'... has anyone had problems with that before? I am starting to believe it's discord's fault, but I dunno. I only recently started exploring the JDA..
Edit - I have diagnosed the problem.

fervent goblet
#

code?

latent helm
#

this quran bot

#

quran bot

quiet bobcat
#

Yes we can see that

latent helm
#

*Ψ§Ω„Ω‚Ψ±Ψ§Ω†

#

not

#

*help

quiet bobcat
#

Maybe make it english aswell?

#

To make it easier to use

latent helm
#

this quran
muslims book
muslims book arabic not english

quiet bobcat
#

Yes but the moderators don't know arabic

latent helm
#

copy

quiet bobcat
#

And did you list the command *Ψ§Ω„Ω‚Ψ±Ψ§Ω†?

latent helm
#

yes

quiet bobcat
#

And maybe put in some info that the bot only responds to arabic

#

So there isn't any confusion

latent helm
#

okey this quran

#

heroz bot

#

why

#

this arabic and english

earnest phoenix
#

Shouldn't it be Ψ§Ω„Ω‚Ψ±Ψ§Ω†* if it's in arabic?

tawny lava
#

maybe make the help command in english telling them to run *Ψ§Ω„Ω‚Ψ±Ψ§Ω†?

quiet bobcat
#

yeah ^^

latent helm
#

heroz bot

#

english and arabic

#

you see *help

#

bot choose engelsh or arabic

quiet bobcat
#

Just make the bot respond to *help

north fog
#

did you put that information also in the description ΒΏΒΏΒΏ

quiet bobcat
#

for just one command

latent helm
#

for english
*help.en

Ω„Ω„ΨΉΨ±Ψ¨ΩŠΩ‡
*help.ar

quiet bobcat
#

Yes do that

#

But for the other bot

#

or is that for the other bot?

latent helm
#

@lusty plaza this my bot

quiet bobcat
#

Ok

#

But arraying wasnt aware that there was a *help.en

#

Because he just did *help

latent helm
#

no

#

help-m

quiet bobcat
#

But the screenshot...

#

It just said *help

latent helm
#

*help-m

quiet bobcat
#

Sure that's the correct

latent helm
#

say

quiet bobcat
#

but he just did *help

north fog
#

nobody excpect *help-m

quiet bobcat
#

Yes

north fog
#

everyone expect help wihtout any extra's

quiet bobcat
#

Yes

north fog
#

also, try adding more command info in your bot command that they can test/find out

latent helm
quiet bobcat
#

Good

#

But that wasnt there before

north fog
#

because they couldn't find the correct help command they thougt it was broken

quiet bobcat
#

When arraying was looking at your bot

latent helm
quiet bobcat
#

Yes but we cant write that

#

sooo...

latent helm
#

no It existed before

#

copy

quiet bobcat
#

what exsisted before?

#

you cant copy playing messages

latent helm
#

command help

quiet bobcat
#

If it existed before, then why couldn't arraying use it

latent helm
#

idon't no

quiet bobcat
#

For the love of god this has nothing to do with development

#

You should know, it's your bot

latent helm
#

hey

quiet bobcat
#

What?

latent helm
#

Salvation I do not want Bot quran

#

i wan heroz bot

quiet bobcat
#

then use heroz bot?

#

what's even the problem

latent helm
#

*bot-m

quiet bobcat
lethal sun
#

answer for almost all questions

scenic crest
#

@latent helm yes I know quaran bot replied to this message, but it still shows that the actual help command reply did not send for that specific bot

crystal void
#

rip #rules

weak parrot
#

^^

north fog
#

defuk, no rules anymore ΒΏ

lethal sun
#

wow true

inner jewel
#

ANARCHY /s

glossy sand
#

how do you use a discord oauth access token?

#

I can find absolutely no documentation or tutorials

young cradle
glossy sand
#

already read it

#

it tells me how to produce an access token but not how to use it

bitter sundial
#

you use it on normal endpoints

fervent goblet
#

Bearer <token>

glossy sand
#

uh should I cache the stuff I'm getting from the user endpoint

fervent goblet
#

As auth header

glossy sand
#

I'm afraid I might end up with outdated avatars

#

don't want those spicy 404s

#

I'll cache for 30 minutes I guess

hazy bone
#

Me is a m

#

me*

scenic crest
#

@foggy sinew let's talk here πŸ‘‹

#

and what do you mean someone voted?

#

you mean reacted to a message?

foggy sinew
#

In my bot

#

I want to give them a gift if they do

#

I know

#

I just want to get a good understanding first

scenic crest
#

ohh right

#

are you familiar with HTTP requests in Java?

foggy sinew
#

Nope

#

I am kinda new to java

scenic crest
#

oh boy ok

#

well uh

#

I suggest you read up on HTTP requests and such

foggy sinew
#

Ok

scenic crest
#

once you got that, lmk

foggy sinew
#

Is there a good example bot that has this?

inner jewel
#

look up okhttp

#

it's one of, if not the, best http libraries

scenic crest
#

^

inner jewel
#

or just use my wrapper because it handles it for you

#

DiscordBotsAPI#getUpvoterIds()

scenic crest
#

does your wrapper have support for jars + build paths?

foggy sinew
#

So this basically uses data from a websites?

scenic crest
#

ye

inner jewel
#

you can download a jar from bintray

#

the only dependencies are okhttp and org.json

#

iirc

foggy sinew
#

Ok

#

Do i need this to accomplish this?

inner jewel
#

no

#

but it's easier if you're not familiar with making HTTP requests

#

download this

#

and add to your classpath

#

if you have JDA already it's all done

foggy sinew
#

Yeah I have JDA

#

So do I need gradle or maven now?

#

I have gradle installed I think

#

One of the two

scenic crest
#

I set body color to white but it's not all of the text

glossy sand
#
* {
  color: white !important;
}
#

but the proper way is to write a separate rule for each individual element

#

don't be Lazyβ„’

scenic crest
#

I don't care about the proper way

#

I'm a backend dev

#

now

#

how do I add this

#

as a style tag?

glossy sand
#
<style>
stuff {
  foo: bar;
}
</style>
scenic crest
#

coolio

#

#prefix { color: green !important; } isn't making the prefix green

#

the prefix is in a span with the ID of prefix

glossy sand
#

inspect element it

#

there's probably some other rule with higher priority

scenic crest
#

probably the * {} ?

glossy sand
#

uh i wouldn't think so

#

if you look in the styling panel of the web dev tools, you'll see only one of the color rules isn't struck out

#

that'll be the one with highest priority

#

i'm pretty sure * matchers have the lowest priority

scenic crest
#

this tab?

glossy sand
#

yeah

#

scroll down and see what's up

scenic crest
#

there is no color that isn't striked out

lethal sun
#
<style>
code {
    background-color: whitesmoke;
    color: #000000;
    font-size: 0.875em;
    font-weight: normal;
    padding: 0.25em 0.5em 0.25em;
}
</style>```
#

works for me

glossy sand
#

i can see in your screenshot the wildcard selector's color rule isn't

lethal sun
#

@scenic crest use that code

glossy sand
#

odds are your prefix selector didn't actually work

scenic crest
#

it's there sure

#

but

#

it's striked out

#

same with all the other color

lethal sun
#

click on the little boxes on the side

glossy sand
#

ok so your * selector has higher priority than your .color-blue selector

#

i'm so confused tbh

scenic crest
#

ok thanks for the help my 0.34 shits have been used up

#

most of it works, you just can't see the prefix LOL

glossy sand
#

oh hell we're all stupid

#

you need to apply the rule to #prefix.color-blue > code

#

not just #prefix.color-blue

#

I blame whoever wrote the new bot page for putting that in a <code> block in the first place because why would you do that

scenic crest
#

lol thanks

next bluff
#

@woven drum
<div id="details" style="max-width: 1264px;margin: 10px auto;">
is an improvement

woven drum
next bluff
#

might need to do something about that extra white border though

#

lol

woven drum
#

@next bluff the mainly problem with the page is

#

i want the bg but the text is ugly

next bluff
#

oh I see

#

like the created by text?

woven drum
#

ya and the "bot profile" text

next bluff
#

I would maybe add a background for those?

woven drum
#

it will look shitty tho

#

new layout is a big problem

next bluff
#

or you could replace the text with an image with the text that stands out more

#

like black font with white borders or something

woven drum
#

maybe

next bluff
#

or the inverse

woven drum
#

how to do it with css

next bluff
#

you would make the text transparent and then give the div a background image

woven drum
#

this looks good

next bluff
#

nice

woven drum
#

one problem tho

#

cant get that properly working

next bluff
#

what's wrong with it?

woven drum
#

it makes borders to the usernames too

#

i just need them to the creaed by text

next bluff
#

what css rule did you use?

#

you could make it more specific by adding an additional rule for the <a> tags

woven drum
#
    #createdby {
      color: #FFFFFF !important;
       text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;

    }
next bluff
#

ah yeah that would include the child tags as well

woven drum
#

yep

next bluff
#

just do #createdby a { text-shadow: none } or something

woven drum
#

it works

next bluff
#

it looks really good like this imo

#

with the text improvements on top of that

#

if you want that as well, you can do
`#details {
max-width: 1264px;
margin: 10px auto;
box-shadow: 4px 4px 0 0 #424f80, inset 4px 4px 0 0 rgba(204, 214, 248, 0.8), inset -4px -4px 0 0 #a5b3e6;
}

#details .container {
border: none;
}
`

#

@woven drum I recommend it

woven drum
#

@next bluff reload it

#

it will have the text chnages

next bluff
#

somehow your status div is misaligned now

#

#bot-details-page .status::before { vertical-align: middle; }

woven drum
#

made the image circular

next bluff
#

also, for the #details .container, change it to #bot-details-page #details .container to get rid of that border

#

the change didn't take

#

circular image looks nice

woven drum
#

ya

#

the Join Support Server should be centered

next bluff
#

#bot-details-page .bot-btns2 { width: 188px; margin: auto; }

to center it

woven drum
#

@next bluff do you still have the page open

#

if you do dont close it

#

take me the css

#

another dev overwrote it

next bluff
#

I did not, crap

woven drum
#

cra

#

p

shrewd field
#

hello

#

can someone help me?

#

please

trim steppe
#

@shrewd field

cannot read property 'name' of undefined - check that props.help exists first

#

before continuing

shrewd field
#

ok

scenic crest
#

@shrewd field make yourself familiar with rule 7b please

trim steppe
#

btw

#

new rules

scenic crest
#

wouldn't want you accidentally breaking the rules

trim steppe
#
7.
      a. Don’t spoon-feed or attack beginners.
           Everyone starts somewhere and asking questions is smart. Do not attack people for not knowing how to code. Point them to great learning sources and help them with problems.
           However, you shouldn’t just give them finished code because then they only learn to copy more.
      b. If you are a beginner, have a will to learn and do not expect to be spoon-fed.
shrewd field
#

ok

#

then what would be a correct wat to ask for help

scenic crest
#

have the will to learn what the code does

#

be prepared to read a few paragprahs on coding concepts

#

try to actually uinderstand and create code yourself

shrewd field
#

ok

next bluff
#

stack overflow is excellent πŸ‘

trim steppe
#

You will also be required to read the error

shrewd field
#

ok

#

thanks

#

I figured it out

#

I had exports.conf twice instead of exports.help

thorny hinge
#

So I have a
let var = somevalue; in a js file, how can I use this variable in my html file?

#

I wanna make the header of my page the value in my js variable

glossy sand
#

get the element and set its innerText attribute

#

you might use document.getElementById('something') for example

shrewd field
#

hello I can't figure out what to do with this error can someone help me

#

Bananya

#

You will need:

  1. A Token for the Bot.
  2. Make sure that it is in your server.
  3. Go to https://www.discord.js.org/ and go to documentation.
  4. Copy the examlpe there and edit on it.
#

with only 1 command

#

that is ping pong

#

you then can edit on the example to add more code

#

yes that is it

#

hello can someone help me with this error.

C:\Users\toshiba\Desktop\Valkbot\node_modules\discord.js\src\structures\interfaces\TextBasedChannel.js:490
    return this.send(content, Object.assign(options, { code: lang }));
                                            ^

RangeError: Maximum call stack size exceeded```
scenic crest
#

are you recursively invoking the function?

shrewd field
#

no

#

what i did was I had sendCode depreciated so I went to the directory of the bot file and chaged everything from sendcode to send

restive silo
#

Well you have a memory leak somewhere

shrewd field
#

nope

#

that is everything I did

scenic crest
#

call stack size sounds like the part of the stack allocated for function calls

#

and the only time I can think of where that becomes full is if you recursively call the function over and over and over again

#

but I don't know JS so I can't rlly tell

shrewd field
#

ok i didn't understand a single word from what you said

restive silo
#

Like i said he has a memory leak somewhere by calling that function too often

shrewd field
#

huh

scenic crest
#
function foo() 
{
    foo();
}```
restive silo
#

It seems like 2 functions are calling each other until max call size is reached

scenic crest
#

this will generate a memory leak

#

have you got something like that in your code?

shrewd field
#

what could i do now then

scenic crest
#

see if you find any examples of this happening in your code

#

idk ask the person who linked you to the site xD

shrewd field
#

you need to go to documentation

#

then copy the example and change the place next to the word login in client.login() to your token

shell bane
#

Would someone be able to help me with a simple problem

#

I know the solution is with object.keys I'm just not entirely sure how to implement it properly

#

So i have one object that has say 10 properties and another object that has let's say 3 of those properties. All properties are numbers

#

How would I check which common properties they have and add them together

#

I know I can just get rudimentary and to an if check for each of the 10 properties to see if it exists but I feel like that's a waste of time and space

restive silo
#

@shrewd field dont make a new account and ask in d.js

#

You were banned for a reason

#

He is banned yes

prime cliff
#

Deni banned again? OOF

restive silo
#

He were always banned on d.js

scenic crest
#

let's not get offtopic in here x)

shell bane
#

What library are you using

quiet bobcat
#

What language?

prime cliff
#

XD

quiet bobcat
#

Programming language

shell bane
#

That's....

quiet bobcat
#

...

vital lark
#

I need to learn English Programming Language kthxbye

fervent goblet
#

My bot is legit coded in english too

#
for f in lol:
#

is english

#

using hwat programming lang?

#

what*

quiet bobcat
#

Show me your code then?

fervent goblet
#

what the/

shell bane
#

What

quiet bobcat
#

What

fervent goblet
#

that has nothing to do with this

quiet bobcat
#

If you just made your bot app then you haven't even coded anything

#

You got to choose a language to code the bot in

fervent goblet
#

A LANGUAGE

#

as he said

quiet bobcat
#

The bot. You need to code it

fervent goblet
#

a PROGRAMMING language

#

and yes, you can clone a bot, but don't clone a bot, thats bad

quiet bobcat
#

You got to choose what to code it in

#

^^

fervent goblet
#

Python is the only available programming language

#

so not much choice

quiet bobcat
shell bane
#

Lol

quiet bobcat
#

Some libraries to use for coding are discord.js, discord.py, Eris, JDA ect

earnest phoenix
#

Sup bruvs

#

Eris is the best library btw

shell bane
restive silo
#

You cant say that 1 libary "is the best"

fervent goblet
#

Disclaimer, don't listen to a word I say unless stated otherwise, this is probably for your own safety

#

or the safety of yo bot

prime cliff
#

Ok noted blocked

fervent goblet
#

xDl

quiet bobcat
#

Oh yeah

#

animated emojis

#

cool cool

fervent goblet
#

thats why I'm extending nitro

shell bane
#

So can someone help me with my quest up there ^^^

quiet bobcat
#

What quest?

shell bane
#

Question sorry

quiet bobcat
#

What question?

#

Sorry didn't see it

#

uh

#

I don't know how to do any of that

#

Sorry

earnest phoenix
#

Suh

shell bane
#

I basically need help with understanding how to use object.keys to verify if certain properties of an object exist and adding their values

earnest phoenix
#

Oh checking if exist

quiet bobcat
#

I'm thinking of making a new bot

earnest phoenix
#

Here is something called hasownproperty

quiet bobcat
#

What lang should I learn?

#

I'm currently using d.js

earnest phoenix
#

Tells u if value in a object @shell bane

#

Lemme get docs

#

Or u could do if(!obj[val])

shell bane
#

But what I'm trying to do is use a for loop to iterate through the properties and add them if they exist

#

So I don't need to have an if case fir each potential property

earnest phoenix
#

So like for(item in obj) ?

shell bane
#

Essentially yes

earnest phoenix
#

for(val in object_name){
object_name[val]
}

shell bane
#

I want something like

earnest phoenix
#

Im at work on phone so sorry for awful formatring lol

shell bane
#

For(obj1 properties){
If(obj2.property)
Obj1.property+=obj2.property
}

#

Something like that but makes sense

earnest phoenix
#

Oh

#

So for every value in obj1 if its in obj2 put it in obj1 ?

shell bane
#

Add it but ya

earnest phoenix
#

for(item in obj1){
If(obj2[item]){
Obj1[item] = 'blah'
}
}

#

So like that?

shell bane
#

Essentially

#

And I need to know how to iterate through obj1 properties

earnest phoenix
#

Gotta run back to work if u still got prob msg me in 5 hours lol

#

Cya

shell bane
#

Pce

pulsar cairn
#

can someone good at java help me

#

I am getting a NullPointerExecption at this code

.setGame(Game.of("ne-help | " + jda.getGuilds().size()))
#

(btw it is in my jdabuilder)

restive silo
#

wasn't game.of deprecated?

pulsar cairn
#

idfk

#

it still works

restive silo
#

still using deprecated methods is bad

pulsar cairn
#

how would I fix

restive silo
#

also .size() returns an int

#

you need to use .toString() on it

pulsar cairn
#

on wat

#

the Game.of

restive silo
#

.size()

#
Yukine
ID:

393921573653839873

Message:

also .size() returns an int

#

reading is hard

pulsar cairn
#

I want it to display my guild count

restive silo
#

yes

#

you cant use game.of() with an int since you cant do "string" + int

#

you need to do .toString() on that int

pulsar cairn
#

so jda.getGuilds.size().toString()

restive silo
#

yes

#

why does your editor not show any warnings there WaitWhat

#

what do you even use

pulsar cairn
#

intellij k

restive silo
#

you miss a (

pulsar cairn
#

fuck

#

im still getting this

restive silo
#

oh

#

yea

#

that make sense now

#

you use jda while it isn't built

pulsar cairn
#

wat

#

Do I need to do public static JDA jda = null;

restive silo
#

Your JDA builder is a JDABuilder until you call .buildBlocking(); on it

pulsar cairn
#

brb gotta shit

restive silo
#

and you need a JDA to use .getGuilds() on it

#

lmao

inner jewel
#

use shardmanager

restive silo
#

huh

#

he can just call the setGame after the building

#

than he is fine

#

and he should update since game.of is deprecated

inner jewel
#

outdated versions GWbinAngry

restive silo
#

yup

earnest phoenix
#

p!help

earnest phoenix
#

suh friends

next bluff
#

a-suh dude

earnest phoenix
#

@shell bane still need help?

#

why

#

oh shit

#

my bad

#

lol

#

yea

#

wrong copy and paste

lime sluice
#

lol

quiet bobcat
#

Why can't I download python? It says The installer has encountered an unexpected error installing this package. This may indicate a problem with this package.The error code is 2203

lethal sun
#

delete the installer

#

then download it again

quiet bobcat
#

Same thing

lethal sun
#

make sure you dont have any python files in your memory

#

config files etc

quiet bobcat
#

I can't even delete the files

#

Because I get an error

#

lol

#

Ok they're gone. And I tried installing python again but I just got the same error

lethal sun
#

thonk

thorny hinge
#

What would be the best way to store upgrades, totally not making a clicking game clone

twin yoke
#

Hi

uncut slate
#

hi

granite oxide
#

hi

wooden shoal
#

Jw, how many commands at least is required for a bot to be on the site?

fervent goblet
#

None

wooden shoal
bitter sundial
#

did your bot have like only help ping and something

#

your bot provides nothing

wooden shoal
#

Yeah i realised I forgot to add the docs command to the help menu, and the main purpose of it is to check js syntax

lethal sun
#

Can someone just show me the steps on how to shard a bot? Just want the steps. Not the full code. JavaScript - discord.js

wooden shoal
#

shared?

thorny hinge
#

Nice development

#

That picture really sums everything up

inner jewel
#

discord.js has an autosharder

thorny hinge
#

^

inner jewel
#

but it's cancer

#

iirc they were working on one that doesn't spawn a process per shard

fervent goblet
#

Is that blocking or async

#

if its not blocking, please send me a blocking lib

#

I need blocking requests

quasi marsh
#

Python?