#development

1 messages Β· Page 1643 of 1

crimson vapor
#

please learn js

#

ty

opal plank
#
this.this.this.this.thing = this.this.this.this.this.this.this.seomthing_else```
crimson vapor
#
this.this = this```
#

then you can do this.this.this.this...

opal plank
#

i wonder what would happen

solemn latch
#

confusion

opal plank
#
(function loop() {console.log('this.'); loop()})()

run this in console mmulu

solemn latch
#

ok πŸ‘€

opal plank
#

no balls

solemn latch
opal plank
#

HEHHEHEHEH

solemn latch
#

slow cpu angeryBOYE

opal plank
#

tim no reply, sad face

tired panther
crimson vapor
#

its much faster when im not recording

solemn latch
#

yeah mine was too

crimson vapor
#

yeah

#

shame

opal plank
#

just record with your cellphone, duh

crimson vapor
#

its dead tho

opal plank
#

me too

crimson vapor
#

agreed

opal plank
#

just inside tho

crimson vapor
#

ah

earnest phoenix
#

quality development going on here

crimson vapor
#

always bro

earnest phoenix
#

teach me ur this ways

crimson vapor
#

sorry im really bad at explaining things

earnest phoenix
#

right so I never tried importing N defining inside cunst does it actually work

#

does the client id of a bot change when u change its name?

opal plank
#

i dont think ids change at all

#

every id should be unique

crimson vapor
#

ids do not change

#

@opal plank I did while(true) console.log('this.') and my chrome tab crashed

gilded olive
#

πŸ‘

opal plank
#

weak

#

now try on firefox

#

lets see if theres a browser that survives massacre

earnest phoenix
#

it should last a bit before it actually crashes if you're using pure js

crimson vapor
#

it was a few minutes

#

lol

earnest phoenix
#

k thanks

#

πŸ‘

feral aspen
#

Is using switch statements better than chaining else if statements?

cinder patio
#

it depends on the context

feral aspen
#
switch(value) {
  case "1":
    execute;
    break;
};
#

?

final spire
#

who want nitro

feral aspen
feral aspen
#

I did this.

cinder patio
#

yes switch is better in that case

feral aspen
#
switch(args[0])
#

I am checking if args[0] equals to any of the cases.

cinder patio
#

switch

feral aspen
#

Like if it equals (the cases) to 1, or 2, or 3, and on those cases, I will add an if statement inside of them.

#

case 1:
case 2:

#

etc.

#

Is that better?

quartz kindle
#

well...

final spire
pale vessel
#

Thanks

final spire
#

who get it

pale vessel
#

Me

feral aspen
#

πŸ˜‚

final spire
feral aspen
quartz kindle
#

switch is supposed to be better by design

feral aspen
#

Yes.

quartz kindle
#

however as far as performance goes, if else usually beats it, at least in js

feral aspen
#

Oh.

cinder patio
#

nah

quartz kindle
#

idk about very large chains tho

#

if you have like 100 if elses

#

then maybe switch will beat it

feral aspen
#

I only have 3 if elses.

#

πŸ˜‚

quartz kindle
#

but for small amounts, if else is usually faster

feral aspen
#

πŸ‘

#

Thanks.

opal plank
#

is tim recommending using if/else over a switch ?

#

blasphemy

feral aspen
#

What did I just cause.

#

πŸ€¦β€β™‚οΈ

tired panther
umbral zealot
#

doesn't matter the JIT compiler will convert to the right one anyway

opal plank
#
if(command === 'a') {}
else if(command === 'b'){}
else if(command === 'c'){}
else if(command === 'd'){}
else if(command === 'e'){}
else if(command === 'f'){}
umbral zealot
#

the difference between both is insignificant

opal plank
feral aspen
#

.. and some more stuff.

cinder patio
#

If you're dealing with a lot of cases then you'll definitely notice a difference

tired panther
opal plank
#

usually if you're comparing the same thing, you'd wanna use switch

tired panther
feral aspen
#

I passed a placeholder which is args[0]! πŸ‘€

#

Well if statement it is, I guess.

feral aspen
quartz kindle
#

i generally go for switch if i have more than 3 ifs

opal plank
#

^^

#

i do the same

quartz kindle
#

just for organizations sake

opal plank
#

tim

quartz kindle
#

and only if i can actually switch the value

opal plank
#

im dissapointed in you

quartz kindle
#

i dont switch(true)

feral aspen
#

I have two else ifs, so I don't mind for switch at this moment.

pale vessel
#

lmao

opal plank
#

tim betrayed me

feral aspen
#

πŸ€·β€β™‚οΈ Lmao

quartz kindle
#

what did i do lmao

opal plank
#

i asked for ur benchmarks on hashinh

#

and you ignored

quartz kindle
#

when

feral aspen
quartz kindle
#

ye

pale vessel
#

it totally isn't

feral aspen
#

Off-topic: Happy Birthday! πŸŽ‰

quartz kindle
#

tyty

feral aspen
#

😊

opal plank
#

here

quartz kindle
#

when, not where

#

lmao

opal plank
#

erm

#

Today at 14:20

quartz kindle
#

wut

#

i didnt see it

opal plank
#

you asked when

#

thats the time lul

#

my time tho

tired panther
crimson vapor
#

but like

crimson vapor
#

its Tim

#

so who cares

opal plank
#

thats the thing yall dont get
tim's free time IS SPENT HERE
he's procrastinating

quartz kindle
#

found it

opal plank
#

gib gib

quartz kindle
#

i have some results for md5 hashing

feral aspen
#

πŸ‘€

quartz kindle
#

but im not home rn

crimson vapor
#

my free time is also spent here

opal plank
#

frick

crimson vapor
#

I just have a lot of free time

tired panther
#

my school time is spent here

opal plank
#

spam ping me when you get home then tim

quartz kindle
#

if i remember correctly it was tsmd5

pale vessel
#

ts

quartz kindle
#

one of the fastest

pale vessel
#

πŸ‘€

opal plank
#

it has ts in the name

#

surely its good

quartz kindle
#

but i dont demember

pale vessel
#

based

quartz kindle
#

rhe slowest ones were all those with "fast" or similar in tbe name

#

xD

opal plank
#

advertisingℒ️

quartz kindle
#

stonks

opal plank
#

nobody gave tim nitro on his birthday πŸ‘€

tired panther
tired panther
opal plank
#

well nobody gave me on mine either, so its tied mmulu

#

is this nitro begging? it feels like nitro begging

#

anyway, back to hashing blobs

unreal estuary
#

i already have nitro but gib nitro lol

tired panther
earnest phoenix
#

@opal plank can you toss me a simple query to show gateway events in time-series format?

opal plank
#

hmmm sure

earnest phoenix
#

I'm struggling a teeny tiny bit

opal plank
#

actually

#

thats super easy tho

modest maple
#

Zoro!

opal plank
#

ORDER BY timestamp

quartz kindle
#

why md5 tho

opal plank
#

thats all you need

quartz kindle
#

md5 bad

opal plank
#

cuz i need md5 for urls and sha256 for blobs

tired panther
#

Timisim good critics

quartz kindle
#

overkill

earnest phoenix
#

wait I'm still lost. just show me it lol

opal plank
#

well, my employer told me to do so, so im just doing it

#

Β―_(ツ)_/Β―

quartz kindle
#

ah lul

tired panther
#

What are the alternatives for md5?

quartz kindle
#

google hashing algorithms

#

there are tons

#

for fast hashing, check djb2a, fnv, murmurhash, xxhash, citiyhash, farmhash

opal plank
#

my queries arent too basic tho

#

this one is on the very low end

crimson vapor
#

whats the queries for logs?

opal plank
#

since grafana doesnt support text, i made my own

earnest phoenix
#

dont u have something like this that you can show me?

opal plank
#

this?

earnest phoenix
#

yes

opal plank
#

hmmm

earnest phoenix
#

that ideally should be mad simple but I'm just lost lmao

opal plank
#

not with SQL tho, its all in prom

#

this one is simple

earnest phoenix
#

ah

#

I don't use prom and wont be lol

opal plank
#

overkill tbh

#

hmmmm

earnest phoenix
#

well I do but thats for monitoring thins that aren't very dynamic like servers and dbs

opal plank
#

my only thing i can tell you is to ORDER BY timestamp DESC

earnest phoenix
#

yeah I'll keep trying

#

thanks!

opal plank
#

that will sort it by timestamp

#

though you dont need it

#

as long as you have a time table it should be fine

#

you're using query builder?

earnest phoenix
#

send me the vote log thing you had in DMs

#

no im using sql

opal plank
#

aight

#

sec

earnest phoenix
#

thanks boo

feral aspen
#

Hellooo

opal plank
#

@earnest phoenix 1 sec

misty sigil
#

yo erwin

feral aspen
#

1 / 10 (10%)

How can I show the percentage of two numbers.

opal plank
misty sigil
#

how did you do the server logs on grafana

opal plank
#

SQL raw

earnest phoenix
#

oh thx πŸ€—

opal plank
#

you technically shouldnt be using grafana for this

#

check kibana

#

the queries im using are hella complicated

#

unless you copy paste you wont understand shit

misty sigil
#

lemme see

unreal estuary
#

im so bored dont know what to code

opal plank
#

use elk

#

its meant for logs

#

grafana is more for graphs

#

im the one going out of my way to abuse it

feral aspen
#

How can I do this percentage thing with JavaScript?

misty sigil
#

i'd quite like to abuse it

#

eh i'll abuse it later

earnest phoenix
opal plank
#

its some complicated queries, unles you're comfortable with advanced sql, you wont be able to understand it

misty sigil
#

doesn't stop me from wanting to see it

opal plank
#

well fair, but i need to finish this md5

#

i'll send info later

misty sigil
feral aspen
earnest phoenix
feral aspen
opal plank
#

is that a package that simple does Math.round() with a single digit?

#

added to the list of cursed packages, right below is-thirdteen

earnest phoenix
opal plank
#

YIKES

#

cursed

misty sigil
#

what is is-thirdteen

tired panther
opal plank
#

i get commission for each user i bring mmulu

earnest phoenix
#

hehe xD

opal plank
misty sigil
#

oh no

earnest phoenix
#

lol

misty sigil
#

is it ```js
module.exports = (num) => num == 13;

tired panther
misty sigil
#

Holy fuck

#

the source for that is-thirteen package

green kestrel
#

anyone mind giving feedback on a short video I made to show how to set the webhooks role on my bot and rename it and set it's pfp?
this will eventually be a gif.

misty sigil
#

yea ok

green kestrel
misty sigil
#

turkey

green kestrel
#

it ended up about 30 secs ish, I thought about having captions on it but 25% triviabot users don't speak English

green kestrel
misty sigil
#

its uh in your donwloads

#

or wherever that is

green kestrel
#

that's part of triviabot icon set

misty sigil
#

is it

#

oh cool

tired panther
#

But I unterstood it, even though I already knew it xD

green kestrel
#

theres flags for every country iirc but I used the turkey one in some promo material

tired panther
green kestrel
#

hmm? how do you mean

#

the icons are a creative commons set

tired panther
#

custom avatar for @limber meadowvia

#

bruh sorry adontfeelsoblob

misty sigil
#

@inner dirge

green kestrel
#

oh... no anyone can do it @tired panther

green kestrel
#

if I was using a token and connecting a separate custom websocket per user that would be premium but I'm not going to do that, it's resource suck city

#

I've built a queueing and marshalling system around webhooks with error rate monitoring so it's an advantage to me as well to encourage uptake of the new feature, the fact that people can change the pfp is a bonus

#

it's actually more "expensive" for me to send an image with each message than not

#

anything you'd change in the video?

tired panther
tired panther
#

It uses my resources, when I use a custom WebHook avatar?

dusky lagoon
#

Tadaaa what yah guys think

tired panther
dusky lagoon
#

Ooohw

#

Good idea

queen axle
#

hello guys can you please help me with my music system in my bot? when the bot joins the voice channel it disconnects immediatelly and sends a message saying: Queue has ended. No more music to play

if you know how to help me please tag me with the solution.

opal plank
#

who did you get that from?

queen axle
#

a bot on github @opal plank

modest maple
opal plank
#

ask the author

green kestrel
opal plank
tired panther
earnest phoenix
#

footer: {icon: member.user.displayAvatarURL({ dynamic: true, format: 'png', size: 2048 }),

How do I put the bot icon in the footer?

#

bot.client
?

earnest phoenix
#

yes

summer torrent
#

i don't think it is icon, is it?

dusky lagoon
#

hello guys can you please help me with my music system in my bot? when the bot joins the voice channel it disconnects immediatelly and sends a message saying: Queue has ended. No more music to play

if you know how to help me please tag me with the solution.
@queen axle in what code is it and if you have questions about the code i would request you to send the code so that people can look at it

tired panther
#

client.user.avatarURL()

earnest phoenix
#

Thank you

cinder patio
#

This is pretty pog

earnest phoenix
#

footer uh

#

footer icon url

#

idek

quartz kindle
#

a custom sort function?

cinder patio
#

Bytecode which gets turned to a sort function

tired panther
quartz kindle
#

so like a mini compiler?

#

looks cool

modest maple
#

meanwhile this is my interpreter hell

crimson vapor
#

is that c++?

cinder patio
#

rust

crimson vapor
#

ah

earnest phoenix
#

im rusty in rust

lyric mountain
#

tetanus

earnest phoenix
#

the footer icon url is not working

#

Did I do it right?

lyric mountain
#

two footers?

opal plank
earnest phoenix
summer torrent
tired panther
earnest phoenix
#

roonervous ok

opal plank
#

that py level indentation is driving me nuts, im not even gonna try hiding it

cinder patio
opal plank
summer torrent
earnest phoenix
#

icon_url as in client.user.avatarURL

#

the bot icon into the footer icon

summer torrent
#

yes

earnest phoenix
#

so

#
text: "Text here",
icon_url: "client.user.avatarURL()",
}```
lyric mountain
#

do you know how I know?

quartz kindle
#

distance between planets?

lyric mountain
#

yeah

#

look at those indents

quartz kindle
#

xD

lyric mountain
#

tim yellow

earnest phoenix
#

footer: {text: "The Suite", icon_url: client.user.avatarURL({ dynamic: true, format: 'png', size: 2048 }),
@summer torrent

lyric mountain
#

happy cake day

summer torrent
#

yes

opal plank
quartz kindle
#

solar system is written in whitespace lang

opal plank
#

IMAGINE NOT CODING IN SQL LANG WHERE EVERYTHING IS CAPS LOCKED FOREVER

quartz kindle
opal plank
#

gonna bes honest, i prefer the caps over the indentation

#

not even joking

proven lantern
#

No more big memory usage tim

lyric mountain
#

Imagine Coding In VBasic Or Pascal Where Everything Is Titlecased

umbral zealot
#

SELECT fucks FROM SELF WHERE toGive NOT NULL

ancient thunder
#

are files supposed to appear above embeds

opal plank
#

ImAGine NoT CoDInG IN SponGEbOB CaSE

quartz kindle
#

naice

#

imagine not naming your variables after vodka

#

disapoint

earnest phoenix
cinder patio
#

Even more pog

opal plank
lyric mountain
#

what I read

opal plank
#

'user' referes to self

lyric mountain
#

what I think

#

timotei

opal plank
#

oh my

#

tim is also a loli?

summer torrent
opal plank
#

@quartz kindle so much for taking a piss at me earlier today init bud

quartz kindle
#

lmao not again

opal plank
#

how the turn tables

umbral zealot
proven lantern
opal plank
opal plank
quartz kindle
#

yes

#

u loli

opal plank
#

confurmed

quartz kindle
#

loli weeb tsundere

tired panther
opal plank
#

neko loli

lyric mountain
#

timotei, timoteei, timotii

nocturne dagger
#

Does anyone know how to get a windows host something up on a domain rather then localhost?

quartz kindle
#

xD

cinder patio
#

why do you want a windows host

opal plank
#

now tim is legally obligated to end his debugging sentences with nyaa

quartz kindle
umbral zealot
#

Technically you get a domain on a window machine the same way as a linux machine. you point the domain to it. (or its IP, to be precise)

quartz kindle
#

nyaa

opal plank
#

wsl2 mmulu

nocturne dagger
#

Same as u would with Linux?

opal plank
#

just install visual interface

#

use mstsc

misty sigil
opal plank
#

im not losing my chance

#

im putting that shit on staboard

#

git rekt tim

tired panther
opal plank
#

gottem

misty sigil
#

nyaa

opal plank
#

actually

tired panther
#

never heard blobLUL

misty sigil
#

that’s what he means

quartz kindle
#

lmao

opal plank
#

@nocturne dagger here, watch this

misty sigil
#

Who is ted

pale vessel
#

Ted?

#

like the old mod?

misty sigil
#

oh I just have the short term memory of 0

#

don’t worry

pale vessel
#

o

pale vessel
#

vague question

earnest phoenix
#

Is there a bot for people to enter your server?

opal plank
#

join4join?

proven lantern
opal plank
#

join4join bot spotted

lyric mountain
#

🎰

#

you earned a ban mmulu

earnest phoenix
opal plank
#

OMG

#

WHAT IS THIS

earnest phoenix
opal plank
#

OMG

#

BURN IT

#

bruh

proven lantern
#

it's not a join4join bot thoughj

lyric mountain
#

lul yansim code

opal plank
proven lantern
#

it lets you host a game that people can search for and join

opal plank
#

and no, im not trying to be rude

#

its legit THAT bad

earnest phoenix
#

xd

opal plank
#

first, dont use var

earnest phoenix
opal plank
#

use let/const

lyric mountain
#

listen, there are two types of coders: non-coders, coders and YanDev

#

don't be yandev

cinder patio
proven lantern
opal plank
#

second

earnest phoenix
#

omg pocky_4d_aaaAAAAAA

opal plank
#
if(message.member.hasPermission("KICK_MEMBERS")){
        permissions.push("Kick Members");
    }
 
    if(message.member.hasPermission("BAN_MEMBERS")){
        permissions.push("Ban Members");
    }
 
    if(message.member.hasPermission("ADMINISTRATOR")){
        permissions.push("Administrator");
    }
 
    if(message.member.hasPermission("MANAGE_MESSAGES")){
        permissions.push("Manage Messages");
    }
 
    if(message.member.hasPermission("MANAGE_CHANNELS")){
        permissions.push("Manage Channels");
    }
 
    if(message.member.hasPermission("MENTION_EVERYONE")){
        permissions.push("Mention Everyone");
    }
 
    if(message.member.hasPermission("MANAGE_NICKNAMES")){
        permissions.push("Manage Nicknames");
    }
 
    if(message.member.hasPermission("MANAGE_ROLES")){
        permissions.push("Manage Roles");
    }
 
    if(message.member.hasPermission("MANAGE_WEBHOOKS")){
        permissions.push("Manage Webhooks");
    }
 
    if(message.member.hasPermission("MANAGE_EMOJIS")){
        permissions.push("Manage Emojis");
    }
 
    if(permissions.length == 0){
        permissions.push("No Key Permissions Found");
    }
 
    if(member.user.id == message.guild.ownerID){
        acknowledgements = 'Server Owner';
    }```
this
umbral zealot
#
    var permissions = [];
    var acknowledgements = 'None';
    var permissions = [];
    var acknowledgements = 'None';

Why are those there twice? Thonk

misty sigil
opal plank
#

i already fed you enough code

earnest phoenix
#

I understand like

#

50% of the whole thing that got said here

misty sigil
umbral zealot
#

Actually I'd say array.includes might be a great way to do this

#

maybe?

earnest phoenix
#

Yeah totally, uhm How??

umbral zealot
#

ok hold up

#

you want to check if the member has one of many permissions, right?

#

at least one of them?

earnest phoenix
#

it should list all the perms that the member has

opal plank
#

kek

summer torrent
#

member.permissions.toArray()

umbral zealot
#

why not just... convert the name instead Thonk

earnest phoenix
#

Because I don't know a other way

cinder patio
#

we just told you another way to do it ^-^

umbral zealot
#

Lodash would be great here actually since it has a function for that

summer torrent
earnest phoenix
#

yes but where do I put it do I put anything next to it which line aaa

quartz kindle
#

member.permissions.toArray() does exacty what you want, in 1 line

#

instead of 50

opal plank
#

big boys use raw bitwise

quartz kindle
#

lmao

earnest phoenix
#

just do that in 1 line

opal plank
#

with a for loop

earnest phoenix
#

just

member.permissions.toArray()

cinder patio
#

permissions.toArray(), except that it will give you MANAGE_SERVER instead of Manage Server, like you want it to

earnest phoenix
#

i'm fine with that

#

I'm already happy that it lists

opal plank
#

.replace(/ +/g, ' ');

summer torrent
#

you should check docs before writing code

opal plank
#

close enough

umbral zealot
#

I mean the rest is basically just "make it pretty"

opal plank
#

indeed

earnest phoenix
#

pretty comes later xd

quartz kindle
#

which is still doable in 1 line

umbral zealot
#

member.permissions.toArray().map(_.startCase) with lodash kekface

quartz kindle
#

lul

#

not hard to do without lodash either

earnest phoenix
#

ok but

#

The code worked

lyric mountain
#

.replace("_", " ").replace("/ [a-Z]/g", "$1".toUpperCase())

earnest phoenix
#

then I added the module.exports part and then it died on me

#

That's how it looked like

#

then I wanted to add the nickname, full name and id

#

and I added module.exports to make it appear in the help command and it said fuck you to me and died

tired panther
#

good story

earnest phoenix
#

ye so

summer torrent
#

nickname is nullable

quartz kindle
#

why module exports tho

earnest phoenix
#

to make it appear in the help command

#

it auto adds when I do that little part in it

opal plank
#
member.permissions.toArray().map((perm) => {
  let arr = perm.split('_');
for(let _arr of arr) {
  _arr = _arr[0].toUpperCase() + _arr.substring(1);
}}
return arr.join(' ')
})

this might work

#

maybe

#

perhaps

#

somewhat

#

ish

#

kinda

#

need to flat() and join tho

quartz kindle
#

ah you mean to add the command to the command list

pale vessel
#

bru

opal plank
#

but you get the gist

earnest phoenix
#

wrong reply

quartz kindle
#

i tjought you meant to add nickname

earnest phoenix
#

but yes to make it appear in the help command list

quartz kindle
#

lul

earnest phoenix
#

oh no xd

misty sigil
earnest phoenix
#

But what is the error that makes my bot to not respond to it

#

It's really obvious he said and then went offline catWhat

quartz kindle
#

well what was the error?

earnest phoenix
#

The error redirected to the event message but he said to ignore the error because the thing that was causing the error was in the userinfo.js file

quartz kindle
#

who said that

#

show the full error

earnest phoenix
#

He told me that it was showing the error because something was wrong in the userinfo.js file and that made the error pop up in the message.js file

#

I also had it with the info command something was wrong and then fixed it and the error didn't show up anymroe

quartz kindle
#

you didnt add an execute function

summer torrent
#

show userinfo.js

earnest phoenix
#

Really obvious he said and then went offline

quartz kindle
#

delete module.exports

earnest phoenix
#

how else will I put the thing in the help command list appear?

quartz kindle
#

youre reassigning module.exports to a new object, which dereferences it from exports

#

youre already using exports

#

module.exports makes all exports invalid

earnest phoenix
#

o

quartz kindle
#

if you edit it

tired panther
#

more structure @earnest phoenix Agree

earnest phoenix
#

let me test this first

#

@quartz kindle ok it works again

#

This will be a kind of stupid question

#

but what does inline do at
.addField "blabla" inline,

solemn latch
#

puts them in a line

lyric mountain
#
INLINE  |  INLINE  |  INLINE
NOT INLINE
NOT INLINE
NOT INLINE
opal plank
#

i cant even begin to imagine how much you have to scroll if you dont use inline

lyric mountain
#

25 fields limit

#

1024 per field

quartz kindle
#

just check it on mobile

lyric mountain
#

\n
\n
\n
\n
\n
\n

quartz kindle
#

happy scrolling

solemn latch
#

chat killer command, just send it once πŸ‘€

pseudo phoenix
#

in my info user command i put manage_messages permission for use the command, thats a correct permission or need other permission

#

??

lyric mountain
#

depends

#

do your command removes user messages or their reactions?

#

if yes, it needs MESSAGE_MANAGE perm

#

else it doesn't

olive roost
#

im using discord.py and there is someone who is abusing my bot and spamming with it. how do i make a command that prevents a menteioned user from using the bot?

pseudo phoenix
#

my command show info of the user what permission is recommend to use

pale vessel
opal plank
#

or just ban them from every server they are in mmulu

#

||im clearly joking, dont||

#

no one laughed, ouch, that hurts

cinder patio
#

😩

zenith terrace
opal plank
#

since i called him out after he called me a loli

zenith terrace
#

shush loli

opal plank
opal plank
#

tim is neko loli too

#

why u not booling him too?

zenith terrace
#

cause neko's are too cute to booli

opal plank
lyric mountain
#

boowi

opal plank
zenith terrace
#

so, loli erwin

zenith terrace
#
const loli = client.users.cache.get('188836645670223872')
loli.booli();```
quartz kindle
#

is that erwin's id?

zenith terrace
#

yes

quartz kindle
#

xD

zenith terrace
#

wanna booli him with me?

quartz kindle
#

yes

zenith terrace
#

pog

#

just call him a loli

quartz kindle
#

prepare for bully

zenith terrace
#

owo

quartz kindle
#

and make it doubly

zenith terrace
#

@opal plank loli

opal plank
# quartz kindle is that erwin's id?
((commandClient.client as ClusterClient).shards
    .map((shard) => [...shard.users.values()])
    .flat() as User[]).find((u) => u.id === '180112943612952577').nyaa({options: {loli: true}, booli: true, amount: -1})```
beat that scrubs
opal plank
#

nou

zenith terrace
#

no w

opal plank
#

you cant pull a reversal on code

zenith terrace
#

I can now

quartz kindle
#

jesus, do you really have to do all that in detritus?

earnest phoenix
#

Bro, just do an epic gamer move

opal plank
#

though you broadcastEval

earnest phoenix
#
global.Loli = Erwin;

Loli.bully();```
zenith terrace
opal plank
quartz kindle
#

not internal sharded

opal plank
#

internal, yeah

#

but normall you'd need to broadcast eval

zenith terrace
#

idk anything bout sharding so I took a guess

opal plank
#

all shards are available via clusterClient

#

so i just do that

quartz kindle
#

well yeah but your coded doesnt have await

#

so its internal sharding

opal plank
#

why would it need to wait?

#

its all in the same thread

zenith terrace
opal plank
#

@slender thistle hilp

zenith terrace
earnest phoenix
#

Sure

zenith terrace
#
const loli = client.users.cache.get('188836645670223872')
loli.goToJail();```
earnest phoenix
#
this.jails.random().put(Loli);```
zenith terrace
#

noice

slender wagon
#

ik it is off topic but happy bday Tim!! Keep the cool on!

opal plank
#

im being boolied

craggy pine
#

peepoPats erwin

opal plank
#

miyuka

zenith terrace
#

you'll be fine

opal plank
#

they booling me

#

with coding

zenith terrace
#

hello Miyuka

opal plank
craggy pine
#

Hai star ❀️

earnest phoenix
#

Wait why we bullying erwin

opal plank
#

exactly

#

lets booli tim

zenith terrace
#

cause he a loli

opal plank
#

tim neko loli cofirmed tho

earnest phoenix
#

@opal plank QKpatpat

zenith terrace
#

NEKO'S TOO CUTE TO BOOLI

craggy pine
#

I'm a loli with a mustache

zenith terrace
opal plank
craggy pine
earnest phoenix
craggy pine
#

Don't question me

opal plank
#

hormones

earnest phoenix
zenith terrace
craggy pine
opal plank
#

@quartz kindle isnt it similar with d.js?

#

but internally?

earnest phoenix
#

Top.gg development, more like general

#

exports.name = 'serverinfo';
exports.execute = (bot, message, args) => {
  const verlvl = {
    0: "None",
    1: "Low",
    2: "Medium",
    3: "(β•―Β°β–‘Β°οΌ‰β•―οΈ΅ ┻━┻",
    4: "(γƒŽΰ² η›Šΰ² )γƒŽε½‘β”»β”β”»"
  }

    let inline = true
    let sicon = message.guild.iconURL;
    let serverembed = new Discord.RichEmbed()
    .setColor("#00ff00")
    .setThumbnail(sicon)
    .setAuthor(message.guild.name)
    .addField("Name", message.guild.name, inline)
    .addField("ID", message.guild.id, inline)
    .addField("Owner", message.guild.owner, inline)
    .addField("Region", message.guild.region, inline)
    .addField("Verification Level", verlvl[message.guild.verificationLevel], inline)
    .addField("Members", `![TS_User](https://cdn.discordapp.com/emojis/819307875121233960.webp?size=128 "TS_User") ${message.guild.memberCount}`, inline)
    .addField("Roles", message.guild.roles.size, inline)
    .addField("Channels", message.guild.channels.size, inline)
    .addField("You Joined", message.member.joinedAt)
    .setFooter(`Created ${message.guild.createdAt}`);

    message.channel.send(serverembed);

    message.delete();
}```
opal plank
#

cuz i mean, i did make it easy to access stuff like that mmulu

earnest phoenix
#

This module doesn't have a name

opal plank
earnest phoenix
#

how do I give it a name so it gets defined

opal plank
#

couldnt be arsed to extend commandClient

earnest phoenix
#

You're exporting different values than just an object

slender thistle
#

Booli loli Erwin with hugs

craggy pine
opal plank
#

OYE

earnest phoenix
#

Pog

opal plank
#

you're suppose to be on my team!

earnest phoenix
opal plank
#

tf shiv

earnest phoenix
#
Loli.bully({ method: 'hugs' })```
#

I added this exports.name = 'serverinfo';
to define the module but it's not defining it

#

The module doesn't have a name

zenith terrace
#

@opal plank help the white name

#

if you do

#

I wont booli

opal plank
#
while(true) {
  global.blockBooli();
}```
earnest phoenix
#

Impossible

earnest phoenix
#

Well export an object and assign values

zenith terrace
#

then get boolied

earnest phoenix
#

CH_UhHmm but how I'm kinda dumb and new to this lol

opal plank
#

wait

#

you can call exports directly?

earnest phoenix
#
module.exports = {
  name: 'bruh',
  execute(...params) {
    // Code
  }
};``` as an example
opal plank
#

i thought you had to declare module before

earnest phoenix
opal plank
#

ontoresting

#

but thats module

#

import for big bois

earnest phoenix
#

The amount of stuff existing in global object is interesting

opal plank
#

i wonder

earnest phoenix
#

Reflect.ownKeys(global)

#

CH_UhHmm I'll see if I can mess with it and kindly bully the bot till it goes online

opal plank
#

bully

craggy pine
#

no bully only huggies

zenith terrace
#

bullying @opal plank noises

opal plank
opal plank
craggy pine
zenith terrace
#

oh no the loli is drunk

earnest phoenix
#
    name: "serverinfo",
    aliases: [],
    category: 'Infos',
    utilisation: '{prefix}serverinfo',
    execute: (client, message, args) => {```
#

Like that?

opal plank
#

that works

zenith terrace
#

loli helping the white name?

opal plank
#

technically

#

you dont need execute: ()

#

you can call it directly

#

execute() =>

earnest phoenix
#

Bulli the loli erwin

#

Can I say that it looks like I did more if I add the extra client, message, args inside the () xd

opal plank
#

wait wot

#

thats not what i meant

#

i mean that semicolon and space is unecessary

#

you keep the stuff inside the parenthesis

earnest phoenix
#

Erwin, what would you like to see in JS/TS in the future?

#

I might implement it pepehmmNoBG

opal plank
#

you using detritus and finally stop being stubborn

#

cmoe join the dark side

earnest phoenix
#

I already have

opal plank
#

reject d.js, come to monke detritus

earnest phoenix
#

Wait, what's detritus

opal plank
#

slash commands but be a fun thing to implement

#

a lib that puts d.js a run for its money

zenith terrace
#
const loli = client.users.cache.get('188836645670223872')
loli.pat();```
earnest phoenix
#

So a better d.js?

zenith terrace
#

@opal plank 13patpar

opal plank
#

better? LMAO

#

its 10 - 0 on d.js

#

i was bragging about it yesterday

#

and the day before

#

....

#

and the day before....

earnest phoenix
#

sus Sounds kinda sus

opal plank
#

well, anyone, here

#

anwya*

#

one sec

earnest phoenix
#

HEH

opal plank
#

thats just the tip of the iceberg

earnest phoenix
#

What do I do instead of discord rich embed

craggy pine
#

Richembeds don't exist anymore or do they

opal plank
#

you can send() directly

#

they dont

#

its MessageEmbed

#

he's reading an outdated guide

craggy pine
#

^

#

Well there's a problem in its self

opal plank
earnest phoenix
#

That's literally everything a discord bot needs packed together in a lib

opal plank
#

been trying to advertise it to get it kicking

#

its an amazing lib

#

custom caching out the gate

#

command handler

earnest phoenix
#

It's a kick-ass lib

opal plank
#

dynamic loader

#

prefixes

#

everything

earnest phoenix
#

Now I want to have a look at the lib instead of bulli'ing the erwin loli

earnest phoenix
#

Not so bot is written in that lib?

opal plank
#

if you truly enjoy it, help them advertising how great out lord and savior is

opal plank
#

it was py, i think its running both now

earnest phoenix
#

Well that lib is literally the best thing i've ever seen, anyway did you see my question?

opal plank
#

i missed it

#

what was it?

earnest phoenix
#

What would you like to see in JS/TS in the future?

#

I might implement it

opal plank
#

hmmm not really sure

solemn latch
#

In the future? Shoot I want to be able to think of something and an ai programs it.

#

Lol

opal plank
#

make a bot that uses some other platform thats not easily accessible, like instagram

#

why? cuz why not

earnest phoenix
opal plank
#

instagram bot

#

actually

#

thats not that bad of an idea

static magnet
#

hiya πŸ‘€

opal plank
#

post notifications when you post intagram pics

#

i might yoink that idea

static magnet
#

etto i have a question ;-;

earnest phoenix
#

Is that supposed to be something in JS/TS programming language itself?

opal plank
#

well yeah, ts

#

its api

#

scraping

#

json

#

requests

#

http

zenith terrace
#

spam

opal plank
#

it all can be done in ts

#

dont expect stuff to be pre made

#

im fairly certain theres no wrapper for instagram

#

you'll have to write your own

solemn latch
#

except command handlers πŸ‘€

earnest phoenix
#

I know, but like a feature that would really helpful in the programming language itself

opal plank
#

use detritus for the discord side

static magnet
#

i used discord.js and I'm still confused on how to mention someone in an embed message, can someone help me plz?

opal plank
#

and instagram you code

static magnet
#

but like

opal plank
zenith terrace
#

loli.poke();

#

@opal plank poke

static magnet
#

where? in description?

earnest phoenix
#

Well imagine if I add whatever you said to the v8 engine itself, as both node and TS extend v8

opal plank
zenith terrace
opal plank
zenith terrace
#

loli.pat();

#

@opal plank pat

opal plank
opal plank
#

types is the major thing about ts if you wanna use language stuff

#

with API calls they are all returned as any

earnest phoenix
#

No no no

opal plank
#

you'll have to cast them

#

good practice

#

then?

earnest phoenix
#

Features you would like to see in the programming language itself in the future, like I want to add stuff to the programming language by contributing to it

opal plank
#

oh

#

hmmm

earnest phoenix
#

That's what i meant

opal plank
#

you could try solve an issue i had a couple hours ago

earnest phoenix
#

What's the issue

#

ok so

earnest phoenix
#

.addField("Status",`${status[member.user.presence.status]}`, true)

#

It's giving as output offline/invisible

#

but the user is online and status is online

#

Did I do something wrong?

opal plank
#

@earnest phoenix

#

you'd be changing core stuff btw

blissful coral
#

When I fetch a guild from the API does the icon return as icon or avatar

#

icon right?

#

@earnest phoenix do you have the presence intent enabled

opal plank
#

you dont need intent to post

#

only to recieve

earnest phoenix
#

It's off

opal plank
#

you dont need it

#

its a post request

earnest phoenix
#

A lot of stuff is returning undefined

#
    .setThumbnail(sicon)
    .setAuthor(message.guild.name)
    .addField("Name", message.guild.name, inline)
    .addField("Server ID", message.guild.id, inline)
    .addField("Owner", message.guild.owner, inline)
    .addField("Region", message.guild.region, inline)
    .addField("Verification Level", verlvl[message.guild.verificationLevel], inline)
    .addField("Members", `![TS_User](https://cdn.discordapp.com/emojis/819307875121233960.webp?size=128 "TS_User") ${message.guild.memberCount}`, inline)
    .addField("Roles", message.guild.roles.size, inline)
    .addField("Channels", message.guild.channels.size, inline)
    .addField("You Joined", message.member.joinedAt)
    .setFooter(`Created ${message.guild.createdAt}`);```
#

Just like here

opal plank
#

cuz you using v11

#

which is deperacted

#

you need to access .cache

earnest phoenix
#

how?

opal plank
#

it seems you used v11 before

#

so check how to update v11 to v12

blissful coral
#

When I fetch a guild from the API does the icon return as icon or avatar

#

Anyone know?

earnest phoenix
blissful coral
#

just gonna check docs actually I am dum

opal plank
#

the lib is

earnest phoenix
#

but I used code from v11 when i'm in v12

blissful coral
#

your lib may be but code isnt

craggy pine
opal plank
#

thats exactly what i sent

earnest phoenix
#

alright

opal plank
#

bug catching is also part of the job

#

there are also some other oddities i know of

earnest phoenix
#

The Type Checker node seems fine to me, i don't see why is that even happening, I'll do some debugging later on

opal plank
#

the whole thing is explained in the screenshot i sent

#

its the union types doing that

blissful coral
#

ah yes very pog

earnest phoenix
blissful coral
#

hi voltrex

earnest phoenix
#

Hey extreme

blissful coral
#

Hey hey

opal plank
#

well, in fairnes, yeah, its a quirk

#

howver

#

the proper way of doing what i was attemping is a simple Object.assign()

#

that would override existing properties

earnest phoenix
#

.addField("Owner", message.guild.owner, inline)
I can't find the v12 version of this

opal plank
#

that.... is... the v12

earnest phoenix
#

but it's showing undefined

opal plank
#

inline is either ture or false btw

earnest phoenix
opal plank
#

not inline

earnest phoenix
#

ok

opal plank
#

here

earnest phoenix
#

o

opal plank
#

you using vsc?

earnest phoenix
#

yes

opal plank
#

perfect

#

learn this and you'll never have another question regarding whats going wrong with code

#

you can stop code real time and see the current value of your variables

earnest phoenix
#

CH_UhHmm so much info in too quick of a time

#

xd

#

thank you

opal plank
#

no problomo

craggy pine
#

coding isn't something that is quick to learn. Just study and practice.

opal plank
#

sneeze

craggy pine
#

bless

opal plank
dreamy trout
#

I'm scared πŸ₯Ά

umbral zealot
dreamy trout
#

no My bot is being reviewed

earnest phoenix
#

${guild.roles.cache.filter

#

what's wrong

#

heh

#

It's guild.roles.cache.filter right

umbral zealot
dusk scarab
#

Anyone here good with databases? So i have this code: https://sourceb.in/BrnKjw8UQf which is for my blacklist and antiswear. I already have it logging all bad words said to a channel, but I also want to make a database for it so that it counts how many times they have sworn or tried to say a bad word in the server. I know how to display it, my issue is that its not updating the database or creating a profile for the user.

dreamy trout
umbral zealot
#

you mean your bot isn't actually written yet?

lyric mountain
#

Github buffet intensifies

dreamy trout
umbral zealot
#

I don't know what that means.

#

"accept your text"?

dreamy trout
#

There's an error

umbral zealot
#

well... maybe we can help, if you need assistance?

proven lantern
umbral zealot
#

Please state the nature of your technological emergency.