#development

1 messages · Page 74 of 1

wheat mesa
#

Probably because I was following a tutorial since I would have no idea how to start on one myself

earnest phoenix
#

Understandable DogKek

#

OSes are very complicated

wheat mesa
#

Yeah

#

I like writing chunks of code in classes a lot, just stuff that encapsulates other stuff to make life easier

earnest phoenix
#

More and more abstractions and stuff are always nicer, makes developers' lives much easier and better

wheat mesa
#

I like writing that stuff from a low level

earnest phoenix
#

But if the abstractions are costly then it's probably not worth it, abstractions should be of almost zero cost in case of the performance at the end result

#

That has been a big deal in a lot of programming languages' development for example, such as Rust

wheat mesa
#

part of the reason I liked writing discord bots is because there was so much I could throw into a bundle of data in classes

#

I could make everything super modular

#

I haven't been able to find as many projects where I can do that as easily now

earnest phoenix
#

how do i host my bot 24/7? im using visual studio

wheat mesa
#

doesn't matter what IDE you're using, you're going to need a VPS

earnest phoenix
#

i need help here.

radiant kraken
#

Cancelled; he decided to contribute rewriting Linux in Rust instead sdTroll

minor olive
earnest phoenix
minor olive
#

Yeah, well all other options are going to cost you real money.

earnest phoenix
wheat mesa
#

I am gladly an Oracle product

#

They own me anyways

inland fern
#

(python) initialising an instance of topgg.DBLclient (with the required params) raises an error due to the breaking asyncio initialisation with discord.py 2.0, any fix?

hardy leaf
earnest phoenix
#

just pay up/selfhost/oracle

hardy leaf
#

Yes paid options are always the better ones.

dry imp
#

oracle 💀 x100

hardy leaf
#

How do I get the bot developer role?

sharp geyser
#

@neon leaf got another question that might be related to nginx, should I use it when routing something like a game server to a domain? My rust server is listening in on port 28015 and using my vps ip but I have no idea what I am doing

#

or should I look into something else?

limber siren
#

anyone know why this is not working

sharp geyser
#

Why the fuck would yyou ask me

earnest phoenix
harsh nova
boreal iron
#

What you wanna use ideally are Service resource records (SRV records) which aren't supported by most of the games unfortunately

#

They would allow you to specify the protocol and port as target

#

Like UDP, port 27905

#

But yeah idk why most games and services don't support em

dry imp
boreal iron
#

Ads

#

Ban now!

sharp geyser
#

I am fucking tired as hell

quartz kindle
#

buy domain
go into domain settings
look for dns records
set an A and/or AAAA record to your vps' IP address

sharp geyser
#

ok

#

I will do that later

boreal iron
#

the hostname however can be anything you like

#

Since your domain itself most likely has your webserver as target you simply create a "sub domain record"

#

Like rust.misty-girl.com IN A 12.34.56.78

bright thorn
#

SelectMenuBuilder() is removed ?

earnest phoenix
bright thorn
boreal iron
#

It's not like FakE called it already like a hundred times

bright thorn
boreal iron
#

Just write the select menu object yourself and you won't suffer from nonsense on any update of djs

bright thorn
#
new discord.StringSelectinteractionBuilder()
                                        .setCustomId("search")
                                        .setPlaceholder("Nothing selected")
                                        .addOptions()
boreal iron
#

StringSelectMenu

slender wagon
#

hey so i am trying the getCookie() function

#

to get 2 certain cookies

#

but it only logs one of them

peak ocean
stiff dust
#

how can I use Path / Headers / Body in post using axios?

neon leaf
#

Do you use the axios API or axios functions (.get, .post, ...)?

lyric mountain
#

I'd recommend against axios

#

node-fetch does everything u need with less boilerplate

sharp geyser
#

@boreal iron I have an A record that points to my IP but it doesn't work in game

quartz kindle
#

dont put it through cloudflare

#

put it in bypass mode

sharp geyser
#

bypass mode?

quartz kindle
#

passthrough

#

disabled

#

idk what word cloudflare uses

sharp geyser
#

proxy?

quartz kindle
#

not proxied

sharp geyser
#

I disabled proxy

#

if thats what you meant

solemn latch
#

When you disable proxy it might take awhile for DNS to update

quartz kindle
#

the orange icon that says "proxied" should be gray and disabled

sharp geyser
#

My only concern is, if I end up pointing another domain to the ip, will it interrupt my aarondye.dev domain making both of them possible to be used?

quartz kindle
#

both can be used

solemn latch
#

are you using something like nginx/apache?

sharp geyser
#

cause aarondye.dev is meant to actually be used for my portfolio but I dont feel like buying another domain to test this

solemn latch
#

Itll make it much easier

sharp geyser
solemn latch
#

I'm not sure if that guide is any good, but virtual hosts is what youll probably want.

sharp geyser
#

Well I’m not actually serving anything no?

#

I’m just wanting to make my other domain (when I end up buying it) be the only one that can be used for connecting to my game server

solemn latch
#

Virtualhosts can point to files, or to other webservers, or anything really.

quartz kindle
#

you most likely dont even need it

#

the domains should work out of the box

sharp geyser
#

Yea but I don’t want aarondye.dev to be able to be used to connect to my rust game server, but both need to be pointing to my vps which will cause that

quartz kindle
#

then you need a router like nginx or haproxy, or even iptables

#

what youre looking for is a reverse proxy

neon leaf
#

Im not gonna go into too much detail but it might help understanding
when you make a dns record it just tells computers that are accessing your url which ip your server requires, so anything ends up as the same ip in most cases, if you have a gameserver and a website it wont interfere since rust is running on a different port, http: 80, https: 443, rust: 28104 or sum, they wont interfere and people can only connect to the rust server through your direct ip (since the orange cloud means it goes though cloudflare) or your record where its deactivated

quartz kindle
#

nginx is often used for that

#

so is haproxy

quartz kindle
#

you install php

lyric mountain
#

you cry

neon leaf
#

yes

quartz kindle
#

configure some webserver to run it

sharp geyser
#

and if you can do that with nginx I have no idea how so any pointers in the right direction would be nice

quartz kindle
#

step 1: install nginx

neon leaf
#

what you are doing isnt really something you should do

sharp geyser
#

why not?

neon leaf
#

limiting ips to connect is kinda unnessesary since it can make the servers connection immensly slower, with my minecraft server I used to test it was about 400ms higher ping

sharp geyser
#

alright well I will just proxy my portfolio domain and not proxy the rust server's domain

quartz kindle
#

that should not happen

#

its perfectly fine to do some basic routing with nginx

#

never seen any ping increase because of it

neon leaf
#

🤷🏾‍♂️

boreal iron
#

Aka sub domain

#

And add the game server Ip as target

neon leaf
#

you should probably ask the author of your site, almost every php site varies

boreal iron
#

Once it's installed and enabled you gonna let the virtual host know to read php files

#

By default the server is listening to html files

#

Index.html

#

Add the following line to your vhost config

server
{
index index.php index.html;
}

lament rock
#

php notcrying

neon leaf
#

you need to setup cgi

boreal iron
#

That's what you usually enable in your global config

#

And not separately for any vhost over and over again

#

But up to anybody...

limber siren
#

@placid crane could you help me with something

stiff dust
stiff dust
lyric mountain
stiff dust
lyric mountain
lament rock
#

global.fetch

#

use undici over node-fetch

#

if using node 17 or higher, undici is built into node as global.fetch

stiff dust
#

ok well with node fetch how can I post Path / Auth / Body ?

quartz kindle
#

undici fetch sucks

#

use undici request

quartz kindle
#

there are also many types of body, like json and form data

#

all of those should be easily found in the documentation of whatever lib you decide to use

quartz kindle
#

path is the url

#

the rest usually goes in the options of the library youre using

#

for example ```js
somefetchinglibrary.post(https://website.com/${id}, {
headers: {
Authorization: ...
},
body: ...
});

#

you have to check the documentation for the library you want to use

stiff dust
#

oh okay

#

tnx

stiff dust
quartz kindle
#

i prefer using node http or undici request, but it doesnt really matter, there are lots of other options too like got, bent, petitio, ky, and god knows what else

lament rock
#

writing your own http agent using raw net sockets

quartz kindle
#

yes

lament rock
#

if you don't care about responses or want to stream all of the data it gives you somewhere, use that

#

audio

quartz kindle
#

someone was complaining about a memory leak in their bot recently

#

turns out the culprit was undici fetch

signal lance
#

@static summit

earnest phoenix
#

Hy Alex
Ich bin schon ein zeidel dabei auf Patreon und da ist mir aufgefallen, dass du öfters von deiner Gruppe redest.
Jetzt wollt ich dich fragen ob du einen Server auf Discord hast und ob ich dem beitreten darf?

quartz kindle
#

what level of wrong server is this ?

lament rock
#

every 10min, I'm posting stats and no issues

quartz kindle
#

they were running undici 5.8.0

#

fetching multiple times per second

lament rock
lament rock
#

Try a gradient at 135° instead of horizontal/vertical

lament rock
#

Yeah

#

If you're gonna animate the bg, make the animation slow

sterile lantern
#

Got these two emails, after the error I couldn’t access my cluster but it seems to have resolved on its own. What’s the reason behind it?

hidden gorge
#

can someone explain what this is?

lone wing
#

looks like a debug page

hidden gorge
#

it’s on my discord though

lone wing
#

oh wtf

lament rock
#

If you're using client mods, stop. It's where developers upload their client version others can use temporarily until the override link expires

craggy pine
flint sage
whole glen
#

To get your bot verified can I use a permit instead of a drivers licenses?

earnest phoenix
whole glen
#

Oh ok well sucks to be me already sent it

earnest phoenix
whole glen
#

It says it’s verified

#

So idk

earnest phoenix
earnest phoenix
winter pasture
#

Should be located under the General information tab

earnest phoenix
#

How am I able to send a message via webhook on a Thread again? I've done it before, I just forgot how.

whole glen
lament rock
#

copy other people's and change it up a little

pale vessel
sage bobcat
#

One message removed from a suspended account.

tired stream
#

my bot

lyric mountain
#

errr...you know that's just the account, not the bot itself right?

terse bone
#

Lmao

whole glen
#

Happy

signal lance
whole glen
#

They are asking me to make a better privacy policy but my bot doesn’t even store any data

signal lance
whole glen
#

Bro they emailed me saying they needed one

novel snow
#

Anyone here have any experience with the Discord OAUTH2 Applications? As I am running into some issues but cannot seem to wrap my head around them

quartz kindle
#

what issues?

terse bone
#

Lol

#

And they accepted it

whole glen
#

Just got mine done

#

And verified

sterile brook
#

Do anyone know answer to this situation:
i have one global object this.client.someCollection
This is array of objects like this:

[{
  _ID: 3,
  charges: 10,
  code: 'G-3',
  color: '#b47756',
  name: 'Apricot Mix',
  owner_id: '271726440641331200',
  radius: 15,
}, {...}]

when i am changing charges in one certain object during command to 7 for example and then i use another command to view this object, charges remain 10

tired stream
#

he’s

#

sure I am sure

lyric mountain
#

you need to mind thread safety even in langs that don't have threads (cuz they still have some form of parallelism)

#

for example:

A | 10 charges >--- 1s -> 7 charges                    |
B | 10 charges >----------- 2s -----------> 10 charges |
#

both started at the same time, but since A took less time to complete, B completely overrides the final value

#

a common solution would be to synchronize accesses to that collection, to prevent two tasks from using it at the same time

sterile brook
#

not in same time

#

after second 6, i used another command

quartz kindle
#

can you show your code

sterile brook
#

to view object

#

First command

#

with simple change

#

That what i am doing in another command and getting not that result that i expected

#

console.logs u can see upper

quartz kindle
#

is that an array of normal objects or an array of mongo/mongoose objects?

lyric mountain
sterile brook
quartz kindle
#

mongo objects have a bunch of weird properties and behaviors that change based on your schemas

#

also they are not meant to be directly edited

#

you should be using mongo update functions

sterile brook
#

like for example this works perfectly
this is also mongo obj

#

changed names of prop

quartz kindle
#

does that actually save the value in the database? afaik thats only editing the object locally

sterile brook
#

yes i am just trying to make local edits

#

and i cant do even that

quartz kindle
#

yeah but once you access mongo, the real values will overwrite your local edits

sterile brook
#

i that certain situation i need only local edits

quartz kindle
#

well i think mongo is interfering with that

#

so put your local edits in a different place

solemn latch
#

I feel like that's the correct way to do it anyway.

If you're making edits not to the database it shouldn't be in the same place as your database.

#

Just so its easier to know what's going on.

lyric mountain
#

not even sure why mongo has "local" and "persisted" storages to begin with, but perhaps I'm just spoiled with sql transactions

#

get -> update -> commit, no changes wandering around uncommited

sterile brook
#

most meme is this
1st log prints 7
2nd prints unchanged 9 in one func now

#

i found even bigger meme

#

that shit happens only when object is in array

quartz kindle
#

your bot is haunted

#

they coded the ghost

#

somehow

lyric mountain
#

do you mean they have
🤏👓
a botghost?

sterile brook
#

oke

#

solved guysfreerealestate

whole hinge
#

Hi, I am looking to add a function that does a mini interview upon joining my server.
Basically; Are you here for A) or B)
Selecting one of the options prompts next set of questions. etc.
What bot would suit me best?
Thanks in advance

hybrid cargo
whole hinge
hybrid cargo
#

Or you could have the whole server locked by a role, and only having one channel visible to new-joiners. And only after they complete the survey they can enter the server (aka get the member role kinda thing and get perms to view all other channels)

hybrid cargo
whole hinge
#

Oh, okay! Let me explain myself a little bit more clear. I think I've messed up my explanation

#

Basically when you join the server I want it to ask the reason you are here.
If you are wanting Package #1 or Package #2
Selecting the option you want will redirect you to the channel that offers that package. Perhaps redirect you to a URL.

#

Basically like a directory.
It will redirect you based on the selection you choose.

hybrid cargo
#

Oh okay, well the best case screnario can be having a bot to ping them in a certain channel (possibly the introduction channel) upon join and send a message saying that.
Could be done in two ways, just use any bot that has welcome messages and send a message when someone joins with the links. Something like

Welcome, Select the below link to go to the respective Package
Package #1: <link>
Package #2: <link>
#

Or you could just have a bot send the message with buttons that let them select it

#

But that also does the same thing just with a bit more complexity

whole hinge
hybrid cargo
#

well only to code your own bot

#

I dont think any bot has that feature

thorny cargo
#

I basically want the code to send me alerts each time someone trades something (someone == configured user) , the alerts will be sent to a configured discord channel . I get this error

const leaderboards = await Promise.all(users.map(userId => binance.futures.getLeaderboard(userId)));
                                                                             ^

TypeError: Cannot read properties of undefined (reading 'getLeaderboard')

I also added comments to the code so yall know what I am trying to do.
here is the code :

// Specify the users to track
const users = [
  '0932D2B47499C2E940AE805D3D2D9B72',
  'D8C8D5F58F1D6BEA7C2D8A83C974F8BA',
  'B952767C0F1B876D47D50F2F70BC68E9',
];


// Create a Binance client
const binance = Binance({
  apiKey: binanceApiKey,
  secret: binanceSecret,
});

// Get the Discord channel to send the message to
const channel = client.channels.cache.get(channelId);

// Call the code to retrieve the user's trade information and send the embed message
// every second
setInterval(async () => {
  // Get the leaderboard data for each user
  const leaderboards = await Promise.all(users.map(userId => binance.futures.getLeaderboard(userId)));

  // Get the user's trades
  const trades = await Promise.all(users.map(userId => binance.futures.getTrades(userId)));

  // Create an embed message with the user's trade information
  const embed = new Discord.RichEmbed()
    .setColor('GREEN');

  // Add the user's trade information to the embed message
  users.forEach((userId, index) => {
    const leaderboard = leaderboards[index];
    const userTrades = trades[index];

    // Add a title to the embed message with the user's name and trade count
    embed.setTitle(`Trader ${leaderboard.userName} has made ${leaderboard.trades} trades!`);

    // Add the user's current balance and total profit to the embed message
    embed.addField('Current balance', leaderboard.currentBalance, true);
    embed.addField('Total profit', leaderboard.totalProfit, true);

    // Add each trade to the embed message
    userTrades.forEach(trade => {
      embed.addField(
        `Trade ${trade.orderId}`,
        `${trade.side} ${trade.price} ${trade.symbol} at ${trade.timestamp}`,
        true,
      );
    });
  });

  // Send the embed message to the Discord channel
  channel.send(embed);
}, 1000);

I am using the binance-api-node npm

#

any help is appreaciated

lone wing
#

i got role pickers working in a sorta intuitive way

#

you use </roles create:0> to create a role picker and then use </roles add:0> with the ID and role you want to add to the picker

whole hinge
#

@hybrid cargo
What bot does this

craggy pine
# whole hinge

There's a lot of bots on top.gg, unless it's a commonly used bot, it would be hard to tell you exactly which one that is.

whole hinge
craggy pine
sharp geyser
#
            CREATE TABLE IF NOT EXISTS user(
                id          BIGSERIAL,
                user_id     VARCHAR(1000) NOT NULL UNIQUE,
                balance     BIGINT DEFAULT 1000 NOT NULL,
                class_id    SMALLINT
            );

So how is this invalid syntax? It tells me that there is an error at or neat user but this looks correct based on the numerous examples I have seen

sharp geyser
#

figured it out

#

didn't know user was a reserved keyword

lament rock
#

rip lol

sharp geyser
#

this is what I get for not touching raw sql

#

orms have babied me too much

#

I didn't even know sql had reserved keywords like that

lament rock
#

There are built in tables and queries you can do to show backend info. It's actually really cool

hasty mulch
#

How do I edit an embed in d.py 2.0?

hasty mulch
#

This is what I have so far:

    @commands.command(name='edit-specific', hidden=True)
    @commands.is_owner()
    async def _edit_specific(self, ctx, type = None):
        if type == 'role-request':
            message = await ctx.fetch_message(1038828402536349736)
            embed = message.embeds[0].fields[0].value = '''
The following roles can be requested:
- <@&762321175900454933>
- <@&763478824641495040>
- <@&959865461846204436>
- <@&853817144243650561>
- <@&1024429857104478228>
- <@&1045827799967088840>
            '''
            embed = message.embeds[0].footer.text = f'Developed by {self.bot.owner}'
            await message.edit(embed=embed)
final surge
#

what do u want to edit

hasty mulch
final surge
#

oh then im clueless as well

quartz kindle
hasty mulch
quartz kindle
#

then edit and send as normal

hasty mulch
wicked violet
#

/roles create

tulip hinge
#

Can someone tell me how do I know how many members have a role? Discord.js V14`

lyric mountain
#

Well, you'd need to fetch all members and filter my role

#

Inb4, that's a bad idea

tame linden
#

Fetch all members and their roles then store it and using intervals to update it after a period. I think it is good enough to use

digital swan
#

Discordjs already caches members & roles

lyric mountain
#

not all tho

digital swan
#

true

if (guild.memberCount != message.guild.members.cache.size) {
  await guild.members.fetch()
}

role.members
#

magic

whole glen
#

How can the snow giving bot add emojis to one person for a discord server with out giving it to the whole server or is that what it does?

lyric mountain
earnest phoenix
#

thats java

lyric mountain
#

kinda, but the point stands

#

fetching all members is a terrible idea

earnest phoenix
#

it is

earnest phoenix
whole glen
#

The snow giving has this: 🎣 Amazing! You fished the :PhibiSled: PhibiSled emoji! You can use it in this server, and if you have Nitro you can use it across servers

earnest phoenix
#

I don't get it, that's the exact same case with all custom emojis

#

It creates the emoji in the server it's run in, so everyone can use it, and if you have Nitro you can use it in all servers

#

Although you can limit the users that can use a specific emoji by roles, Discord has an endpoint for that

whole glen
#

Never knew that my bad

hidden gorge
#
<script> type="text/javascript"
window.onload = function(){ 
                alert("Website Made by James | Coded On ");
                }
                                              </script>```
earnest phoenix
#

the >

hidden gorge
#

this one?

#

it causes this

#

and doesnt work

#

FOUND IT

#

i missed a </script> above the <script>

lyric mountain
#

uhh

#

buddy

#

you REALLY need to learn how html works

hidden gorge
#

im dumb ok

lyric mountain
#

not an excuse

hidden gorge
#

im bored

limber siren
#

Dose anyone have a clue?

lyric mountain
#

i is undefined

signal lance
limber siren
signal lance
limber siren
#

that's what I mean but its not

signal lance
limber siren
#

short for interactions

signal lance
#

not quite sure if i is a actual thing, have you tried just interaction?

lyric mountain
lyric mountain
quartz kindle
#

show more code

#

also show index.js line 123

limber siren
quartz kindle
#

thats the problem

limber siren
#

oh really

#

do you know how I can fix it

quartz kindle
#

function parameters are passed by order, not by name

#

if you do execute(interaction, client)

#

then on the other code thats what the order will be

#

so where you wrote client, thats not client, thats interaction

#

where you wrote message, thats not message, thats client

#

and i does no exist

knotty quartz
#

"I" sounds like python code

for i in range()

lyric mountain
#

i is just the common name for iterator variables

#

others are j, it, x, y, z, w

knotty quartz
lyric mountain
#

...you have python in your tests?

knotty quartz
lyric mountain
#

you better put a ruler in your backpack

#

cant miss those indents

knotty quartz
#

Stuff like:

Fix the errors
Unscramble the code
Write your own code to a specific function
and turtle ect

knotty quartz
prime mist
#

I think I just made my dream Discord library. Command type safety ❤️

sterile brook
lyric mountain
#

That's just TS with extra steps

#

It looks somewhat similar to my command handler

#

Perhaps one day I'll release a lib of it, too lazy to document

sharp geyser
radiant kraken
#

i regret making my discord library

lament rock
prime mist
lament rock
#

"super promises"?

broken swift
#

Hi good morning

prime mist
lament rock
#

Are they cancellable?

#

I have unique problems with Promises

prime mist
rocky hearth
#
function Car() {
  this.make = "hi";
  return { make: "by" };
}

const car = new Car();
console.log(car.make);

Can someone explain this? What's happing here?

earnest phoenix
# rocky hearth ```js function Car() { this.make = "hi"; return { make: "by" }; } const car...

Classes are functions with additional abstraction, what's happening here is that when you assign the property make to the this context of the Car() function, and then return a value to the function, the properties assigned to the function's this context will be cleaned because classes can't return their own values in their constructors, so the object you're returning will be it's value

#

If you don't return a value, and call the function with the new keyword, the properties assigned to the this context of the function will remain, in this case make property's value will be hi if you don't return a value

rocky hearth
#

Ooh I see. 👍
Thanks for taking this time to explain.

rocky hearth
rotund linden
#

hi

surreal sage
#

ChatGPT is replacing stackoverflow slowly 🥶

#

Personal coding assistant then

#

Anyways it's hella crazy

plain coral
#

here!

#

there example sp , pt and en

#

no cant click no solution

#

if (language === "sp") {

#

if (language === "pt") {

tired panther
plain coral
#

no problem.

#

have done solution.

lyric mountain
raw gust
#

How can I report bot rain?

earnest phoenix
#

Already replied in general

radiant kraken
#

@wheat mesa Rust's Deref trait is basically acts like inheritance, right?

lament rock
radiant kraken
lament rock
#

Maintaining an already existing one is painful

#

Only real upside is that one of Vexera's devs sometimes opens issues and PRs

earnest phoenix
#

Discord API wrappers are definitely one of the hardest wrappers to properly maintain

#

So many moving parts and so many changes to be done almost every day

radiant kraken
lament rock
#

Stuff like snowtransfer and cloudstorm are already basically libless and the real maintenance is just whenever routes/gateway changes or maintaining a types package which I also do

lyric mountain
earnest phoenix
lyric mountain
vivid fulcrum
surreal sage
#

best way to encrypt things: make your own encryption methods with 0 knowledge on mathematics

#

yeah no it justs starts working with aes cbc

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

surreal sage
#

lmao yeah

sage bobcat
#

One message removed from a suspended account.

surreal sage
#

maths Ew

sage bobcat
#

One message removed from a suspended account.

surreal sage
crystal wigeon
#

Yo how to remove auction

#

I accident bid 1000$ EMJ_jerrycri

#

Pls help

lyric mountain
#

"accidently"

crystal wigeon
cunning thistle
#

Here’s a picture of a frog

rugged dawn
#

or you can just ping xiuh or mac in #auctions-support and ask them to remove

sterile lantern
lyric mountain
#

take that with a grain of salt, I never used it, I'm judging by the content of the message

sterile lantern
limber siren
#

My commands are duplicated and I'm assuming it is related to slash command registering

#

Can anyone help?

boreal iron
#

You are aware that a registration is a one time process?

#

Also The code you showed doesn't show the registration at all

limber siren
#

Do you know what the duplication could be

next storm
boreal iron
next storm
#

empty array will delete all the slash cmds i hope so

#

yeah, it automatically gets updated i guess

boreal iron
#

That won't fix his issue if he executes the registration multiple times

limber siren
next storm
#

this is an event vro

boreal iron
#

Still not the right part of code

next storm
#

this isn't the registration part

limber siren
next storm
#

still wrong part

#

it's prefix command loader

#

seems to be modified version of a code

boreal iron
limber siren
#

My uncle coded it and I modified it

#

why

#

its not

next storm
# boreal iron It's not

client.commands is a temporary instance, slash commands are stored on client.application.commands

boreal iron
#

You may ask him then where he puts the command registration part

boreal iron
limber siren
#

I am not I know what everything is doing

#

I just dont understand slash commands

boreal iron
#

worst guide you can read

limber siren
#

its my first time doing that

#

init

boreal iron
#

lol what a question

next storm
#

@limber siren can you show the folders which has all the files

limber siren
#

I am ready I guide you right now but I am also studying the code he gave me

boreal iron
#

Your structure is most likely copied anyways...
So search for "Route" in your files

limber siren
#

well I didn't ask

boreal iron
#

And show the result

next storm
#

it would be better if you show your folders which has the files in it. it would be easy to find, where you have registered

#

😂

limber siren
#

yes thats how you learn

next storm
#

it's okay thunder, chill

limber siren
#

you cant learn to drive a car without driving it

#

thats what I am doing

boreal iron
#

Man show the results of the search...

limber siren
#

my uncull was on call with me while making it

next storm
#

well we asked you to show some parts of your code

#

if you show then we could help you

limber siren
#

wait I have it twice thats why

#

lol

next storm
#

lol

boreal iron
#

It's not twice, it registers them as guild commands once then as global ones, too

boreal iron
#

You wanna decide what scope they are

#

Global or guild ones

next storm
#

btw, which version of d.js are you using?

boreal iron
#

Also make sure not to execute the registration on any startup but only if you register a command

#

Multiple registration cause commands to show up multiple times too as discords caching behavior is trash

limber siren
#

after deleting it they are still two unless I have to wait an hour

boreal iron
#

Also Clients executing a slash command while registering it will receive an error

boreal iron
limber siren
boreal iron
#

Should be somewhere in the settings if that's the same across all clients

#

Just to make sure... how did you delete em?

next storm
#

I guess he used my way 😂

limber siren
#

I checked dev portal

boreal iron
#

Well you said:

#

after deleting it they are still two unless I have to wait an hour

#

Makes me think you deleted them

limber siren
#

oh I meant deleting the code that I didn't need cuz I did it twice

boreal iron
#

You can patch the existing registered commands by calling client.application.commands.set([]);

#

Which posts an empty array clearing your current command set

limber siren
boreal iron
#

I already wrote what to do

#

Call the code once

next storm
#

don't use rest to register slash commands i would suggest, do directly with client.application.commands.set(arrayOfSlashCommands)

#

it's a better way, and an easier way too

boreal iron
boreal iron
#

But it's relatively nonsense to import the rest handler as there are already existing methods you can access through your client

#

Anyways let's see if he does what he got told to do

next storm
#

Hm

sterile brook
#

any clues on bot just closes during commands without any exeptions, logs, etc
memory usage is also stable
Me using VScode

wheat mesa
#

Generally speaking you should have some sort of error if it just “closes”

#

What library are you using?

sterile brook
#

Thats why i am asking

#

node.js v16.13.0
rest dependencies is:

#

No, but that is not the topic atm

wheat mesa
#

You should update to v14 discord.js

sterile brook
#

oh lol

#

ok ty, mb it will solve this

lyric mountain
#

no need to be rude when people spot issues

sterile brook
#

i am not rude btw

#

ty for suggestion

#

but as i said

#

it wasn't the topic in that moment

quartz kindle
#

if it closes without any error, that means you're swallowing the errors

#

check your catch blocks and make sure they are logged and not ignored

#

for example dont use stuff like .catch(() => {}) unless you're sure the error is safe to ignore

#

test all your commands and try to find which one is causing the crash

radiant kraken
#

my question was ignored

boreal iron
#

average rust user just being mad_

radiant kraken
#

shut up fake

boreal iron
opaque acorn
#
const existing = channel.messages.cache.get(data.id);
                                        ^

TypeError: Cannot read properties of undefined (reading 'cache')
    at MessageCreateAction.handle (C:\Users\Iker\Desktop\RAILBANG\node_modules\discord.js\src\client\actions\MessageCreate.js:11:41)
    at Object.module.exports [as MESSAGE_CREATE] (C:\Users\Iker\Desktop\RAILBANG\node_modules\discord.js\src\client\websocket\handlers\MESSAGE_CREATE.js:4:32)
    at WebSocketManager.handlePacket (C:\Users\Iker\Desktop\RAILBANG\node_modules\discord.js\src\client\websocket\WebSocketManager.js:384:31)
    at WebSocketShard.onPacket (C:\Users\Iker\Desktop\RAILBANG\node_modules\discord.js\src\client\websocket\WebSocketShard.js:444:22)
    at WebSocketShard.onMessage (C:\Users\Iker\Desktop\RAILBANG\node_modules\discord.js\src\client\websocket\WebSocketShard.js:301:10)
    at WebSocket.onMessage (C:\Users\Iker\Desktop\RAILBANG\node_modules\ws\lib\event-target.js:132:16)
    at WebSocket.emit (node:events:513:28)
    at Receiver.receiverOnMessage (C:\Users\Iker\Desktop\RAILBANG\node_modules\ws\lib\websocket.js:1008:20)
    at Receiver.emit (node:events:513:28)
    at Receiver.dataMessage (C:\Users\Iker\Desktop\RAILBANG\node_modules\ws\lib\receiver.js:517:14)
#

?

fervent goblet
#

I am trying to make this more efficient. As it stands users some times get spammed multiple messages or get nothing at all. Any ideas?

  setInterval(async function () {
    let reminders = await Reminder.find();
    var toRemind = []
    for (let i = 0; i < reminders.length; i++) {

        var commands = reminders[i].commands;
      
      for (let v = 0; v < commands.length; v++) {
        
        var cd = await client.cd.checkCoolDown(reminders[i].id, commands[v]);
        
        if (!cd.reminded && cd.ready) toRemind.push(commands[v]);
          
        await client.cd.setReminded(reminders[i].id, commands[v]);
      }
      
      let embed = new EmbedBuilder()
      .setColor(client.bot.color)
      .setAuthor({ name: `Reminder`, iconURL: client.user.displayAvatarURL({ dynamic: true }) })
      .setDescription(`The following commands are ready for use:\n**${toRemind.join("\n")}**`);
      
      let user = await client.users.fetch(reminders[i].id).catch(err => {});
      
      if(user&& toRemind.length>0) await user.send({embeds: [embed]}).catch(err => {});
      
      console.log(reminders[i])
    }

  }, 130000)
plain coral
#

"mysql.connector.errors.DatabaseError: 2003 (HY000): Can't connect to MySQL server on 'localhost:3306' (111)"

#

hmm error CM_Hmm

plain coral
#

no cant connect mysql

lyric mountain
#

And please, move away from mysql or at least use maria

plain coral
#

but have my hosting phpyadmin.

lyric mountain
#

Phpmyadmin is a dbm, not a host

plain coral
#

@lyric mountain

plain coral
lyric mountain
#

?

#

Phpmyadmin is a tool, it has nothing to how with mysql hosting

plain coral
#

because I have no idea how is this for phpmyadmin for mysql to work? how is this solution?

lyric mountain
#

php mysql administrator

plain coral
lyric mountain
#

show how ur doing it

plain coral
#

i understand but I don't work asi why.

lyric mountain
#

is mysql running?

plain coral
#

nop, because I have hosting phpmyadmin.

#

...

lyric mountain
#

*sigh*

#

phpmyadmin has nothing to do with mysql hosting

#

it's a separate tool

plain coral
#

I see, what's the idea?

lyric mountain
#

there's no idea, simply follow a mysql setup tutorial

plain coral
#

think api

#

ok

#

thanks.

#

think idea other hmm

#

:/

lyric mountain
#

I have no idea what you're trying to say

plain coral
#

yeah okay

south kiln
#

how to make auto refresh embed

#

anyone please help

boreal iron
#

Use an interval and edit your target message passing your (edited) array of embed(s) to it

opaque acorn
#

180 ping is ok for a bot?

dry imp
#

ok

#

even i play moba and fps on 250ms is fine

rose warren
#

Ping on a bot is kinda irrelevant unless you're playing music or if your ping is so bad it's making slash commands fail darkAYA

rocky hearth
#

How can I check if my internet connection is running through a proxy?

lyric mountain
#

I still wonder why people even attempt to make a music feature when there're so many good music bots around

sterile brook
#

Cuz most guides on yt is about how to make music bot

#

Or etc

neon leaf
#

is melonJS good for making browser games? or should I literally use react since im prob not gonna make like a platformer

dry imp
#

webgl with unity

neon leaf
#

id prefer javascript

lament rock
earnest phoenix
lyric mountain
#

javascript game engine doesn't sound very...performant

lament rock
#

Unity webgl is a better option

craggy pine
#

To be fair i designed my own music system because there are specific things i want or more or less want full control over. I get why but ya a lot of bot tutorials are usually music bots 😂

surreal sage
#

What html framework is used like this?
html
head
body
div

#

or similar

#

saw it in a code report once (yes that one)

wheat mesa
#

?

#

That’s just html

#

Lots of frameworks use base HTML, they just provide extra stuff on top of it to make your life easier

surreal sage
lyric mountain
#

perhaps a yaml-based html parser

#

also, it's </(tag)>

lyric mountain
#

may I warn you tho, html structure is a feature, not a burden

#

using a yaml-like structure will make your code unreadable at best

lament rock
#

for sure

neon leaf
#

whats the best way to make alot of movable divs in react? (all directions, like desktop windows)

#

I settled on using react-draggable

crystal wigeon
#

yo

#

can someone tell me how auctions work? on topgg

#

i got 94$ in vote credit, do i put 94 in both the input boxeS?

lyric mountain
#

The highest bet gets it

crystal wigeon
#

yeah i got the first part

#

but what is the second pe?

#

the 20 @ 100

#

is 100 the amount i pay? from vote credit

#

or 20$?

lyric mountain
#

20 every 100 clicks ig

#

Or 20 for 100 clicks

#

@ reads "at"

crystal wigeon
#

wew i see, adding "$" makes it confusing

lyric mountain
#

Credits is a currency too, just exclusive to topgg

crystal wigeon
#

so after the bid ends i would need to pay 20

#

yea

#

i got that

#

so if i did 90$ @ 100$ i would need to pay 90 at the end right?

lyric mountain
#

That's a question best asked in the proper support channel

#

But I think so

crystal wigeon
#

mmm, alr thanks

lyric mountain
#

no need to ask if anyone can, just ask the question directly

compact pier
#

with

this
#

just ask bro, don't ask to ask question

#

how did you fetch it?

#

can you show me the code

boreal iron
#

11 message listeners added to client

compact pier
boreal iron
#

Man... stop creating unnecessary event listeners

#

That's the first issue you should solve

#

Do not add multiple event listeners for the same event

#

In your case message event

#

(messageCreate I assume)

#

Errr the better question is which lines you should definitely remove

compact pier
#

bruh that api url don't even exist

#

got redirected to this

lyric mountain
#

what even is that no-api-key

boreal iron
#

Well obviously a lost domain

compact pier
#

@raven parcel where did you find the api?

#

can you show me documentation?

lyric mountain
#

the big question is, what is that code supposed to do?

#

like, show user pfp?

compact pier
#

I think, you can't trust your friend :DD

lyric mountain
#

aaaand they delete all messages

compact pier
boreal iron
#

Somebody could steal his legendary code you know

lyric mountain
#

I think I saw a tittleless "i" there

#

100% copypaste-proof code

boreal iron
#

Indeed

compact pier
#

it is anti read code

#

you write in complied style

boreal iron
#

I mean anybody knows you just need to add a (c) into your code and it's save

#

_entirely save _

lyric mountain
#

meanwhile one of brazil's fed sites

#

someone forgot to renew the copyright footer KEKW

boreal iron
#

Imagine not generating the year in your backend

compact pier
#
const copyright = `(c) Copyright ${new Date().getYear()} Correios`

is much better

boreal iron
#

Eww JavaScript

lyric mountain
#

lul

compact pier
boreal iron
#

Guess that will take a while

#

Going to sleep meanwhile

compact pier
granite remnant
#

I want to change the color of my Bots Page like this bot and got told that I should use css. Can I get a small example how to inject css please? ^^

winter pasture
#

@granite remnant Here is the code from the page you linked

<style>
#menu {
  background: #6596f9 !important;
}
.llbETX {
  height: auto;
}
.code,
b,
.entity-header__name,
.entity-announcement__title,
.entity-header__button-icon,
.star {
  color: #e4ecfd !important;
}
.entity-header__image,
.logo img {
  animation-name: SpinAnimation;
  animation-iteration-count: infinite;
  animation-duration: 1s;
  animation-timing-function: linear;
}
@keyframes SpinAnimation {
  from {
    transform: rotate(-180deg);
  }
  to {
    transform: rotate(180deg);
  }
}
.body {
  background-color: #fff !important;
}
:root {
  --background-dark: #fff !important;
}
.ml-3::after {
  content: " from our awesome community! ";
}
.entity-sidebar__title::before {
  content: "The Tempy ";
}
.user-name:nth-child(1)::after {
  content: " (Founder)";
}
.entity-sidebar__website::before {
  content: "Visit the Tempy  ";
}
.entity-button {
  background: #3254b3 !important;
}
.entity-header__button-text {
  background: #3254b3 !important;
}
.entity-header__button-icon {
  background: #3254b3 !important;
}
.pill {
  background: #3254b3 !important;
}
.entity-header__button {
  color: #ffffff !important;
}
.entity-table__cell {
  color: #ffffff !important;
  background: #3254b3 !important;
}
code {
  color: #ffffff !important;
  background: #3254b3 !important;
  font-family: "Inter", BlinkMacSystemFont, -apple-system, Segoe UI, Roboto,
    Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, Helvetica,
    Arial, sans-serif !important;
}
.entity-table__cell:nth-child(odd) {
  color: #ffffff !important;
}
.entity-tag {
  background: #3254b3 !important;
  color: #ffffff !important;
}
.entity-owner {
  background: #3254b3 !important;
  color: #ffffff !important;
}
.entity-content__description {
  background: #6596f9 !important;
}
.review__action-button {
  background: #3254b3 !important;
}
.review__action-button.active.positive {
  background: #cc00ff !important;
}
.entity-announcement {
  background: #3254b3 !important;
  color: #ffffff !important;
}
.entity-announcement__date-wrapper {
  color: #ffffff !important;
}
.entity-announcement__date {
  color: #ffffff !important;
}
.entity-content__section entity-reviews {
  background: #3254b3 !important;
}
.entity-announcement__header {
  background: #3254b3 !important;
  color: #ffffff !important;
}
body {
  background: #6596f9 !important;
}
.entity-header__star.star.icon {
  background: #6596f9 !important;
}
.entity-content__description {
  background: #3254b3 !important;
}
.nav__NavbarParent-sc-1r2v9d7-0 llRurQ is-widescreen is-mobile site-nav {
  background: #6596f9 !important;
}
.StarRating__StarGrid-sc-14c4h6v-1 kiLlqk comment-stars-parent {
  color: #6596f9 !important;
}
</style>

You can inspect element on any page to see the code :)

granite remnant
#

Thank you this will help me! :)

surreal sage
#

How do I move the border down a pixel?

#

margin-bottom: -1px ThumbsUp

raven parcel
#

It says undefined, how can I delete that text?

lyric mountain
#

This time don't delete the question, please

raven parcel
#

okey

lyric mountain
#

Show how're you defining that field

#

Or is it supposed to be just the bold text?

raven parcel
lyric mountain
#

Ah yeah, just the bold text then

#

You need to define a content for the field

raven parcel
#

okey

lyric mountain
#

.addField("title", "content")

raven parcel
#

oh

lyric mountain
#

You're currently only defining the title

raven parcel
#

Is there anything else he should do?

lyric mountain
#

Nope, it's appearing undefined cuz u didn't set anything for the content

#

Do note, it'll still have a blank space in that line, fields always occupy at least 2 lines

raven parcel
#

okey

#

thank you

eternal osprey
#

hey guys

#

would this be a valid sql code to create an assertion?

#
CREATE ASSERTION MaximumGrams
CHECK( 1000000000>=(
SELECT SUM(weight) FROM Copy
)
)```
#

I basically want to check whether the total weights in the copy table don't surpass a billion

lyric mountain
#

cant u just use a trigger?

eternal osprey
#

nah we must use assertions

lyric mountain
#

school exercise?

#

gonna be honest, I never ever user that thing in sql

eternal osprey
#

yessir

lyric mountain
#

given how weird it is, is it sql server?

eternal osprey
#

I am usually using duckdb

#

But yeah its sql based

lyric mountain
#

quite an odd hole you got yourself into eh?

#

but well, I think that's something exclusive to duckdb, perhaps you can find good answers if u specify it on google

eternal osprey
#

no duckdb doesn't even have this implemented

#

it was recommended to us to use it

#

while we cannot even have all the needed features lmao

lyric mountain
#

that ain't standard compliant sql, that's for sure

#

oh wait, just noticed

#

it's you!

#

I'm starting to question what kind of school is that

eternal osprey
#

its ISO SQL-92 Standard spec.

tired jacinth
lyric mountain
#

bruh 💀

#

but well, ignoring the insane amount of newlines, ur not completing the interaction

tired jacinth
#

how come ?

#

I did add those in case of getting user info or I'd

lyric mountain
lyric mountain
#

if u just defer it'll maintain the "Bot is thinking..." message

boreal iron
#

Theres no interaction author

#

Never

#

Messages have authors, interactions not

lyric mountain
boreal iron
#

Good I didn't watch it

uneven tartan
shadow frigate
#

Hello, I'm using discord.js and when my discord bot starts up, it spawns multiple shards.
I am in servers that are in various different shards.
My code currently seeks out users in shards and then sends a message to them.
However, because i'm in multiple shards, it's sent me the message multiple times.
How can I resolve this?

shadow frigate
#

So it's pretty much running every time the bots shard becomes ready.
If it finds the user on that shard, it sends them the message.
I just need it to send them it once, despite finding them on multiple shards.

quartz kindle
#

or you only have their user information, without any relationship to guilds?

shadow frigate
#

no relationship to guild

#

It pulls all users from my database, goes through them all and checks if they have auto posting enabled.
If so, it will then prepare to send the user a message.

quartz kindle
#

then its not possible to split users across shards

#

you have to run that code outside of the shards

#

either in the shard manager, or in a separate process

shadow frigate
#

There's no way to filter it out within the shard? 😦

#

rip okay

quartz kindle
#

users are not bound to shards like guilds are

shadow frigate
#

What if i had the guild info?

#

So I go through each guild, and find each user in my database instead?

quartz kindle
#

if you have the guild info then yes you can separate them based on their guild

shadow frigate
#

Right okay

#

Yeah thanks

craggy pine
#

With discord.js' createMessageCollector what would be an appropriate way to have a character limit. Like I would rather it not collect a bunch of things if someone decides to spam. Is there a way to "Empty" the collected messages apon a character limit hit.

if(collected.content.length > 1999) {
  //throw error msg and clear collected messages
}

I'm not using slash commands for now as I'm finishing up a to-do list I made a while ago but eventually I'll migrate over when I'm not lazy.

#

I guess I could just "Stop" the collector and have them re-click on the emoji to fire up the collector again. mexShrug

sharp geyser
#

set a limit

craggy pine
#

Well yes I can do max: #

sharp geyser
#

Now if you mean individual characters the best way is to compare string length

craggy pine
#

What I'm referring too is, I know how to check character limit and all that fun stuff but the collector will still "collect" it.

earnest phoenix
sharp geyser
craggy pine
sharp geyser
#

collected is actually a collection of everything collected

earnest phoenix
craggy pine
#

oh.

#

why couldn't I find this before..

#

.clear()

wheat mesa
#

there's prob a .clear() method on it

sharp geyser
#

yea

boreal iron
#

Waffle saved the day

craggy pine
#

Voltrex saved the day and waffle stole his reponse.

earnest phoenix
#

So true bestie

boreal iron
#

Voltrex just copied what Waffle was thinking

#

That's the truth

craggy pine
sharp geyser
#

Voltrex always copies people

wheat mesa
#

oh

sharp geyser
#

He steals all my unicorn company ideas

wheat mesa
#

i didnt even realize u sent the docs ngl

#

playing a valorant match rn

boreal iron
#

Nub

#

Play tarkov with me

sharp geyser
#

You funny to think Waffle's pc can handle tarkov

boreal iron
#

Once a beautiful day I have some time to spend on it again

craggy pine
#

What about sum good ol' league of legos

boreal iron
#

Move on

earnest phoenix
sharp geyser
#

honestly I have a fool proof plan of making money quick

#

just sell oxygen in a bottle

#

idiots will buy it like hot cakes

boreal iron
#

Can't improve it sorry

craggy pine
# sharp geyser just sell oxygen in a bottle

In this scene from MOST EXPENSIVEST, 2 Chainz meets Moses Lam, co-founder of Vitality Air, a company that is literally selling air by the can.

Watch the season premiere of MOST EXPENSIVEST here: https://vice.video/2iWI9JY

Subscribe Now: http://bit.ly/SUBSCRIBE-TO-VICELAND

Follow VICELAND:

VICELAND.com | https://www.viceland.com
VICE Video | ...

▶ Play video
earnest phoenix
sharp geyser
craggy pine
#

right lmao

wheat mesa
#

I have decent specs

sharp geyser
#

"But ours is from the Icelandic mountains"

earnest phoenix
boreal iron
earnest phoenix
#

The IRS is getting there

boreal iron
#

I'm sure they will

sharp geyser
#

Ima follow in Al Capone's footsteps

boreal iron
#

Breathing to much? Can't pay your taxes?
Fuck you, you're not allowed to breath anymore

#

one issue less

sharp geyser
#

Its gonna turn out like those stupid tik toks

earnest phoenix
#

TikTok is just a cesspool of absolutely the stupidest shit that exists out there

#

They fucking dance on people's graves for the "trend"

boreal iron
#

Imagine wasting your life time watching bullshit like that

earnest phoenix
#

Yeah, TikTok is just making people even more stupid every day

craggy pine
boreal iron
#

I mean yes, it it's Intension is just to publish even more private informations the Chinese government can use against u

wheat mesa
#

It's just a collection of values

sharp geyser
craggy pine
#

ok den

earnest phoenix
sharp geyser
#

Mfs out here with their own mansions

craggy pine
#

Jesus.

#

Ok ty lol

boreal iron
#

I mean

#

You can also use filter()

earnest phoenix
boreal iron
#

Instead of clearing the entire collection

sharp geyser
#

Whats even more sad is the OF stuff KEKW

#

Its horrendous the amount of money people make for just posting a normal pic of themselves

earnest phoenix
#

OF?

sharp geyser
#

OnlyFans

earnest phoenix
#

Oh

sharp geyser
#

Wanna know whats funny

wheat mesa
#

markiplier

sharp geyser
#

Im pretty sure OF tried banning NSFW content and they saw a drop in their income and reneged it

earnest phoenix
#

Yeah that was over a year ago, extremely stupid decision

boreal iron
#

Totally understandable, selling nudes seems to be a good way of earning money

sharp geyser
boreal iron
#

Especially for younger people

sharp geyser
boreal iron
wheat mesa
#

ikr, your mom sends great ones

boreal iron
#

lol

#

Yeah you're right sir, I like em too

sharp geyser
alpine lichen
#

@opaque acorn

opaque acorn
#

?

alpine lichen
#

<@&817055174613794826>

rose warren
#

-m @alpine lichen spam pinging people and roles for no reason

shell echoBOT
#

Member "<@​1046916070977572904>" not found

rose warren
#

Yeah good. Come back when you actually want to ask a question.

raven parcel
#

how can i put the commands side by side

lament rock
cursive musk
#

Is it possible to get the server count of bots I don’t own?

#

I can get stuff like their username and pfp but not their server count.

earnest phoenix
#

by scraping yes

spark flint
#

It’s highly discouraged to scrape

cursive musk
spark flint
#

Just get a manual amount

#

0 need to keep it up to date

cursive musk
spark flint
#

Why does it need to be accurate

cursive musk
#

No need for me to make an npm module for something so simple lol

spark flint
#

No, developers send their server count to the Top.gg API

cursive musk
#

And scraping is a lot

spark flint
#

Bruh just don’t scrape

cursive musk
spark flint
#

There’s no legitimate way of doing this

earnest phoenix
#

if you really wanna make it "accurate", youll have to scrape

cursive musk
earnest phoenix
#

it might be too much work but oh well

#

too bad

spark flint
#

Yes you can

spark flint
#

You could get the server count from the Top.gg API (if the bot owner posts server count) but then you risk rate limits

#

As they’re pretty low for top.gg

cursive musk
earnest phoenix
earnest phoenix
#

We do, no worries CatJAM

earnest phoenix
spark flint
#

And yeah mods can find it

cursive musk
#

Yeah

spark flint
#

But I just don’t see a neeed to show server count? It’s not like it needs to be either accurate or there at all

earnest phoenix
#

^

cursive musk
#

Yeah I’ll just put the current count

#

Still can’t believe it’s not part of the API though

earnest phoenix
#

You see the count when you invite the bot so yeah, not really that needed

earnest phoenix
#

We just don't feel like scraping Discord's invite page for every single bot in a cronjob

#

Maybe that will enlighten you about why CatJAM

spark flint
#

Lol

#

If Discord wanted it to be available they would have made it available already

earnest phoenix
#

or just not something good to do

spark flint
#

^

#

Against TOS

#

Discord doesn’t like scraping

earnest phoenix
#

Almost every website doesn't like it

spark flint
#

Yup

earnest phoenix
loud nebula
#

🎁

earnest phoenix
#

How to get more server use my bot?

digital swan
#

make it better

plain coral
#

@earnest phoenix hello there is?

tired jacinth
#

i will try it right now

uneven tartan
#

it isnt anything more than you already had but its cleaned up and looks better

compact pier
#

Is k8 too complicated for 1 core server

limber siren
#

avatarURL

tired jacinth
surreal sage
#

If someone is willing to;
Explain or link something for mongodb access control
Had no data on it but in the future it will 😅

wheat mesa
#

Don’t leak your db password

surreal sage
#

Never was

wheat mesa
#

Definitely did at some point or another whether you meant to or not

surreal sage
#

Or just improper access control?

#

bind ip all was on

#

just hmu on how to

sharp geyser
#

iirc doesn't mongodb allow a whitelist only system

#

Just make it so only your IP is allowed to connect

#

as for how to do this google, cause I can't be asked

surreal sage
#

chatgpt

#

(blurred out value is my public ip)

#

Would this work out?

#

got it setup

#

whitelisted ips only + required authorization

lyric mountain
#

music is a thing that's best done as a separate bot

#

because the resource usage is H U G E

lament rock