#development

1 messages · Page 986 of 1

solemn latch
#

ive not had any issues really, but my house caught on fire due to faulty wiring

#

no problem, ill hire him again

lyric mountain
#

Those things will get u a very easy queue system

obtuse jolt
#

I know guild name and Id is useless

#

Idk why I added it

#

It looks good I guess

quartz kindle
#

json is ok if its read-heavy

#

but its terrible if you need write-heavy

#

also, to make json good, its actuall data set needs to be stored in memory

obtuse jolt
#

It’s mostly read because it checks the config when someone sends a message (assuming auto scanning is on and somethings are also correct)

quartz kindle
#

a good json data store is essentially an in-memory database with json files as backup

#

similar to how redis operates

obtuse jolt
#

Is that why my bot has high ram usage compared to my other bots

quartz kindle
#

most likely not

obtuse jolt
#

oh

#

I uses like 100mb

#

And a lot of cpu

quartz kindle
#

which library?

obtuse jolt
#

d.js

quartz kindle
#

is that heap or rss?

obtuse jolt
#

not sure which one

#

I don’t really check

solemn latch
#

you have 64gb of ram, and one core

quartz kindle
#

how are you measuring it?

solemn latch
obtuse jolt
#

lol

#

it has 8 cores

#

Using nodejs

#

os

quartz kindle
#

use process.memoryUsage().rss

#

for used ram

solemn latch
#

what about cpu usage?

#

actually probs can just google that

obtuse jolt
#

yeah I was confused on how to get cpu usage

#

I think its supposed to be 4.0% in the image above

quartz kindle
#

getting cpu usage from within node is a bit more complicated, it involved measuing process.cpuUsage() over time

obtuse jolt
#

Yeah

quartz kindle
#

because process.cpuUsage() returns system/user cpu time

obtuse jolt
#

I’m just converting milliseconds into something

#

Which I completely forgot

solemn latch
#

so what, an average over the past few seconds?

quartz kindle
#

i have a sample you can use

solemn latch
#

id love to see it too

lyric mountain
#

"Converting millis into something"
--------- How to measure your CPU 101

quartz kindle
#
Number(Math.round((await new Promise(async r => {
  let start = [process.hrtime(),process.cpuUsage()];
  await new Promise(r => setTimeout(() => r(),100));
  let elap = [process.hrtime(start[0]),process.cpuUsage(start[1])];
  r(100.0 * ((elap[1].user / 1000) + (elap[1].system / 1000)) / (elap[0][0] * 1000 + elap[0][1] / 1000000));
}))+'e2')+'e-2')
#

this is what i use lol

#

in an async function

obtuse jolt
#

That’s what I use

quartz kindle
#

yeah that wont work

#

it needs to be done over time, ie, two measurements

#

i wait 100ms between each measurement in the above example

obtuse jolt
#

I need to measure it like at the time tho

quartz kindle
#

yes but that's not possible

#

node doesnt know how much cpu its using at any given time

#

it needs to measure it over an amount of time

#

so it can understand how much exactly its the process itself and how much its the system

obtuse jolt
#

but if that’s the case tho isn’t that solution already measured over time just my integration is poor

quartz kindle
#

yours is not measured over time

obtuse jolt
#

I just though like who actually cares about the cpu usage

solemn latch
#

uh, nerds do

#

like me

obtuse jolt
quartz kindle
#

and me

#

lmao

solemn latch
#

i like looking at that stuff

obtuse jolt
#

wow ok then

solemn latch
#

and really, your trying to impress me CBKappaJail

obtuse jolt
#

Which is weirder because that say 0.7

#

And the bot never goes below 20%

#

It says it doesn’t

quartz kindle
#

because the bot is not measuring it correctly

solemn latch
#

my bot sits around, 2-0.3% at idle

obtuse jolt
#

2%

#

Bruh

solemn latch
#

it has a few checks it does to get to that 2%

obtuse jolt
#

My bots without databases idle at like less then 0.1%

quartz kindle
#

yours will likely also show 1-2% if you measure it correctly

obtuse jolt
#

But I guess that what you get from server grade chips

quartz kindle
#

well yeah 0.1% if we take into consideration you have a dedi with 8 cores

solemn latch
#

^

obtuse jolt
#

yeah

solemn latch
#

im on a single core, and the bot idling is actually still doing stuff

obtuse jolt
#

I actually use it to run my own hosting business

#

¯_(ツ)_/¯

quartz kindle
#

nice

obtuse jolt
#

It’s pretty speedy

quartz kindle
#

im on a single core vps lul

solemn latch
#

i just got a second vps

#

3900x core

obtuse jolt
quartz kindle
#

i get 25ms

solemn latch
#

you still getting that ping?

#

🤔

obtuse jolt
#

Idk

#

I took that yesterday

#

It happens if I keep spamming it for long enough

#

Just gotta hope

lyric mountain
#

Ain't VirusTotal a copyrighted brand?

obtuse jolt
#

The ping is very up and down because of the amount of minecraft servers using the bandwidth

#

I actually emailed them about the API limits and they said what I was doing was a cool idea

#

And wanted €15k/yr for private API access

solemn latch
#

oh only 15k a year?

lyric mountain
#

Ain't VirusTotal a copyrighted brand?
This can be an issue if you want to grow it big

obtuse jolt
#

I do say it’s unofficial

#

Like on bots lists it says Unofficial VirusTotal BOT

#

I could probably email them and check if it’s alright with them

lyric mountain
#

It'd be safer to do that

#

And you might get some perks for advertising their site

#

Who'd deny free marketing?

obtuse jolt
#

I might get a 1% discount off paying 15 grand

quartz kindle
#

lmao

obtuse jolt
#

Something makes me think that they won’t care because of they are mostly known online or they might care a whole lot because they don’t want their brand image being ruined

#

The person I was talking to seemed hella chill

#

They were saying that they thought the idea was pretty cool

#

Holy shit

#

ITS JESUS

lyric mountain
#

They are always a hella cool

#

You just need to make sure your bot is as good as possible to make their brand have a good image

obtuse jolt
#

Yeah I really need to rewrite it because the bot was originally made to prevent account compromises but I guess a half working bot won’t do well at that

#

I already have the basics of how to make the bot work

#

I just need to build off that

#

And make it better

lyric mountain
#

And use sqlite

#

It's a hella faster than json, and safer

obtuse jolt
#

@lyric mountain is there an easy guide that doesn’t just give a huge chunk of code and say that’s how you do it

sick cloud
#

what is it actually

#

google hasn't complained about my bot luckily

#

even when we sent an email

obtuse jolt
#

What does your bot do?

sudden geyser
obtuse jolt
sudden geyser
#

lol

obtuse jolt
sudden geyser
#

Do you have knowledge on SQL?

obtuse jolt
#

Yeah but in php

#

Not javascript

lyric mountain
#

Sql is a separate language

obtuse jolt
#

@lyric mountain

#

This is confusing

#

You can’t

#

It’s part of the website

#

¯_(ツ)_/¯

lyric mountain
#

This is confusing
@obtuse jolt sql is a bit confusing when you're too used to programming langs

#

But keep researching about it

obtuse jolt
#

I think I said that about json at first

lyric mountain
#

Treat it like a new programming lang

obtuse jolt
#

But there’s like so many lines just starting it

#

Json is 1 line

sick cloud
#

@torpid forge inspect element

earnest phoenix
#

because json isn't meant to be used as a db in the first place

#

it's a notation

#

JavaScript Object Notation

#

hence JSON

solemn latch
#

theres really only one line that matters when acessing a database, the rest is just structure/syntax

lyric mountain
#

It might work well now, but later on you'll regret relying on json

solemn latch
#

and then you also gotta port everyones info over ^

#

or just drop all their info

#

which is terrible for your users

lyric mountain
#

But since it happened many times already...

solemn latch
#

well, he was going to swap when he has more users 🤔

#

which is more frustrating for everyone

amber fractal
#

@obtuse jolt you can look into mongo

#

unless you specifically need sql for something

#

but mongo is closer to the "normal" programming stuff most people do and isnt like INSTERT INTO x ...

solemn latch
#

insert into x is super english tho

amber fractal
#

Yes, but not all programmers like that syntax

#

I hate it

#

I'd rather db.collection("x").insertOne({})

lyric mountain
#

After years using sql you get used to it

#

Maybe months

amber fractal
#

I'd still stick to mongo tbh

#

I have no use for sql anyways

earnest phoenix
#

i'm just learning mongo

#

i wanna cry

lyric mountain
#

Sql is good if you need relation between entities, other than that it's just really a matter of taste

dusk sphinx
#

What's the step for making bots online

lyric mountain
#

Step one - code

dusk sphinx
#

Which code

lyric mountain
#

Yes

#

Jokes apart, you gotta code ur bot's behavior

#

Find a programming language that's easier for you and start writing

lyric mountain
#

Note that without prior ps knowledge you'll have some rough time understanding things

earnest phoenix
#

docs for libraries ^^

#

also no matter the language you use.. dont just jump right into discord bots

#

learn the basic-to-intermediate concepts first

dusk sphinx
#

Ok

lyric mountain
#

I'd recommend using either JS or Java

#

Both are beginner-friendly

earnest phoenix
#

so is python-

lyric mountain
#

Python is a bit too abstract, and might confuse beginners

#

It's easy if you have prior ps knowledge tho

earnest phoenix
lyric mountain
#

Read my last comment

earnest phoenix
#

ps?

lyric mountain
#

Programming science

earnest phoenix
#

i started with python

#

my cs degree at my uni started with python

lyric mountain
#

Ah, yes, it's cs

#

I always mix the names

earnest phoenix
#

ok? some of those people had no programming experience

solemn latch
#

python is like the top beginners language suggested these days

dusk sphinx
#

I have almost has perfect experience for that

solemn latch
#

from what ive seen atleast

earnest phoenix
#

python is a beginner friendly language

  • it's knowig something like js or java beforehand that trips people up
#

python breaks away from the braces, etfc

#

that and ruby

dusk sphinx
#

Duh..at begining until now took me 3 days if i was right

earnest phoenix
#

to learn... what?

#

a specific programming language?

#

Duh..at begining until now took me 3 days if i was right
@dusk sphinx what

lyric mountain
#

python is a beginner friendly language

  • it's knowig something like js or java beforehand that trips people up
    @earnest phoenix probably that's the issue
#

Python is the most high level lang i know of

earnest phoenix
#

but a complete beginner will never be used to js/java

#

and ruby is higher IIRC

#

and you've clearly never seen cobol :p

#

its.. special

dusk sphinx
#

A whole of bot creation

lyric mountain
#

Cobol is low level af

earnest phoenix
#

A whole of bot creation
@dusk sphinx im sorry what? if you learned "all of bot creation" in 3 days, you might wanna go back and read the 50 chapters of the tutorial you skippd

#

Cobol is low level af
@lyric mountain is cobol not the english-like-lang-for-boomers?

#
SUBTRACT A FROM B
``` etc
lyric mountain
#

Idk, it's a mix of the two I guess

#

Ugly af and confusing

earnest phoenix
lyric mountain
#

Let's say cobol is in its own tier

earnest phoenix
#

xD

lyric mountain
#

Cobol is like if delphi and sql had a child

earnest phoenix
#

isnt cobol like old and sql young weewoo

lyric mountain
#

Sql went back in time to ensure its future generations

sudden geyser
#

nightmare fuel

dusk sphinx
#

Only blind people will do

earnest phoenix
#

oh.

#

okay.

dusk sphinx
#

Umm..any other step for Activate the bots

olive rune
#

Host it

dusk sphinx
#

How

olive rune
#

Buy a vps or host it locally

winter basalt
#

host it locally for starters

dusk sphinx
#

Where

olive rune
#

On a computer

winter basalt
#

..your pc

earnest phoenix
#

or an rpi ;3

dusk sphinx
#

I am on my mobile no computer

olive rune
#

Buy a raspberry pi I you don't have one

earnest phoenix
#

oh god

olive rune
#

Raspberry pi is like 20 dollars max

earnest phoenix
#

30* for a 4b 1GB

dusk sphinx
#

Beside that

olive rune
#

No other way unless you have a spare PC which you apparently don't

winter basalt
#

think you should get atleast a laptop, mobile is pain to code with

earnest phoenix
#

or even a bt keyboard..

olive rune
#

You can pay 3-10 dollars fora good vps from gakaxygate or something

dusk sphinx
#

I need no no payment step please

earnest phoenix
#

pebblehost is 2.50/mo for 1GB

olive rune
#

Oh lord

earnest phoenix
#

you arent gonna get anything decent for free..

olive rune
#

Lol

winter basalt
#

there is no free lunch

dusk sphinx
#

OwO

#

Which step is easiest

earnest phoenix
#

what do you mean which "step"?

dusk sphinx
#

I mean which way is the simple for activate the bot

earnest phoenix
#

you run it.

#

like.. literally find something to run it on

olive rune
#

Localhosting is easiest if you have a pc

earnest phoenix
#

hack a smart fridge, use a spare pc, rpi, vps

dusk sphinx
#

Vps? What it mean

olive rune
#

Virtual private server

dusk sphinx
#

Where can i find it

olive rune
#

Google

winter basalt
#

google, or check pins here

dusk sphinx
#

Can you send me the link

earnest phoenix
#

it's in the pins

#

for a good vps you need to pay

olive rune
#

I recommend galaxygate, rhythm and dank memes use it

dusk sphinx
#

What's next

olive rune
#

providing support, maintaining it, growing it, and then just maintaining again

lyric mountain
#

Well, maintenance

#

The full cycle is:
1 - develop
2 - test
3 - implement
4 - feedback
5 - repeat

olive rune
#

You need to provide good and fast support for your bot too

lyric mountain
#

This will keep going forever, until you stop maintaining it

#

You need to provide good and fast support for your bot too
That's step 4

olive rune
#

Most developers spend hundreds of hours a month working on their bots

lyric mountain
#

And most good projects take about 1 month before being able to be released publicly

olive rune
#

I would recommend making a test bot to test new features instead of pushing to main bot before testing it

lyric mountain
#

And always, ALWAYS backup your bot's code and database

olive rune
#

but it really just depends on the developer

lyric mountain
#

Github is your best friend

olive rune
#

yeah, I need to do that more often

#

lol

#

I just copy paste my files to google drive

dusk sphinx
#

Is making bot worked were hard

lyric mountain
#

Depends

#

Some people can code as if it was a second nature, while some have a hard time grasping to coding principles

olive rune
#

there are almost always example bots with code on github, normally you can learn a lot from there

lyric mountain
#

Just dont copypaste without even reading

#

And github ain't "free bots shopping"

olive rune
#

also, read the code, see what it does, try figure out what each line actually does, then you can adapt the code to suit your needs

dusk sphinx
#

The link for github

lyric mountain
tawny cape
#

hello how to use the permission integer with discord.py ?

lyric mountain
#

Each permission has a integer representing it, you'll need to sum the bytes iirc

#

Like, 0x8 is admin perm

tawny cape
#

Ok , so now i got the byte what do i do with it ?

lyric mountain
tawny cape
#

i got it thanks

tired nimbus
#

how do you downgrade node

#

everytime I try it just goes for the newest version

lyric mountain
#

npm i package@version iirc

tired nimbus
#

with node?

lyric mountain
#

It'd be like npm i nodejs@12.1.1 or something

tired nimbus
#

hm

lyric mountain
#

Just an example tho, further research might be required

tired nimbus
#

everything is telling me the hardest things

lyric mountain
tired nimbus
#

when I run node -v:
V14.4.0
Then sudo n 10.16.0:
node -v:
V14.4.0

solemn latch
#

Sudo n?

dapper lynx
#

Um, trying to get node-fetch to work with Heroku Buildpacks, i have figured out a way by using both errors and a currently compatible module and it needs a compile folder and i am not completely sure how to get it to work?

#

Using ffmpeg for help, Heroku needs a "compile" folder with code that looks basically like the image i am about to send but i don't know how i am meant to get a link for download url as i would assume it needs a .tar.xz file??????

#

Can anyone give me a bit of help because i don't know of a download link for node-fetch that i can put in my compile file

#

Um nvm i think i did it, just gotta check if node-fetch will properly work, i finished it all and got no errors deploying to Heroku

#

The bot started with no errors but my meme command does absolutely nothing, doesn't throw any errors at all either, it just doesn't do anything at all

#

Yeah doesn't matter i figured out why it isn't working sorry for bugging people with my questions

dapper lynx
#

Just have one small problem that i don't fully understand how to fix UnhandledPromiseRejectionWarning: ReferenceError: Cannot access 'msg' before initialization

#

There is the code

tepid canyon
#

message.channel.send

brittle copper
dapper lynx
#

I use msg not message

tepid canyon
#

Then your variable name after let needs to be something else

#

let memeMsg = . . .

memeMsg.edit . . .

undone veldt
#

for some reason that idk what is, my ${message.author.id} is returning false, can someone help me?

brittle copper
#

Uh,

dapper lynx
#

Ahhhhhh right, i feel a little bit stupid 🤦

tepid canyon
#

What code are you running for it to return false?

undone veldt
#
console.log(`Comando "${command}" utilizado por "${message.author.username}#${message.author.discriminator}" cujo id é "${message.author.id}" no servidor "${message.guild.name}"`);
#

all my commands that use some if to check if the user is certain user with the id, its returning false

tepid canyon
#

in that console.log instead of putting their id it puts false?

undone veldt
#

yes

tepid canyon
#

Hmmm

undone veldt
#
if(message.author.id == '435228312214962204') return message.reply("hey")

This just return <false>

#

i created a test command, that just says your id

#

for other people returns their id, but my id return false

tepid canyon
#

Haven't heard anything like it before. Maybe you have something set up somewhere else that is messing with it?

#

In one of the main files maybe?

undone veldt
#

I read all of my main file, and there's nothing in conflict, if someone dm my bot, he send me with a client.users.cache.get(myid) and the message goes to me, but it cant say that its mine

#

i will show

tepid canyon
#

Which discord.js version are you using?

undone veldt
#

12.2

#

yesterday everything was working ok, but today this problem started

tepid canyon
#

what changed since yesterday ? was it happening today at the beginning of your testing?

undone veldt
#

I went to modify a command, which pointed out the error of the id. so I went back to the old version of the code, but even then the error continued

harsh dock
#

The red point?

tepid canyon
#

When your bot starts do you fetch all members?

undone veldt
#

it has a line that take the amount of users that the bot has with a client.users.cache.size

lusty quest
#

this changed in V12

undone veldt
#

yeah but, its just to my id, other people can do

#

the bots returns that my id its false

lusty quest
#

did you use the member object or the me object?

undone veldt
#

member

lusty quest
#

so you want to check the permissions for a guild member?

#

guild.me.hasPermission(['MANAGE_CHANNELS']) this works for me to check the permission of the bot

undone veldt
#

go to #265156322012561408 and use m!moon, it will show your discord id, but if i use, it will return false

lusty quest
#

did you check something against your ID?

#

bcs this is strange

undone veldt
#

theres no line of code creating an exception to my id

lusty quest
#

why should it return something else than your ID

undone veldt
#

its like i had a rateLimit and my token goes off

#

but to my id

lusty quest
#

usually you get locked out from starting the bot if you get ratelimited. and i dont think you can hit it fast with a client

tepid canyon
#

What shows if you console.log(client.users.fetch("435228312214962204"))

undone veldt
#

let me see

tepid canyon
#

Since it seems you can get your username and discrim but not the avatar and id...

undone veldt
#

my id its false

pale vessel
#

nice id

undone veldt
#

yeah haah

lusty quest
#

gg

undone veldt
#

i dont know what happened

lusty quest
#

contact Discord Support i guess

undone veldt
#

i guess i need to

lusty quest
#

but the ability to troll some badly coded bots with this bug is tempting

tepid canyon
#

Ehh I fetched him through my eval command and it showed his actual id and not false..

undone veldt
#

apparently the problem is with my code

lusty quest
#

but how?

undone veldt
#

i ahve just one main file

lusty quest
#

i dont get how you can edit the stuff that is requested with a /get call

#

on small bots its not a issue

#

if you get a ton of commands having a handler is nice but not really a thing you need

undone veldt
#

like, i handle all the commands, and in my index file, nothing like edit my id or something to the rest of the code

lusty quest
#

its strange. bcs the stuff in your code requests your member object from the Discord API so there is no way that its edited. (maybe some strange caching issue)

#

maybe ask someone in the Discord.Js discord server

#

they know probably more about the api

undone veldt
#

I will talk to them, thanks for the help guys

#

its working now, idk what happened, but its ok now

surreal sage
#

help

topaz fjord
#

its hidden by the black and white square

#

the black part is covering the rounded top left corner

#

@surreal sage

weary ridge
#

he ded

#

lol

#

:\

surreal sage
#

the black part is covering the rounded top left corner
@topaz fjord how

#

do

#

i

#

fix

#

that

topaz fjord
#

good question

#

send some html and css and you'll get an answer

topaz fjord
#

add a margin to the top of pf-child

surreal sage
#

how much

topaz fjord
#

up to you

surreal sage
#

thanks i think

final radish
#

I want my bot to approval now please check it

radiant estuary
#

How much ram, needs a small teamspeak 3 Server?

indigo folio
#

be safe and go with 32gb

radiant estuary
#

Okay, thx

indigo folio
#

that was a 1:30 am joke pls dont be serious about that

radiant estuary
#

Oh. 😆

#

Ok

faint spade
#

delete Room[user[message.author.id] .oda].members[i]; Although I have done this, the Room[user[message.author.id] .oda].members.length does not decrease, what should I do?

restive furnace
#

just bind the value into some variable and start decreasing it.

gentle cipher
#

possible way to test vote system on my TestBot before publishing it to my original bot?

small prairie
#

SQL doesnt have any limitations right?

grizzled isle
#

It is flat data. Meaning it can't store objects

small prairie
#

I mean those are visible for lets say a bot with like 100k regular users

#

Yeah no prob for that need not to use objects

lusty spade
#

how do i display permissions for a certain role??

small prairie
#

Is SQL safe?

#

Like can it get corrupted like JSON And is it secure?

#

@lusty spade Which Library?

lusty spade
#

discord.js

small prairie
#

These both might be what you are looking for

lusty spade
#

ok thanks i will take a look

pale vessel
#

@small prairie it is safe

sick cloud
#
new webkitSpeechRecognition() || new SpeechRecognition();

webkitSpeechRecognition is not defined
how can i make this work

#

it's supposed to use the other if the first doesn't exist

wide sage
#

Cannot read property 'bot' of undefined

woeful pollen
#

Heya I always get an error no connection established within 15s, I've gotten it for a while and can't use voice commands

wide sage
#

how do i fix that?

woeful pollen
#

Can I see your code

wide sage
#
          return receivedMessage.channel.send("I can't mute a bot!");
        }```
woeful pollen
#

user is not defined

wide sage
#

let user = receivedMessage.mentions.users.first();

woeful pollen
#

Ah

#

I think it has to be a member object

sick cloud
#

no lol

#

@wide sage user is undefined

#

so that would mean either:
receivedMessage doesn't exist
no users were mentioned

pure lion
#

Hey, does anyone know how to get specific values from a json? I'm stuck and I'm not sure how to do weather-js

distant bramble
#

hello i have a bot i already developed some commands but i also trying to work the welcome masg

#

but i cant seem to get it work

#

here is the code lines i aded into index.js

#

client.on('guildMemberAdd', member => {
const channel = member.guild.channels.cache.find(ch => ch.name === 'member-log');
if (!channel) return;

channel.send(`Welcome to the server, ${member}!`);
#

it doesant give any errors

pure lion
#

Well

#

Maybe

#

You could search for the system channel ID?

#

Because then everyone with your bot would have to make a channel named member-log

distant bramble
#

true

#

hmm i will have some truoble though

pure lion
#

What with?

distant bramble
#

nvm

#

with searching for the system channel id

#

i have no idea

pure lion
#

Ok so you wanna do

#

member.guild.channels.cache.find(c => c.id === member.guild.systemChannelID)

distant bramble
#

ok

#

thanks

pure lion
#

Np

royal tree
#

how can I do that?

distant bramble
#

@pure lion thank u soo much

pure lion
#

Np :)@distant bramble

royal tree
#

Can yo uhelp me Dice?

indigo folio
#

npm i discord.js@version

pure lion
royal tree
#

My bot is not working with 12.2

pure lion
#

Oh

distant bramble
#

but 12 is stable

pure lion
#

What's the problem?

#

It's probably outdated code

distant bramble
#

try to fix the problem

indigo folio
#

you just need to update your code

distant bramble
#

dont downgrade

pure lion
#

Easy fix imo

royal tree
#

yep

#

i don t know what to update

indigo folio
#

^ guide on upgrading from v11 to v12

pure lion
#

@royal tree any red lines?

royal tree
#

thx

#

no red lines

small prairie
#

member.guild.channels.cache.find(c => c.id === member.guild.systemChannelID)
@pure lion
member.guild.channels.cache.get(member.guild.systemChannelID)

#

Isnt this more direct?

pure lion
#

Either one works, that's just how I did mine lol

small prairie
#

Idk lmao

#

if its providing why do more work

pure lion
#

I believe get works based on ID's (not entirely sure)

small prairie
#

It does

#

You are using ID thats why i suggested that

pure lion
#

Ah

#

My skull is like 12 inches thick don't mind me

gentle cipher
#

python help?

slender thistle
#

What's up

gentle cipher
#

async def on_dbl_vote(self, data)

small prairie
#

lmao Probably not thicker then mine

gentle cipher
#

not working

small prairie
slender thistle
#

Show your DBLClient line

gentle cipher
#

okay

#

here?

slender thistle
#

#api

pure lion
#

Don't you love it when your console log has no errors

small prairie
#

I actually like it when it errors
Im worried if its working or not
getting an error sometimes is actually good for me lmao

#

I know its working somewhat if i get an error

pure lion
#

Do you know json? I could use some help-

small prairie
#

Yeah i used it somewhat

#

ping me or DM me

pure lion
#

Aight

small prairie
#

i'll reply in a few

inland aurora
#

I know how to add certain role permissions (like if a user has a role called Mod they can use the commands) but can I make it so only my user ID can use the command?

royal tree
#

how do I restart the bot

blazing portal
#

I know how to add certain role permissions (like if a user has a role called Mod they can use the commands) but can I make it so only my user ID can use the command?
@inland aurora yes. check if message author id is your id

inland aurora
#

ok thanks

royal tree
#

can someone help me to update from v11 ti v12

dusk sphinx
wild mist
hasty sparrow
#

Or your own webhook endpoint

wild mist
#

Ook thanks

quartz kindle
#

its not a discord webhook

#

top.gg webhooks are not compatible with discord webhooks

distant bramble
#

i am trying to get my canava work it loads but the welcome is messed up

#

i use sans serif

#

but the font wont load

#

pls help

#

i am new to canvas

quartz kindle
#

show code

distant bramble
#

ok

#

here is the code

#

i fowllowed the discord.js guide

quartz kindle
#

check the registerFont method

distant bramble
#

ok

earnest phoenix
#
const { MessageEmbed } = require("discord.js");

module.exports = {
  name: "np",
  description: "Show now playing song",
  run: async (bot, message, args) => {
    const queue = message.client.queue.get(message.guild.id);
    if (!queue) return message.reply("There is nothing playing.").catch(console.error);
    const song = queue.songs[0];

    let nowPlaying = new MessageEmbed()
      .setTitle("Now playing")
      .setDescription(`${song.title}\n${song.url}`)
    .setThumbnail(song.thumbnail)
      .setColor("#ff9900")
      .setAuthor("LegendaryBot")
      .setTimestamp();

    if (song.duration > 0) nowPlaying.setFooter(new Date(song.duration * 1000).toISOString().substr(11, 8));

    return message.channel.send(nowPlaying);
  }
};

how to define the song thumbnail? song.thumbnail doesn't work

pale vessel
#

i don't know, you coded the bot

#

what is queue.songs[0]?

#

debug

restive furnace
#

prob copy paste or bought from fiverr or freelancer

earnest phoenix
#

i solved it, but ty for saying that i'm copying it from somewhere 🙂

dapper lynx
#

Question, if i have a command that fetches a json api which can get memes from say 3 sub reddits, is there a way for me to set up a way for e.g. the 1st sub reddit has an image just with the number 1 as a thumbnail and the 2nd sub reddit as an image with the number 2 as a thumbnail?

#

The api is laid out like this
{"postLink":"originalpostlink","subreddit":"asubreddit","title":"posttitle","url":"originalpostimage"}

hasty sparrow
#

Yes

dapper lynx
#

Could you possibly show an example?

hasty sparrow
#

You would need to be more precise on where you want to set this thumbnail

dapper lynx
#

One of the subreddits would be r/memes, so just "memes". It would be .setThumbnail() in a message embed

#

Doesn't matter what the image is for what subreddit, just like say like i said image that says 1 for memes, then image that says 2 for like dankmemes or something

hasty sparrow
#

Just pass the custom image/thumbnail in the embed

dapper lynx
#

How would i make it so a specific image will show for a specific subreddit?

hasty sparrow
#

Check it in your code

dapper lynx
#

Because the way my command is setup, the api just chooses randomly from 3 different subreddits, so 1 command shows a random post from a random subreddit

hasty sparrow
#

You already know which subreddit you are fetching the post from, so you should also know which thumbnail to use

dapper lynx
#

Yeah, but i use json.subreddit to get from the api what the subreddit is, i don't know how to get it to assign a specific image for a specific subreddit if the subreddit isn't referenced in my code

#

I use 1 single api that randomises through 3 different subreddits, i don't have 3 separate embed outputs for 3 separate subreddits

hasty sparrow
#

Isn't the subreddit returned in the response?

dapper lynx
#

It is using r/${json.subreddit}

#

Which outputs in the embed which subreddit it's from

hasty sparrow
#

Please show your code, this is getting confusing

dapper lynx
#
if(command === "meme") {
        let memeMsg = await msg.channel.send("Getting meme");
        fetch("https://meme-api.herokuapp.com/gimme")
        .then(res => res.json())
        .then(json => {
            const embed = new Discord.MessageEmbed()
            .setColor("#FF5700")
            .setAuthor(`r/${json.subreddit}`, `https://i.imgur.com/nWtRlHA.png`)
            .setTitle(json.title)
            .setURL(`${json.postLink}`)
            .setImage(json.url)
            .setFooter(`Custom Reddit API`)
            memeMsg.edit(embed)
        });
    }
restive furnace
#

you can use directly reddit to fetch memes

wheat valve
#

How do you get a avatar command to show the animated avatars as well? I use Discord.js

hasty sparrow
#

You could have an object with subreddit name as key and thumbnail as value

pale vessel
#

@wheat valve use the dynamic option

dapper lynx
#

Would i put that just after fetch?

#

Honestly, i have no idea how to do that, i haven't ever done any coding like what i'm trying to do

#

Like specifically the question, not like bot making in general

hasty sparrow
#

In that case I'd recommend learning the basics first before trying to create a bot

dapper lynx
#

No no i know all the basics of javascript near enough, just not how to do the "an object with subreddit name as key and thumbnail as value" thing

#

Is there a post or something on how to do it specifically for Discord or is there not?

hasty sparrow
#
const theObject = {
  "subreddit": "thumbnail link",
};
dapper lynx
#

So with that i could have different message output for different subreddits then? So have a completely different embed for one subreddit and another different embed for another subreddit?

hasty sparrow
#

Your initial question was how to display different thumbnails, not different embeds

dapper lynx
#

Doesn't matter, not thinking straight

#

So do i put that at the end so when it outputs a certain subreddit, a certain image will be added to the embed thumbnail?

earnest phoenix
#

what to block certain commands on a server and if the owner wants to activate them he can activate them?

restive furnace
#

@earnest phoenix in short: database.

earnest phoenix
#

ok

dapper lynx
#

I'm not 100% sure where the const goes for it goes but do you reckon would this work?

hasty sparrow
#

Try it out

dapper lynx
#

Not a well formed url, i believe for .setThumbnail

#

Think i know what i did wrong though

hasty sparrow
#

That's not how you access an object property

autumn summit
#
            user = payload.member
            for x in user.roles:
                if "team" in x.name.lower():
                  roelf = teams.find_one({"_id" : str(x.id)})
                  pass
            first = guild.get_member(int(self.players[0]))
            if not first:
                  rolef = 10
                  pass
            for x in first.roles:
              if "team" in x.name.lower():
                rolef = teams.find_one({"_id": str(x.id)})
                pass
            print(rolef)
            if rolef == roelf:``` Someone help, my code is fine until an hour later, everything works then anhour later, it says rolef referenced before assignment, any ideas?
dapper lynx
#

Yeah ik i don't know how to get it to use the thumbnail url i set in my object

hasty sparrow
#

@autumn summit Typo in line 4 roelf = teams.find_one({"_id" : str(x.id)})

dapper lynx
#

Nvm

#

It was subredditThumbnail.meme

#

.setThumbnail(subredditThumbnail.meme)

autumn summit
#

@hasty sparrow where is the typo

#

where

hasty sparrow
#

roelf

autumn summit
#

its intentional

#

rolef is the problem

dapper lynx
#

Oh but it shows the thumbnail for all subreddits

earnest phoenix
#
 if(!db.has(`test_${message.guild.id}`, "true")) return message.reply("You need to set the command to true!")

will this check if the value on database is set to "true" ? (quick.db)

hasty sparrow
#

Oh nvm

#

@earnest phoenix Try it out

dapper lynx
#

I have it so anything in r/memes will show the thumbnail but only for r/memes but it still shows thumbnail for all 3 subreddits

hasty sparrow
#

No big surprise, as you hardcoded the thumbnail

reef mantle
#

Anyone here?

#

How to make the bot send gifs and videos

#

I need code

#

Sorry if I am disturbing

dapper lynx
#

Wait, so how do i get it to just show the appropriate thumbnail for the subreddit, would it literally just be to put setThumbnail as (subredditThumbnails) or do i need to add a bit extra to my code?

reef mantle
#

.setThumbnail("YOUR LINK OF PHOTO")

#

I think it's correct

reef mantle
#

Pls give the code @hasty sparrow

#

How to make the bot send gifs and videos
@reef mantle

#

Pls tell

#

@dapper lynx @hasty sparrow

dapper lynx
#

I read through the link and i am still confused as to how to call a specific value from my object based on the value of my subreddit :/

haughty night
#

message.channel.send("Link of your gif/video/photo")

dapper lynx
#

Question, if i have a command that fetches a json api which can get memes from say 3 sub reddits, is there a way for me to set up a way for e.g. the 1st sub reddit has an image just with the number 1 as a thumbnail and the 2nd sub reddit as an image with the number 2 as a thumbnail?
@dapper lynx my original question

#

But i don't know how to use my thumbnail object to where a specific subreddit has a specific thumbnail in the MessageEmbed

pure lion
#

Pls tell
@reef mantle
let image = new Discord.messageattachment(
'image link', image.jpg
)

reef mantle
#

Thanx

pure lion
#

H

dapper lynx
#

How do i get it to use the value of a specific value in my object based on what subreddit it's from for my Discord messageembed thumbnail

earnest phoenix
#
const { MessageEmbed } = require("discord.js");
const db = require("quick.db");

module.exports = async (oldMember, newMember) => {
    if(!oldMember) return;
    if(!oldMember.guild) return;

    const tag = db.get(`Tag_${message.guild.id}`)
    let role = db.get(`ServerRole_${message.guild.id}`)

    if(!role || !tag) return;

    if(oldMember.displayName.contet === tag) oldMember.roles.add(role);
    if(newMember.displayName.content === tag) newMember.roles.add(role);
}

I want to check if a user has a specific word in their name, and if they have the bot assign a role to them, why this dont' work ?

charred jetty
#

Please make sure you have the correct access rights
and the repository exists.

trying to pull

dapper lynx
#

Right now all i can get it to do is output the full thing shown at the bottom

pale vessel
#

object.memes

#

if it has a space or something, object["hi world"]

tulip ledge
#

So I have this array: ["item1", "item1", "item2"] now is there a way that I can detect how many times item1 is in that array?

dapper lynx
#

That just shows the memes thumbnail regardless of what subreddit

pale vessel
#

replace it with the subreddit lol

#

object[subreddit]

#

you can't use . for that

dapper lynx
#

.. As in if the subreddit is memes, then specific thumbnail, but if it is e.g. dankmemes it doesn't show a thumbnail

pale vessel
#

it just won't show it

reef mantle
#

Who sees AoT?

pale vessel
#

then don't put the subreddit in the object

dapper lynx
#

But if i wanted a thumbnail assigned to each of the 3 subreddits, and it will output the corresponding thumbnail to what the subreddit is

pale vessel
#

define the subreddit as keys then

#

the value would be thumbnail link

#

get the value by using the key, which is the subreddit

dapper lynx
pale vessel
#

it'll get their corresponding thumbnail

dapper lynx
#

That's what i have currently

pale vessel
#

setThumbnail(subredditThumbnails[json.subreddit]) then

#

tell me you understand what that code does

dapper lynx
#

Yes, picks out of the values i have in my object based on the value of the subreddit

pale vessel
#

is that what you wanted?

dapper lynx
#

Yeah, thanks so much i couldn't figure it out :/

pale vessel
#

epico

dapper lynx
#

I just wasn't aware that i could do the [] part to get the values of my api

pale vessel
#

if it has a space or something, object["hi world"]

#

should have make that more clear

#

you can also use variables

dapper lynx
#

Oh damn i didn't realise you said that, that would've been plenty help, sorry

#

object[subreddit]
Ah yeah sorry i wasn't 100% paying attention to those messages

brittle copper
#

I type help

#

and it kills my bot

dire stag
#

hey guy

#

just developing a bot atm

#

im worried about the safety of the bot

#

can anyone breach it? Since the bot is no as modified as other bots

brittle copper
#

what have I done

dapper lynx
#

As long as you don't share your code when your bot token is visible, or as long as you don't share your token

brittle copper
#

I mean ideally the token is stored outside of the code

dapper lynx
#

Yeah, but if it does show in shared code then that is an easy way to compromise your bot ig

brittle copper
#
            discordClient = new DiscordClient(new DiscordConfiguration
            {
                Token = File.ReadAllText("./Token.txt"),
                TokenType = TokenType.Bot,
                UseInternalLogHandler = true,
                LogLevel = LogLevel.Info | LogLevel.Debug,
                AutoReconnect = true,
            });``` 
Likely not the most ideal, but I've got mine stored in a separate file for safekeeping
dapper lynx
#

Doesn't really affect how the bot works really so if anything it's better to do so

brittle copper
#

Also I'm really confused right now, because any exception I hit and the bot shoots the connection

#
System.Collections.Generic.KeyNotFoundException: The given key 'register' was not present in the dictionary.

[2020-06-23 07:59:16 -04:00] [WebSocket] [Debug] Connection closed. (1000, '')
dapper lynx
#

I've never run into that issue before so i wouldn't know how to help sorry

brittle copper
#

Yeah me neither.

#

Before it worked just find

#

Hopefully I can handle the SocketClosed event, and try to get the bot to reconnect

#

Nope

pale vessel
#

what library is that? dsp?

brittle copper
#

Yes

#

For some reason my exception handling is breaking the socket so far that it refuses to reconnect .-.

#

I comment out client.CommandErrored += MyExceptionHandler and suddenly that same invalid command doesn't kill my bot

#

I don't know what about that is magically killing the socket

pale vessel
#

@earnest phoenix

earnest phoenix
#

uh

#

that's nasty

brittle copper
#

I never said it was good

earnest phoenix
brittle copper
#

am using D#Plus

earnest phoenix
#

you're probably getting an exception elsewhere

#

oh

#

dsp

brittle copper
#

yes

dire stag
#

wait

#

obviously

#

you wont give out the token

#

but people can breach the bot

brittle copper
#

the API with absolutely egregious docs that use features from nightly but put them in the stable docs

dire stag
#

is it possible?

dapper lynx
#

but people can breach the bot
@dire stag people can only "breach" the bot if they either have access to your discord account or if you share your token whether it is an accident or not

earnest phoenix
#

i don't use dsp's commands so i wouldn't know how it works per se, but if the socket's closing run the app in debug mode, you might be getting an exception that's getting swallowed

dire stag
#

ahh ok

earnest phoenix
#

i don't use the libs built in commands in general

dire stag
#

so the bot is safe

#

im just thinking

brittle copper
#

I mean yeah, except its in run mode

dire stag
#

someone could breach without my consent and use the bot to give him perms to terminate my server

#

because one time

#

a random person managed to remove me form the owner role

earnest phoenix
#

vs has a debug mode that lets you break on any exception and you're able to read resources used by the app

empty owl
#

My stomach hurts

earnest phoenix
#

ok

empty owl
#

ooo wrong chat

dire stag
#

...

brittle copper
#

vs has a debug mode that lets you break on any exception and you're able to read resources used by the app
Yes, except it provides almost meaningless information at times because of async; assuming it manages to break on the exception to begin with.

the debugger is great, but in my experience trying to catch exceptions when making a bot is quite difficult.

#

but

#

I'll run it in VS and let you know what happens

dire stag
#

so does stroing the token really work?

#

its still in the website

brittle copper
#

What website?

#

Discord?

dire stag
#

yes

brittle copper
#

Yes

dapper lynx
#

I think they mean the Discord Developer website

dire stag
#

yes

dapper lynx
#

Where you create your app for the bot

dire stag
#

so whast the point of storing it

brittle copper
#

You need to login somehow

dapper lynx
#

No one can access your bots token from the website unless they have your Discord account details

brittle copper
#

It's like trying to login to discord and asking "why remember my login" imo

dire stag
#

ok i guess

#

i knew that

#

but im worried that the bot can be breached...

pale vessel
#

it can't as long as you don't leak anything

brittle copper
#

It's quite difficult to brute-force a massive string, but as long as you keep your own account secure you're fine

#

And ofc don't leak the token

dire stag
#

alirght thanks

brittle copper
#

But if your token does get leaked, iirc you can generate a new token, which makes the old one invalid

pale vessel
#

i mean the first part of token is the bot id in base64

dire stag
#

you guys recommend anything before i start?

pale vessel
#

but that's like one third of the token

brittle copper
#

Also @earnest phoenix Ran in VS, no exceptions caught

#

Tried setting breakpoints as well, no luck

spark breach
#

So I have a issue, I am trying to make a command that makes it so I can change the bots status however I get this error:

Code:``` if(message.author.id !== '553649764177149972') return message.channel.send("Sorry you can't use this command!");

        let msgArgs = args.slice(1).join(" ");
    bot.user.setActivity(msgArgs, {type: 'CUSTOM_STATUS'}).then(message.react('✅'));```
brittle copper
#

So, I've figured out the socket is closing when I return Task.CompletedTask, but, I'm not sure why. Same code worked like an hour ago

earnest phoenix
#

you're on nightly?

#

if so

#

there might've been a breaking change recently

spark breach
#

you're on nightly?
Me? I'm on heroku

pale vessel
#

@spark breach bot.user is null

#

not you

spark breach
#

oh ok

#

not you
oki

pale vessel
#

what is your client defined as?

spark breach
#

const bot = new Discord.Client(); //discord bot itself

brittle copper
#

you're on nightly?
Yes because the stable version hasn't been updated in like 3 years,
But I haven't updated, and this code worked fine before

earnest phoenix
#

no idea then, i haven't used dsp since 3.2

#

try asking in their guild

brittle copper
#

Oh god

#

to hell if I'm asking emzi.

I'll try and figure it out, I appreciate the help though

pale vessel
#

are you using a command handler @spark breach

spark breach
#

I am yes

pale vessel
#

did you define bot

#

or pass client to the handler

#

if not you can probably use message.client or something

spark breach
#

oh ok I'll try that then

pale vessel
#

message.client.user

spark breach
#

seeing the colour already is making me have the feeling it isn't correct :/

placid cobalt
#

how do i make a web dashboard?

digital ibex
#

code it

placid cobalt
#

no shit

fresh hatch
spark breach
#

code it
r/basicallythetruth

fresh hatch
#

can somebody please help me make all files run at once

placid cobalt
#

pm2

fresh hatch
#

bc i cant find a good tutorial on yt

placid cobalt
#

pm2

digital ibex
#

node . is running all the files at once

placid cobalt
#

yeah but pm2

digital ibex
#

what

placid cobalt
#

use pm2 its easier

digital ibex
#

that doesn't really make a difference

#

pm2 also eats ur ram

#

its kinda shit

placid cobalt
#

no node is kinda shit

digital ibex
#

ok

earnest phoenix
#

yes

placid cobalt
#

if you pc goes to sleep bam your bots offline if you close your cli boom goodby bot

fresh hatch
earnest phoenix
#

if you're targeting performance node is the last thing you want to use

fresh hatch
placid cobalt
#

i think its your code proboably

digital ibex
#

ik, but pm2 takes up around 60mb just on its own

#

is what im saying

placid cobalt
#

@fresh hatch use this code

#
    name: 'kick',
    description: 'kicks user',
    usage: '<user>',
    guildOnly: true,
    premission: ['Admin','Owner'],
    execute(message, args) {
        console.log(args)
        console.log(message.guild)
        if (args[0].substr(1, 1) == "#") {
            return message.channel.send(`I can't kick channels, ${message.author}!`);
        } else if (args[0].substr(1, 2) == "@&") {
            return message.channel.send(`I can't kick roles, ${message.author}!`);
        }

        args[0] = args[0].replace(/[>#@!&<]/g, '');
        if (/^\d+$/.test(args[0]) && args[0].length == 18) {
            const member = message.guild.members.cache.get(args[0])
            if (member) {
                if(member.kickable) {
                    member.kick()
                    return message.channel.send(`kicked <@!${args[0]}>`)
                } else {
                    return message.channel.send(`i can't kick <@!${args[0]}>`)
                }
            } else {
                return message.channel.send(`i can't find <@!${args[0]}>`)
            }
        } else {
            return message.channel.send(`Do i look stupid? i want an actual user please <@!${args[0]}>`)
        }

    } 
}```
#

wtf is that emoji?

modest maple
#

spoonfed

placid cobalt
#

ahh

#

why am i getting it?

slender thistle
#

Rule 7a

dapper lynx
#

Because you spoonfed an entire command

placid cobalt
#

well they were strugglin

#

also your breaking that same rule

#

your attacking a begginer

digital ibex
#

lol

#

what

fresh hatch
#

lemme try @placid cobalt

slender thistle
#

in what way is anyone attacking anyone

dapper lynx
#

If you're talking about me, didn't really "attack" i just pointed out that you spoonfed an answer GWcmeisterPeepoShrug

fresh hatch
digital ibex
#

that code won't even work

fresh hatch
#

still doesn't work lmao

empty owl
#

Lol

dusk sphinx
#

How do i turn on my bot

digital ibex
#

they're not using a command handler

placid cobalt
#

your bot might not have the correct permissions

digital ibex
#

lmao

slender thistle
#

-faq 3

gilded plankBOT
placid cobalt
#

How do i turn on my bot
@dusk sphinx you need node.js

digital ibex
#

it'd error if they don't

slender thistle
#

-faq 13

gilded plankBOT
fresh hatch
digital ibex
#

no you don't....

empty owl
#

you can use a different Lang

placid cobalt
#

well i use that kick command and it works perfectly fine

dusk sphinx
#

Is that it

digital ibex
#

yeah

#

but he's not using a handler

placid cobalt
#

yup

empty owl
#

Owen just cause it works for u

digital ibex
#

what

#

tf

empty owl
#

doesn’t mean it will work with that jug Yu

#

*guy

slender thistle
#

See what hell spoonfeeding beginners causes

placid cobalt
#

why are you still fucking bringing up a fucking mistake for you asshole @slender thistle

empty owl
#

.

slender thistle
#

No need to get hostile

placid cobalt
#

yes you dont piss someone off thats having a bad day ok

dapper lynx
#

Damn chill, he was just saying that spoonfeeding an answer to someone doesn't always solve problems

dusk sphinx
#

What should i do with node.js

placid cobalt
#

and it was a fuckign mistake how many mistakes have you made in your life huh

empty owl
#

@dusk sphinx

placid cobalt
#

how would you feel if i started bringing them up constantly

empty owl
#

uh you know you could’ve just said sorry I won’t do it again and explain how to do it

#

I think the guy who’s asking also would like to learn how the code works

digital ibex
#

O_O

placid cobalt
#

can you all just stop being assholes towards me okay

dusk sphinx
#

(-_-•)

empty owl
digital ibex
#

O_O

fresh hatch
#

can someone send me a good command handling tutorial on yt in dms

placid cobalt
#

not many on yt but if you go to faq there are good web tutorials

dusk sphinx
#

Do i need download it

slender thistle
#

YouTube tutorials aren't reliable most of the time

honest perch
#

learn js

digital ibex
#

you shouldn't follow a tutorial, you should make ur own. what the tutorial is doing is basically spoonfeeding the code to u

unique nimbus
#

YouTube tutorials just gives you the code

#

you barely learn shit

empty owl
pale vessel
#

it's outdated

#

hence the description

placid cobalt
#

@digital ibex yes but its best to follow a tutorial when getting started as the code will get explained

empty owl
#

It’s ez to update tho

slender thistle
#

for a beginner?

pale vessel
#

might as well just read docs

digital ibex
#

not a node.js tutorial

empty owl
#

Oh

#

good point

dusk sphinx
#

So hard tho for the chip mark

dapper lynx
#

If you don't know js, first place to start is discord.js docs and js basics

digital ibex
#

if its plain js then yeah, not node.js

empty owl
#

Discord bots is what got me into JavaScript because JavaScript alone isn’t very interesting

digital ibex
#

wut

grizzled raven
#

if you dont know js then dont make discord bots

dusk sphinx
#

O

grizzled raven
#

unless you're me imcool

dapper lynx
#

But if you want to make a discord bot, you learn js

empty owl
#

or another lang

grizzled raven
#

or py mmlol

dapper lynx
#

True

slender thistle
#

Or any programming language that supports websockets and HTTP

grizzled raven
#

or

empty owl
#

brainfk

dusk sphinx
#

It drain alot of brain cells for that lol

grizzled raven
#

what shiv said startriumph

dapper lynx
#

I just personally find that js is a bit easier to understand

empty owl
#

at least you don’t have to worry about indents

#

py

slender thistle
#

Eh you indent your code to make it look understandable and pretty anyway blobshrug

digital ibex
#

um O_O

empty owl
#

Ye ig

dapper lynx
#

It's basically just down to personal preference or possibly just which works better for what you are coding

digital ibex
#

my code is all on one line

#

smh

slender thistle
#

The tab-space issue I understand though, but a proper IDE should help you with that

empty owl
#

my code is all on one google search

pale vessel
#

It's basically just down to personal preference or possibly just which works better for what you are coding
this

digital ibex
#

lol

empty owl
#

Someone please code a bot with google search bar

dapper lynx
#

My code is all in binary in a txt file compressed in a zip then compressed in a .rar

empty owl
#

my code is comic sans

dapper lynx
#

😳

pale vessel
dapper lynx
#

Honestly the way to go

#

Yeah sorry, off topic

brittle copper
#

I've gathered a hypothesis about why my websocket was being killed.

dusk sphinx
#

I don't see any thing about the activation system for the bot

empty owl
#

@dusk sphinx
What langague

dusk sphinx
#

Eng

slender thistle
#

programming language

empty owl
#

lmao

dusk sphinx
#

Is it in discord.js?

empty owl
#

if it’s in discord.js

#

good guide

indigo matrix
#

How do I make my html look good

pale vessel
#

use css

#

or a css framework

indigo matrix
#

This is what it is supposed to look

pale vessel
#

oh

indigo matrix
#

makes it look like this

pale vessel
#

it looks okay, maybe a <code> for commands?

indigo matrix
#

wdym?

#

oh

#

also the problems are

#

buttons don't show unless hovered on

#

and image is not circled/bordered

#

and this isn't in center alignment

pale vessel
#

use css

indigo matrix
#

i did

pale vessel
#

then it should solve your problems

indigo matrix
#
body {
  background-image: url('https://i.redd.it/f0mpjw4ddzv41.png');
}

div.a {
  text-align: center;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
}

.center {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

img {
  border-radius: 50%;
  border: 5px solid #555;
}

h3 {
  color: gray;
}

.button {
    background-color:#44c767;
    border-radius:28px;
    border:1px solid #18ab29;
    display:inline-block;
    cursor:pointer;
    color:#ffffff;
    font-family:Arial;
    font-size:17px;
    padding:16px 31px;
    text-decoration:none;
    text-shadow:0px 1px 0px #2f6627;
}
.button:hover {
    background-color:#5cbf2a;
}
.button:active {
    position:relative;
    top:1px;
}


</style>```
pale vessel
#

use inspect element and experiment with it

#

all i can say

honest perch
dapper lynx
#

Would this work?

#

Like is that the proper layout for using images as thumbnails from bot directory?

pale vessel
#

you would need to use attachFiles()

quartz kindle
#

@indigo matrix top.gg has its own existing html and css structure

#

your bot description, both html and css is injected into this existing structure

#

so you have to code it accordingly

#

all your css code needs to take top.gg's existing css into consideration