#development

1 messages · Page 1611 of 1

old cliff
#

no

green kestrel
#

and im guessing some bots will be hit more than others

woeful pike
#

I can't really tell rn because we just don't know yet but probably a big percentage

modest maple
#

im looking at the turks

green kestrel
#

mind if i dm about it

woeful pike
#

bots don't really suffer from vote manipulation

#

it's mostly servers

green kestrel
#

i have want to have a quick chat about it and dont want to discuss it in public 🙂

modest maple
#

well

#

i thin munda

#

or what ever its called

young scroll
woeful pike
#

like I don't see any vote botting for the top bots in the homepage

#

but the entire servers homepage is just bots lol

devout notch
#

hey I tried this but it says that indexOf() is not a function
I don't think find / sort returns an array
Im just trying to find a document in a sorted collection and return its index

green kestrel
#

i found the background gradient

#

but the class is called .dnTrRP

#

😮

earnest phoenix
green kestrel
#

class="StyleProvider__BackgroundGradient-sc-1wukuln-0 dnTrRP

#

what is this madness

#

😛

cinder patio
#

It's dynamically generated from styled-components

green kestrel
#

looks like i need

#

div[class^="StyleProvider__BackgroundGradient"]

cinder patio
#

gonna change the next time they update anything on the frontend

green kestrel
#

^ that wont

#

but this is temporary

#

xetera said it'd be fixed soon

#

yeah this does it

#
  div[class^="StyleProvider__BackgroundGradient"] {
    background: none;
  }```
woeful pike
earnest phoenix
#

Hey, is aws ok for discord bots?

pale vessel
#

it's not the worst

ancient nova
#

do any of you guys know of a license for a website that will completly prevent people from using my code

pale vessel
#

then make it closed source

cinder patio
#

yeah don't open source it if you don't want people to steal it

#

minify and uglify javascript and css, too

devout notch
#

do any of you know how to get the position of a document inside a collection? (MongoDB)

modest maple
#

or you can just make the code visible to all and sue every person who uses it mmLol

lyric mountain
#

since, well, open-souce is open

earnest phoenix
#

how can i get the role bitfield?

#

what

earnest phoenix
#

that doesn't prevent someone from stealing code

#

but it gives you the right to sue them

ancient nova
#

people just inspect my website steal the frontend code and use it to make their own

#

isn't there any way to prevent that?

earnest phoenix
#

nope

ancient nova
#

well I still have the take-down rights if they use my code to for themselves or if they sell it

lyric mountain
#

because you need all the assets 'n stuff

#

if you use react to build ur site it's basically impossible

earnest phoenix
#

you can't do anything about stealing html structure but you can do your best to obfuscate your js assets

#

minify + obfuscate

ancient nova
#

there's a way to obfuscate html as well

lyric mountain
#

just don't obfuscate ur dev source code

#

obfuscate prod code

ancient nova
#

the problem is, it deobfuscates when the website is running

lyric mountain
#

minified codes are unreadable

earnest phoenix
#

html can't be obfuscated

ancient nova
#

there is a way to

pale vessel
#

no

mellow kelp
#

haha IDE formatting go brr

earnest phoenix
#

and any browser prettifies html in inspect element

ancient nova
#

yeah, I know, but you technically can obfuscate html, it's just that website deobfuscates it in inspect

lyric mountain
#

html is not a lang, so it can't be obfuscated at all

mellow kelp
#

you can make the whole html file a single line

ancient nova
#

well I got it obfuscated?

mellow kelp
#

but that's all

lyric mountain
mellow kelp
#

ik

#

that's as far as you can go with html

earnest phoenix
#

you might be confusing obfuscation with minification

ancient nova
#

it changes the html to javascript and uses html to decode it into a html

lyric mountain
#

I'd not worry much about html steal tho

#

like, as I said, without the assets stolen html will be just a bunch of text

mellow kelp
#

well yeah, if you're using a framework, the content is most likely generated with js

ancient nova
#

@pale vessel I'm not sure if it works that way

lyric mountain
earnest phoenix
# pale vessel what

they put the html in a garbage string and then let the js code degarbage it and render it

lyric mountain
#

browsers only see html

earnest phoenix
#

that isn't obfuscation though

ancient nova
#

I just put my html in to the program and obfuscate it, it returns me a single line of html code with a bit of random strings that is the obfuscated code

lyric mountain
mellow kelp
#

i think the random strings might just be js files with hash names

ancient nova
#

@lyric mountain yeah that's what I mean

pale vessel
ancient nova
#

people can still view it

pale vessel
#

i've seen those

lyric mountain
#

if the html is available client-side then there's not much u can do

ancient nova
#

:/ dang

lyric mountain
#

just don't worry about it

earnest phoenix
#

regardless if you see your code used elsewhere you can threathen with legal action or submit a DMCA takedown request

lyric mountain
#

html is only text

#

without assets it's meaningless

ancient nova
#

@earnest phoenix I'll do that then

lyric mountain
#

not even google worry that much about html steal

ancient nova
#

@lyric mountain still if you worked on your html code for few days then see someone else use it for themselves, I'd make you kind of mad, wouldn't it

lyric mountain
#

let them be

#

without assets

earnest phoenix
#

js is where the goodies are so you should just worry about that

lyric mountain
#

html is useless

ancient nova
#

thanks

earnest phoenix
#

you can go a step further and straight up do server side rendering so your client doesn't even get a glimpse of what's happening in the code

ancient nova
#

I'm not sure how to do that though

pale vessel
#

p h p bro

earnest phoenix
#

lol

#

you'll have to search for some libs that are capable of SSR

#

i know that c# has asp.net core's razor pages

dire obsidian
#

i know dank memer uses this for it's help command, is there a way to change the toolbar? i think that's how its called

earnest phoenix
#

toolbar?

dire obsidian
#

idk

earnest phoenix
#

you mean the tooltip?

dire obsidian
#

THAT

#

yes

ancient nova
#

@earnest phoenix I see

earnest phoenix
dire obsidian
#

hmmm ok

#

oh (url ""text)

#

nice

wicked crown
#
 if(user.roles.cache.has(muterole)) {
        return message.channel.send("Given User is already muted")
    }
#

TypeError: Cannot read property 'cache' of undefined

#

help

lyric mountain
#

you need to check if an user has been mentioned at all

earnest phoenix
lyric mountain
#

yes I guess

earnest phoenix
#

okay thx making my own api to bypass ratelimit ^^

lyric mountain
#

well, on browser it's an actual html tag, so you also have tag stuff

lyric mountain
earnest phoenix
lyric mountain
#

why were you even using an api to generate canvas?

earnest phoenix
steep drum
lyric mountain
earnest phoenix
earnest phoenix
lyric mountain
#

like, it's not nuclear codes nor the next cure for cancer

wicked crown
#

can u show me

lyric mountain
#

canvas stuff are really easy to replicate

earnest phoenix
rigid sandal
#

after my bots files got corrupted I decided to use python instead and it gives me a syntax error on line 8 at the beginning and when I do indent it says unexpected indentation

lyric mountain
#

that's how internet works

#

if you keep bashing on copy protection you'll go insane

rigid sandal
#
import discord                                                            
from dotenv import load_dotenv                                            
load_dotenv()                                                             
TOKEN = os.getenv('DISCORD_TOKEN')                                        
client = discord.Client()                                                 
@client.event                                                             
async def on_ready():                                                     
 print(f'{client.user} has connected to Discord!')                        
client.run(TOKEN)```
lyric mountain
#

look at microsoft/ea/ubisoft/etc

#

not even them can keep piracy on check

steep drum
lyric mountain
#

perfect protection doesn't exist on internet

earnest phoenix
lyric mountain
steep drum
lyric mountain
#

even if u made an api

earnest phoenix
lyric mountain
#

a code is only 99% safe if it's isolated from world and locked in a vault

#

there's still 1% chance to be stolen due to physical attempts

#

true protection is a myth

#

also, remember that while you're slowing down thiefs you're also slowing down genuine users

lyric mountain
#

not unique, read it right

#

genuine users, those who have actual interest in using ur site/service/whatever

earnest phoenix
cloud warren
#
message.channel.createWebhook(kisi.username, kisi.displayAvatarURL)
.then(webhook => webhook.edit(kisi.username, kisi.displayAvatarURL)

I can't take avatar picture in code, how do I fix it version v12

#

I can't change your profile picture

cloud warren
#

There is no error, but the picture needs to change.

rigid sandal
#
    async def on_ready():
        ^
SyntaxError: invalid syntax```
earnest phoenix
rigid sandal
#

that is

#

its repeated

lyric mountain
#

show code

rigid sandal
#
import discord                                                            
from dotenv import load_dotenv                                            
load_dotenv()                                                             
TOKEN = os.getenv('DISCORD_TOKEN')                                        
client = discord.Client()                                                 
@client.event                                                             
async def on_ready():                                                     
 print(f'{client.user} has connected to Discord!')                        
client.run(TOKEN)```
lyric mountain
#

idk what it could be, but that code doesn't look right

steep drum
rigid sandal
#

No?

steep drum
#

Well you should if you want to use async

rigid sandal
#

Ok

gilded olive
#

Unindent and reindent it

gilded olive
icy skiff
rigid sandal
gilded olive
#

Did you copy it

#

Indentation errors like that occur if the code is copied

rigid sandal
#

Half of the code yes

gilded olive
#

well that explains a lot

#

Unindent the entire thing and reindent

lyric mountain
#

half the code is all the code in this case KEKW

icy skiff
#

i mean i think python would specify indentation error if the issue was indentation

rigid sandal
#

It has syntax without an indentation

#

Thats the error after I unindent

gilded olive
#

invalid syntax in async def on_ready(): means the line above is falty

#

most likely because its copied

#

unindent the line above and reindent

icy skiff
#

but the line above shouldnt be indented

gilded olive
modest maple
#

still not true

#

its not a syntax error

#

its because its Python 2

gilded olive
#

Well thats interesting

modest maple
#

or a py version < 3.5

gilded olive
#

correct me if im wrong

icy skiff
#

i think the issue is with discord.Client()

fierce ether
#

is there a way to invoke this without using new? js module.exports = class PresitgeEmbed extends MessageEmbed { constructor () { super() this.setColor(constants.EMBED_COLOR).setFooter(constants.EMBED_FOOTER).setTimestamp() }

gilded olive
modest maple
#

well

#

3.5.3+

#

because thats when async/await was added

icy skiff
#

replace "client = discord.Client()" for "client = commands.Bot(commands_prefix=<your prefix>, intents=<your intents>)", dont forget to from discord.ext import commands

#

see if it works

modest maple
#

that wont change anything pithink

gilded olive
#

^

modest maple
#

that would be the same as just deleting it and re-adding it

icy skiff
#

i think the error is that the decorator is not right because the client is not right

icy skiff
#

well if u say so

rigid sandal
#

My python version is the problem

#

2.7.16

gilded olive
#

My oh my

modest maple
#

told you smug

gilded olive
rigid sandal
#

Its gonna be a challenge to update python to 3

modest maple
#

pretty sure you wanna be running it with python3

#

cuz i think your mobile emulator or what ever is running it as you would expect linux to behave with the versions

icy skiff
#

if its linux

modest maple
#

well anything unix

icy skiff
#

it could be windows

modest maple
#

its not windows lol

#

you can tell just by looking with yer eyes

rigid sandal
#

actually its connected to an external device by ssh

icy skiff
#

then u should do python3 as he said

rigid sandal
#

because It doesnt have screen functionality

rigid sandal
#

So my phone is 1 way to connect to the pi

modest maple
icy skiff
#

ye i know i didnt understand what he meant by screen functionality

rigid sandal
#

oh I cant connect to it on the tv since the pi doesnt support hdmi

icy skiff
#

oh gotcha

rigid sandal
#

Yep

#

now im waiting for packages to update

#

then ill update to python 3.6 then 3.7

#

it should work then right?

icy skiff
#

after u download python3

#

all u need to do is execute ur bot code with python3 <your file>.py

rigid sandal
#

Ok

icy skiff
#

if u want it to keep running even after closing the terminal, use nohup python3 file.py &

modest maple
#

it'll work with 3.6 fine

rigid sandal
#

why specifically python3 <name>.py why not python <name>.py?

icy skiff
#

bc python uses python 2

#

python3 uses python 3

modest maple
#

python3 on linux is the identifier for python 3

rigid sandal
#

Oh ok

modest maple
#

python on linux is the python 2 versioning

rigid sandal
#

Ok I was wondering

#

wtf is tango lol

#

first time i seen screen functionality also

earnest phoenix
#

why does this circle only go to

#
    ctx.beginPath();
    ctx.lineWidth = 10;
    ctx.strokeStyle = "#0000ff";
    ctx.arc(308, 105,55, 0,360, true);
    ctx.stroke();
    ctx.closePath();
    ctx.clip();
mellow kelp
#

the angles must be in radians

#

for a full circle, the end angle must be Math.PI * 2

earnest phoenix
earnest phoenix
cinder patio
#

Geometry goes brrrrrr

crimson vapor
#

yeah

#

not taking geometry makes canvas so much harder

earnest phoenix
devout notch
#

because you need to use Math.PI * 2

modest maple
#

🤨

crimson vapor
devout notch
#

it doesn't take degrees

crimson vapor
#

yeah it takes radians

earnest phoenix
crimson vapor
#

no

mellow kelp
#

180° = PI radians

crimson vapor
#

360 is 2PI

mellow kelp
#

radians are degrees on steroids

crimson vapor
#

yes

#

rotating a circle is so counter intuitive imo

mellow kelp
#

what

#

how do you rotate a circle

#

oh nvm im stupid

#

n0

cinder patio
#

If it's a whole circle then yeah

#

it's pointless

earnest phoenix
#

pointless ha

mellow kelp
#

(no pun intended)

#

i mean you can rotate a full circle if it has multiple colors on it or something

modest maple
#

can always rely on #development to lower brain cells one way or another

mellow kelp
#

indeed

crimson vapor
#

not fill it

#

rotate it

mellow kelp
#

that's just a method to draw an arc

modest maple
#

you ever notice how in practically every other language types a integer as either int or integer and JS just went with "nah lets just use number because we know all the kids are gonna need the basic words with their discord bots"

mellow kelp
#

fr tho

cinder patio
#

it's cause there isn't a separate type for floats and ints

mellow kelp
#

i was so confused when i started using typescript just because of number

cinder patio
#

so calling it int would be a lie, cause it can also be a floating point

lyric mountain
cinder patio
#

in JS all numbers are 32bit floating points

lyric mountain
#

in JS everything is a boolean

#

32bit booleans

cinder patio
#

Actually in TS there could technically be a float and int types...

#

even if they're not real

rigid sandal
#
  File "bot.py", line 4, in <module>
    import discord
ModuleNotFoundError: No module named 'discord'```
#

-_-

lyric mountain
#

did u install it?

rigid sandal
#

discord?

#

I got python 3.7 installed

umbral zealot
rigid sandal
#

Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-3k3rvhdj/multidict/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-c87r74_h/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-install-3k3rvhdj/multidict/

#

I think i done the command wrong

cinder patio
#

Hey Evie you here

umbral zealot
#

I'm always around.

#

24/7

#

always watching

rigid sandal
#
nanopineo:~:% python3 bot.py      <master ✗> Traceback (most recent call last):
  File "bot.py", line 4, in <module>
    import discord
ModuleNotFoundError: No module named 'discord'``` It wont install discord.py
cinder patio
#

There was a talk about taking templates for sites earlier, does this look good, I'm afraid I'm making it look template-y

rigid sandal
#

idk why

ornate otter
#

so

lyric mountain
#

just use pip

ornate otter
#

i'm trying to list all of the members in one role, but it always returns empty

rigid sandal
#

ive used pip pip3 python3

#

same error

lyric mountain
cinder patio
#

Is that good?

modest maple
#

also looks quite flat

earnest phoenix
lyric mountain
rigid sandal
#

I know I added pizazz to my websites menus

cinder patio
#

Well I've only added the header and footer so far, there's going to be stuff in the body

lyric mountain
#

maybe with the black-ish color

rigid sandal
#

like a box function

lyric mountain
#

yeah but, like, both yellow and purple colors are somewhat...eye straining

#

also sometimes red

zenith terrace
rigid sandal
#

👀

cinder patio
#

hmmm maybe less yellow?

lyric mountain
cinder patio
#

but I kinda wanna keep the yellow

#

I think it looks nice

ornate otter
#

Does anyone know how i can list all of the members in a role

umbral zealot
ornate otter
#

Cus i've tried a few ways, they all return empty

modest maple
#

yellow is often an incredibly hard colour to make work

earnest phoenix
lyric mountain
#

just do (width / 2) - (avatarWidth / 2)

#

that'll center it

modest maple
#

high contrast with dark colours + high mixing with lighter colours

lyric mountain
eternal osprey
#

what do you guys think of this layout and color use?

umbral zealot
#

that fucking wave again

lyric mountain
#

ton of yellow

umbral zealot
#

always that same damn wave

eternal osprey
modest maple
umbral zealot
lyric mountain
umbral zealot
#

everyone and that damn wave

modest maple
#

also very obviously copied from somewhere

zenith terrace
#

@ornate otter

I did it by getting the role id then using map()

modest maple
#

or atleast it looks like your bog standard copy page

zenith terrace
#

and members who have the tole

#

role*

cinder patio
earnest phoenix
lyric mountain
#

solarized bg color will only look good with low-contrast colors

#

yep

modest maple
#

Chip's site colour scheme still annoys me a bit

#

people seem to like it but man it pissed me off

cinder patio
#

yikes forgot to remove the footer msg

modest maple
#

cant find a good alternative though blobpain

lyric mountain
#

btw, I vote for "remove hyperlink underlines"

ornate otter
zenith terrace
#

ye one moment

modest maple
#

must one day re-do this front page

#

discord cdn dying yay

#

or my client is atleast

eternal osprey
#

@umbral zealot some more noodle waves.

cinder patio
#

The final theme... I don't know what I was doing with this one, I got it from the color palette generator

umbral zealot
#

oh god

lyric mountain
#

that's awful

modest maple
#

very harsh on the eyes

umbral zealot
#

what the actual hell

eternal osprey
umbral zealot
#

Serious question: are you color blind?

cinder patio
#

thought so, lol

lyric mountain
#

looks like a cross between bubblegum and pasta

modest maple
#

dark theme bro

umbral zealot
#

still that fucking wave KEKW

cinder patio
#

smooth

umbral zealot
#

Which bot came up with it? Rhythm, yeah?

eternal osprey
#

is the maker of rhytm also in this server?

modest maple
#

probably

lyric mountain
#

everyone using senoidal wave

imma use cosenoidal wave

eternal osprey
#

ahh, really hot.

modest maple
#

i try avoid waves in places

modest maple
#

they can add depth to some things

#

but in other cases make it much harder to fit things together

opal plank
#

@quartz kindle need a bit of a help

modest maple
opal plank
#

does js has a nice way to throw a nasty crash to exit process?

modest maple
#

just call a system exit no?

cinder patio
#

process.exit

opal plank
#

i wanna crash node with non 0 exit

modest maple
#

just shut your own process down

opal plank
#

checking for env's, and they are needed to run

#

planning on crashing node with a custom error

cinder patio
#

you can specify the code

modest maple
#

    process.exit([exitcode])

    Ends the process with the specified code. If omitted, exit uses the 'success' code 0.

    To exit with a 'failure' code:

    process.exit(1);

    The shell that executed node should see the exit code as 1.
opal plank
#

can i pass a typeerror there?

#

or should i throw before exiting?

cinder patio
#

yeah throw it before you call process.exit

modest maple
#

print the tacetrace first

#

then call

opal plank
#

dont think i'll need trace, i just need a typeerror

#

since its checking for env's before running

cinder patio
#

better yellow?

modest maple
#

yeah

#

just a bit bland now

cinder patio
#

mmmm

#

how can I make it less bland

mellow kelp
#

maybe make the navigation font color white?

modest maple
#

add depth, diffrent font and text sizes, better highlights, move the nagivation sections left or right to better add the usability aspect

earnest phoenix
modest maple
#

most people expect nav buttons to either to the left or the right not dead center

daring prawn
#

how do i make the logos frame circle?

mellow kelp
#

border-radius

#

oh you mean frame

earnest phoenix
#

or just remove the drop shadow

cinder patio
#

Thanks everyone

daring prawn
cinder patio
#

soft gradients are really gonna make stuff more lively

daring prawn
#

i can use border gradients 50

rigid sandal
#

Failed building wheel for multidict, Failed building wheel for yarl

#

How do i fix these?

quartz kindle
earnest phoenix
quartz kindle
#

btw

#

anyone seen this weird artifacts in vsc?

opal plank
earnest phoenix
#

🤔 the renderer seems to be fucked

#

my first thought would be to try reinstalling

quartz kindle
#

i keep scratching it thinking its something on my screen but its not lmao

cinder patio
#

Could it be an issue with the color theme?

rigid sandal
# earnest phoenix what's the full stacktrace

Command "/usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-install-725exiyt/multidict/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-fnulzue5/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-install-725exiyt/multidict/

daring prawn
#

code:

@keyframes float { 0% { box-shadow: 0 5px 15px 0px rgba(0,0,0,0.6); transform: translatey(0px); } 50% { box-shadow: 0 25px 15px 0px rgba(0,0,0,0.2); transform: translatey(-30px); } 100% { box-shadow: 0 5px 15px 0px rgba(0,0,0,0.6); transform: translatey(0px); } } .entity-header__image { box-shadow: 0 5px 15px 0px rgba(0, 0, 0, 0.6); transform: translatey(0px); animation: float 4s ease-in-out infinite; } 

do you see the box in the logo? how do i make that circle?

earnest phoenix
rigid sandal
quartz kindle
earnest phoenix
#

are you using posh

daring prawn
#

if someone could help me pls @ me

rigid sandal
earnest phoenix
#

i was talking to tim

rigid sandal
#

oh sorry

earnest phoenix
#

posh fucks with ps output so that could be a thing

quartz kindle
#

idk what posh is

#

but i fixed it by disabling canvas rendering

#

"terminal.integrated.rendererType": "dom"

#

made fonts a bit bigger tho

slate oyster
tired panther
#

A notice:
Google Feud is to notable to get the Notable Member role 😓

solemn latch
opal plank
#

hmmm need help again

slate oyster
#

Why does notable member really matter much?

opal plank
#

dotenv converting numbers to string somehow

#

any way to avoid that?

#

also arrays

#

fucking up anything that isnt string

solemn latch
#

ngl, I didnt know env could hold anything other than string.

opal plank
#

thats going to be a bitch if it cant

lyric mountain
#

afaik property files are string=string stuff

opal plank
#

fucking

#

AAAAAH

cinder patio
#

yup strings only

lyric mountain
#

you can make a custom loader tho

#

like

#

since javascript has no typing at all

cinder patio
#

That's the main reason I use json files

earnest phoenix
opal plank
#

cannot believe how shitty this dotenv thing is

#

imagine not parsing types

#

fuck my life

cinder patio
#

I mean.. how is it supposed to know what's a string and what's a number

solemn latch
#

how does json know whats a string and a number

#

i guess ""

cinder patio
#

Well then it would break the .env format

mellow kelp
#

yeah

#

any enviroment variable is supposed to be a string

earnest phoenix
#

json is a notation

#

you can put anything inside

#

the language parsing it decides what is what

outer perch
#

what's the regex for empty lines?

mellow kelp
#

something like /(\n\r?){2}/ i guess

solemn latch
#

it would depend on the OS wouldnt it?
windows returns are different than Linux.

earnest phoenix
#

only for reading files

mellow kelp
#

yeah

solemn latch
#

actually i might be thinking of something else

#

oh

mellow kelp
#

that's why i'm including \r?

earnest phoenix
#

windows puts a carriage return

#

for whatever reason

solemn latch
#

oh yeah i didnt see ?

crimson vapor
earnest phoenix
#
Error: EBUSY: resource busy or locked, open 'C:\Users\igoro\OneDrive\Bureaublad\DezorBot\node_modules\mongodb\lib\core\a
uth\auth_provider.js'
←[90m    at Object.openSync (fs.js:476:3)←[39m
←[90m    at Object.readFileSync (fs.js:377:35)←[39m
←[90m    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1090:18)←[39m
←[90m    at Module.load (internal/modules/cjs/loader.js:928:32)←[39m
←[90m    at Function.Module._load (internal/modules/cjs/loader.js:769:14)←[39m
←[90m    at Module.require (internal/modules/cjs/loader.js:952:19)←[39m
←[90m    at require (internal/modules/cjs/helpers.js:88:18)←[39m
    at Object.<anonymous> (C:\Users\igoro\OneDrive\Bureaublad\DezorBot\node_modules\←[4mmongodb←[24m\lib\core\auth\mongo
cr.js:4:22)
←[90m    at Module._compile (internal/modules/cjs/loader.js:1063:30)←[39m
←[90m    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)←[39m {
  errno: ←[33m-4082←[39m,
  syscall: ←[32m'open'←[39m,
  code: ←[32m'EBUSY'←[39m,
  path: ←[32m'C:\\Users\\igoro\\OneDrive\\Bureaublad\\DezorBot\\node_modules\\mongodb\\lib\\core\\auth\\auth_provider.js
'←[39m
}``` what t fak is this?
mellow kelp
#

you're trying to read a file that is currently being read by another process

earnest phoenix
#

?

#

tldr you either interrupted npm while it was installing a package or you're trying to run your project while a package is being installed

#

tldr of the tldr you did something you weren't supposed to do

crimson vapor
#

I need a tldr of the tldr of the tldr /s

earnest phoenix
#
C:\Users\igoro\OneDrive\Bureaublad\DezorBot>node ticket.js
MongoDB is Ready
Server started
(node:8712) Warning: Accessing non-existent property 'MongoError' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
Online
(node:8712) DeprecationWarning: Listening to events on the Db class has been deprecated and will be removed in the next
major version.
crimson vapor
mellow kelp
#

no problem dude

leaden creek
#

Anyone one know a good app to code in python?

earnest phoenix
#

do you mean an editor/IDE or like an actual app to make

leaden creek
#

An editor

earnest phoenix
#

try out pycharm ig

#

people i know really seem to like it

modest maple
#

Pycharm or VSC are two good ones

earnest phoenix
#

can somebody tell me which font gets used here

#

uni sans

#

it's a paid font

#

that developer of the bot probably downloaded it illegally

#

considering how ugly the design is

misty sigil
#

lmfao

earnest phoenix
#

you probably shouldn't, but not like anyone would know if you did

outer perch
#

:O

misty sigil
#

it is a bit ugly aye

#

a bit too squished

mellow kelp
#

i'm pretty sure uni sans is the discord font right?

earnest phoenix
#

yup

mellow kelp
#

o

earnest phoenix
#

i only use google fonts

#

are there any similar

#

it isn't discord's font per se

#

they just bought the license to use it for their branding

mellow kelp
#

yeah

solemn latch
#

which the licenses seem super cheap

earnest phoenix
#

atm I have this it is really ugly

solemn latch
opal plank
#

question:
"["a"]"
any decent way to turn that or "["a", "cbd"]"
into an array?

solemn latch
#

oh expired

#

f

earnest phoenix
#

i am searching for an alternative

#

and not payed my 🏦 0 $ xD

solemn latch
#

most free fonts are not for commercial use

earnest phoenix
opal plank
#

thats the issue

#

what about the first one

outer perch
#

@misty sigil shouldn't it be sco'ish q'ie?

opal plank
#

there no , to be split

solemn latch
#

just be aware you will not be allowed to make a profit more than likely while using a free font, so no premium features.

earnest phoenix
opal plank
#

so it'll return a string still

earnest phoenix
#

it's going to be the only element in the array, no?

opal plank
#

theres no array

#

its a stringified array

solemn latch
#

sure, but they are typically licensed to be private use only 👀

earnest phoenix
#

i know

#

split returns the array

opal plank
#

oh

#

im stupid

earnest phoenix
opal plank
#

json.parse

earnest phoenix
#

or that

solemn latch
#

just make sure to know what your agreeing to using a free font

earnest phoenix
#

i keep forgetting js has first level support for json

modest maple
modest maple
#

just write your own parser

opal plank
#

lmao i forgot about it too

earnest phoenix
heavy marsh
#

in .js - v12.5.1
I am trying to remove the category Developer if the author doesnt have my id

 let category = await client.commands.map(x => x.category);
``` - What to do here ...
earnest phoenix
#

context please

heavy marsh
#

Help command

#

For my help command I am trying to remove the commends under the Developer category

solemn latch
#

filter if its not you to not include Developer category

heavy marsh
#
  let category;
  if(message.author.id !== config.owner) {
  let category_s = await client.commands.map(x => x.category);
  category = category_s.filter(category_s => category_s !== `Developer`)
  }
#

something like this?

sturdy dock
#

internal sharding only creates multiple connections to the discord API so different internal shards can access the same local variables right?
ex. if var number = 1 is run on one internal shard, would other shards also get 1 from evaluating number

#

or does this only apply to the caches

earnest phoenix
earnest phoenix
#
sc.send("hi, ive been recently rewriten, if you like me please concider voting for me!", embed)``` sc is a channel object, why am i only getting the text not the embed
#

(the embed is properly set up

#

the error if i just send the string:
(node:1548) UnhandledPromiseRejectionWarning: DiscordAPIError: Cannot send an empty message

copper cradle
#

consider, not concider

#

at the end of it: sc.send("yourtext", { embed }); try that

earnest phoenix
copper cradle
#

if it doesn't work then Idk

earnest phoenix
#

tysm

copper cradle
#

np

earnest phoenix
#

idfk how tho lmao

#

i just had a thought
i think the bot im working on has a slightly newer d.js version

#

@copper cradle

#

mayb thats what went wrong

lyric meteor
#

I have a question regarding publishing a bot

#

I made a bot that solely depends on NSFW commands

#

Is there any way to have it in the site, without including any type of nsfw media on the submission?

solemn latch
#

we do not accept bots which are nsfw only

crimson vapor
#

@solemn latch has your pfp always been a gif?

solemn latch
#

i mean it has been, i just didnt have nitro for awhile

sand urchin
#

My bot just inspries peoole as time goes on it will be changed

near dew
earnest phoenix
#

I've had this problem months ago, anyone here knows the solution to this error?

occurs when upgrading to v12

sudden geyser
#

Do node -v for me

#

@earnest phoenix

earnest phoenix
#

1 second

#

@sudden geyser here ya go

sudden geyser
#

Hmm, the error would imply try {...} catch {...} is invalid syntax and expects try {...} catch (...) {...}, but that syntax was supported in Node v12.

stark abyss
#
const indexFile = require("../../index.js")
let pool = indexFile.dbClient;

I was told that requiring index file in other files isn't needed, and it would give an error when I do node index.js. It does give an error, so how am I supposed to use dbClient which I am exporting from index.js?

lyric mountain
#

you never need to require index

stark abyss
#

yeah, I got it now I am just unsure how to use dbClient

#

it's not like i can just say dbClient and it would magically work right i didn't try but that shouldn't work so how do I do this?

stark abyss
sudden geyser
#

It comes from a dependency so that's not the right approach.

stark abyss
#

dang just when I thought I was able to help someone AHsad

swift cloak
#

yoo, how can i make my react app into a custom url

lyric mountain
swift cloak
lyric mountain
#

which one?

#

is it tk?

#

inb4: freenom domains won't work

#

also, u need a vps

stark abyss
#

KuuHaKu you didn't fill me with all the information, if you know more Ill appreciate if you can tell me

lyric mountain
#

what is a dbClient?

#

you supply few info, you retrieve few info

stark abyss
lyric mountain
#

use a middleman file

#

like, one to hold all global variables

stark abyss
#

oh

lyric mountain
#

or just pass that object whenever you change files

#

like, in a function

#

but since db access will be global, use a middleman

stark abyss
#

Okay, thank you

swift cloak
dusky sundial
proven lantern
swift cloak
dusky sundial
swift cloak
lyric mountain
#

you still need a vps to run the site

#

or host it locally and risk uptime

swift cloak
#

im testing it by hosting it locally

lyric mountain
#

You can't test the domain locally, at least not easily

#

For cloudflare stuff, just search "how to setup cloudflare for domain"

#

I followed a medium tutorial iirc

swift cloak
#

oh no i did it alr

#

i think

opal plank
#

I just would like a moment of your time to tell each person who uses ENV:
HOW?
HOW CAN SOMEONE USE THIS CRAP?!
need strings? we got you
need numbers? FUCK YOU
need bools? FUCK YOU
need arrays? FUCK YOU

HOLY how do people use this shit for entire projects? i had to make my own parser for this crap wtf

mellow kelp
#

Number(thing)

#

thing === 'true'

#

thing.split(', or whatever separation you want')

#

how hard is that

opal plank
#

once? sure, easy

#

multiple times? yeah nah

mellow kelp
#

what

opal plank
#

i either wrote a parser or added literally all that everywhere

mellow kelp
#

how many variables are you using though?

opal plank
#

Number(thing)
thing === 'true'
thing.split(', or whatever separation you want')
this adds logic, a couple is fine, its still increasing code unecessarily

#

but in my case i got a couple hundread times

#

imagine adding that literally every single time you call an env

#

and no even that, theres no types for it

#

cuz god forsake people from adding types to process.env

#

this shit is infuriating to work with

#

casting AND parsing it EVERY FUCKING TIME

mellow kelp
#
// env.ts
const { VAR_ONE, SECRET_NUMBER, SOME_LIST } = process.env;

export const varOne = VAR_ONE;
export const secretNumber = Number(SECRET_NUMBER);
export const someList = SOME_LIST.split(',');
#

now you don't have to parse the variables every time you use them

opal plank
#

you do

#

cuz env only accepts string

#

everytime you need to call a variable you need to cast it

#

EVERY

#

FUCKING TIME

mellow kelp
#

cast it once to a temporary variable

#

ez

opal plank
#

you're thinking this is a small project with 10 env's

#

it aint

mellow kelp
#

well k

#

so why not cast config.shards where you declared it?

#

or is it something else

mellow kelp
#

i mean how do you declare config

#

well nvm

opal plank
#

from process.env

mellow kelp
#

const config = process.env?

opal plank
#

correct

mellow kelp
#

o

drifting wedge
#

Carpal

#

Send code + output

safe creek
#
client = commands.Bot(command_prefix='!', case_insensitive= False, Help_command = False)

client.remove_command(help)```
drifting wedge
#

It's none

#

Not false

safe creek
#

ohhh

drifting wedge
#

Case insensitive isn't for that

#

It's for commands

#

And it's help_command no caps

#

I think

safe creek
#

ahh ok

#

why am i only getting told this all my coding life i thought it was like that

drifting wedge
#

Lol

safe creek
#

fuck you god you betrayed me tho i dont believe in you

lyric mountain
drifting wedge
#

?

safe creek
#

oooh i have left over dominos

lyric mountain
#

Like, generics

drifting wedge
#

Pizza = noob food

opal plank
#

made my own parser

#

fuck the rest

mellow kelp
#

make a generic function that casts the type

drifting wedge
#

@opal plank i found a lizard and named it after you

mellow kelp
#

ez

drifting wedge
#

Ye

#

Yw*

#

I mean they're all called Erwin

#

I found like 10

opal plank
#

lmao

drifting wedge
#

Some frogs I found are called carlos

mellow kelp
#
function getEnv<T = string>(name: string) {
  return (process.env[name] as unknown) as T;
}
drifting wedge
#

And the crabs are Gilbert

opal plank
#

if they are even remotely related to me, make sure to lock them, those fuckers will have some insanely high ability to destroy shit just by staring at it

drifting wedge
#

I found them outside

opal plank
#

lizardS

mellow kelp
#

wait how did you find a lizard just "outside" hashflushed

#

where do you live

opal plank
#

funfact, i was coding and a gecko fell on my keyboard

#

like, those house geckos you find around

safe creek
#

this is the correct format for embeds right? ```py
@commands.command
async def prefix(ctx, embed):
await ctx.send(

    embed=discord.embeds(
    color=discord.Colour(0xff0000),
    title="This servers prefix is:",
    decription=f"{prefix}"


    ))
drifting wedge
opal plank
#

gave me one hell of a scare

mellow kelp
opal plank
#

anyhow, back to coding

safe creek
drifting wedge
#

Also prob define embed before send

#

Makes it easier to read / edit

safe creek
#

it should be defined already no?

drifting wedge
#

They both work

#

Also, why u passing embed?

#

And if it's a cog u need self?

#

And if not, you use client.command

#

Without ()

safe creek
#

im confused as fuck mostly because im tired

drifting wedge
#

U in cog or main file

#

?

safe creek
#

cog

drifting wedge
#

U need self?

safe creek
#

in my utilites file

#

mmmk so ill add a self

drifting wedge
#

Send cog code as In imports and class

dusky sundial
#

And @commands.command() is correct

safe creek
#

ahh ok so i did get this a little wrong then?

dusky sundial
#

Mostly just replace discord.embeds with discord.Embed

safe creek
#

i do mostly code at night like rn so i do mess up quite a bit haha

#

okie tyy

dusky sundial
#

And yeah, if it's in a Cog class you should have self as the first parameter in the method

safe creek
#

ahh ok i see

#

thanks

dusky sundial
#

\https://discordpy.readthedocs.io/en/latest/api.html#embed
Here's a little more info on embeds if you're interested

safe creek
#

cheers

#

helps alot

#

so i wanted to test out a event to here the bot sends a message on the join and got this?

#

not too sure what that means?

earnest phoenix
#

that means the dev turned on an option that requires a code grant

safe creek
#

huh i mustve done that by mistake

earnest phoenix
#

yeah

celest bone
#

is a animated status on a Discord bot considered "API Abuse" ?

earnest phoenix
#

probably

celest bone
#

Ive heard many mixed things

earnest phoenix
#

it should only update 4 times every 20 second

celest bone
#

Welp mines 3 every 10

#

maybe I should change it 🤣

safe creek
#

there we go

#

it joins servers noe

earnest phoenix
#

gg

safe creek
#

i mustve switched it on when toggling intents

whole warren
#

Does anybody have a decently large bot? I have a few questions that i would like to ask.

solemn latch
#

Whats the word for keeping a int between two numbers?
ie if the number is outside
0 and 1 and the number is set to 5.6 its set to 1.

#

clamp 👀

#

brainfarts are fun

blissful coral
#

using ejs, if I am passing a value through a option tag in a select tag and I pass the object will that work Thonk

versed gulch
#

-bots 184632227894657025

gilded plankBOT
#
Bots <:dblAdmin:483994951961673738> <:dblMod:483995659054088193> <:dblCertified:392249976639455232>

@visual ginkgo

blissful coral
versed gulch
#

my b

lyric mountain
whole warren
solemn latch
#

depends on the library and intents

#

depends heavily*

whole warren
#

specifically a discord.js bot

lyric mountain
#

A lot then

whole warren
#

oof

lyric mountain
#

If u don't manage the cache properly

solemn latch
#

could be 500mb-2gb, depending on what you cache

whole warren
#

oh

#

ok, cool

solemn latch
#

could be more if you just cache everything

whole warren
#

ok

lyric mountain
#

Bandwidth is quite negligible

#

Data exchange is waaaaay too small for real-time stuff

solemn latch
#

if you dont use precense intent and dont have any images being uploaded it wont be a concern

whole warren
#

I plan on adding music to my bot and i dont know how much that would take

lyric mountain
#

Music is one hell of a niche feature

whole warren
#

yeah

lyric mountain
#

Mainly because youtube hates your bot, you, your ip, your requests, etc

whole warren
#

that sucks

solemn latch
#

most music bots in a few thousand servers probably wont use much bandwidth I wouldn't think, yeah the main concern is ip bans

whole warren
#

is their any way to get around that?

solemn latch
#

buying an ip block

lyric mountain
#

And a ton of ip rotation

whole warren
#

ok

#

is there any way i can allow it for my ip

lyric mountain
#

Then theres the issue that discord is not made for music streaming

whole warren
#

like to have them not ban me

lyric mountain
#

So it's badly optimized for it

whole warren
#

agreed

solemn latch
#

its against their tos, so no?

lyric mountain
#

Ip stuff or streaming?

#

Oh, yeah, ip dodge is against tos for most stuff

solemn latch
#

well, streaming without going through one of their validated services is against their tos(like music bots)

whole warren
#

what would be one of their validated servces be

lyric mountain
#

YouTube

solemn latch
whole warren
#

ok good

lyric mountain
#

No, not good

whole warren
#

not good

#

why?

lyric mountain
#

That means only youtube can use it

whole warren
#

?

#

so i can not stream youtube music?

lyric mountain
#

Only youtube is allowed to stream YouTube stuff

solemn latch
#

if you want to not break their tos

#

most people break that tos, so 🤷‍♂️

whole warren
#

how does groovy work then

solemn latch
#

by breaking their tos

#

😄

lyric mountain
#

You can, theoretically download all the music files and stream from ur own storage

whole warren
#

but discord verified it

lyric mountain
#

But then you'd be breaking not only the tos but the law

solemn latch
#

discord doesnt care unless they get sued

whole warren
#

nice

#

would streaming from youtube be a lot of bandwidth tho

#

since it is only audio

lyric mountain
#

Not at all, the issue is latency

whole warren
#

nice

lyric mountain
#

With most vps bandwidth wouldn't be a concern

whole warren
#

like a 1tb bandwidth would be good?

lyric mountain
#

Why have limited bandwidth?

whole warren
#

because digital ocaen is bad

#

and i have a free $100 from them

solemn latch
#

cough cough galaxygate

#

ah

lyric mountain
#

Digital Ocean is overpriced af

whole warren
#

really?

solemn latch
#

i mean 1tb should be fine for just starting

#

i wouldnt expect you to be at a large number of servers before that $100 runs out

whole warren
#

yeah

#

we grew 90 servers in 3 weeks

lyric mountain
#

Like really? 5 bucks per month for some shitty specs?

#

1 cpu, 25 gb ssd

whole warren
#

is that good?

#

for that pricve

lyric mountain
#

That's expensive

solemn latch
#

its okay considering they charge hourly

#

when you use it like its hourly its pretty decent imo

#

buying for a bot host its bad

lyric mountain
#

But since bots will be 24/7 it's really not worth it

whole warren
#

oh

lyric mountain
#

It'd be good for like, remote processing

solemn latch
#

^

lyric mountain
#

Short-lived tasks

whole warren
#

ok, i undertand

solemn latch
#

I really want to setup a rendering platform on DO

#

just throw it up when I want to render

#

👀

#

just for fun

whole warren
#

i just have a github stident developer account so i get discounts for some things

old cliff
#

anyone knows any guide on react with discord auth ?

mellow kelp
#

react is just the frontend

whole warren
#

use express

lyric mountain
old cliff
#

including express

lyric mountain
#

Not react

#

React is front, node is back

old cliff
#

I knio

solemn latch
#

you can just use any react guide

old cliff
#

but how can I integrate ?

#

it with express and discord auth ?

whole warren
#

#discordjs #discorddashboard #oauth2

Discord OAuth2 Dashboard setting up with Express.

Want to support me and the channel? Donations are not required but greatly appreciated!

Become a Patreon: http://patreon.com/stuyy
Buy me a Coffee: http://ko-fi.com/anson
Streamlabs: https://streamlabs.com/ansondevacademy/tip

Discord Server: http://discord...

▶ Play video
#

that will tell you

old cliff
#

lifesaver

mellow kelp
#

oh no

#

youtube videos

whole warren
#

lol

#

i litterally took the first result from google

lyric mountain
#

Btw, one tip from someone who spent many hours regarding real time connection with backend:

#

Use websocket

whole warren
#

?

#

what is that

mellow kelp
#

why websockets?

#

i mean this is just some auth

lyric mountain
#

Dashboard stuff

mellow kelp
#

bake some cookies and

mellow kelp
whole warren
#

I just use graphql endpoint

lyric mountain
#

Like, if you really want to modify ur bot settings realtime then u need websockets

mellow kelp
#

how about a save button like the one discord uses

whole warren
#

mine is almost realime

lyric mountain
#

It not only checks if a connection is active

#

But also sends data near instantly

mellow kelp
#

my old dashboard had a save button that sent the api call

whole warren
#

same

mellow kelp
#

it worked pretty good

solemn latch
#

yeah, save buttons are still kinda standard

#

pretty much every large and small platform uses them

mellow kelp
#

oh and one of those "u sure u wanna leave the page?" messages

whole warren
#

lol

lyric mountain
#

Yeah, like, with websockets you'd also use a save button

#

The advantage is preventing lost data or miscommunication between layers

whole warren
#

my bot interacts with the dashboard with mongodb and graphql

old cliff
#

wait

#

but how can I use that with react ?

whole warren
#

look later in the series

old cliff
#

I already know express ejs and have made it

whole warren
#

it explains a lot of it

old cliff
#

ok

mellow kelp
#

you should probably expose stuff in the api

old cliff
#

illl just see the repo

mellow kelp
#

so that the react app can fetch the data

lyric mountain
#

Use post btw

whole warren
#

who do yall reccommend for hosting then?

lyric mountain
#

Get is bad

solemn latch
#

galaxygate eyes_shaking

lyric mountain
#

Contabo

mellow kelp
#

apparently there was a time when everything was made with POST

solemn latch
#

oversellers

mellow kelp
#

ew

lyric mountain
#

Never had st issues again

whole warren
#

contabo acutally looks pretty good

lyric mountain
#

They recently bootstrapped their site

whole warren
#

ew

lyric mountain
#

You'd think they were sketchy a couple months before

#

1997-ish style

solemn latch
#

they always have been sketchy imo

whole warren
#

i am going to have to look at a few options

solemn latch