#development

1 messages · Page 1653 of 1

river panther
#

that idk, i am java and javascript

modern granite
#

haha

#

okay

#

KeyError: Is the guild id

#

I guess

pale vessel
#

prefixes[guildID] does not exist

modern granite
#

yeah

#

but

#

the code works

#

there is no problem

pale vessel
#

what do you mean?

modern granite
#

this is only in the console

pale vessel
#

check the file

#

are you sure?

modern granite
pale vessel
#

log the guild ID

modern granite
pale vessel
#

and check if that exists in the prefixes.json file

#

It's KeyError

modern granite
#

I checked

pale vessel
#

The property (guild ID) doesn't exist

modern granite
#

there is no guild id like that there

#

idk where the error comes from

pale vessel
#

That's why it errored

modern granite
#

how can I fix that?

#

or at least why is it even calling that guild id, if it's not in the prefix.json?

pale vessel
#

you never handled it

#

it'll still call it if it doesn't exist

#

use dict.get() instead to avoid KeyError and provide a fallback prefix

modern granite
#

okay

#

thank you

spare goblet
#

ia_think_thonk alternatives to rabbitmq in order to facilitate communication between multiple processes in the same server? ping if you have ideas

young flame
#

hmmm

drifting shell
#

What's wrong with rabbitmq in your instance?

#

Pusher can be an option

spare goblet
#

i don't wanna set up rabbit mq

young flame
#

usher

spare goblet
#

rabbit mq is so annoying to setup

young flame
#

Pusher*

#

I can help lol

spare goblet
#

it's such a heavy thing for such a smol thing

drifting shell
#

I understand the pain :painsive:

spare goblet
#

is it pain to setup too

#

?

drifting shell
#

no

#

its really easy

#

its just paid for past 200k requests

#

What're you using RMQ for?

young flame
#

sorry iara I cant help

spare goblet
#

okay wait

#

200k requests per what

#

per day? per year? per

drifting shell
#

month

#

I think

spare goblet
#

because that might be enough

#

wait lemme do math

young flame
#

my fingers are locking up because its cold

drifting shell
#

oh ok no

#

its per day

young flame
#

so I can't give suggestions

spare goblet
#

oh yeah i have enough then LMAOO

young flame
drifting shell
#

past that pusher is $49 / million a day

spare goblet
#

i only have to do 1 message per hour per cluster + 1 message per day per cluster + 1 message per week per cluster

which would be
24 * 70 + 70 + 10 / 7

#

which is less than 2k

#

STONKS

drifting shell
spare goblet
#

thanks smaule ily

drifting shell
#

stonks

#

ily iara

#

@spare goblet I understand your pain with RMQ, its docs are really awful too

#

advantage is its free, but its just pain

spare goblet
#

@drifting shell it

#

s

#

not gonna work for me

#

only allows 100 concurrent connections

#

which means per cluster i have to use at least one connection right

#

im already at close to 70 clusters

#

and at this rate of growth i only have 4 months before i reach 100 clusters

#

😭

drifting shell
#

😔

#

I mean, couldn't you join the clusters with an internal ws?

#

or even a webhook

cinder patio
#

IPC? thonkku

drifting shell
spare goblet
#

terrible idea

#

point of doing this in the first place is NOT using a webhook

drifting shell
#

probably onesieKEKW

#

yeah kinda defeats the purpose of pusher

spare goblet
drifting shell
#

what're you sending the messages for?

spare goblet
#

roleincome

#

honestly at this rate

#

i'm ready to just

#

setInterval(() => {
})

#

this crap

#

but scalability pensive_wobble

drifting shell
#

hmmm, i have another idea tho and im pretty sure this has definitely crossed your mind

#

in java you can do

#

executorService.scheduleAtFixedRate(runnable, delay, frequency)

spare goblet
#

isnt that setinterval

drifting shell
#

kind of, but not quite

spare goblet
#

because javascript works with singular thread

#

it's not scalable at all

drifting shell
#

yeah thats why js is kinda stinky

#

but, you could just set the task to run after a delay period, and then get it to rerun again at the desired period

eternal osprey
#

,hello,Muted how would i remove the comma's from a string like this?

#
 if(message.content.startsWith("!add")){
    const result =  message.content.slice(4).split(/ +/);
    const z24 = message.content.slice(auth.prefix.length).split(/ +/);
    const z25 = z24.slice(z24.length)
   
    fs.appendFileSync("./keywords1.json", result + " " + z25 + "\n");
    }```
drifting shell
#

remove it entirely?

spare goblet
#

as i said the reason why i wanted to do this in the first place is to avoid it zlmaocry

drifting shell
#

replaceAll("," "")

#

i know

#

is it just JS's lack of multi threading that's making you need 70 clusters?

spare goblet
#

no, it's because of how large my bot is

#

i could probably change to like 30 clusters

#

or 40

drifting shell
#

yeah I just meant like why does it need 70 clusters, if you know what's actually causing your need for it

eternal osprey
drifting shell
#

you're trying to remove , right?

eternal osprey
#

yeah

#

and repalcve it with a normal space

drifting shell
#

oh

#

did it not remove the ","?

spare goblet
#

it needs clusters to split the load

#

also ia_think_thonk pusher can't publish directly from code?

eternal osprey
warm marsh
#

It's a method.

#

",Hello,Goodbye".replace(/,/g, " ")

#

Same with replaceAll

whole coral
#

Guys, how come I got this error?

cinder patio
#

use replace with a regular expression

drifting shell
spare goblet
#

oh

#

trigger is publish?

drifting shell
dusky lagoon
#
 message.channel.send(pages[0]).then( async message => {
            await message.react('◀️');
            await message.react('▶️');
            await message.react('🗑️');
            var collector = message.createReactionCollector(
                
                // only collect left and right arrow reactions from the message author
                (reaction, user) => ['◀️', '▶️'].includes(reaction.emoji.name) && user.id === author.id,
                // time out after a minute
                { time: 600000 }
            )
            let currentIndex = 0
            collector.on('collect', reaction => {
                
                reaction.emoji.name === '◀️' ? currentIndex -= 1 : currentIndex += 1;
                if (currentIndex < 0) {
                    currentIndex += 1;
                }
                if (currentIndex + 1 > pages.length) {
                    currentIndex -= 1;
                }

                if (reaction.content === '🗑️') {
                    message.reactions.removeAll().catch(error => console.error('Failed to clear reactions: ', error));
                }``` ok so i added ```js
if (reaction.content === '🗑️') {
                    message.reactions.removeAll().catch(error => console.error('Failed to clear reactions: ', error));
                }``` im trying to remove all the reactions with the trash can only im stupid so can someone help me
pale vessel
#

reaction.content doesn't exist

drifting shell
#

@spare goblet for 37k servers albeit I know yours is like 6* that, my bot happily runs on 1 2vcpu vps onesieKEKW

dusky lagoon
#

LETS TRY

#

@drifting shell what is your bot

pale vessel
#

amogus bot

dusky lagoon
#

couldnt find it

whole coral
pale vessel
cinder patio
lament rock
dusky lagoon
whole coral
humble wasp
#

Can someone please fast write a give role code?

whole coral
#

This is the list of the servers that bot joined:

lament rock
pale vessel
#

yeah, the filter function

#

you're not collecting the remove all reaction

#

probably, try again later

#

if that's your actual IP you should delete the screenshot

fair fractal
#

okay

cinder patio
#

What are you trying to do?

spare goblet
#

@drifting shell 1 2vcpu?

#

whats vcpu

#

my bot doesnt use that much resources tbh

drifting shell
#

its not a dedi so its not dedicated cpui

lament rock
#

either 2 vCores or a server with 2 numa nodes

spare goblet
#

around 7-30% cpu steadily, 8 cores
around 30 gb of ram

spare goblet
earnest phoenix
#

hi i would have a quick question.
how can i get the names of the guild rooms?
Here is my code

(guildCreate EVENT)

var channelsNumber = guild.channels.cache.filter(m => m.type === 'text').size;
  for (let i = 0; i <= channelsNumber; i++) {
    console.log(guild.channels.cache.name)
}```
pseudo helm
pale vessel
#

If you want to loop through the guilds to get the name, you can use collection.values() and a for loop or use collection.map()

earnest phoenix
#

i see how many text channels there are and i run a formal to write the name of those console log ba

pseudo helm
pale vessel
#

yeah

lament rock
#

code is hard to read on mobile.

#

or im just r word

pale vessel
#

which code?

lament rock
#

any

#

most likely just me being dumb

pale vessel
#

same here, the code block font in sans instead of monospace

pseudo helm
earnest phoenix
#

but then how can I do it now to write out the names of all the found text channels?

pale vessel
#

instead of using collection.size, use collection.map with the function to return the channel name (and index if you need that too)

earnest phoenix
#

sorry for my bad english

earnest phoenix
pseudo helm
#
guilds.channels.cache.forEach(channel => console.log(channel.name));

This should work, if this is what you need.

pale vessel
#

E

lament rock
#

Not just that since they filter the guild for text channels

#

they need to forEach the filtered collection

pseudo helm
#

Sure.

lament rock
#

also, your casing for forEach was incorrect

pseudo helm
#

Explain me.

pale vessel
#

forEach

lament rock
#

not foreach

pseudo helm
#

Oh, typo, my bad.

earnest phoenix
#

thanks dude is perfect

faint moth
#

what is the problem

pseudo helm
faint moth
#

okay wait

pale vessel
#

seems fine on mobile

pseudo helm
faint moth
pale vessel
#

Don't use dblapi.js since it's deprecated, use @top-gg/sdk

#

and make sure you provide the correct token

faint moth
#

this problem occurred yesterday

marble juniper
#

don't use dblapi.js

faint moth
#

I'm trying alright

#

@marble juniper

#

Same mistake

sick fable
#

My pp is smol

faint moth
#
const Discord = require('discord.js')

exports.run = async (client, message, args) => {

      let user = message.mentions.users.first() || message.author
      let author = message.author.tag

      const embed = new Discord.MessageEmbed()
      .setDescription(`**<@${user.id}> İşte Avatarın!**`)
      .setColor(`RANDOM`)
      .setFooter(`${author} Tarafından İstendi.`)
      .setImage(user.avatarURL({ dynamic: true, size: 1024 }));
      message.channel.send(embed)
    }
  exports.conf = {
    enabled: true,
    guildOnly: true,
    aliases: ["pp"],
    permLevel: 0
  };
  
  exports.help = {
    name: "avatar",
    description: "",
    usage: ""
  };```
#

@earnest phoenix

#

pp code

zenith terrace
#

why do all that when you can just do math.random

marble juniper
#

true

cinder patio
#

Lmao pp/900000000

#

So you want to do it based on the user's id

#

You could just get the first two numbers from the id, add them, and divide by 2

#

There are other ways to do it ofc

icy fjord
#

(node:25452) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 message listeners added to [Client]. Use emitter.setMaxListeners() to increase limit (Use node --trace-warnings ...to show where the warning was created)
How to fix

cinder patio
#

But basically if you joined early = you have a smaller pp

marble juniper
#

this

marble juniper
#

ids are not really random

#

computers don't make random numbers

#

its impossible

#

lol

#

truly random sources are for example when discord servers break

#

or when a windows update publishes

cinder patio
#

(Number(pp[0]) + Number(pp[1])) / 2

marble juniper
#

computers are not made to generate randomness

#

they can't generate randomness

#

its impossible for computers to do

#

even if it seems random
its technically not

faint moth
#

@earnest phoenix tr lol

#

@marble juniper bro

#

Is there a problem with jeans?

marble juniper
#

?

faint moth
cinder patio
#

nope, pp has to be a string

#

just don't parse it to an int

pale vessel
#

Okay what the hell.

cinder patio
#

Don't make it cm

#

make it inches

pale vessel
#

I can't take this seriously

cinder patio
#

My pp would be 4 inches rip

#

Multiply the result by 2.54

#

and you'll get cm

zenith terrace
cinder patio
#

Because that's how you convert inches to cm

lament rock
#

true random does not exist in the context of computers. Computers are designed to execute exact instructions. Anything led to make you believe otherwise is false. computers are able to seemingly generate random numbers by a concept called psuedo-randomness. In the case of languages offering random numbers, the logic behind those methods is that you have a seed which is what the math is based off of to present a number. Most seeds are the computer's Date time which updates constantly and would produce different outputs most of the time

drifting shell
#

is there a benefit to marking a web socket connection as AFK / idle?

cinder patio
#

I guess you can also add the third number and divide by 3

#

then you'll get slightly bigger pps

#

but also slightly smaller

pale vessel
#

i'm dying reading this

cinder patio
#

Just multiply by 2.54 what's the problem

drifting shell
#

is there a benefit to marking a web socket connection as AFK / idle? someone help SadCat

cinder patio
#

You'll still get relatively less than average pps

#

You can also do the smartest thing and store PP sizes in a database

#

so you don't have to do shit like this, just generate a random number if the user's PP size isn't in a database already

#

and put it in the database

lament rock
pale vessel
#

but my pp will be forever short if it's stored in a db

lament rock
#

That was uncalled for

cinder patio
#

Maybe make the numbers increase over time

pale vessel
#

yes, growth

#

sounds good to me

cinder patio
#

lmao you'll make it stop after the 18th year

pale vessel
#

store the pp and timestamp

slender thistle
#

What the fuck are you people doing

pale vessel
#

i think you're on to something here

cinder patio
#

you don't even have to store the timestamp, use the user's account creation timestap

zenith terrace
#

I cannot take this convo seriously

lament rock
#

You don't need a database for this. You can do all of the math based on timestamps

cinder patio
#

Not really, your pp isn't a fixed length based on your date of birth

#

you'll need a random value

river panther
#

mhm, nice

#

was there any outcome?

#

@quartz kindle helo sir, big fan, long time no see, do you have an answer to this?^

lusty quest
#

lol its 8 in the morning for him

river panther
#

where does he live?

lusty quest
#

maybe he is at work or still sleeping

river panther
#

no no, its 5:51

#

17:51 is american

lusty quest
river panther
#

WHAT

#

**WHAT?!(

#

the fuck

#

I HAVE BEEN TRICKED

#

MY WHOLE LIFE TIME WAS A LIE

cinder patio
#

There's no way it's 5 pm in russia

lusty quest
#

depends on the timezone you are, they got atleast 3 or so

#

moscow is at 13:54

river panther
#
[Math.floor(Math.random() * whateverarray.length)]
cinder patio
#

Math.floor(Math.random() * 100) - 1

river panther
#

breh, python is for the weak

#

am i right @slender thistle ?

#

because from 1 to 100 its 101 numbers

#

i mean, how do i explain

burnt citrus
#

Is doubts about webhooks allowed here?

pale vessel
#

no that's 1-98

lament rock
#

Do not make fun of languages

cinder patio
#

yeah 101 and +1

#

mb

lament rock
#

They all have their own uses

marble juniper
#

its actually against rules to have language wars

#

lol

river panther
pale vessel
#

you can use Math.ceil() and not use 101 - 1

river panther
#

all kind of development are allowed

slender thistle
#

I'm sceptic of JS with all the idiotic packages people made for fun

river panther
#

welp yes

slender thistle
#

I prefer not to waste time arguing which is best, however

river panther
#

but js looks better and it is funner

slender thistle
#

That's subjective

river panther
#

yes ig

burnt citrus
marble juniper
#

rule number 4 c

lament rock
#

The skepticism is reasonable, but it still gets it's job done pretty efficiently depending on the developer's proficiency

burnt citrus
river panther
#

what webhooks, discord or some other?

solemn leaf
#

Why complain, they are both high level languages

burnt citrus
#

@river panther webhooks to setup up vote notifications from top.gg

marble juniper
#

Do not discriminate/harass (hate speec, arguing, etc). This includes but not limited to:
c. Programming languages

river panther
lament rock
#

Some people might like the more object oriented approach JS takes while python seems a bit more functional in contrast

river panther
river panther
# marble juniper

we are just having a friendly discussion, which will develop our debating skills

#

we are developing as one

marble juniper
#

smh

burnt citrus
river panther
#

shaking my pc

#

not pp

marble juniper
#

blocked

solemn leaf
#

Bruh

marble juniper
#

lol

river panther
#

breh

solemn leaf
#

Wtf

river panther
#

anyways, i go study, exams soon ;-;

#

i mean, day after tomorrow

solemn leaf
#

Nobody cares

nimble kiln
#

Good

slender thistle
slender thistle
#

No complaining really

solemn leaf
#

Same thing

lament rock
slender thistle
#

There isn't any complaining about languages, though. My personal preference is Python because that's what I've worked with for years, and at this point it's hard to get into another language that I can use primarily

slender thistle
#

Though, yeah, I don't feel like I was cut out to use it as my main language KEKW

lament rock
#

fair

nimble kiln
#

That's a good way to start

slender thistle
#

You usually want to refer to official documentation on top of "stealing" code

river panther
#

stole*

nimble kiln
#

With a timer

zenith terrace
nimble kiln
#

setInterval(function() { client.user.setPresence(...) }, 60000);

slender thistle
river panther
nimble kiln
#

ah yeah setinterval works too

#

Doing it every minute is perfectly fine

lament rock
#

milliseconds

nimble kiln
#

The example is literally given there

#

you already have your "stolen code" (client.user.setPresence)

nimble kiln
#

I would recommend putting it into your client.on('ready')-event so it doesnt error out when your bot is not logged in yet

#

nobody is gonna say anything when you do it every minute

umbral zealot
#

yeah discord presence every minute is fine.

slender thistle
#

Do you mean this lol

#

Presence ratelimits are very lenient on top of that so doing it every minute is more of a common sense move

astral crown
#

So currently my discord bot is hosted on heroku but there's size limit of 500 MB. Is there any other platform where I can host my bot for free with no size limit?

cinder patio
#

no, there are always limits, even with paid hosts

astral crown
# cinder patio no, there are always limits, even with paid hosts

Is there any platform where I can store images and get my bot to send images from that when the user type a command? Like if I could upload my folder filled with images on google drive then it will save some space but could bot read the image from google drive or any suitable platform for that?

leaden beacon
#

can someone help me with this poll? if i place the question i want the bot to remove my questions after the polls is posted? anyone who willing to help me out?

lyric mountain
willow mirage
#
for(let languages in obj){
    if(languages != "execute"){
          if(obj[languages]){              
       obj.aliases.push(...obj[languages].config.aliases)                 }
     }
}
lyric mountain
#

show the definition of "obj"

willow mirage
lyric mountain
#

the definition, not obj itself

willow mirage
#

wdym?

lyric mountain
#

like, where you do let obj = ...

willow mirage
lyric mountain
#

show that client.commands.set(name, obj)

#

like, what its doing

willow mirage
#

it is a collection bro

#

that saves commands function and configs

lyric mountain
#

ah ok

#

if you do console.log(obj) right before you push to the aliases what does it show?

willow mirage
small tangle
#

Is it considered a privacy breach if im implementing a command to count my Database documents to display the number of botusers?

#

Or is this information oke?

nimble kiln
#

Ok even if it's not that ^ it's fine. Because it's just a number

small tangle
#

Each user gets an unique db entry and i would count this number and display it

nimble kiln
#

yeah perfectly fine

small tangle
#

thanks peepoHappy

leaden beacon
#

anyone who willing to help me out? trying get t his poll to work when you have it setup it removes the messages you typed? 😄

lyric mountain
#

omfg why is that file so long?

leaden beacon
#

its with result

#

😄

lyric mountain
#

what is that lang?

#

like, programming with json?

leaden beacon
#

me?

lyric mountain
#

yes

leaden beacon
#

discord bot maker

#

lol

#

raw data

lyric mountain
#

we have a serious contest between bdfd and dbm

#

can't choose which one is worst

#

but anyway, where am I supposed to look?

leaden beacon
#

discord bot maker?

lyric mountain
willow mirage
#

nvm fixed

lyric mountain
willow mirage
#

im trying to make multi -lang

lyric mountain
#

what was the issue?

winter bear
#

I'm trying to make a vote to release commands but I don't know how to start or how to do it

wary bloom
#

d

dusky lagoon
#
   // only collect left and right arrow reactions from the message author
                (reaction, user) => ['◀️', '▶️','🗑️'].includes(reaction.emoji.name) && user.id === author.id,
                // time out after a minute
                { time: 600000 }
            )
            let currentIndex = 0
            collector.on('collect', reaction => {
               reaction.users.remove(message.author.id)
                reaction.emoji.name === '◀️' ? currentIndex -= 1 : currentIndex += 1;
                if (currentIndex < 0) {
                    currentIndex += 1;
                }
                if (currentIndex + 1 > pages.length) {
                    currentIndex -= 1;
                }

                if (reaction.emoji.name === '🗑️') {
                    message.reactions.removeAll().catch(error => console.error('Failed to clear reactions: ', error));
                }``` i added `reaction.users.remove(message.author.id)` so it removes the user reaction but instead it deletes the reaction that the bot added?? how can i fix this
lyric mountain
#

method not allowed means you're doing a GET request on a POST endpoint or the inverse

lyric mountain
#

use user.id instead

dusky lagoon
lyric mountain
#

you start by showing index.js at line 180

lyric mountain
dusky lagoon
#

Nope otherwise it would have given me a permission error

lyric mountain
#

@earnest phoenix you're trying to modify the webhook?

icy fjord
#

(node:20404) UnhandledPromiseRejectionWarning: ReferenceError: db is not defined at Client.<anonymous> (\index.js:180:19) at Client.emit (events.js:327:22) Console error how to fix?

lyric mountain
#

edit follow-up message?

#

like, webhooks are a one-way trip

#

you can't retrieve messages with it

#

ik

#

but still, webhooks are send-only

icy fjord
earnest phoenix
#

anyone know how can you make your bot leave every guild at once?

#

(Discord.js)

lyric mountain
#

I have no idea then, check if your request is being sent as actual PATCH

earnest phoenix
#
  bot.guilds.cache.get(id).leave()
    .catch(err => {
    console.log(`there was an error leaving the guild: \n ${err.message}`);
    }```
#

would this work?

#

true but my bot is only in 6 so that will be easy

boreal iron
#

Get an array of the guilds by guilds = client.guilds.cache.array()
Loops through it calling guilds[i].leave()

lyric mountain
#

client.guilds.forEach(g -> g.leave())

#

why bother with optimization if it's just a one-time thing?

boreal iron
#

Eww foreach

#

Well I mean if it’s actually 6 guilds only smirk

lyric mountain
#

oh yeah, java stuff

#

forgot js uses fat arrows

dusky lagoon
#
   // only collect left and right arrow reactions from the message author
                (reaction, user) => ['◀️', '▶️','🗑️'].includes(reaction.emoji.name) && user.id === author.id,
                // time out after a minute
                { time: 600000 }
            )
            let currentIndex = 0
            collector.on('collect', reaction => {
               reaction.users.remove(message.author.id)
                reaction.emoji.name === '◀️' ? currentIndex -= 1 : currentIndex += 1;
                if (currentIndex < 0) {
                    currentIndex += 1;
                }
                if (currentIndex + 1 > pages.length) {
                    currentIndex -= 1;
                }

                if (reaction.emoji.name === '🗑️') {
                    message.reactions.removeAll().catch(error => console.error('Failed to clear reactions: ', error));
                }``` i added `reaction.users.remove(message.author.id)` so it removes the user reaction but instead it deletes the reaction that the bot added?? how can i fix this
lyric mountain
#

use reaction.user.id

#

just noticed user has nothing to do with that scope

eternal osprey
#

these are the intents of my txt file

#

i tried getting the size of it

#

so how many words there are in the txt file

lyric mountain
#

7

eternal osprey
#

it gave me 25 eventually witht his code: if(message.content == "!count"){ const count1 = fs .readFileSync("./keywords1.txt", "utf8") count1res = count1.length;

#

pretty sure that it isn't right

eternal osprey
cinder patio
#

that gives you the total amount of characters

lyric mountain
#

you're counting the chars, yeah

eternal osprey
#

owh

#

what should i use instead?

lyric mountain
#

regex mostly

#

then count matches

boreal iron
#

Split the content by split(/ +/g) and count the created array size

#

@eternal osprey

opal plank
#

or regex

#

\b should catch everything thats non symbol type

#

just check size after that

#

my bad

#

\s

#

@eternal osprey

#

if you want ALL characters(including spaces and newlines) you do <str>.length

#

if you want JUST the characters

#

[a-zA-Z] in a regex capture group

#

if you want ONLY digits \d

#

theres plenty of ways to do count like you want

#

this i would consider a decent case for regex as checking for every character would be annoying as fuck

cinder patio
#

they want to count the words

lyric mountain
#

use \w+

#

so it doesn't match single letters but the whole word

icy fjord
#

@lyric mountain can pm?

lyric mountain
#

no

#

just show how you're defining db

icy fjord
#

brp

#

bro

lyric mountain
#

line 180, file index.js

icy fjord
#

not this

#

xd

lyric mountain
#

about?

winter bear
lyric mountain
#

then ask #topgg-api how to proceed if you still have questions after reading the docs

earnest phoenix
#

is there any efficient way without fetching mongodb on every message

slender thistle
#

Storing in cache and editing the data when users want to edit it

earnest phoenix
#

What is this happening?

slender thistle
#

429 meaning ratelimited

earnest phoenix
#

atm i have caching with changestream ,which gets updated,but often it gets corrupted

slender thistle
#

Corrupted how

earnest phoenix
earnest phoenix
earnest phoenix
slender thistle
#

wait until ratelimit is over

earnest phoenix
lyric mountain
#

also fix whatever is causing ratelimit spam in a single minute

earnest phoenix
#

is there any efficient way without fetching mongodb atm i have caching with changestream

lyric mountain
#

use actual object caches

earnest phoenix
#

it still stays in cache

slender thistle
#

Sounds like an issue with code

lyric mountain
#

this is what you're caching

#

this is what you should cache

earnest phoenix
#

and if the document create are too fast it does not catch

pale lava
#

lol

lyric mountain
#

don't cache streams, they're supposed to have a beginning and an ending

#

cache their values

#

make a map/collection/whateveryourlanguses and store key-value pairs there

#

with the key being whatever u use to access in mongo docs

#

and the value being whatever you'd retrieve from there

#

do note, however, that this is trading RAM for storage

#

more ram = less cache | more transactions
more performance = more cache | less transactions

feral aspen
#
const message = "lol";

const embed = new MessageEmbed()
.setColor(red)
.setDescription(`${message} Hello`)
#

How do I make it for example, If message is equal to "lol", it would add the ${message} before Hello but if it was not equal to "lol" or like if it was false, then it won't add.

#

I'm pretty sure there is a way.

obsidian palm
#

yea you need to collect the message

feral aspen
#

"lol" is stored as a value in the variable message

#

as an example

obsidian palm
#

hmm

#

yes collector works for this

zenith terrace
#

I would of done it with message.content if you put it into a message event

obsidian palm
#

yea

earnest phoenix
obsidian palm
#

no then if the message

#

includes lol

feral aspen
#

Ok.

obsidian palm
#

like lmao lol

feral aspen
#

What if it was this?

obsidian palm
#

then it will send

#

do you want it for only the word lol

#

.content.includes

zenith terrace
feral aspen
#
const lol = message.member.roles.cache.has(server.moderatorRole);

const embed = new MessageEmbed()
.setColor(red)
.setDescription(`${lol} Hello`)

// If the user has the role, it would add the ${lol} but if it was false, then it won't add.
zenith terrace
#

this is what I would of done if it was inside a message event

//code with lol
} else {
//code without lol
}```
feral aspen
#

That will not work if you have multiple ${} at the same line at the same time

#

As you can have 1 true, 2 true, 3 true, or at any time any of them can change.

obsidian palm
#

hmm idk if server.moderatorRole is a function

#

wait a sec

icy fjord
#

Can anyone help me?

dusky sundial
feral aspen
#

Nevermind.

obsidian palm
#

best test it

feral aspen
#

What?

obsidian palm
#

the command

feral aspen
#

That wasn't what I was looking for.

zenith terrace
#

maybe if you actually said about roles my answer would of been different

feral aspen
#

Well, I guess I sent that 1 second before you sent your answer.

#
const check = message.member.roles.cache.has(server.moderatorRole);
const emoji = "😀";

const anotherCheck = message.member.roles.cache.has(server.mainRole);
const emojiTwo = "😉"

const embed = new MessageEmbed()
.setColor(red)
.setDescription(`${emoji} ${emojiTwo} Hello`)

// If the user has the role, it would add the emoji before the Hello
#

Like this.

#

if check was ture, it adds emoji, if anotherCheck was true, it adds emojiTwo, if not, it won't add.

earnest phoenix
lyric mountain
#

streams must be closed after usage

#

don't keep them open smh

earnest phoenix
#

the problem is if many users delete a document it does not receive all streams

lyric mountain
#

use a map/collection/whatever

#

the flow should be like this:

earnest phoenix
lyric mountain
#

use, local, map/collection

#

forget mongo for that matter

earnest phoenix
#

this is the stream

changestream.on("change", function (change) {
    if (change.operationType === "update") {
        var removeIndex = cache.map(function (item) { return item.token; }).indexOf(change.fullDocument.token);
        cache.splice(removeIndex, 1);
        cache.push(change.fullDocument) ;
    }
    if (change.operationType === "delete") {
        /*let index = cache.findIndex(x => x._id === change.documentKey._id)
        console.log(index)
        if (!index) return;*/
        var removeIndex = cache.map(function (item) { return item._id; }).indexOf(change.documentKey._id);
        // remove object
        cache.splice(removeIndex, 1);
    }
    if (change.operationType === "insert") {
        cache.push(change.fullDocument)
    }
})```
#

cache is a object

#

rn have to go off

#

just ping me so i can read it later

lyric mountain
#
data retrieval

bot ──> cache ──> is cached? ┬─> yes ──> return value
                             │               ↑
                             └─> no ──> retrieve from db
#

@earnest phoenix

#
data edit

bot ──> update database ──> is cached? ┬─> yes ──> delete entry
                                       │              ↓
                                       └─> no ──> add to cache
#

"cache" being a map/collection

willow mirage
#

damm

#

nice design

river panther
#

ooof, i wonder how much time did it take you to make it

lyric mountain
#

not much, most is just getting the chars from charmap

willow mirage
#

use the numbers pad + alt

#

it is faster

lyric mountain
#

I never remember the unicode codes

willow mirage
#

me2

earnest phoenix
#

Hey

#

I want to add this:

if (result.includes("A")) result = result.replace("A", " ∀");
if (result.includes("a")) result = result.replace("a", " ɐ");

But I don't want to add this 50 times

#

How to compress this?

copper cradle
#

wdym

cinder patio
#

for loop + switch is one of the alternative ways to do it

#

not sure if you can do it with regex

copper cradle
#

do you want it to replace every single occurrence of it?

#

if so then a regex should do

#

/A/g

#

/a/g

cinder patio
#

but he would still need to do it 50 times for the others...

copper cradle
#

and that'll replace every single A in your string

cinder patio
#

that's what he doesn't want to do.

copper cradle
#

what-

cinder patio
#

...

copper cradle
#

their question isn't that clear tho

#

@earnest phoenix come here

cinder patio
#

He doesn't want to have 50 different if statements for each letter, at least that's what I'm getting from it

earnest phoenix
#

oh euhh

#

In the alphabet, there is 26 letters

#

and I need to add this

#

min and maj

copper cradle
#

alr then gfeud was right

slender thistle
#

for char in someMap
string.replaceAll(char, someMap[char])

cinder patio
#

It would probably be better to reconstruct the string instead of using replace, though not sure

earnest phoenix
#

oh

slender thistle
#

Can't you use a Map here

earnest phoenix
#

no

#

but my script is better oof

#

but I don't want to add 50 times the line

#

O_O

copper cradle
#

then it isn't

slender thistle
#

I'm sorry but how does a Map not apply here

earnest phoenix
slender thistle
#

A Map consisting of char to be replaced as a key and a char to replace with as a value

cinder patio
#

smth like this

const thingsToChange = {a: "Some weird A", b: "Some weird B", ...};
let res = "";
for (let i=0; i < str.length; i++) {
  if (thingsToChange[char]) res[i] += thingsToChange[str[i]];
  else res[i] +=str[i];
}
earnest phoenix
#

okay I test

copper cradle
#

inb4 they just copy the code googlefeud sent and say it doesn't work

feral aspen
#

When writing an inline if statement.

#
.setTitle(`${premium ? supporter : }`)
#

After : I want it to return or not set a value

#

Do I put '' only?

cinder patio
#

an empty string

feral aspen
#

'' only.

cinder patio
#

Also those template literals are pointless

#

""

copper cradle
#

that's not called an inline if statment, that's a ternary operator, just use "", yeah

feral aspen
#

Thanks!

copper cradle
#

don't worry

feral aspen
#
.setTitle(`${premium ? supporter : ""} ${earlySupporter ? earlySupporterBadge : ""}`)

I think if the first one is false, it will put as an empty string, but you see the space between } and $, I guess that makes a problem?

lyric mountain
#

no need for a ternary

feral aspen
pale vessel
#

well premium && supporter || ""

lyric mountain
#

you don't need in that case

cinder patio
#

ternary is the cleanest option

lyric mountain
#

like

lyric mountain
#

if premium is false, then don't show the badge

#

right?

lament ruin
#

I'm trying to figure out how the 'voiceStateUpdate' event works but I have no idea. Is there a way to check if the newMember or the oldMember arent just muting or deafening themselves and just check if they joined left a channel?

pale vessel
#

no

#

it'll stringify false

feral aspen
# lyric mountain right?

If premium is false, it won't show anything, if early supporter badge is false, it won't show anything.

pale vessel
#

just use ternary

feral aspen
#

Ternary it is for now.

cinder patio
#

You can still use && but differently

pale vessel
#

I'd use ternary too but that should also work

lyric mountain
copper cradle
#

lmao

lyric mountain
#

or it'd still stringify false?

lament ruin
cinder patio
feral aspen
#

😀

#

Ayy, it works amazing, thank you all, though.

fierce ether
#

best case system would be creating a new entry into the db with each case author, and the reason with the number correct?

feral aspen
#

if(!oldMessage.guild.me.hasPermission(["SEND_MESSAGES", "EMBED_LINKS"])) return;

Cannot read property "me" of null

umbral zealot
#

oldMessage.guild is undefined - either it's not a message, or it's a message that's not from a guild.

feral aspen
#
module.exports = async (bot, oldMessage, newMessage) => {

    // Checks if the bot has permissions to send messages or embed links to the channel.
    if(!oldMessage.guild.me.hasPermission(["SEND_MESSAGES", "EMBED_LINKS"])) return;

    // Checks if the bot has permissions to send messages or embed links to the channel.
    if(!newMessage.guild.me.hasPermission(["SEND_MESSAGES", "EMBED_LINKS"])) return;
};
#

It's for the messageUpdate event.

umbral zealot
#

Ok. Message updates can happen in DMs.

#

¯_(ツ)_/¯

feral aspen
#

Doesn't look like a good order.

#

😂

umbral zealot
#

Just add a condition to return if there's no guild, should be simple enough

feral aspen
#
// If the message was from a direct message.
    if(oldMessage.channel.type === "dm" || newMessage.channel.type === "dm") return;

    // If the message was from a bot, it would return.
    if(oldMessage.author.bot || newMessage.author.bot) return;
    
    // If the message has no guild.
    if(!message.guild) return;

    // Check if there is a message content.
    if(!oldMessage.content || newMessage.content) return;
    
    // If the bot was offline or restarting and the bot could not cache the message, it will return so it can not return as "undefined".
    if(oldMessage.partial || newMessage.partial) return;

    // Checks if the bot has permissions to send messages or embed links to the channel.
    if(!oldMessage.guild.me.hasPermission(["SEND_MESSAGES", "EMBED_LINKS"]) || !newMessage.guild.me.hasPermission(["SEND_MESSAGES", "EMBED_LINKS"])) return;

    // We need to check if the actual message is a blank message, so it can return.
    if(oldMessage.content.includes(["_ _"]) || oldMessage.content.includes(["_ _"])) return;
#

That is a lot of checks! 👀

earnest phoenix
#

thats no tooooo bad

feral aspen
#

Aw.

earnest phoenix
#

I worked on a bot years ago with some friends and literally a single command had the BIGGEST if statements ever

feral aspen
#

Idek

dusky harness
#

How to send the command block

#

hey

#

look

lusty quest
#

did you want to send a message inside a command block with the bot or here on discord?

dusky harness
#

for our deal

lusty quest
feral aspen
#

Idk him.

quartz kindle
#

yandev is now tsundev?

#

xD

feral aspen
#

🤷‍♂️

lusty quest
#

idk one of them

feral aspen
#

😂

lusty quest
#

but yea the game is a joke

dusky harness
lusty quest
#

runs like you would expect if you saw the leaked code

delicate shore
#

yo guys

#
    if(typeof(input) !== "String") throw new Error(`Expected a string! For example - "This is a message" or "https://youtube.com/user/rickastley"`)

Haven't coded in months, I have forgotten everything KEKW

#
const {isRick} = require("rickroll-detector")
let thing = "https://youtube.com......"
 
console.log(isRick(thing))

this is the code

opal plank
#

lowercase string

#

not uppercase

delicate shore
#

ohh

cinder patio
#

Yo, does discord allow you to use any chats while you're watching a stream?

opal plank
#

yeah

#

use the popout feature

peak knot
opal plank
cinder patio
#

ah right

delicate shore
#
    if(!input) throw new Error("No Input provided!")
    if(typeof(input) !== "string") throw new Error(`Expected a string! For example - "This is a message" or "https://youtube.com/user/rickastley" but recieved ${typeof input}`)
request(input), function (error, response, body) {
  console.error('error:', error)
  let body2 = body.toString()
  let body3 = body2.toLowerCase()
  if(body3.includes("rick roll") || body3.includes("rick astley") || body3.includes("never gonna") ){
  return("Yep, This is a RickRoll!")
  }else{
      return("Nope, This ain't a RickRoll")
  }
  }

😩

lament rock
#

might wanna check the lib's code

#

see how it determines the boolean

opal plank
#

its not that

#

he's returning inside a function scope

#

first, your return is in brackets

#

second

#

even if it didnt

#

your return fullfills this function

#

not the one you originated from

opal plank
#

also request is a promise

hollow haven
#

Idk

opal plank
#

your function should be using async/await

#

read upon that as well

#

i also formatted it for you since you dont seem to be using a linter, this should show how poorly this code was written

#
  if (!input) throw new Error('No Input provided!');
    if (typeof input !== 'string')
      throw new Error(
        `Expected a string! For example - "This is a message" or "https://youtube.com/user/rickastley" but recieved ${typeof input}`
      );
    request(input),
      function (error, response, body) {
        console.error('error:', error);
        let body2 = body.toString();
        let body3 = body2.toLowerCase();
        if (
          body3.includes('rick roll') ||
          body3.includes('rick astley') ||
          body3.includes('never gonna')
        ) {
          return 'Yep, This is a RickRoll!';
        } else {
          return "Nope, This ain't a RickRoll";
        }
      };```
#

request() missing a parenthesis

#

return scope blocked

#

theres a lot of mistakes here

rose lance
#

hey, I'm working on my bots page currently and hit a problem: I somehow can't change the text-align argument of h5s
this is what I'm trying but it still looks like in the screenshot below. It also shows that it works fine with normal text

.entity-content__description h5 {
    color: #eeeeee
    text-align: center;
}```
lament rock
#

is h5 a child of entity-content__description

unreal estuary
#

add a ;

#

after #eeeeee

rose lance
#

yeah I just noticed when posting haha

unreal estuary
#

i think u forgot to

#

lol

rose lance
#

thanks anyways

unreal estuary
#

page looks nice c:

rose lance
#

thanks :D

#

I'm not sure tho if I should really only align the titles and main description tho since it looks kinda weird with the rest

unreal estuary
#

maybe just the titles

#

depends what u want

lyric mountain
#

holy don't center-align the body

#

makes most content unreadable

rose lance
#

still looks quite readable imo

#

but just aligning the white title and the text right below looks kinda weird

lyric mountain
#

that's not center-aligned

#

I didn't mean normal alignment

#

there, edited the message

unreal estuary
#

see how it looks with the title only centered

lyric mountain
#

basically

rose lance
#

I did but it only looks good if the description is one line or longer

unreal estuary
#

maybe center the commands

#

too

lyric mountain
#

imo, make the titles larger and keep everything on the left

#

you could also use columns

cinder patio
#

Holy

#

so I'm planning on making something with lua

#

but all libraries I need are outdated

opal plank
#

useless lang mmulu

#

imagine starting arrays at 1

lyric mountain
opal plank
#

spit

#

disgusting

small tangle
#

What is the best way to delete an embed of a message with java and JDA and jda-utilities? im using suppressembeds()and im checking the permissions before executing the command i got an rest action failure missing access

lyric mountain
#

this from suppressEmbeds()

small tangle
#

oh wait let me checked that, i tried it with manage message

lusty quest
small tangle
#

what is the Messae Read permission in discord "view channel"?

lyric mountain
#

java gave u intellisense, use it

small tangle
#

i mean in discord itself to remove the permission of the bot

#

trying to reproduce the error

lyric mountain
#

yeah, view channel

opal plank
lusty quest
#

well its better than adding stuff that needs more efford to learn into games

delicate shadow
#

how do I make my bot do this

#

look at bottom

umbral zealot
#

what library are you using

small tangle
# lyric mountain

Im kinda lost how to catch that case 😟 im using the eventwaiter from the jda utilities and listen for reactions to that message, but when the bot sent the message, reacts under it and you remove the bot permission to read messages on that message afterwards and react its throwing an exception

#

oh wait im getting an idea FeelsSmartMan

earnest phoenix
#

if you want to see server's name so you need to make eval command.

opal plank
#

@earnest phoenix you do know you're replying to a message, not only from yesterday, but one that was already answered too, right?

earnest phoenix
#

which db supports change streams? without mongodb

lusty quest
#

seems to be a Mongo Spezific feature, cant find any other DB supporting it

crystal wigeon
#

hey umm

#
    /\{(.*?)\}/gm,
    y('$1')
  )```
in my func y the value passed is "$1" instead of the 5 which the replace method would give with the $1 syntax. im sure im doing it wrong here. anyway to get the 5?
pale vessel
#

you can't do that

crystal wigeon
#

so how would i set a variable in a description string

pale vessel
#

use js "hello world {5}".replace( /\{(.*?)\}/gm, match => y(match) )

crystal wigeon
#

ah

#

will try, thanks!

pale vessel
#

i think it should match {5} instead of 5

#

not sure, log it

crystal wigeon
#

wait whats match here?

pale vessel
#

a string

crystal wigeon
#

the syntax for replace is '$1' to get the value

pale vessel
#

it's the string that the expression matched

crystal wigeon
#

and im sure you cant pass a func like that

pale vessel
#

you can

crystal wigeon
feral aspen
#
  const lookup = {
    1: "oof"
  }

  var variable = 1;
  console.log(lookup[variable])
  console.log(look.variable) // <-- How does this not work..
pale vessel
#

nono

crystal wigeon
#

look is not even defined?

pale vessel
#

it's a function

crystal wigeon
#

yeah im passing a func

pale vessel
#

'$1" => is not a valid function

#

that's a string

#

(param) => doSomething()

#

that's an arrow function

crystal wigeon
#

ye it says i cant pass functions

#

to replace

#

wait nvm

#

but its still passing "$1" into the function

#

instead of 5

#

ok its passing the whole {5}

#

instead of jsut 5

pale vessel
cinder patio
feral aspen
#

I forgot that the [variable] is telling it about the value and not the name of the property itself.

#

Thank you.

steel arch
#

If i make a music bot he would need a DataBase?

crystal wigeon
#

which is this case is 5

pale vessel
#

the match isn't $1, it's $&

#

so the whole thing

crystal wigeon
pale vessel
crystal wigeon
#

ah

dusky sundial
steel arch
crystal wigeon
#

how would i strip the number lel

dusky sundial
#

Why do you need to store the queue there?

steel arch
#

I there another way?

pale vessel
#

just slice the brackets

crystal wigeon
#

aight

#

thanks!

dusky sundial
#

You could just store it in the code, no? Unless you plan on having the queue save despite your bot going offline

crystal wigeon
#

worked

steel arch
crystal wigeon
dusky harness
#

bot.on("message", async message => { // Her mesaj atıldığında tetiklenen message eventi.
^

ReferenceError: bot is not defined
at Object.<anonymous> (C:\Users\Hp\Desktop\Bot(2)\deneme.js:14:1)
←[90m at Module._compile (internal/modules/cjs/loader.js:1063:30)←[39m
←[90m at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)←[39m
←[90m at Module.load (internal/modules/cjs/loader.js:928:32)←[39m
←[90m at Function.Module._load (internal/modules/cjs/loader.js:769:14)←[39m
←[90m at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)←[39m
←[90m at internal/main/run_main_module.js:17:47←[39m
PS C:\Users\Hp\Desktop\Bot(2)>

#

where is my fault

rustic nova
#

Was that really necessary

round cove
#

Ghost ping?

scenic kelp
#

@dusky harness can you not

rustic nova
#

-m @dusky harness mass-pinging staff for attention | 2d

gilded plankBOT
#

🤐 Muted Ϟ EFEILGAZHD#9321 (@dusky harness)

livid pine
#

@dusky harness Ghost ping Yapma

scenic kelp
#

that works too

rustic nova
#

Cant deal with it now god damnit

crimson vapor
#

added it to the spreadsheet

steel arch
#

How can i do a only VIPs command?

solemn latch
#

depends on how you define vip

steel arch
solemn latch
#

well, how are you accepting money for vip?

#

like, patreon, paypal, custom subscriptions, or whatever?

steel arch
solemn latch
#

then you will have to probably save each vip manually.

#

so a database

steel arch
solemn latch
#

thats probably a bad option, it means taking down your bot each time a new vip is added.

steel arch
#

Yeah you right... I need to add a DB to my bot, and see how that works, thank you

earnest phoenix
#

@spare goblet pls dm

dusky sundial
#

Don't ping community managers please, what is your issue?

frail mountain
#

hi i cant figure out how to actually make a kick cmd with discord.py any tips?

dusky sundial
#

there is a method you can use called Member.kick(reason="reason here")
Keep in mind that your bot also needs the "KICK MEMBERS" permission to execute that

sick kite
#

كود

dusky sundial
sick kite
#

Code

cunning gorge
#

Hello:

          const className = `${pages[page].title.charAt(0).toLowerCase() + pages[page].title.substring(1, pages[page].title.length)}`;
          console.log(pages[page].title.charAt(0).toLowerCase() + pages[page].title.substring(1, pages[page].title.length));
          console.log(arena.className.price);

I am trying to access a price from my json file. Arena is a json file.

When I run arena.healer.price it works, but when I run arena.className.price it gives me undefined. And the className variable when logged shows healer...

sick kite
#

Code free fire server mena

lyric mountain
#

me don't speak tchakatchaka, me speak english

solemn latch
#

@winter bear have you ever used a database?

solemn latch
#

so your best bet is spending some time learning about databases.

solemn latch
#

databases are too big of a topic to explain them here 👀

#

or if you want something super easy, quick.db is very simple stuff.

#

but pretty much, what youll be doing, in the webhook event(when you receive a vote) you will be saving that vote in the database.
that entry you can set to auto delete after 12 hours(ttl).
whenever someone runs a vote locked command, youll check the database and see if its in the database, if it is, let them run it.

steel arch
#

What would be the best DB for my bot?

solemn latch
#

depends

#

relational, non relational? are you worried about scalability? what are you comfortable with?

#

its something you can spend a lot of time researching

steel arch
#

I'm thinking about MySQL

opal plank
#

if you go for sql based, i'd go with postgres

steel arch
opal plank
#

im highly biased on postgres and redis

#

no, its a normal database

#

you install it and use it

steel arch
#

Oh I prefer a online DB because I just have one computer and have the database always running, i do t know

opal plank
#

mySQL as you wanted, isnt online

woeful pike
#

I prefer managed databases too but my wallet disagrees with me

opal plank
#

postgres keydb redis or cassandra

#

those are the only ones i would personally use

#

postgres as a utility one, it has basically everything you need

#

redis keydb as super performance dbs

#

or cassandra which offers great and easy scalability

lyric mountain
woeful pike
#

i mean people here talk about scalability when they're running databases with less than a million rows lol

steel arch
#

I saw MongoDB but seems very confusing

opal plank
#

i dont think anyone here would reaslistically need for performance bots

#

not below 100k servers at the very least

woeful pike
#

just get a single postgres instance and you're not gonna run into issues for a long time

opal plank
#

and even at those ranges you'd need a lot of queries to manage to abuse it

#

though in fairnes postgres offers clustering too

#

i was checking upon that a while ago

#

same for redis

boreal iron
woeful pike
#

it's very tempting to play with different toys but these scalability databases really don't make any noticable difference for the kind of data you and I work with, not even at top.gg even

opal plank
#

the only reason i had to even bother checking on scaling was leviathan, which legit pulled 98% of twitch's global traffic

#

and i was querying on every message

woeful pike
#

I mean I can't think of many instances where your database access doesn't grow with the size of your data

opal plank
#

i think i was looking at around 120k queries per second

steel arch
#

I'm going to try KeyDB seems to me a very good DB

opal plank
#

keyDB is overkill

#

i would not recommend it

woeful pike
#

just... pick up a relational database first

opal plank
#

vanilla redis would be better

tender dust
#

Hi

boreal iron
quartz kindle
#

when it comes to databases, your data design and structure matters 95% of your performance

earnest phoenix
#

Help

quartz kindle
#

the software you use matters 5%

boreal iron
#

Yeah that’s true for sure

opal plank
#

and what queries you're using too

woeful pike
#

no bro nosql very fast brrrr

opal plank
#

SELECT *

boreal iron
quartz kindle
#

with that said

steel arch
#

I will just use the database to VIP commands

quartz kindle
#

sqlite > all

earnest phoenix
#

İm created a bot i can no invite

quartz kindle
#

:^)

opal plank
lyric mountain
woeful pike
#

use relational database = very stink, not good performance
use nosql = instantly good performance and better in every way pog

opal plank
#

normally nobody would ever deal with that much traffic

quartz kindle
#

use JS = very stink, not good performance
use TS = instantly good performance and better in every way pog

#

/s :^)