#development

1 messages · Page 6 of 1

sharp geyser
#

@carmine magnet you can do smth like this

#

If you want to remain with the updated node fetch

earnest phoenix
#

aight thanks, this did it

carmine magnet
#

hum

#

i will stay with the outdated one

#

and switch to the native fetch when released on lts

sharp geyser
#

All that does it make it so it doesn't transpile to require and wraps it in a function call that will get ran and import your module

earnest phoenix
#

You would have to switch your module resolution and compile module target to nodenext to use ESM in TS

winter pasture
#

Hummm

const usr = { name: "burbur", status: "qt" }
if (usr.status === "qt") {
  console.log("omg qt");
} else {
  console.log("stinky");
}
ancient nova
#

fixed 👍

const burbur = "me"
if (burbur == "qt") {
  console.log("stinky");
} else {
  console.log("omg qt");
}
royal portal
drifting cairn
#

😱

sharp geyser
#

Cause they aren't required

royal portal
#

still

#

it looks better

winter pasture
ancient nova
sharp geyser
#

Inbv he makes a anonymous async func and wonders why his code is broken

winter pasture
earnest phoenix
#

(Not inserting semicolons in your JavaScript code is actually a bad idea, because they're optionally excluded, meaning the interpreter inserts them automatically)

#

And can cause unexpected behaviors

winter pasture
#

Ikik 😭

#

I just like it this way 🙃

sharp geyser
#

Voltrex just cause you said that I'll never use em again

winter pasture
#

Got to save that bundle size (ikik, its a joke)

earnest phoenix
sharp geyser
#

That's fine

#

I'll make a prettier github action that removes semi colons

#

So no matter how hard you try

#

They will be removed

earnest phoenix
#

do you guys know how to change the attachment image size ( not the resolution nor a crop of the image but how large its displayed ) so that it doesn't take up too much embed space?

sharp geyser
#

You'll have to resize attachment itself iirc

#

Before using it that is

sudden geyser
#

What Misty said, though if you're using a host that allows you to set the size (such as Discord's under cdn.discord.com/...?size=...), you could do that.

wheat mesa
#

Keep in mind that (iirc) the size might not upscale all the way to what you give it for discord, it depends on the resolution/quality of the original uploaded image

lyric mountain
#

just build waifu2x on ur vps and get infinite image size

stable eagle
#

you are used to semicolons

wheat mesa
#

Semicolons just stop confusion

winter pasture
wheat mesa
#

Not to mention it’s also a lot of work saved for the person writing the parser 😭

pale torrent
#

*help

earnest phoenix
#

is this supposed to be like this? or am I able to resize the image while keeping the resolution

lyric mountain
#

not really

#

the computer has to "guess" pixels when u resize raster images

#

so you either get loss of detail or jaggedness

earnest phoenix
#

That's mostly how it works, you lose the original resolution since the width and height are the ones that determine the resolution of the image, so you'll at any point lose some detail or "sharpness" of the image

earnest phoenix
lyric mountain
#

not with raster images

#

the closest you'll get to lossless resizing is using waifu2x

#

but u need to build it yourself and it requires an nvidia gpu

earnest phoenix
earnest phoenix
lyric mountain
earnest phoenix
#

this is my case

lyric mountain
#

btw, is that command nsfw-only?

earnest phoenix
#

no

lyric mountain
#

-booru sites are known to return nsfw sometimes

earnest phoenix
#

yeah

lyric mountain
#

even with safe filter

earnest phoenix
#

I filter them

earnest phoenix
wheat widget
#

hi

lyric mountain
#

not as much as u might think

earnest phoenix
#

also, depends what u consider nsfw

earnest phoenix
earnest phoenix
lyric mountain
#

and you think that's enough?

wheat mesa
#

x to doubt that you made a 100% accurate filter for anything nsfw

lyric mountain
#

what if it's missing an important tag?

earnest phoenix
#

yeah, additionally I can scan them for nsfw without the tags

#

second layer

earnest phoenix
#

and third layer I can manually verify them if one of the tags dont match

wheat mesa
#

There’s always a way

sudden geyser
#

you trying to torture yourself or something?

earnest phoenix
#

go try it

#

ima give u 24h

wheat mesa
#

I don’t care about it

earnest phoenix
#

find me one example and compare 6 boorus with the tags then apply nsfw filter on it then talk

wheat mesa
#

I’m saying that no filter is 100% accurate

earnest phoenix
#

You can never really get rid of NSFW content 100%, there are ways to bypass a ton of this stuff

earnest phoenix
wheat mesa
#

So you should probably lock it to nsfw channels

earnest phoenix
#

but whats the point of this discussion now

lyric mountain
earnest phoenix
#

why bring it up

#

everyone knows u can bypass decals on roblox using bypass methods on paint with patterns etc

lyric mountain
#

because it'll cause u legal issues later on

earnest phoenix
wheat mesa
#

It likely won’t cause legal issues but it might cause your bot to be taken down by discord

earnest phoenix
#

ur talking too much

earnest phoenix
#

there are various booru bots VERIFIED by discord, it'd hit them first and yet I havent seen any bot be hit for that reason

wheat mesa
#

lmao

earnest phoenix
#

in fact

#

one of the booru bots that are verified promote content that violate tos

lyric mountain
#

oh smh, why people never accept advices

earnest phoenix
#

but simple to put

#

discord doesnt care

wheat mesa
#

This type of thing is not something you cannot risk when you are managing an application on a service that contains many underage users

earnest phoenix
#

would it make sense if discord doesnt really care at all

#

and even if my bot gets taken down ( which is unlikely ), I can just learn from it and apply more filters. but then again, I haven't seen any incident in years unless it involved stuff like loli

wheat mesa
#

I wouldn’t ever be taking the slightest risk of accidentally shoveling out nsfw content to minors, just saying

#

Regardless of your intentions, it’s a bad idea

earnest phoenix
lyric mountain
#

discord is getting stricter every year, "not caring" might just be luck for those cases

sick agate
#

lying on age exists but it's their issue

wheat mesa
#

We’re saying to lock the command to nsfw channels :p

earnest phoenix
#

make yourself clear

wheat mesa
#

lmao

earnest phoenix
#

they still wont care

lyric mountain
#

why would I?

wheat mesa
#

I think you’re being purposefully ignorant here

earnest phoenix
#

to prove ur point ( I refuse to believe )

lyric mountain
#

I don't need to prove any point

earnest phoenix
lyric mountain
#

actually, I didn't even make a point

wheat mesa
#

The point is that you might give out nsfw content to minors. That is not something you want to fuck with. At all.

earnest phoenix
#

so stop talking about me facing legal issues or letting minors face nsfw

#

when this isnt the case at all

lyric mountain
#

I'm just saying having a potentially nsfw command not locked to nsfw channels might cause you legal issues

earnest phoenix
#

stop bringing up ridiculous examples like this

lyric mountain
#

as it has (and I saw) happened before

earnest phoenix
#

if u wanna brag about how nsfw discord is considered in various places

#

then dont make me start why u or various other people should be banned from top.gg right now considering that minors see NOT SAFE FOR WORK content let alone comments or indicators to adult content

wheat mesa
#

There’s a thing called plausible deniability but when you acknowledge the risks and then refuse to facilitate them, then that becomes a problem

#

What?

#

We’re saying that you should not take a risk because you have the power to control it

earnest phoenix
wheat mesa
#

Lmfao

earnest phoenix
#

the fact that the discord support refuses to cooperate with u says much about them

#

check out BooruBot, verified and in various servers. violates the tos

lyric mountain
#

there's no hope in this case, some people only learn that fire burns when they get a third degree

wheat mesa
lyric mountain
#

so let it be, don't say we havent warned u

wheat mesa
#

We are trying to prevent potential future conflict for you, but if you’re going to be a dick about it and refuse to believe what we’re saying, then by all means go ahead

earnest phoenix
earnest phoenix
#

this was unnecessary

lyric mountain
wheat mesa
#

Have you ever heard "Two wrongs don't make a right" before? Because that's the exact flawed logic you're using right now

wooden ember
earnest phoenix
lyric mountain
#

yes please

earnest phoenix
#

wanna start an argument right here

wooden ember
#

also wtf did i just walk in on

lyric mountain
#

you said we dont have a clue about those two things

#

then show me what clue you have

earnest phoenix
lyric mountain
#

I didn't bring the worst case, I brought THE case

sick agate
#

don't ignore the worst case scenario

lyric mountain
#

there's no better or worst case for exposing to nsfw

earnest phoenix
#

Okay. Fun fact. You can lose your discord account just by clicking an invite link, and you won't have a clue of it.

lyric mountain
#

what about it?

earnest phoenix
#

I feel that this argument is gonna devolve into something way more obscure and weird troll

lyric mountain
#

and btw, discord does actively ban scam link people

#

we used to see a shitton of botALERTAs here

sick agate
#

yup

#

i even made a joke about it

earnest phoenix
#

Another fun fact. Discord doesn't intend to read through your reports, this is common considering how many times I've tried to report the same verified bot over its ToS violation yet got automated responses. It is ridiculous, don't even question this

wooden ember
#

^^^^^

sick agate
#

they don't have the support staff

solemn latch
#

I dont think anyone expects an actual person to read every report

sick agate
#

yup

solemn latch
#

its impossible at the scale of discord

wooden ember
#

no but it would be nice to think that they did

sick agate
#

meh

lyric mountain
wooden ember
#

i mean bots will never be good enough to analise context

sick agate
#

getting not ignored would be nice though

earnest phoenix
#

idiots fall for it

wooden ember
#

lol

#

true

lyric mountain
#

when they see a report with a huge amount of incidences THEN they go reading the reasons

earnest phoenix
winged temple
earnest phoenix
#

one could mass send reports using different proxies and mails, etc

lyric mountain
sick agate
#

🍿

wheat mesa
earnest phoenix
lyric mountain
#

you see, there's an entire topic at university on how data sampling works

winged temple
sick agate
#

it should have been a common knowledge

earnest phoenix
sick agate
earnest phoenix
#

Yo do you guys like js or python more?

#

Js for me

earnest phoenix
winged temple
sick agate
#

ITS A FUCKİNG RISK

lyric mountain
earnest phoenix
sick agate
#

you want to lock it to nsfw channels

lyric mountain
#

there is a think called 🌈 standards 🌈

earnest phoenix
sick agate
wheat mesa
wooden ember
#

bruh this is devolving rapidly

earnest phoenix
#

Let alone talk in here

#

You might be a groomer

lyric mountain
#

discord follow almost the same standards as every other big enterprise

earnest phoenix
#

Mods might be a groomer

wheat mesa
#

Lmfao

winged temple
#

lets be honest, every kid has seen some kind of nsfw voluntarily

wheat mesa
#

This guy

earnest phoenix
#

Don't take the risk!!!!

lyric mountain
#

they collect data and process it for later review

earnest phoenix
#

Hilarious.

#

This argument is going nowhere

wheat mesa
proven escarp
wooden ember
#

sadly

proven escarp
sick agate
#

💀💀💀💀

earnest phoenix
proven escarp
#

pov: you're 8 and looking up "sex" on google, no incognito window, while parents downstairs

sick agate
#

just lock it to nsfw channels to be safe

boreal iron
#

What is the discussion even about?

earnest phoenix
sick agate
#

aight

proven escarp
boreal iron
#

Can’t be android or I would be involved

wheat mesa
sick agate
#

turkey perhaps

winged temple
#

when u tryna go on pornhub but it doesnt show up, and then realize ur parents enabled "safe search" and removed clearing history perms

wooden ember
#

or considder this: dont be a degenerate and have nsfw commands in your bot at all

earnest phoenix
wooden ember
#

ez

wheat mesa
#

My god you're ignorant.

earnest phoenix
#

Gotta love how this went from resizing an image to this DogKek

lyric mountain
proven escarp
#

and it was at this moment, he knew, he fucked up

lyric mountain
#

there's a whole global law regarding that

lyric mountain
#

someone has the name? I forgor

wooden ember
#

quite the tangent

sick agate
wheat mesa
#

This guy is saying that people are "groomers" while actively promoting the idea that it's ok to risk showing nsfw to minors

#

Nice

lyric mountain
#

ah, found it: Children's Internet Protection Act

#

or CIPA

#

other contries have it under a different name

proven escarp
wooden ember
#

dont let children on the internet

solemn latch
#

wth happened

wooden ember
#

no idea

wheat mesa
wooden ember
#

help

solemn latch
#

this is still dev channel

winged temple
#

thank god im no longer a minor as im 16

wooden ember
#

suposed to be

earnest phoenix
wooden ember
#

bruh

solemn latch
#

I think its time to change topics ^_^

wheat mesa
lyric mountain
earnest phoenix
sick agate
winged temple
proven escarp
#

🧢

earnest phoenix
winged temple
#

its literally right next to it

proven escarp
#

fr ong no cap?

earnest phoenix
proven escarp
#

just dont add nsfw to your bot?

wooden ember
#

based

lyric mountain
#

they kinda didn't

#

but are using -booru api (which is infamous to return nsfw even with safe filter)

earnest phoenix
wooden ember
#

just dont use the internet

winged temple
#

why use discord bot to watch porn

earnest phoenix
#

Reddit is better than ph change my mind

winged temple
#

when u got the real stuff 😎

lyric mountain
wooden ember
solemn latch
#

I'm going to start muting angeryBOYE

earnest phoenix
#

Maybe we should just get back to what they were asking help for, this argument isn't gonna go anywhere

dry imp
#

top.gg member try not to make a drama in 1 day challenge

wooden ember
#

big funny

winged temple
#

fr

lyric mountain
proven escarp
winged temple
#

best solution

lyric mountain
#

but well anyway

earnest phoenix
winged temple
#

remove nsfw from bot

wooden ember
#

yes

earnest phoenix
proven escarp
#

i wanna see what it's like

earnest phoenix
#

you should inform yourself about the various laws, legal issues and filters possible nowadays especially as someone who doesn't manage an entire database

proven escarp
#

:)

earnest phoenix
solemn latch
#

-m @earnest phoenix

gilded plankBOT
#

upvote Hulkzz_YT#2935 was successfully muted

earnest phoenix
#

okay I drop this argument now

winged temple
#

was that perm?

boreal iron
#

Finally

winged temple
#

poor dude

solemn latch
#

no

lyric mountain
earnest phoenix
lyric mountain
#

that I do manage entire databases?

earnest phoenix
#

A database full of birthday dates?

#

question why is this still going

earnest phoenix
winged temple
#

@solemn latch

wooden ember
earnest phoenix
dry imp
#

that was fast, which is what she said

proven escarp
#

guys let's restart the dev talk. no more drama

wooden ember
#

k

#

anyway, my original reason coming here was to ask:

is there a way to relog a discord bot without killing the entire script and restarting it?

winged temple
#

yes

wooden ember
#

nice

#

how?

winged temple
#

uhh what do u wanna reload

#

commands? events?

winged temple
#

he means reloading

wooden ember
#

i wanna disconnect from discord and then reconnect

wooden ember
earnest phoenix
dry imp
#

why tho

winged temple
#

lets say if he makes changes to a command

#

instead of having to restart the bot

#

he can reload the commands

#

only

earnest phoenix
#

They don't mean reloading

lyric mountain
#

u don't need to disconnect from discord to reload commands

proven escarp
#

do you use more number 1 or number 2?

import { thing1, thing2, thing3 } from "module"
console.log(thing1);
import AllThings from "module"
console.log(AllThings.thing1);
lyric mountain
#

ah, relogin

earnest phoenix
lyric mountain
#

just close the client

#

and open again

winged temple
earnest phoenix
boreal iron
wooden ember
#

i got commands to reload but my net is shit and vc brakes after a while so i wana relog the bot withough having to end the entile program

wooden ember
earnest phoenix
#

You can just call the <Client>.destroy() method and then call <Client>.login()

boreal iron
#

I don’t think that requires a full relog

earnest phoenix
#

But at the same time, since if you destroy the client, it won't be able to respond back

proven escarp
earnest phoenix
#

Yes

proven escarp
#

never heard of that

lyric mountain
#

there's always a close method on clients

boreal iron
#

Just close all voice connections, unsubscribe the events and reinitiate the bot

winged temple
earnest phoenix
winged temple
#

i think he means reload

wooden ember
winged temple
#

but a tiny language barrier

#

is making confusion

wooden ember
winged temple
#

@wooden ember, making the bot re-login wont update anything

wooden ember
#

i don't need it to

earnest phoenix
wooden ember
#

yeah

winged temple
#

then whats the point of a re-login

#

nvm

earnest phoenix
#

A long-running connection without any reconnects on a slow internet connection can make it unstable

wooden ember
#

cuz once vc gtst disconnected it wont come back and at the moment i have to restart the entire bot

#

to fix it

#

would be nice to just go /reconnect and the bot the relogs

boreal iron
#

You’re sure that’s an issue with the gateway?

earnest phoenix
wooden ember
#

ah cool

lyric mountain
#

you can perhaps make it respond through webhooks

earnest phoenix
#

But doing it through a command dedicated to it can help you restart the connection without you forgetting about that

wooden ember
#

shouldnt be an issue

lyric mountain
#

since they dont require a client at all

#

or u can set a variable to make the bot respond on that channels as soon as it connects

winged temple
#

onReady event might help you with that

#

but with a really shitty method

wooden ember
#

i dont need it its an admin only commands on a small bot

lyric mountain
#

like, pseudocode```
let reconChannel = null;
...
on("ready", => {
if (reconChannel) {
reconChannel.send("Reconnected successfully!");
reconChannel = null;
}
...
})
...
/restart -> reconChannel = message.channel;

winged temple
#

thats what i was thinking

wooden ember
#

will just make it send a message before it kills the connection and will probably be enough

#

ooooo

#

that looks interesting

winged temple
lyric mountain
wooden ember
#

true

winged temple
#

you could store it in a db

#

check if the boolean is true

wooden ember
#

eh not using a db just for that

winged temple
#

if so, onready, say it works

earnest phoenix
#

Or you can set the channel ID of the command that restarted occurred in to an environment variable in the process, and pick it up on ready

wooden ember
#

yeah

earnest phoenix
#

Such as process.env.RECONCHANNEL

#

And reset it after sending the log message

lyric mountain
#

Remember to null it after sending

wooden ember
#

yeah

lyric mountain
#

Ah

boreal iron
#

Instead of over complicating things just run the command which executes a script to kill the app process and restart your app

#

Instead of just a relog

eternal osprey
#

hey how can i find my topgg user id?

#

Is it the same as my discord id?

earnest phoenix
#

Yes

eternal osprey
#

love, voltrex.

earnest phoenix
wooden ember
boreal iron
#

Don’t trust him… as soon as you do that he will place a badly put together bomb

boreal iron
earnest phoenix
#

FakE with their FakE news strikes once again!

wooden ember
#

lol

#

idk I'll try this first

boreal iron
#

Initiating a simple node script killing your process and retorting it

#

tf

#

retorting

#

Thanks auto correct

boreal iron
#

Aye

wooden ember
#

i mean i could just use child_prosses and start another bot instance and kill the existing one

#

dont want to use external means

boreal iron
#

Can the child process even kill its main process?

#

Not even sure

wooden ember
#

no you just run node index.js to boot up a new instance

#

and then prosses.exit

boreal iron
#

Yeah that’s pretty much what I said

wooden ember
#

indeed

boreal iron
#

Which is the cleanest solution?!

#

Isn’t it

wooden ember
#

i like just reloging the connection

#

since its the connection that broke

boreal iron
#

If you don’t initiate a database or reading stuff taking a while to start up you can go with that

#

Sure if it’s just the connection then just do a relog

wooden ember
#

yeah thats basically it

#

i dont have any other issues atm

#

got my commands to reload

#

and my event too

#

now for the entire bot

#

lol

boreal iron
#

Keep the connection limit per day in mind

#

Dunno how often a relog is required

wooden ember
#

bruh whilst testing my bots ive booted it up and shut it off easily over 100 times in on day

boreal iron
wooden ember
#

and i only need this to fix vc stuff

wheat mesa
#

connection limit is 1000 per 24h

boreal iron
#

I remember a lot of people who got banned for 24h already

#

They all must write/edit one character in their code than quickly pressing run to test it

carmine magnet
#

TypeScript is pure genius!

data is an array,
What is the type of i in for(const i in data) {}; according to TS?

A; : a number (going from 0 to data.length - 1 according to what I know)
B; : a string
C; : any
D; : unknown

send your answer below!

lyric mountain
#

Fckin cloudflare with no warning shot

carmine magnet
#

don't be shy and pick an answer!

lyric mountain
#

So option A?

carmine magnet
carmine magnet
lyric mountain
#

A string?

carmine magnet
#

yes

#

no idea why

lyric mountain
#

I mean, in js arrays are just objects with number keys

#

Maybe those numbers are stored as string instead of actual number

carmine magnet
wheat mesa
#

use of, again

#

not a ts problem

#

it's a js thing

carmine magnet
#

but how can I check if i == 0 then

wheat mesa
#

of

carmine magnet
#

of will give me values of the array

lyric mountain
#

Can't u just use an indexed loop?

carmine magnet
#

i can lmao

#

but i typed as string is wierd

lyric mountain
#

U can also use Object.entries() no?

wheat mesa
#

yeah I thought you were trying to get the value

#

why would you use a for of there

#

just use indexed

carmine magnet
#

I need the index and the value

wheat mesa
#

then use a normal for loop

lyric mountain
earnest phoenix
#

And use the of keyword to iterate through the indexes

#

Or you can use a traditional for loop

carmine magnet
#

voltrex is always here to give the reason why

#

but thank you all for your advice

earnest phoenix
#

Am I able to store some sort of string/'key' inside an message embed object that isn't seen in the embed?

carmine magnet
#

would be cool, but infortunately no

earnest phoenix
#

You mean it isn't visible when logging the object or something?

#

nono

#

visible in the embed visual

lyric mountain
#

You can put it inside the footer icon

earnest phoenix
#

the footer is visible to players

lyric mountain
#

Icon

earnest phoenix
#

Nvm

#

ah

carmine magnet
earnest phoenix
#

Yeah I can try that

lyric mountain
#

Surprisingly, yes

#

At least it used to

carmine magnet
#

oh my

earnest phoenix
#

😏

lyric mountain
#

Doesn't error, just sends nothing as the icon

carmine magnet
#

used hmm

#

i'll try that

earnest phoenix
#

same

lyric mountain
#

I used it for music selector before

#

To fit variables inside the message

carmine magnet
#

discord have to add variables to messages

lyric mountain
#

Then again, http://key.value also works if it requires a "valid" url now

carmine magnet
#

at least to command replies

lyric mountain
#

Just remove the http and split by .

#

If u want to go even hackier, use querystring to hold a json encoded in base64

carmine magnet
#

lmao

reef berry
#

How do I make an animated background on my bot page? Use a long description

proven escarp
sharp geyser
#

If top.gg supports keyframes you can use that

lyric mountain
#

It does support css animation

reef berry
#

He said I should go here to help me I think it's okay

proven escarp
#

Maybe you could start with that

reef berry
#

There is no information on this topic on the Internet?

sharp geyser
sharp geyser
proven escarp
sharp geyser
#

Animations on a web page is not a new concept

proven escarp
#

Like a fuck ton of information

#

Enough to make a book

sharp geyser
#

Several books

proven escarp
#

Fill a library

reef berry
#

There is a long way to find this

proven escarp
#

Nope.

#

Look up: "css video background" and there. It works

reef berry
#

Does a long description have a word limit?

lyric mountain
#

Don't think so

proven escarp
sharp geyser
hollow fractal
#

/🚭🌪️

proven escarp
fierce kindle
#

hello friends, how can I check whether someone has voted on top.gg or not?

eternal osprey
#

Where do i get the auth token to connect my server to topgg and check its votes?

lyric mountain
#

auth token?

#

you're the one defining the token

eternal osprey
#

The whole docs is orientated around having a bot deployed onto top.gg not a server

lyric mountain
#

ah wait, u mean the rest api?

#

I though u meant the webhooks

#

it's in its edit page, last item in sidebar

midnight marsh
#

!staff

#

!docs

#

...

solemn latch
#

no commands work here

#

the docs are linked a few messages above

stuck dawn
#

how can i make a translation in and out when the visible property is off in React?

wooden ember
#

works perfectly so as usual thanks for the help guys

#

did try to make it so that if it was in a vc it would reconnect after but somehow that aborts the disconnect and means theres now two instances of the bot running

#

idk how i did that but its fine the way it is

#

also odly the reconnect doent trigger the ready event

vivid fulcrum
#

that effectively doesn't do anything

#

the library is already automatically reconnecting behind the curtains

#

because discord tells you to force a reconnect with a RECONNECT opcode through the gateway

#

to put it in lays terms

#

you're closing an open door and then opening it again just to walk through the door

sharp geyser
sharp geyser
#

Also fun fact loom, you can mix the two in the same import

#

:p

#

import Discord, { Client } from 'discord.js' is perfectly valid which a lot of people probably already know but for those who don't it's possible

boreal iron
#

Seems a bit redundant to import the main class and a sub class

sharp geyser
#

Some packages export the main class by default

#

Like express

boreal iron
#

Since you usually only use the client once to initiate it

sharp geyser
#

But there's a lot of other things you'll want from express when using it so

sharp geyser
#

Not specific to discordjs

boreal iron
#

Yeah just replied to this case okeh

sharp geyser
#

I was highlighting it is possible to do it in one line rather than importing from that same package twice

#

Which is useless

boreal iron
#

Yeah

#

Except if you may have to call the class like 100 times

shut zenith
#

Does Topgg accept mod-logs?

sharp geyser
#

Wdym

sharp geyser
#

Like from your bot?

shut zenith
#

forget it

sharp geyser
#

Mk

proven escarp
shut zenith
#

mk?

sharp geyser
#

Hi loom

proven escarp
sharp saddle
#

Jesus

#

i'll sleep

#

bao

#

bai

zinc dawn
sharp geyser
#

Did you install it

zinc dawn
#

yes

civic scroll
#

reboot

sharp geyser
#

Is it in your package.json

zinc dawn
sharp geyser
#

🤔

#

Show code

#

On how you're requiring it

zinc dawn
sharp geyser
#

So it doesn't seem to be code wise

#

Is that the only package giving you issues?

sharp geyser
#

Try deleting your node modules and running npm i again

zinc dawn
#

supported v16?

sharp geyser
#

It could be it wasn't added to node modules

sharp geyser
#

🤔

zinc dawn
#

yh

#

idk why

#

i have a idea

civic scroll
#

@zinc dawn did the package name shows up in your intellisense btw

sharp geyser
#

I'm still thinking it's not properly being added to node modules

civic scroll
#

delete package-lock.json

zinc dawn
#

ok i try

civic scroll
#

then uninstall and install again

#

make sure you got the right package name tho

zinc dawn
#

🤨

civic scroll
#

man still use discord v12

#

💀

zinc dawn
#

huh

civic scroll
#

you still use discordjs version 12

#

that shit is already deprecated

#

upgrade to discordjs ver 14

#

also it will introduce some breaking changes

zinc dawn
#

Ok am Lost too tired 5:13 equal is already 6 o'clock in the morning .-.

civic scroll
#

refer to migration notes v12->13 and v13->14 for more info

#

go sleep then

#

come back when your mind's clear

ancient nova
#

I'm thinking of integrating buttons to my warn system

wheat mesa
#

but I thought interactions were harder :^)

sharp geyser
#

Let's not go down that path again

civic scroll
boreal iron
#

tf is that syntax highlighting

#

It literally shows all possible colors existing

civic scroll
#

yeah

#

my style

#

yk

#

also this dumb of a hell

boreal iron
#

lol

#

Suppressing always is the best error handling

civic scroll
#
  • monokai dimmed theme
boreal iron
#

Hmm looks a bit better but somehow too bright for me

sharp geyser
#

I'm not even going to ask

boreal iron
#

My notepad skin is just called black

#

Less creative name but nice theme

sharp geyser
#

you have a theme for your notepad

pine nova
#

💀

boreal iron
#

Yes it has themes!!1!

#

that’s all of its features but still

sharp geyser
#

You don't use notepad do ya

#

To actively code?

boreal iron
#

I’m only using npp

#

For … idk more than 10y now

#

Probably even way longer

#

Tried some other editors like Atom and other stuff when it popped up but I don’t like anything of that

#

I like the very simple and minimalistic UI and the fact it let me code like I want

ancient nova
#

learned a lil

sharp geyser
ancient nova
#

finally someone using intelisense instead of copilot

boreal iron
#

I never had it before so I can’t miss it

#

I mean there’s some sort of autocomplete for vars and functions I used in the same file but that’s it

#

Like I said before I literally type any char of my code myself

#

Which probably means all takes longer than it would need to but.. who cares

ancient nova
#

depending on what kind of u install tho

boreal iron
#

Yeah like I said some sort of autocomplete is available but only per file not in an entire project

sharp geyser
#

Never heard of intellisense auto completing more than just what you're typing

pine nova
hard wraith
#

Visual Studio and Visual Studio Code… love em. And the plug-ins you can get for VS Code… Devine.

boreal iron
#

Nah…

#

You usually stick to what you feel comfortable with

civic scroll
hard wraith
#

Oh for Java and python ye… but I can use Vs and vsc for those if needed

civic scroll
#

uhhh

#

i use IntelliJ for kotlin

#

VS for C# .NET

#

Clion for C/C++

#

WS for web

#

then VSC as backup web + other languages

hard wraith
#

VS and VSC are very versatile as you can get almost all the languages you need as workloads for VS and then VSC obviously is just a lightweight code editor with extensions that can work with every language 😂

civic scroll
#

same thing for Jetbrains IDEs

#

despite the plugins i feel dedicated IDEs are better in terms of performance and functionality

#

since they are dedicated to that specific type of workflow

hard wraith
#

100%

civic scroll
#

one example is an angular project

#

VSC is limited compared to WS

hard wraith
#

But being able to just clone all repos to one folder and opening that folder as a workspace in vsc and being able to work on multiple apps at once… golden.

civic scroll
#

eg template intellisense and refactoring

civic scroll
#

as well

hard wraith
civic scroll
#

same thing

#

in that case IntelliJ IDEA fits

#

i'm stuck with 1011 bs syntax error in VS on my typescript project 💀

hard wraith
civic scroll
#

alright that's fine

hard wraith
#

Angular I know Cus angular js…

#

The intellisense 😂

civic scroll
#

no

#

angular as in angular v13/14

hard wraith
#

I just use my little ai helper and debugging tools

#

Ohhh… yeah no. I have used angular.js 😂

civic scroll
#

that's angular version 1

#

i'm using version 14

#

💀

#

but in other words vsc angular plugins sometimes loses intellisense in html templates

#

and that was kinda annoying to write

hard wraith
#

Yeah I bet…

civic scroll
#

it is

#

i don't wanna change windows

#

especially when there's alot of code

pine nova
earnest phoenix
#

omfg

#

why does discord make images in embeds larger on discord if they exceed 100 x 100 in height and width

pine nova
earnest phoenix
#

I literally can't adjust the size of an image without suffering from resolution loss, has discord nothing implemented for scaling images by size?

#

that's dumb as fuck

civic scroll
pine nova
#

i see

#

webstorm lags on my laptop

#

😔

#

so i deleted it

civic scroll
#

@lyric mountain i'm tempted to convert this into Promise<NullableJSONObject>

earnest phoenix
pine nova
#

kekw

earnest phoenix
civic scroll
earnest phoenix
#

why are the embeds this long on windows 10 client

#

same with my web

#

on mobile the embeds are lots shorter

#

I think it's because of the thumbnail as without the thumbnail the embed would be much shorter

#

but between embed and text there is so much unnecessary space

small tangle
#

embed width is a current discord bug i guess

earnest phoenix
#

I remember this wasn't a bug until the snowflake ID issue few days ago

small tangle
#

idk if its actually confirmed

zinc dawn
#

MongoParseError: Value for compressors must be at least one of: snappy, zlib any know fix?

#

i have normal 127.0.0.1 connection string in my root sevrer

sick agate
#

it explains

hard wraith
#

You know what… I love making GDPR compliance code… like a bot command that lets a user get their data in an embed to their DM… and a link to delete all their data from the system if they want to do so… like I thought it would be harder to do, only thing it did was tell me I need to restructure my database.

lyric mountain
civic scroll
#

no

#

it only meant as a pure-JSON object

lyric mountain
#

whats the diff?

civic scroll
#

i have to type them somehow yknow

#

can't just let them be unknown

lyric mountain
civic scroll
#

actually Object has some built-in functions

#

and i don't want intellisense to include them in

#

since this is object with only key-value pairs

#

either nested string | number - string | number | null | boolean

#

no abitrary

lyric mountain
#

how tf u managed to create something that doesn't extend object?

civic scroll
civic scroll
#

oh wait nvm

#

i'm dumb

digital swan
#

are these fat embeds here to stay cus its been a couple days now i swear

frigid robin
#

Hey all, I recently migrated to a MySQL database and probably did some stuff wrong along the way. It seems that some messages that include emojis produce an error (either when I insert or select them in the DB): (1267, "Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='").
I believe the specific query that fails is SELECT reply FROM guildmessages WHERE message = %s AND guildid = %s.
I made sure all the columns in the tables are utfmb4. Also attaching the result of the command SHOW VARIABLES WHERE Variable_name LIKE ("character%") OR Variable_name LIKE ("Collation%"); if that helps.
Any idea what else I can do?

lyric mountain
#

is mysql a must?

#

like, if ur doing a migration you could go postgres instead, mysql is way too buggy

#

and there's that collation thing

frigid robin
#

Well if you remember me I was previously using SQLite 😅
I moved to MySQL because it was free and provided the logic I needed (fuzzy searching)

#

already comes with my PythonAnywhere sub

hard wraith
#

Anyone see anything wrong with this code?

lyric mountain
#

one being for fuzzy search

frigid robin
#

oh well PA wanted to charge more for hosting it, but I'll remember that for the future. I did just move to MySQL so I'd rather just fix that emoji crap thing 😦

lyric mountain
#

really? that sucks

hard wraith
#

None lol

lyric mountain
#

but oh well, regarding the emoji thing, you cannot have VARCHAR(255) on mysql

#

you need to use VARCHAR(191)

hard wraith
#

I have full error reporting and its showing nothing, but the stripe dash doesn't show the default payment method.

lyric mountain
#

anything higher and it refuses to save text with emoji, and has a high risk of corrupting already existing data with emoji

lyric mountain
#

nope

#

that's a well known bug on mysql when u use utf8mb4 and try to save emojis

frigid robin
#

wtf

hard wraith
frigid robin
#

will it be enough to store a max length Discord message though?

lyric mountain
# hard wraith

u "can" have VARCHAR(255) columns, you just won't be able to save anything with an emoji

hard wraith
lyric mountain
hard wraith
#

Well no, a max length discord message can be 2000 characters

lyric mountain
#

which in mysql, is WAY slower than varchar

hard wraith
#

(nitro)

frigid robin
#

Initially I wanted to use TEXT but couldn't because they cannot be indexes

#

so I could not use SOUNDEX on them IIRC

hard wraith
#

You want to index off a discord message?

#

Are you feeling ok?

frigid robin
#

or I couldn't have another index in the same table, can't remember

#

there was some limitation with it

lyric mountain
frigid robin
#

oh yeah I had to store 2 TEXT ones

hard wraith
#

Where is the table in question?

lyric mountain
#

any column that'll make use of sorting can and must be indexes

#

it makes sorted selects a hella faster

hard wraith
frigid robin
#

yep

lyric mountain
#

the reason TEXT cant be an index in mysql is because it's technically not a text

#

it's a LOB type

#

it's saved as binary

hard wraith
#

can you show your full table structure?

frigid robin
hard wraith
#

Or paste the SQL to make the table.

lyric mountain
#

anything higher than VARCHAR(191) will error with emojis

hard wraith
#

What other index do you need other than your primary key on ID?

frigid robin
#

probably none, I probably misunderstood that I had to use an index for something

#

oh yeah

#

maybe for foreign key or somethign

hard wraith
#

you dont technically need that...

#

you can do what a foreign key does using your code...

lyric mountain
#

index is just for telling your database that column will be sorted

frigid robin
#

I think it said that I had to make it a FULLTEXT index

hard wraith
#

I haven't spent the time needed to apply foreign keys creating a relational database, but my code links all tables together by discordID

#

or for payment base items... stripeCustomerID

#

set the message to text and don't index it and you should be fine... You don't need to sort the table by messages do you?

frigid robin
#

nope

hard wraith
#

My bot is being tested rn.

lyric mountain
#

then just go with TEXT

#

just remember it'll be slow for fuzzy tho

hard wraith
#

Im working on the database it uses and it just got a new entry lol

frigid robin
#

alright then, I will try to convert that into TEXT soon and will update you guys if I hit any problems again

#

worst case I'll get my Raspberry PI back running and run postgres on it @lyric mountain 😄

#

I just finished converting all my SQL queries and code to work with MySQL so it's a pain in the arse

lyric mountain
#

lmao I still think it's a dick move to charge more for postgres

#

like wtf

hard wraith
#

I forgot to put that to enable welcomer you need to use the enable-welcome option (non-required) in the top.gg page... oops.

frigid robin
lyric mountain
hard wraith
#

Ye

lyric mountain
#

damn not even MariaDB

frigid robin
#

XD

hard wraith
#

100% I added all the planned permission requirements that are coming up in the Kanban and its... basically all of them lol

lyric mountain
#

which is mysql but better

frigid robin
#

maybe it's on purpose

#

I appreciate your help thanks

lyric mountain
#

yw

#

oh just to be safe, convert all ur columns to 191 or less

hard wraith
#

Odd, it didn't provide a response for the commands...

lyric mountain
#

mysql really doesn't like 255 with utf8mb4

hard wraith
#

omfg I have a typo in the commands!

lyric mountain
#

careful changing your bot now

hard wraith
lyric mountain
#

if it's being reviewed, that is

hard wraith
#

hmm wonder why it didnt respond... And it just got declined.

lyric mountain
hard wraith
#

I did those commands at 4 am at 48h awake lol

lyric mountain
#

did u test with 0 perms?

hard wraith
#

Yup.

#

Yes.

#

I think I made a typo on the "cannot perform" response.

lyric mountain
#

what ide ur using?

hard wraith
#

vscode...

#

its showing error based on eslint

boreal iron
#

Yeah typos are annoying that’s why you test every feature multiple times

hard wraith
lyric mountain
#

welp, that's why we said that about ur current team organization

#

there has to be a versioning standard

civic scroll
#

well

lyric mountain
#

like, don't push to production without review, no code accumulating without commit, weekly code review, task designation, etc etc

civic scroll
#

if you use typescript

lyric mountain
#

never let 2 people work on the same thing at the same time

civic scroll
#

that wouldn't be the case

civic scroll
#

no team projects?

lyric mountain
#

I said the same thing, not same project

#

like 2 people working on the ban command

#

that's prone to tail-chasing

civic scroll
#

if the design is agreed beforehand

#

then it's possible

#

man forgor about communication

lyric mountain
#

the top 1 priority is going to github and disabling push to master

civic scroll
#

also he should've added test workflow before even commiting

#

like "try compiling this code"

#

if it's typescript

lyric mountain
#

set the box "pull requests require review" or something

civic scroll
#

then it would probably pop TS2304: Could not find name 'interacton'. at... -> error exit code 1

#

thus preventing it from commit

lyric mountain
#

without reviewing what was changed

civic scroll
#

gh actions run before commit

lyric mountain
#

if u enable forced review on github this gets kinda fixed

#

they probably don't have gh actions

civic scroll
#

solution: just use a typed language

#

typos are stupid which is why we need typed langs or something that can detect em

lyric mountain
#

install intellij in ur vps and use remote multiplayer coding mmLol

civic scroll
#

oh wait

#

"code with me"

lyric mountain
#

ye

civic scroll
#

java user

lyric mountain
#

clearly the chad language

civic scroll
#

i'm disagreeing with rider

lyric mountain
#

is rider out of early release?

civic scroll
lyric mountain
civic scroll
lyric mountain
#

pro gamer move

#

(jk)

civic scroll
#

if you do i will write kotlin in it

hard wraith
lyric mountain
#

disable push to master

civic scroll
hard wraith
#

im adding a linter check onto the merge check list

#

rn its failing because of this

lyric mountain
#

create a gh action to build

#

u get notified if it fails

#

and disable push to master

#

I can't highlight this enough

hard wraith
#

I have azure devops lol

near stratus
hard wraith
#

yeah cant really do much about that...

#

Oh and this is when date-fns is installed...

lyric mountain
hard wraith
#

They dont push...

lyric mountain
#

who approved the pr then?

hard wraith
#

They are doing vote approve..

#

If over half the team approves it, it merges

lyric mountain
#

automatically?

hard wraith
#

yeah

lyric mountain
#

disable that

#

make it so regardless of vote, YOU need to confirm it

hard wraith
#

after 12h if the votes are over half the team, merge approved and executed.

#

Don't worry I implemented this before you mentionned it. I am justt now worrying about the new errors.

lyric mountain
#

well, you'll need to go sifting through the errors

hard wraith
#

Oh i did... Its a node module breaking...

civic scroll
#

add a linter check regardless of voting

hard wraith
#

and if I remove it, the module I use to get payment information from my payment provider breaks lol.

civic scroll
#

i can't believe low-quality checks

#

plus migrate to typescript