#development

1 messages · Page 1704 of 1

placid meadow
#

In mathematics, the term modulo ("with respect to a modulus of", the Latin ablative of modulus which itself means "a small measure") is often used to assert that two distinct mathematical objects can be regarded as equivalent—if their difference is accounted for by an additional factor. It was initially introduced into mathematics in the context...

#

its what fits in that series, then thats the modulo

#

ever done division tree's in school ?

#

with the / and \

eternal osprey
placid meadow
#

well wasnt there a remainder on the right, u had to go on recursivly

#

at least thats how it was explained to me 😛 im not math wizzard myself

#

if i dont know something, i go google it

placid meadow
#

do i say this right, @lament rock ?

#

not sure

median rain
#
from . import errors
from .http import HTTPClient

it says package not found and I tried installing dbl and it still doesnt work

feral perch
#

anyone here uses soundcloup api?

placid meadow
#

whi means what ?

lament rock
#

what

#

Thank god for Function.call

#

static class members would be a pain in my ass without it

cinder patio
#

why

lament rock
#

I'm reimplementing Discord.js' classes and interfaces to act as a layer between user facing code and lower level libraries such as Snowtransfer while retaining a rest only aspect (otherwise, I'd just go back to Discord.js)

When it came down to reimplementing PermissionOverwrites and by extension, Permissions and BitFields, BitField.resolve is a static member which makes use of static BitField.FLAGS I didn't copy the design 100% and ran into issues where it wouldn't reference the extension classes' static member FLAGS and didn't fancy adding more param to resolve

unreal estuary
#

guys c# is cool so we should learn it okeh

vivid fulcrum
#

exactly

pale vessel
#

this is true

#

But It comes With A Cost

cinder patio
#

I see

pale vessel
#

You see sharp, ey?

vivid fulcrum
#

but seriously, c# is so powerful, it's really good at everything but the UI department

#

building UI apps with c# sucks ass

lament rock
#

xml based ui

unreal estuary
#

but since c# is cool i might choose it

cinder patio
#

C# is very different from C and C++

lament rock
#

C# is similar in design to Java

#

which Java is easy to get into

vivid fulcrum
#

in terms of popularity in companies, you're better off doing c#
a lot of companies are hiring asp.net devs

unreal estuary
#

ok

vivid fulcrum
#

there's also unity but unity c# is almost nothing like actual c#

unreal estuary
#

yeah ive never used unity b4

cinder patio
#

I've only used C# with Unity

#

Doesn't Unity use .NET?

unreal estuary
#

ok im pretty sure i need to install visual studio for c# apps?

cinder patio
#

yeah

unreal estuary
cinder patio
#

well... that is if you want to use .NET

unreal estuary
#

well c# is built on the .net framework or whatever lol so yeah

cinder patio
#

there are other IDEs

unreal estuary
#

is visual studio not good?

vivid fulcrum
#

c# is .net core, now .net

#

entirely rewritten .net technology

#

so it can run crossplatform

#

the naming is confusing

#

c# used to be .net framework only, then .net core came in that was a whole ass rewrite that allowed c# to run cross platform

then .net core rebranded to just .net

#

and .net framework is deprecated

vivid fulcrum
#

use rider

unreal estuary
#

ok

#

i downloaded it

lyric mountain
#

visual studio is an elephant

cinder patio
#

Rider is paid 😢

lyric mountain
#

big, fat, slow and clunky

unreal estuary
#

its paid

#

30 day free trial uhhh

lyric mountain
#

depending on WHAT you're doing, you can request a free license for jetbrains stuff

unreal estuary
#

what am i doing hmmm

vivid fulcrum
#

if youre a student you can get rider for free

unreal estuary
lyric mountain
#

also if you're an OS dev

vivid fulcrum
unreal estuary
#

thx

vivid fulcrum
#

keep in mind that you need to have a school email for this

idle ridge
#

?vote

lyric mountain
#

wrong server and channel

eternal osprey
#

hey

lyric mountain
#

arnold

eternal osprey
#

I am trying to delete this embed in discordjs, how would i do that?

#

I have been looking around but couldn't really find anything

lyric mountain
#

edit the message and set an empty embed list

eternal osprey
lyric mountain
#

yes

#

oh and define the message as "\u200B"

#

else it'll error saying "cannot send empty message"

#

that unicode is for VOID character btw

pale vessel
#

why not just delete the message

unreal estuary
eternal osprey
lyric mountain
#

yeah, deleting the message would be better

eternal osprey
#

hahah yeah, i love the alternative but i rather stick to the basic solving.

#

So how should I delete? Just like a normal message?

lyric mountain
#

yes

eternal osprey
#

so message.delete()

lyric mountain
#

embeds are just fancy parsed jsons

#

yes

eternal osprey
#

sounds lovely, thank you!

#

okay hold on a second, my embed is called Embedz

#

can't we use Embedz.delete();

lyric mountain
#

CamelCase 😩

lament rock
#

tfw your app is built in react native superfunnycat

rich prism
#

hey

lyric mountain
eternal osprey
#

owh

rich prism
#

is botify down ?

lyric mountain
#

we dont know

#

ask in its support server

eternal osprey
#

but i already have the variable name of the embed, so how should i delete that exact embed

#

as only 1 is being sent

rich prism
#

okay

lyric mountain
#

you cant

eternal osprey
#

owh okay, my bad

lyric mountain
#

you either delete the message or edit it to remove the embed

lament rock
#

I thought embeds persist after edit, unless they're nullable

eternal osprey
#
 // command: !queue stop
  if (command === 'stop') {
    const randomItem = usersInQueue[Math.floor(Math.random()*usersInQueue.length)]
    console.log(randomItem.username)
      message.channel.send(`${randomItem.username}, we are about to begin the match! You have been pinged as party leader!`)
      message.channel.messages.fetch(queueMessageId).then(queueMessage => {
        message.delete(1000);
      })
  }```okay i've got this so far, but this is the error: Supplied options is not an object.
pale vessel
#

they are undefinedable drakeyes

lament rock
pale vessel
#

needs to be an object with the timeout property

eternal osprey
#

sorry for the bothering guys.

lament rock
#

not exactly a solution to your issue, but may be a solution to future issues;
Use VSCode and turn on CheckJS in VSCode settings

eternal osprey
pale vessel
#

also, use TS :))

lament rock
#

:)

pale vessel
#

I love transport stream myself

lament rock
#

Very type safe

eternal osprey
#

how would i perform an action that is the same as clicking the 'reload button' in vsc?

lament rock
#

control + shift + p
reload window

eternal osprey
#

yeah, but like, code-wise.

lament rock
#

There is no way afaik

lyric mountain
#

afaik that button simply shutdown and rerun the code

umbral zealot
#

try process.exit() but you shouldn't be building a workflow around a feature of your code editor.

eternal osprey
#

isn't there something named process.exit();?

umbral zealot
#

I think process.exit will probably just do the same as the Stop button though

pale vessel
#

Where is the intellisense for my eval command 😭

lament rock
lyric mountain
#

pov: you grew addicted to ctrl + space

umbral zealot
#

pov: you think you should run your bot inside your editor

pale vessel
#

Yes, start a code-server on your VPS and run your bot there

lament rock
#

tfw you accidentally add a break point

#

why bot not respond?!?!1

brittle hamlet
#

Is there any way by which I can get the invite of the servers in which my bot is there in discord.js??

eternal osprey
brittle hamlet
umbral zealot
#

Yeah you shouldn't be creating invites to servers unless it's been requested by the owner

lyric mountain
astral zenith
#

but maybe you should send something like a message

umbral zealot
#

When a bot owner shows up in a server uninvited you can bet your ass they get banned and their bot yeeted to oblivion

astral zenith
#

and if they react

#

it can send invite

brittle hamlet
#

Ok I was just curious as to in which type of server my bot was in but thank you for responding

umbral zealot
#

yeah doesn't matter, I can tell - bot creates an invite, user joins immediately, that's the owner.

astral zenith
#

and also don't create invites

#

fetch

#

some

astral zenith
pale vessel
#

Just don't

brittle hamlet
#

Ok I wont thanks

umbral zealot
#

I wouldn't really do that at all.

astral zenith
#

Yep, you better don't.

cinder patio
#

Yeeting any bot which requests admin perms should become a common practice

astral zenith
pale vessel
#

No such command do

eternal osprey
#

Maybe it's a private group or something.

astral zenith
brittle hamlet
astral zenith
#

That do.

lyric mountain
cinder patio
#

The administrator permission is the same as having all other permissions

astral zenith
#

It is

umbral zealot
#

It's a lazy-ass shortcut though

astral zenith
#

saving alot of trouble

astral zenith
pale vessel
#

So no command REQUIRES it

cinder patio
#

so no, there isn't a command which requires the administrator perm

lyric mountain
astral zenith
#

nope saving

#

I've got a command that requires almost all perms

lyric mountain
#

you might be mistaken, are you sure that ain't your spelling check changing the word?

astral zenith
#

if I just asked for admin

#

It would have been way easier

lyric mountain
#

admin is there for 1 reason

#

debugging

cinder patio
#

What does the command do that it needs almost all permissions

astral zenith
#

;-;

cinder patio
#

Does it kick, ban and mute every member, does it delete every message and then every channel, does it delete all roles, too? Something like a nuke command, perhaps

astral zenith
#

I mean perms like guild manage, manage roles, manage channels,

#

basically it

#

lol

umbral zealot
#

literally don't be lazy, go check the right boxes in the perm calculator 😛

cinder patio
#

sure not ALL but most of them... my point was, no command needs all permissions... so stop saying that it's okay to request the admin perm

#

Pick out the permissions your bot might need

astral zenith
#

Who said I didn't pick them

lyric mountain
#

actually, if your command requires more than 5 permissions you should review your code

thick nexus
#

lol

pale vessel
#

Some bots do that, like Chip (permission 8 in invite) and the reason they did that is because it's easier for an average joe to setup the bot with no issue with permissions. Even if you don't want to give it administrator, you can invite it with zero permissions but still, none of the commands require administrator permission

cinder patio
#

screw Joe

crimson vapor
#

thats what I do

lyric mountain
#

with admin perm, you trade safety for simplicity

cinder patio
#

All the boxes are ticked automatically though

#

like what

lyric mountain
#

fun fact, you can hear a boss music if a bot you gave admin perms get token-leaked

thick nexus
#

How i get a list of all member ids in servers my bot is in
cuz rn i have:

 allmembers = []
  for guild in client.guilds:
    for member in guild.members:
      id = member.id
      allmembers.append(id)

But it only gives me a list but every item is my bot's id

pale vessel
lyric mountain
#

oh, yeah

crimson vapor
astral zenith
#

Yeh, I have a command that requires the person who executes it to have admin

lyric mountain
#

imagine a turkish boss music

cinder patio
#

what does it do

crimson vapor
#

yeah what command requires admin?

lyric mountain
#

the BOT can't require admin

astral zenith
#

oh

crimson vapor
#

iirc for dbl you can't require admin

#

"NO command requires admin permissions"

#

or something

pale vessel
#

You can, just not for commands

#

Invite URL should be fine

lyric mountain
#

they should change that rule to "NO command must require admin permissions FOR THE BOT"

crimson vapor
#

you can't force the bot to need admin tho

#

you can only suggest it

#

forcing it would get you denied

earnest phoenix
#

-bots

gilded plankBOT
astral zenith
#

Oh, damn I actually have a command that requires admin for the bot

crimson vapor
astral zenith
#

Gotta fix it

pale vessel
#

.gonnafixit

thick nexus
#

-bots

gilded plankBOT
astral zenith
thick nexus
#

o

astral zenith
#

just made it my own way so it requires like 6 perms

crimson vapor
#

realistically the only commands that require admin should be an owner only command

astral zenith
#

I guess I am not using shortcuts :/

#

lol

crimson vapor
#

huh

astral zenith
#

sigh back to work

astral zenith
crimson vapor
#

ok

lyric mountain
astral zenith
#
    "CREATE_INSTANT_INVITE",
    "KICK_MEMBERS",
    "BAN_MEMBERS",
    "ADMINISTRATOR",
    "MANAGE_CHANNELS",
    "MANAGE_GUILD",
    "ADD_REACTIONS",
    "VIEW_AUDIT_LOG",
    "PRIORITY_SPEAKER",
    "STREAM",
    "VIEW_CHANNEL",
    "SEND_MESSAGES",
    "SEND_TTS_MESSAGES",
    "MANAGE_MESSAGES",
    "EMBED_LINKS",
    "ATTACH_FILES",
    "READ_MESSAGE_HISTORY",
    "MENTION_EVERYONE",
    "USE_EXTERNAL_EMOJIS",
    "VIEW_GUILD_INSIGHTS",
    "CONNECT",
    "SPEAK",
    "MUTE_MEMBERS",
    "DEAFEN_MEMBERS",
    "MOVE_MEMBERS",
    "USE_VAD",
    "CHANGE_NICKNAME",
    "MANAGE_NICKNAMES",
    "MANAGE_ROLES",
    "MANAGE_WEBHOOKS",
    "MANAGE_EMOJIS",
``` ez fix
#

lol

lyric mountain
#

it's like, SEND_MESSAGE and EMBED_LINKS (if you go fancy)

pale vessel
#

and probably manage channels? Not really familiar with ticket bots

astral zenith
#

nope

near stratus
lyric mountain
#

why?

#

like, just assign the bot to a channel

near stratus
astral zenith
#

MANAGE_ROLES, MANAGE_CHANNELS, MANAGE_GUILD, MANAGE_GUILD, MANAGE_MESSAGES, USE_EXTERNAL_EMOJIS

pale vessel
#

Imagine that with a big bot

astral zenith
#

for ticket command

lyric mountain
#

exactly

#

why manage_guild?

pale vessel
#

Does discord have a channel limit

earnest phoenix
#

Why do you need manage guild for a ticket bot

umbral zealot
#

why manage_guild twice? lol

vivid fulcrum
pale vessel
#

Ah

#

What about roles?

astral zenith
#

lol

vivid fulcrum
lyric mountain
astral zenith
#

only 500k

#

?

lyric mountain
#

500k members

crimson vapor
#

discord limitations

near stratus
#
[
    "MANAGE_CHANNELS",
    "VIEW_CHANNEL",
    "SEND_MESSAGES",
    "SEND_TTS_MESSAGES",
    "MANAGE_MESSAGES",
    "EMBED_LINKS",
    "READ_MESSAGE_HISTORY",
    "USE_EXTERNAL_EMOJIS"
]

This should be all

crimson vapor
#

you can increase it

pale vessel
#

TTS messages? Why

lyric mountain
#

why view_channel?

vivid fulcrum
#

doesn't discord start capping out at a million

crimson vapor
umbral zealot
#

you don't even need mesage history

astral zenith
#

lol

umbral zealot
#

seriously what are all these weird-ass perm requirements

lyric mountain
#

if it was you who create the channel you automatically have view perms

opal plank
#

i actually would like to create 500 category channels and see how long it would take to scroll down

near stratus
astral zenith
#

reactions is for closing tickets

opal plank
#

too lazy

astral zenith
#

and stuff

near stratus
#

like a .txt or csv

opal plank
#

otherwise i would

lyric mountain
#

so you're saying to keep the channels even after the ticket is closed?

crimson vapor
#

what the fuck why do you have a new pfp @opal plank

#

go back to the hentai one

opal plank
#

what you on about? its still ME!ME!ME!

earnest phoenix
astral zenith
near stratus
crimson vapor
opal plank
#

looks like a discord bug to me

#

looks fine on my end

crimson vapor
#

proof?

opal plank
crimson vapor
#

no proof ig

near stratus
opal plank
#

proof its not photoshoped

lyric mountain
#
[
    (niche) "MANAGE_CHANNELS",
    "SEND_MESSAGES",
    "MANAGE_MESSAGES",
    "EMBED_LINKS"
]
astral zenith
lyric mountain
#

you rarely need more perms than that for a ticket command

crimson vapor
opal plank
#

clearly a bug from discord

near stratus
#

@opal plank what happened to your old mei aka zero two dancing ?

astral zenith
#

I guess

opal plank
#

nothing, i still have it

earnest phoenix
lyric mountain
near stratus
earnest phoenix
#

Me!me!me! moment?

astral zenith
lyric mountain
#

what exactly you want for a ticket command?

opal plank
#

people dont know what ME!ME!ME! is

#

cringe

lyric mountain
#

it's a ticket command, not a MasterSystem console for discord

vivid fulcrum
#

yall didn't get traumatized by me!me!me! in middle school and it shows

earnest phoenix
#

@opal plank imagine changing avatar

opal plank
#

dunno what you guys on about

latent heron
#

Imagine flexing commits

opal plank
#

still looks the same for me

vivid fulcrum
#

omg

crimson vapor
opal plank
lyric mountain
opal plank
#

why would you need some many perms tho?

lyric mountain
#

simplicity is the utmost sophistication

vivid fulcrum
opal plank
#

ADD_REACTIONS, SEND_MESSAGES, EMBED_LINKS should be all you need for a ticket bot

near stratus
#

someone explain what me!me!me! is ?
I googled and found a song on yt

lyric mountain
#

exactly

opal plank
#

here

earnest phoenix
#

Imagine not knowing me!me!me! Or happy free friends

vivid fulcrum
#

i have worse ones

crimson vapor
#

just under those

opal plank
#

beat this

crimson vapor
#

ok bet

#

ill do it rn

vivid fulcrum
lyric mountain
crimson vapor
vivid fulcrum
#

github actions were down that day and i just lost my shit

near stratus
opal plank
crimson vapor
#

thats your work repo right?

opal plank
#

get on my level scrubs

vivid fulcrum
opal plank
#

not my work repo

#

but that was for work

#

someone asked me to make them a bot

#

and, well, theres that

pale vessel
#

Whathefuck

opal plank
#

they didnt care about commits or anything, so i just yeeted shit there

#

not like they knew what github even was

vivid fulcrum
crimson vapor
#

you are going to cry

#

better

vivid fulcrum
#

hahaha 🥲

opal plank
#

at least make the commits descriptive

added the thing
fixed something
implemented a feature
found a bug
corrected an error
moved stuff

crimson vapor
#

LOL

#

im gonna start saying check changes

earnest phoenix
#

Professional commit names

vivid fulcrum
#

use git diff output as the commit message 🧠

lyric mountain
#

average joe:

  • doesn't care bout docs or commits
  • wants work done fast
  • wants to pay $10 for a state-of-art bot
  • thinks coding is just writing a text

also average joe:
" WhY iS mY bOt NoT wOrKiNg? AlL i DiD wAs DeLeTe src FoLdEr!"

vivid fulcrum
#

this is why you compile the app into a single file

crimson vapor
#

so far no one has asked me to make a bot which is pog

opal plank
#

thats not professional at all lmao

vivid fulcrum
#

i do fivver

#

fiverr

lyric mountain
#

yarrr

crimson vapor
#

ive heard fiver is pain

vivid fulcrum
#

clients are rich but so... dumb at the same time

crimson vapor
#

rich doesn't mean smart

vivid fulcrum
#

it's a decent side hustle but fiverr takes a cut from your earnings so 😒

crimson vapor
#

I mean for a highschooler

earnest phoenix
#

Every platform be like

crimson vapor
#

more like a full job tho

crimson vapor
opal plank
#

this is professional commits

fleet radish
#

Guys

opal plank
earnest phoenix
crimson vapor
fleet radish
#

I used memberCount to count members in a guild

opal plank
crimson vapor
#

oh

#

this is what I was doing recently

fleet radish
#

But how do I use it to seperate people into offline online etc

lyric mountain
opal plank
#

you need intents for that

#

@fleet radish

crimson vapor
#

just give no users roles

#

ezpz

lyric mountain
#

oh nvm, forget about that

crimson vapor
#

then you don't have to worry about that shit

opal plank
#

GUILD_PRESENCE intents

lyric mountain
#

memberCount is safe

fleet radish
opal plank
#

do you have that?

fleet radish
#

i have

vivid fulcrum
#

aaaaaaand you would need to cache all members anyways so

opal plank
#

then simply loop through the presences of each member

#

actually

vivid fulcrum
#

which, if you're running djs, caching anything is a bad idea

opal plank
#

that got me interested

#

let me see if i can do something rq

fleet radish
#

😀

#

caching is dogshit srsly

lyric mountain
#

errr

crimson vapor
#

are you ok?

earnest phoenix
#

You would basically need both GUILD_MEMBERS and GUILD_PRESENCES intent for that, which are privileged

crimson vapor
#

caching is pog

lyric mountain
#

do you guys tell him or I do it myself?

fleet radish
#

I have both

vivid fulcrum
#

djs objects are just way too heavy, combine that with node.js' shit garbage collection and you have a ram hog

earnest phoenix
#

Munching ram

fleet radish
#

I have 12 gb dedicated ram

#

for my bots

crimson vapor
#

I have .25

fleet radish
#

lmao

#

noice

vivid fulcrum
#

guess you could call it garbage² collection

crimson vapor
#

fuck I can't edit

lyric mountain
#

12 is nothing if you grow your hog

pale vessel
crimson vapor
#

hog moment

fleet radish
earnest phoenix
#

pogging hog

latent heron
fleet radish
#

lmao I'll do it in google later

latent heron
#

These are how my commits are structured

pale vessel
#

Holy fuck

vivid fulcrum
#

imagine actually having useful info

pale vessel
#

That's hard to do

fleet radish
#

hey isn't it new Intents

lyric mountain
#

imagine this, everytime you cache something it grows about 1cm bigger

fleet radish
#

it gab me error

lyric mountain
#

if you dont optimize you'll be creating a bulldozer

#

that's called a memory hog

vivid fulcrum
#

not like you can do anything

fleet radish
#

when I calculated member using caching

astral zenith
#

What perm does the bot need to move channels?

fleet radish
#

it showed me 20 k

#

For a 60 k server

earnest phoenix
vivid fulcrum
fleet radish
astral zenith
#

doesn't work

fleet radish
#

bruh

vivid fulcrum
#

make sure there aren't overwrites on the channel

fleet radish
#

it need manage only

vivid fulcrum
#

that affect your bot

astral zenith
#

alright

fleet radish
#

hey how many days does it take for my bot to be verified here

fleet radish
#

ohk

#

noice

earnest phoenix
fleet radish
#

Ok sir

vivid fulcrum
#

everytime you ask you need to wait an extra week mmLol

astral zenith
#

lol

fleet radish
astral zenith
#

true

fleet radish
#

ok lmao ig I'm gonna make it 1 year streak

lyric mountain
#

!false

vivid fulcrum
astral zenith
#

!false === false

#

0_0

earnest phoenix
#

no

lyric mountain
#

!"text" === "text"

astral zenith
#

returns true

fleet radish
opal plank
#

@fleet radish try that```ts
let offline, online, dnd, away = new Map():
for(let guild of client.guilds.cache.values()) for(let member of guild.members.cache.values) {
if(offline.has(member.id)) continue;
if(member.presences.find(p => p.status === 'dnd')) {dnd.set(member.id, true); continue}
if(member.presences.find(p => p.status === 'offline')) {offline.set(member.id, true); continue}
if(member.presences.find(p => p.status === 'away')) {away.set(member.id, true); continue}
if(member.presences.find(p => p.status === 'online')) {online.set(member.id, true); continue}
}
console.log(Offline: ${offline.size} | Online: ${online.size} | Away: ${away.size} | DND:${dnd.size})

lyric mountain
#

returns false

astral zenith
earnest phoenix
#

Spoon-feed momentum

opal plank
#

it wont work fyi

fleet radish
#

U just made me skip my hw kekww

opal plank
#

but the intent is there

#

dont think that code will work just slapping it there

fleet radish
#

Wait lmao

earnest phoenix
#

Hi

fleet radish
#

Cached one

#

no I have this already

#

This sucks

#

lmao no offense

cinder patio
crimson vapor
#

memory moment

opal plank
fleet radish
earnest phoenix
#

Memory

fleet radish
#

Yea ik lmao I mean what app

crimson vapor
#

grafana

opal plank
#

should i flex?

crimson vapor
#

no

#

not today

opal plank
fleet radish
#

Lol I'll start flexing mine then bois

earnest phoenix
#

Erwin, no more flexing

#

Did you know? You can use emojis as css classes

fleet radish
#

lol I have 32 too

crimson vapor
#

@opal plank check my activity

opal plank
lyric mountain
fleet radish
#

booboo

lyric mountain
#

a boolean is not equal to "text"

crimson vapor
#

false === 'text'

#

moment

astral zenith
astral zenith
#

from my screenshot

lyric mountain
#

sure

vivid fulcrum
#

while(true) GC.Collect(); in c# mmLol
99% cpu usage, 5 mb ram usage

fleet radish
#

And it gives me half the members server has lmao

vivid fulcrum
opal plank
crimson vapor
#

LOL

#

worth it

earnest phoenix
#

cry, why

lyric mountain
fleet radish
#

Discord.js caching is ewww

lyric mountain
#

that reminds me of that "hide source from client" dude

fleet radish
#

wait lemme show

opal plank
#

well, the way i did it was to make it as accurate as possible

queen quartz
#

i got a question....

opal plank
#

so it wouldnt get repeats

crimson vapor
#
setInterval(() => { 
  global.gc() 
}, 60e3)```
lyric mountain
#

wanna trade?

queen quartz
#

how do i add snipe bot to my server..?

earnest phoenix
#

Just add it

fleet radish
#

I did total with member count

lyric mountain
#

top.gg -> search "snipe bot" -> invite

fleet radish
#

And rest with Caching see

#

The difference

queen quartz
#

ok tysm

opal plank
#

you dont need it

#

like i said

#

the way mine works is by indexing each user

#

so you wont get repeats

fleet radish
#

oh

opal plank
#

say, im in all 10 servers

lyric mountain
#

I just get the table count from my database

opal plank
#

you will have 9 repeated "me"'s

fleet radish
#

what 10 lol

opal plank
#

its an example

#

if im in 10 servers with your bot

fleet radish
lyric mountain
#

users that dont use my bot aren't useful to me

opal plank
#

you have 10 me's

fleet radish
#

it's not repetition

#

Hardly 10-15 members might share common server

opal plank
#

its more often than you think

fleet radish
#

I mean r in 2 servers

crimson vapor
#

I have 8 servers with Erwin

#

thats nothing

cinder patio
#

that's still repetition kek

crimson vapor
#

I have like 20 with some people

#

lmao

vivid fulcrum
#

when people flex their member count but their bot is in top.gg which takes up like 95% of your members

#

😔

crimson vapor
#

why do you flex member count

#

its dumb

fleet radish
#

Wait

crimson vapor
#

it makes no fucking sense

#

at all

fleet radish
#

bruh I'm mot fking flexing omg

crimson vapor
#

like give one way it is useful

opal plank
crimson vapor
#

nah idc im not saying you are

vivid fulcrum
#

i'm not saying you're flexing

lyric mountain
#

you should flex the tape

opal plank
#

theres literally a 130k repetition gap

fleet radish
#

omg I was just showing the difference

crimson vapor
#

just I don't understand it

lyric mountain
#

not the member count

opal plank
#

total users is memberCount

#

unique is my method

fleet radish
#

hmm

opal plank
#

look at the difference

fleet radish
#

mruh I did the same way

lyric mountain
#

680k cached members

vivid fulcrum
#

a lot of retarded bot "devs" here flex their member count but don't show their server count bc they know that top.gg, discord bots and guilds like that are boosting the member count 🤣

fleet radish
#

I did the same way firstly

#

But it wasn't accurate

crimson vapor
#

bro

fleet radish
#

Wait would fetch fix the problem

opal plank
#

my bot aint here lul

lyric mountain
#

fetch what?

opal plank
#

it used to be like that cry

#

luckily not anymore

fleet radish
#

why

opal plank
#

let me check something rq

vivid fulcrum
quiet pawn
#

im trying to get my bot to grab user status text and i cant find anything is it possilbe to do?

earnest phoenix
#

Bro, why is Node.js's garbage collector so shit

crimson vapor
fleet radish
#

I just want the fking accuracy xd

lyric mountain
vivid fulcrum
#

because v8

cinder patio
earnest phoenix
#

Kinda want to improve the garbage collector found in there

cinder patio
#

it's because it's a dynamic language, values aren't known at runtime

#

just that means more memory usage

vivid fulcrum
#

inherently, blame google for every issue node.js has mmLol

zenith terrace
# opal plank

WHY IS THIS THE FIRST MESSAGE I SEE WHEN CHECKING HERE

earnest phoenix
#

Node.js uses the v8's garbage collector which is an absolute mess

#

KEKW like wtf

cinder patio
#

how do u know though

astral zenith
earnest phoenix
#

I have seen the internals and also worked on them, but that's just a holy shit moment

vivid fulcrum
#

all i want is a html & js renderer that doesn't run on chromium 😔

fleet radish
#

big brains bois

cinder patio
#

let's make one

crimson vapor
#

your name literally is google feud

#

ironic I think

earnest phoenix
vivid fulcrum
opal plank
#

im not sure i can show it here

#

hmmmmmmm

fleet radish
#

luk

lyric mountain
# astral zenith Here.

your eval cmd is either faulty, you're getting the wrong value from the console or both

earnest phoenix
lyric mountain
#

!"text" === "text" will never ever be true

astral zenith
#

Yeah, look he is still living in 2002

fleet radish
#

uwu

astral zenith
#

bro it's 2021

fleet radish
astral zenith
#

move on

cinder patio
#

We can use an existing html / css renderer

opal plank
#

let me check something rq

cinder patio
#

and add js on top of it

fleet radish
#

huh

lyric mountain
#

also, why use an if-else there?

vivid fulcrum
#

that reminded me

astral zenith
vivid fulcrum
#

i need to check out how much ultralight improved

#

apparently ultralight can run react apps with no stutter now

lyric mountain
fleet radish
#

true

astral zenith
#

Because I am a few days in js

cinder patio
#

nice

astral zenith
#

lol

lyric mountain
#

that explains why you think !"text" === "text" is true

astral zenith
#

oh

lyric mountain
#

console.log(!"text" === "text")

pale vessel
#

Pretty sure we all saw that...

astral zenith
cinder patio
#

😔

astral zenith
opal plank
#

thats a shitton of bots

#

jesus christ

#

155 guilds with more than 70 bots

#

i assume they are bot farms

lyric mountain
#

not possible tho

#

max amoung of bots is 100 per server iirc

opal plank
#

how so?

lyric mountain
#

so maximum would be 15500 bots

opal plank
#

well, here it is

#

thats total

#

in all servers

pale vessel
#

They never limited bots

opal plank
#

the first is the amount of guilds with more than 70 bots in it, the second is the amount of bots in ALL my guilds

#

let me add another reducer for the total of bots

#

@lyric mountain

lyric mountain
#

understandable, have a great day

opal plank
crimson vapor
#

do you guys think discord would accept guild members intent if I use it to cache members and not spam the api?

opal plank
#

no

pale vessel
#

Don't you have logs feature @crimson vapor

#

That's already a valid reason

crimson vapor
#

nah I removed it because fuck that

pale vessel
#

Oh

crimson vapor
#

I could add it back

#

but effort

pale vessel
#

You can still lie about it though xd

crimson vapor
#

proof tho

pale vessel
#

Fake embeds

#

Wouldn't recommend that

crimson vapor
#

I mean

lyric mountain
#

say you need guild members intent so you can sell user data to guilded

crimson vapor
#

they would not know

feral aspen
#

Hello

#

Bye

#

No actually, any tips on how to work on logs using webhooks.

#

Kind of using cache channels and sending it and I was kind-of an idiot for not remembering rate limit is a thing.

#

Links to documentations can be great, I think.

lyric mountain
#

channel logging = bad

#

unless it's for periodic stuff like github commits

fleet radish
#

Bruh

#

const Discord = require('discord.js'); const intents = new Intents([ Intents.NON_PRIVILEGED,
"GUILD_MEMBERS", "GUILD_PRESENCES" ]);
let online = (await guild.members.fetch()).filter((member) => !member.user.bot && member.user.presence.status == 'online');

#

Isn't this supposed to work

earnest phoenix
#

That's not how you use intents wtf KEKW

fleet radish
earnest phoenix
#

cc

const client = new Discord.Client({
  ws: {
    intents: Discord.Intents.ALL
  }
});```
fleet radish
#

ohk lmao

#

tysm

feral aspen
#

Wot.

#

I don't write that at all.

feral aspen
lyric mountain
#

link to what?

#

if you want to log, use a file

#

logging to a discord channel would severely ratelimit you

astral zenith
#

From admin now it only needs ```js
"VIEW_CHANNEL", "MANAGE_CHANNELS", "ADD_REACTIONS", "SEND_MESSAGES", "EMBED_LINKS", "MANAGE_MESSAGES", "READ_MESSAGE_HISTORY", "USE_EXTERNAL_EMOJIS", "MANAGE_ROLES"

#

@lyric mountain

feral aspen
astral zenith
#

I think

#

@feral aspen

astral zenith
feral aspen
astral zenith
#

np

lyric mountain
# astral zenith yeah
[
  "VIEW_CHANNEL", //useless
  "MANAGE_CHANNELS", 
  "ADD_REACTIONS", 
  "SEND_MESSAGES", 
  "EMBED_LINKS", 
  "MANAGE_MESSAGES", 
  "READ_MESSAGE_HISTORY", //useless
  "USE_EXTERNAL_EMOJIS", //useless
  "MANAGE_ROLES" //useless
]
astral zenith
#

the ticket command won't work

lyric mountain
#

why you use view channel?

astral zenith
lyric mountain
#

it was you who created the channel

astral zenith
#

yeah but I configure the perms for it

lyric mountain
#

you can't hide it from you without external influence

astral zenith
#

actually I might not need it

#

lol

#

lemme try

lyric mountain
#

why you use read message history?

#

are you fetching the last N messages?

astral zenith
#

for one of the functions

#

of the ticket command

#

I have

lyric mountain
#

are you fetching past messages?

astral zenith
#

I don't think I need to explain how it works tho

lyric mountain
#

you need

astral zenith
#

Nope.

#

Not to you.

lyric mountain
#

yes to me

astral zenith
#

Yeah, I don't even know you ;-;

lyric mountain
#

that's a useless perm for your use-case probably

#

so, next

#

why you use "use external emojis"?

astral zenith
#

I need this tho

#

but I will tell you why

lyric mountain
#

no, you don't need for this one

#

next

astral zenith
#

because I am using external emojis

lyric mountain
#

why you use "manage roles"?

astral zenith
lyric mountain
#

you create new roles per ticket?

astral zenith
#

you don't know shit lol

lyric mountain
#

don't I?

astral zenith
#

Well, at least you don't know more about me for perms

#

for sure

lyric mountain
#

you sure?

#

so why then?

#

why you use manage roles?

astral zenith
#

because you don't even know what manage roles is used for

lyric mountain
#

yes I know

#

I also know theres a hard cap for how many roles a guild can have

#

and some guilds get really close to it with reaction roles

astral zenith
#

Allows members to create new roles and edit or delete roles lower than their highest role. Also allows members to change permissions of individual channels that they have access to.

lyric mountain
#

so?

#

to summarize:

astral zenith
#

Yeah, I am changing perms of the channel

lyric mountain
#

you're not only clogging server channels' list, but also clogging roles list

astral zenith
#

but not only this

astral zenith
#

lol

#

nvm

#

I don't need to explain how it works to you again

lyric mountain
#

sure, you wouldn't be able to anyway

astral zenith
#

Sure

lyric mountain
#

I must say tho, you won't get far with so much niche stuff VS discord ratelimits

#

it only takes a single botfarm

astral zenith
#

probably

wraith minnow
#

hey the mech

#

how can i become a bot developer i just want to have one role

lyric mountain
#

you need an approved bot here

latent ocean
#

hey i have this problem on start my bot

earnest phoenix
#

Probably because of stage channels, what discord.js version are you using?

#

MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 message listeners added to [Client]. Use emitter.setMaxListeners() to increase limit

#

Help me

#

🥺

sudden geyser
#

You're adding a questionable amount of message listeners.

#

Generally, developers like to stick to 1

opal plank
sudden geyser
#

Stage channels have not been implemented yet to my knowledge

opal plank
#

completely wrong

#

they are and i've already been using it

tacit sequoia
#

Lmao

crimson vapor
#

in djs he means @opal plank

opal plank
#

who uses that shit lib anyway?

sudden geyser
#

a lot of people it seems

crimson vapor
opal plank
crimson vapor
#

laughs in discord-rose

latent ocean
#

@opal plank

opal plank
#

@latent ocean as they said above, staging channels arent available in d.js

#

Use detritus.js instead

#

Wink wink

latent ocean
#

what is it ?

opal plank
#

A better discord library for js

latent ocean
#

i use discord.js-light

sudden geyser
#

You could also point Discord.js to the branch the pull requester has

earnest phoenix
#

Eris is also an option, they covered most of the stage channel support already

opal plank
#

Read that ^^

crimson vapor
#

@opal plank stop.

slender linden
#

yo anyone got a discord.c# anti spam?

opal plank
#

@crimson vapor make me hoe

crimson vapor
summer yoke
#

Guys

#

Can someone show me an example code when someone vote my bot in top.gg the bot send message in my server channel

sudden geyser
#

What library are you using? You want to send a message when your bot is invited to a server?

summer yoke
#

Discord. Js

summer yoke
#

Can u help @crimson vapor

crimson vapor
#

hi

crimson vapor
#

want example code?

sudden geyser
crimson vapor
#

sure why not

#

good luck 🫀

summer yoke
#

Thanksss

vivid fulcrum
#

the whole bot

#

well

#

it depends which ratelimit we're talking about

#

what is the command

#

it has to

#

doesn't matter whether the entity is cached or not

#

whenever you create, edit or delete something it's a REST request made to discord

#

anyway

#

i doubt that ratelimit is global

#

it should be either per guild or per channel

#

id check out the bucket but im on my phone right now

#

the route's major parameter is the guild id so it's definitely a per-guild ratelimit

lament rock
#

per channel rate limits are poggers

half bear
#

guys how can i make a command that you need to vote for using it

twilit hemlock
#

  exports.run = async (bot,message,args) => {
    channel.createInvite()
    .then(invite => console.log(`Created an invite with a code of ${invite.code}`))
    .catch(console.error);
  }  
  
  exports.help = {
  name: 'invite'
  }```
#

channel isnt defined

half bear
#

yes its because not defined

twilit hemlock
#

how

half bear
#

try message.guild.createInvite()

twilit hemlock
#

Ok

half bear
#

you didn't defined "channel"

twilit hemlock
#

ok

#

.then(invite => console.log(Created an invite with a code of ${invite.code}))

#

console.log

#

do i just change to

#

message.channel.send

#

or what

half bear
#

what does your command for

twilit hemlock
#

!invite

#

then

half bear
#

yes do message.channel.send

twilit hemlock
#

ok

half bear
#

console.log will send the message to your console

twilit hemlock
#

yea

#

(node:8112) UnhandledPromiseRejectionWarning: TypeError: message.guild.createInvite is not a function

half bear
#

okay wait

twilit hemlock
#

heres full code again

#

  exports.run = async (bot,message,args) => {
    message.guild.createInvite()
    .then(invite => message.channel.send(`Created an invite with a code of ${invite.code}`))
    .catch(console.error);
  }  
  
  exports.help = {
  name: 'invite'
  }```
earnest phoenix
#

the error is clear

#

if you can't fix simple errors like this, then learn the basics of javascript

twilit hemlock
#

look

half bear
earnest phoenix
#

that's not a roast

twilit hemlock
earnest phoenix
#

it's advice

twilit hemlock
#

i dont know what a guild.createInvite() is

#

as a begginer?

earnest phoenix
#

who writes in a language without learning it, you won't do an English essay without learning English

twilit hemlock
#

do u know every word in the English lang

#

you dont

earnest phoenix
#

huh

#

no shit, at least i know the basics

twilit hemlock
#

ok so do i

fast willow
#

Is something wrong with my command I put it like this

#

$textspam <hahahaha> <182793728181731415263759695736251416264 1>

earnest phoenix
#

you don't lmao

#

you don't even know why the variable isn't defined

earnest phoenix
#

and how to define it

twilit hemlock
#

because i am not experinced with creating invites

earnest phoenix
#

you don't need to be

#

read the docs or learn the language

#

i'd suggest both atm

fast willow
#

@half bear what

twilit hemlock
#

ok look

#

its ez

#

define

earnest phoenix
#

discord will rate limit it

#

and it may result in an api ban

half bear
#

and if you use it for other servers your app probably get deleted yes

twilit hemlock
#

i have another problem

half bear
#

you guys are lucky because i don't know much English so learning js is harder

twilit hemlock
#
const activities = [
    "Getting Created",
    "Jack is good",
    "OK",
  ];
  
  bot.on('ready', () => {
      setInterval(() => {
        bot.user.setActivity(activities[Math.floor(Math.random() * activities.length - 1)], { type: 'PLAYING'})
        .then(Presence => console.log(`Activity set to ${Presence.activities[0].name}`))
        .catch(console.error);
      }, 5 * 60 * 60); // 1000 ms = 1s, 1s * 60 = 60s (1m), 1m * 60 = 1h
  });``` only the top 2, activites are getting sent, not "OK" for example
fast willow
#

@earnest phoenix can I invite you to the server so you can join and help me please

#

@earnest phoenix or can you type it in hear

twilit hemlock
#

ok well i fixed the invite code,

#

so much for me knowing nothing

half bear
fast willow
#

@earnest phoenix I’ll PayPal you $1

zenith terrace
#

he isnt going to help you

#

and quit pinging him

#

one is enough

twilit hemlock
#

how do u

#

like i updated code in vsc

#

how do i now update it in github

#

like what command

crimson vapor
#

git push

twilit hemlock
#

it says sucess

#

but doesnt update in files

crimson vapor
#

then add your changes

#

and commit

fierce ether
#
if(type !== ('add' || 'remove')) return this.sendMessage(channel, incorrectTypeEmbed)``` how am i doing this incorrect?
twilit hemlock
#

so i gotta re add

#

ok

#

but i made new folders and stuff

#

it should just update

#

nvm im idiot im new to github stuff

earnest phoenix
fierce ether
#

ok thx

#

works fine thx

twilit hemlock
#

A lock file already exists in the repository, which blocks this operation from completing.

#

i have no idea how to commit omg

#

there got it

fleet radish
#

hooooiii

prisma hearth
#

Guys so I have a bot of mine that went from the 75 servers right there I sent it to check and waiting only that unintentionally in the gateway Intent I deactivated them from my bot just need to activate back because many events do not work in my bot so I’m trying to activate in site more I could not more, So I went into the support office, and it’s been a week, and no one’s answering me, so any help with that?
Whoever knows, please brand me!

half bear
#

guys how can i make a command that you can only use with voting the bot

earnest phoenix
prisma hearth
#

Ok thanks

neat beacon
#

Aight im having a few problems, i added some commands to my bot project, and didnt stopped at each one for bug checking or something like, but when i started to debug it, this error appeared.

``D:\nodejs\node.exe .\index.js
JS Loaded, Waiting for login.
index.js:1
Uncaught Error: Cannot find module '../../Structures/Command'
Require stack:

  • d:\OMORI\commands\kick.js
  • d:\OMORI\index.js
    Process exited with code 1``

I can give the current index and the kick.js that is doing all the trouble if you need.

#

:/

earnest phoenix
#

it couldn't find the path to that exact file

quartz kindle
#

show your index.js

neat beacon
#

k k

#

here?

earnest phoenix
#

use a bin

quartz kindle
#

can be here as well