#development

1 messages Β· Page 780 of 1

lofty vine
#

oo if a file is left empty then?

warm marsh
#

Yeah

lofty vine
#

xD

#

thanks!

warm marsh
#

Np.

lofty vine
#

and how abou the dbl events?

warm marsh
#

Dynamically loading them?

#

Oh dbl events shouldn't be inside /events/ as you don't want to add them to your client.

lofty vine
#

yea ik

#

I have kept them in index.js rn

warm marsh
#

Yeah good.

lofty vine
#

thanks!

#

(node:20526) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 debug listeners added. Use emitter.setMaxListeners() to increase limit

#

😐 yet another bug

twin pendant
#

are you using sepereate listeners for each command?

modest maple
#

Looks like it

warm marsh
#

Possibility that the loader is called multiple times.

lofty vine
#

ay?

#

Possibility that the loader is called multiple times.
nope

#
fate.readdir("./events/", (err, files) => {
  if (err) return console.error(err);
  files.forEach(file => {
    const event = require(`./events/${file}`);
    let eventName = file.split(".")[0];
    client.on(eventName, async(...args) => event.bind(null, client)(...args));
  });
});```
#

this the code

#

{event handler}

#

want me to show codes for each event?

#

and you can fell free to ping me

modest maple
#

Do you have a seperate event for each thing?

quartz kindle
#

Do console.log(client._events) after you finish loading them

#

(after the files.forEach block)

lofty vine
#

ye

#

nothing happens with that

#

after executing any command it shows this

#

(node:280) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 debug listeners added. Use emitter.setMaxListeners() to increase limit

#

Do you have a seperate event for each thing?
yes

quartz kindle
#

Only after executing a command?

#

Show the command code and the message event

lofty vine
#

ok

#
const client = new Discord.Client();
module.exports = {
  name: "ping",
  description: "Ping!",
  execute(client, message, args) {
    var sds = client.ping;
    sds = sds.toPrecision(3);
    message.channel
      .send(":loading~5:Pinging...")
      .then(message => message.delete(1000));
    message.channel.send(`Pong ${sds}ms`);
  }
};
quartz kindle
#

Ok dont

lofty vine
#
module.exports = (client, message) => {
        const args = message.content.slice(prefix.length).split(/ +/);
        const commandName = args.shift().toLowerCase();
        if (!client.commands.has(commandName)) return;
      
        const command = client.commands.get(commandName)
          || client.commands.find(cmd => cmd.aliases && cmd.aliases.includes(commandName));
        if (!command) return;
        if (command.guildOnly && message.channel.type !== 'text') {
          return message.reply('I can\'t execute that command inside DMs!');
        }
        try {
          command.execute(client, message, args);
        } catch (error) {
          console.error(error);
          message.reply('there was an error trying to execute that command!');
        }
}
quartz kindle
#

Dont Create new clients

lofty vine
#

um? unsend?

#

okay

#

53 commands = 53 new clients

#

delete them all?

quartz kindle
#

Delete the new client part yes

lofty vine
#

okay done

dense drift
#

You're importing client, so there's no need to make a new one every time, hence

module.exports = (client, message) => {```
lofty vine
#

oo okay

dense drift
#

You can theoretically import anything too.

quartz kindle
#

Where do you define client.commands?

modest maple
lofty vine
#

index.js

modest maple
#

When your at school

#

And the websockets close

lofty vine
#

😐

dense drift
#

Careful, you have an IP exposed.

modest maple
#

Only a local IP

dense drift
#

True

#

lol

quartz kindle
#

An internal ip lol

dense drift
#

I just saw IP and was like, RED FLAG!

quartz kindle
#

Ill give you my ip, try and hack me

#

127.0.0.1

dense drift
modest maple
#

XD

lofty vine
#

oo

mossy vine
#

lol tim what is ur security im already in ur system

dense drift
#

Here's mine, 1.1.1.1, or 1.0.0.1

modest maple
#

Building a async alchemy driver is fucking hell oml

lofty vine
#

code is now bug free thanks to ye all!

dull terrace
#

For .connect () I must put timeout and reconnect or not?

#

In py

earnest phoenix
#

@modest maple make an emergency command for restart websocket πŸ€·β€β™‚οΈ

tight heath
lofty vine
#

xD

quartz kindle
#

Lmao

modest maple
#

All well n good

#

Having the command

#

After

#

How ever

#

I can't xD

earnest phoenix
#

are dbd bots allowed?

modest maple
#

Iirc no

earnest phoenix
#

why

#

:c

mossy vine
#

cuz its essentially just a template

earnest phoenix
#

:c

#

ok

#

so ddb bots arent allowed to be advertised in top.gg

#

?

mossy vine
#

afaik no

earnest phoenix
#

i hate my laif

topaz fjord
#

@modest maple you asked if they intellij updated made it eat less ram

#

they apparently want to make it functional as a lightweight texted editor

amber fractal
#

So they trying to make another VSCode but with ide stuff

uneven wyvern
#

How can I create my own Command Promt command?

earnest phoenix
#

wat

steel burrow
#

How to change long description transparency??

blissful scaffold
#

background: none in CSS

green kestrel
earnest phoenix
#

Not funny didn't laugh

#

That's my error message which I got using rethinkdb on glitch can't understand the error

blissful scaffold
#

I still prefer Bogosort

hybrid ruin
#

@earnest phoenix Look up the error, I found many solutions by doing so

grizzled raven
#

multiple shards mean more ram usage, right?

toxic jolt
#

I want to create an invitation connection link with the server ID to the server where bot is located, how can I do this? (Discord.js)

modest maple
#

@grizzled raven yes but actually no, Ram is mostly effected by the guild count at lower shard counts

#

@toxic jolt what is it for?

toxic jolt
#

For support

modest maple
#

for you to join the guild?

hybrid ruin
#
modest maple
#

btw

#

if your doing for you to join the guild

#

DONT

#

it is a massive breach of privacy and is against tos

steel burrow
#

How to remvoe avatar shadow?

slender thistle
#

Remove border

toxic jolt
#

@hybrid ruin thx

hybrid ruin
#

You're welcome

steel burrow
#

Thanks @slender thistle

modest maple
#

this is the most ridiculous issue ever

#

it wont fucking save the db

#

like

#

REE

slender thistle
#

.commit ClaraSmug

modest maple
#

its an orm

#

it does it automatically

#

making this a module to import is the most fucking argggggg]#

#
returning exception unable to open database file
Traceback (most recent call last):
  File "C:\Users\ChillFish8\AppData\Roaming\Python\Python37\site-packages\aiosqlite\core.py", line 153, in run
    result = function()
  File "C:\Users\ChillFish8\AppData\Roaming\Python\Python37\site-packages\aiosqlite\core.py", line 307, in connector
    return sqlite3.connect(loc, **kwargs)
sqlite3.OperationalError: unable to open database file
Traceback (most recent call last):
  File "D:/Crunchy/DataBases/PrefixDB.py", line 56, in <module>
    asyncio.run(main())
  File "C:\Users\ChillFish8\AppData\Local\Programs\Python\Python37\lib\asyncio\runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "C:\Users\ChillFish8\AppData\Local\Programs\Python\Python37\lib\asyncio\base_events.py", line 579, in run_until_complete
    return future.result()
  File "D:/Crunchy/DataBases/PrefixDB.py", line 53, in main
    await database.list_prefix()
  File "D:/Crunchy/DataBases/PrefixDB.py", line 43, in list_prefix
    rows = await self.db.fetch_all(query=query_)
  File "C:\Users\ChillFish8\AppData\Roaming\Python\Python37\site-packages\databases\core.py", line 131, in fetch_all
    return await connection.fetch_all(query, values)
  File "C:\Users\ChillFish8\AppData\Roaming\Python\Python37\site-packages\databases\core.py", line 218, in fetch_all
    return await self._connection.fetch_all(self._build_query(query, values))
  File "C:\Users\ChillFish8\AppData\Roaming\Python\Python37\site-packages\databases\backends\sqlite.py", line 89, in fetch_all
    assert self._connection is not None, "Connection is not acquired"
AssertionError: Connection is not acquired```
#

jesus

#

christ

grizzled raven
#

@modest maple so 2000 guilds with one shard uses more ram than 2000 guilds with 2-3 shards?

modest maple
#

sorta but its a almost insignificant amount

earnest phoenix
#

How do I make it so my bot sends messages in one specific channel with one command, like all the either commands work in other channels but a specific one doesn’t in the others

modest maple
#

what lib

earnest phoenix
#

Node.js

#

@modest maple

modest maple
#

im not sure about js

earnest phoenix
#

Fuck

quartz kindle
#

More shards use more ram, but depends on the language and lib

#

And sharding method

#

@earnest phoenix you can use message.guild.channels.get(channelid)

#

Or client.channels.get(channelid)

#

And then send to that channel

severe forge
#

Yo

#

Wsp

#

How do I use this bot??

#

To monitor prices on stockx

#

Anyone can help me with that pls?

modest maple
#

what bot

severe forge
#

To monitor stockx prices

modest maple
#

what bot

severe forge
#

What this group is for?

modest maple
#

not what ever the bot youre using's support server

severe forge
#

K

#

Sorry

earnest phoenix
#

Galaxy Gate or Digital Ocean

delicate zephyr
#

Or contabo

fluid basin
#

both have their pros and cons imo

delicate zephyr
#

Contabo is better but requires more experience imo

#

Galaxy Gate and DO are good for starters

earnest phoenix
#

but what should i choose?

delicate zephyr
#

Which every you want

earnest phoenix
#

but what would you suggest me?

#

hi

#

@quartz kindle would that be an else for the command I want in that channel ?

#

Has anyone worked with the twitter api? I am trying to avoid retweeting retweets. But can't find any info about how to check if a tweet is a retweet of another tweet

#

i tried using "-filter:retweets" in my search query for possible tweets to retweet but it doesnt seem to work :/

blissful scaffold
#

With the Java lib you can check if a tweet is a retweet with statusObject.isRetweet()

earnest phoenix
#

but i guess that is specific to that lib?

grizzled raven
#

does galaxygate and digital ocean connect with github?

earnest phoenix
#

retweeted Boolean

Indicates whether this Tweet has been Retweeted by the authenticating user. Example:

what does this mean?

#

authenticating user? if the tweet has been retweeted by the person that created the tweet?

slender thistle
#

I'd guess it means the user who is sending the request 02think

earnest phoenix
#

oh, if i already have retweeted a tweet?

#

how can i upload files to galaxy gate

quartz kindle
#

With an sftp client

earnest phoenix
#

from where

#

@quartz kindle

quartz kindle
#

Anywhere

earnest phoenix
#

?

#

in what category

quartz kindle
#

...

#

Literally google for sftp client

#

There are many of them

#

Its a software used to connect to a server

#

With the puspose of transfering files

#

For example, filezilla, winscp, mobaxfire...

#

Any program that supports "SFTP" can do it

earnest phoenix
#

ok ty

earnest phoenix
#

how do i connect with galaxygate?

#

im using filezilla

topaz fjord
#

Enter the ip of your server

#

The username and the password into filezilla

earnest phoenix
#

Connecting to ip Status: Connection attempt failed with "ECONNREFUSED - Connection refused by server".

#

sftp isnt ftp

#

yea

#

i mean it didnt ask for username so i used my email

topaz fjord
#

Smh

#

your email isn't your username

#

The default username is root

earnest phoenix
#

ok

topaz fjord
#

And you put the password to the server, not your email

earnest phoenix
#

yeah but it still gives me same error

#

Host: IP
Username: root
Password: PASSWORD
Port: Empty

#

did i do something wrong?

#

@topaz fjord

#

are you sure the password is correct?

#

yeah i just changed it too

#

In the protocol option you are using sftp?

#

protocol?

#

Wait

#

Okay you open filezilla, click the little icon in the top left

#

Assuming you've done it that way

#

I think if it's the first time

#

yeah it is

#

you need to click "New site"

#

ok

#

whats next

quartz kindle
#

In the host bar, put sftp://your.host.ip.address

earnest phoenix
#

i change it to sftp?

#

make sure you selected it and input your info

quartz kindle
#

In port put 22

earnest phoenix
#

ok ty

#

so that was all that i had to do?

#

now i need to upload my bot file

#

i mean folder where its in

quartz kindle
#

Yes

earnest phoenix
#

ok ty

#

its honestly cool to see ppl help eachother

topaz fjord
#

so basically see people live life

half laurel
#

anyone know how can i Check if my bot has permissions to embed links?

earnest phoenix
#

the client user on a guild is set as me, so you can check the permissions with <guild>.me.hasPermission()

#

thats only a lil bit of spoonfeed

#

but it is right

#

well

#

i cant teach otherways

#

ok its all uploaded now, so how can i make my bot active?

#

or online

#

uploaded to where

#

you

#

run it?

#

with node?

#

assuming that's what you are using anyway

#

if your bot is made with node, node <mainFile>

#

if not

#

idk

#

I'd recommend using pm2 tho

#

pretty kewl

#

if you have multiple bots

#

otherwise I wouldn't really worry about

#

download putty

#

maybe you can do it through galaxygates dashboard but i haven't figured it out

#

how do i even download it

quartz kindle
#

The same way you used sftp to send the files, now you need to use ssh to access the machine and run commands on it

#

Download an ssh client

earnest phoenix
#

what he said lmao

quartz kindle
#

Then login the same way, ip address, port 22, root, password

earnest phoenix
#

before any of that if i update my code, do i need to upload everything again?

quartz kindle
#

Then install whatever your bot needs to work

#

Yes

earnest phoenix
#

oof

quartz kindle
#

Unless you use a code editor with integrated sftp

earnest phoenix
#

thats partly why having a testing bot is a must have

#

you should have one anyway but

#

login as:

#

what do you think 😩

#

do i need to input the username and password

#

yes

#

ok good im in

iron scroll
#

how to fix it?

topaz fjord
#

ping should be ping(self, ctx) I think

stable horizon
#

^

#

Client.say is not a thing

#

Client.send_message is also not a thing

#

On message delete is missing a decorator

#

I think that's it

iron scroll
#

hm

earnest phoenix
#

in ssh it gives me this error```Error: ENOENT: no such file or directory, scandir './commands/'
at readdirSync (fs.js:887:3)
at module.exports (/root/neptune/handlers/command.js:9:5)
at /root/neptune/index.js:41:37
at Array.forEach (<anonymous>)
at Object.<anonymous> (/root/neptune/index.js:40:13)
at Module._compile (internal/modules/cjs/loader.js:1151:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1171:10)
at Module.load (internal/modules/cjs/loader.js:1000:32)
at Function.Module._load (internal/modules/cjs/loader.js:899:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
errno: -2,
syscall: 'scandir',
code: 'ENOENT',
path: './commands/'
}

quartz kindle
#

Read the error

#

Is the vps running linux?

earnest phoenix
#

no?

quartz kindle
#

Ew

earnest phoenix
#

is it bad?

quartz kindle
#

Unless id need windows for a particular reason, id never go for a windows server

earnest phoenix
#

most people run linux servers

#

if i read the error is see: "no such file or directory, scandir './commands/'" but that does not make any sense

west raptor
#

it's linux

#

/root/neptune

quartz kindle
#

So ge running linux without even knowing lmao

west raptor
#

how do you manage that..

quartz kindle
#

Anyway, do you know how to navigate on a linux terminal?

stable horizon
#

@iron scroll why are you on the async docs

earnest phoenix
#

no its isnt its ubuntu

stable horizon
#

Use the newer docs

#

Mate I've already told you what's wrong

west raptor
#

ubuntu is linux

quartz kindle
#

Use the ls command do see the contents of the current folder, and the cd command to change folders

earnest phoenix
#

oh wow

#

i didnt know that πŸ˜…

#

@quartz kindle no i dont know how to navigate on a linux terminal

quartz kindle
#

I just told you how

west raptor
earnest phoenix
#

ok, but what do i need to do then

west raptor
#

well with the error

earnest phoenix
#

i get that ls is reading contents of the current folder etc.

west raptor
#

it's probably looking at the dir you're running from

quartz kindle
#

Well, does it have a commands folder?

west raptor
#

(iirc) nodejs looks at the current dir you're runnning from

earnest phoenix
#

yeah it does

west raptor
#

so in handlers it's looking for $BOT_ROOT/commands

earnest phoenix
#

ok so i need to change every thing rn?

west raptor
#

just change the dir it's looking for

quartz kindle
#

You dont need to chanhe anythong

#

You jusr need to make sure all the files and folders are there

#

And that your bot files are in the rihht folders

#

And that yoire running it from the right folder

warm marsh
#

You been on the drink?

west raptor
#

What

earnest phoenix
#

?

warm marsh
#

Nvm.

earnest phoenix
#

ok there are a lot of files that need changing dir

#

so what do i do

#

can i even change them without uploading them again

quartz kindle
#

You can move files using the mv command

earnest phoenix
#

is there a way to mass move them

quartz kindle
#

You can move folders

#

And you can use wildcard selections

#

Using *

#

All of this can be easily googled

earnest phoenix
#

ok i messed up when i upload everything again does it make every thing like it was before

tiny tinsel
#

Anyone ever used RestSharp before?
Anyways. When I try to post to an API It says the json is invalid.
Of course It is:
"{\"sex\":\"Male\",\"age\":25,\"evidence\":[{\"id\":\"s_102\",\"choice_id\":\"present\",\"initial\":true}]}"

Because apparently RestSharp serialize the object for you.
But how would I fix that?

var request = new RestRequest("/diagnosis", DataFormat.Json);

request.AddJsonBody(profile);

var response = Client.Post(request);

Output: "{\"message\":\"invalid json\"}"

#

When I use postman and remove every escaped characters It works fine.

quartz kindle
#

@earnest phoenix uploading will replace existing files if a conflict happens, same as windows does

#

If you upload to a different folder or with different names, it doesnt replace anything

#

Just upload yoir entire bot folder and keep tje same structure as you have on your computer

#

You dont need to upload node_modules

#

You will need to install node, preferably the same version you have on your pc

#

And you woll need to run node install on the folder where you have your package.json

earnest phoenix
#

@tiny tinsel why not use HttpClient

tiny tinsel
#

I kinda like how RestSharp is made.

#

It is kinda the Axios of C#

earnest phoenix
#

@quartz kindle So i need to go rn but basically if i have things you said reuploaded i need to do mv commands neptune (bots file dir) and to every other file?

prime cliff
#

@tiny tinsel you can use newtonsoft.json to convert a class into a json string which you can use for api requests

tiny tinsel
#

@prime cliff RestSharp normally does it for me.

prime cliff
#

That should work fine then because the json parses fine for what you sent

earnest phoenix
#

you can effectively make restsharp in 10 lines of code with async support and make it behave like you want it to natively using HttpClient

#

Newtonsoft.Json and generics with HttpClient and you got yourself a less expensive restsharp client

quartz kindle
#

@earnest phoenix not if you upload them to the right places

#

You can literally chose where to upload what

earnest phoenix
#

ok but can i delete everything what on there rn?

quartz kindle
#

Yes, you can do that with the rm command, or in filezilla as well

#

But dont delete the base folders, like root, etc, bin, usr, var, ...

#

Thats same as deleting system32 on windows

earnest phoenix
#

do i need to do rm file/folderName

quartz kindle
#

You can do it in filezilla

#

Right click, delete

#

Or yes, rm file/folder

#

You need rm -r for folders

tiny tinsel
#

@earnest phoenix Your name describe my current mood. The issue wasn't RestSharp itself. I was sending "sex" with a capitalized letter at the beginning..

#

Their API is really broken to not output any errors for that.

earnest phoenix
#

ooooof

tiny tinsel
#

Male had to be "male"..

earnest phoenix
#

with what kind of relic of an api are you working with that it's case sensitive

tiny tinsel
#

I will contact them and tell them I think.

#

It probably check for case sensitives.. sad.

#

Infact everything is lowercase.

#

Wow.. like I didn't think that could be the issue. I had the problem since yesterday.

#

I was seriously about to giveup.

#

I tried 100 solutions on Stackoverflow.

west spoke
#

@gloomy oar dont spam reactions

#

thanks

earnest phoenix
#

Does anyone know how to fix 502 bad gateway errors on Cloudflare? I checked all the DNS records and they work. This broke my voting rewards system.

modest maple
#

altho the async orm framework does not like sticking shit in folders

gloomy oar
#

:Thank_You πŸ‘Œ

#

@modest maple thanks for help. Spam/?

modest maple
#

?

gloomy oar
#

@modest maple skip it in awl

modest maple
#

?

split hazel
#

Is there any Discord API wrapper for NodeJS that supports Oauth2 methods

steady plaza
#

uhm heyy🦧

earnest phoenix
#

Is there any Discord API wrapper for NodeJS that supports Oauth2 methods
wat

#

almost all oauth endpoints are... normal endpoints

modest maple
#

Isn't that like

#

Any discord js wrapper

#

Because that's what it requires to even use discord api

#

My internet

#

Like

#

Ffs

split hazel
#

I am referring to a wrapper

#

So I don't have to do much work myself, for example instead of fetching data via HTTP, you may use lib.refreshToken("refresh_token")

#

I really didn't find any, since Discord Login Oauth2 is being used more and more in websites, I'd expect a lib or 2 to have this kind of functionality, and instead leaving noobs completely confused

#

I might work on creating one for public use if that is the case

#

Oauth2 is quite annoying for me to implement into websites, and that most likely ends up in bugs. Having a library lift a lot of the work is nice

#

Imagine if there was no libraries like discord.js or eris, people would be stranded lmao

quartz kindle
earnest phoenix
#

there aren't any libs that do everything for you because it's completely up to you how you want to handle oauth

#

I just wanted to know, with discordjs specifically, I've been running a basic bot that just sends embeds for different information, not much is going on, at around 480 servers, suddenly I started noticing an increase from ~100mb of ram towards ~300mb within about a day, there wasn't a sudden skyrocket in user count or server count. Was this due to something on Discords side perhaps, memory leak or just bad coding MegaThonk

#

Like now my bot seems stable at around 100mb again

#

Just completely suddenly it rose about 200mb

#

a restart seemed to fix it though

quartz kindle
#

Thats just discord.js caching users and messages

#

Djs uses a lot of ram due to caching by default

earnest phoenix
#

really? That seems a little drastic for such a short period of time

quartz kindle
#

If you suspect a memory leak, then watch it for longer time

#

It should stabilize at around 300mb otherwise

#

For your server count

#

There are many things that can be done to optimize djs

split hazel
#

I am aware. I have implemented oauth2 into websites (which 1 is being used quite frequently) I was just curious if there was a library already out there that handles rate limits and things like that. I know a library can't do all the work for you. But something as simple as <lib>.exchangeToken("") can save a lot of time instead of having to implement it yourself

quartz kindle
#

Some of them might break certain functionality

earnest phoenix
#

hmm, might start tinkering with that a bit more

quartz kindle
#

You can make a bot use less than 100mb at thousands of servers if you know what youre doing

split hazel
#

D.JS should cut down on cache, just like Eris. Or at least have an option to disable caching of unnecessary things

quartz kindle
#

Thwy already said they wont do it

#

Because many core features are writren around caching

#

But it can be done, and its not hard. You need to provide workarounds for certain things

#

I did it for my bot

#

50-60mb at 2k servera

split hazel
#

It really also depends on what your bots main purpose is

quartz kindle
#

Yes

#

Some featues wont be available, espexially if you disable guild subscriprions

#

(Dont mind my spelling lul)

earnest phoenix
#

My bot basically only relies on the ability to send embeds and add reactions, nothing too intensive so I don't think it needs too many events enabled lol

#

Could probably get by with disabling a good amount of stuff

split hazel
#

Owning a bot that relies on guild member data to be 100% up to date, aswell as cached uses quite a bit of memory

#

which grows overtime as the cache grows

quartz kindle
#

Do you send welcome messages or use the guild member events?

#

Those stop working if you disable guild subs

earnest phoenix
#

@earnest phoenix discord.js's memory jumps arent just members, disable the PRESENCE_UPDATE event as this event caches updates per member per server

This does however completely disable activities and things like presence as they wont be cached anymore

#

But this made my bot lose about 800MB memory on 3 day uptime

quartz kindle
#

The problem is, disabling presence updates wont stop discord from sending them to you

split hazel
#

Pretty much everything my bot needs is if a user if in a specific guild, user's roles, VC update events, reactions, and all the other basic things

earnest phoenix
#

Yes but they wont cache

quartz kindle
#

So your bot will still use a fair amount of bandwidth and cpu just from procesing them

earnest phoenix
#

So thats not an issue

split hazel
#

there's probably more but GuessIwillShrug

earnest phoenix
#

Yes but ram not

#

Ram is a bigger issue than cpu nowadays

quartz kindle
#

Tru

earnest phoenix
#

The difference of cpu usage with the event disabled saved me 2% of the cpu

#

It literally uses 2%...

#

9% total usage of the bot though

quartz kindle
#

2% for caching

earnest phoenix
#

Yes

quartz kindle
#

Not for decoding

earnest phoenix
#

2% to cache every damn bit

quartz kindle
#

If your total usage is 9%, 8% of that is decoding presence packets

earnest phoenix
#

Meh as if the message event didnt recieve a huge load already

quartz kindle
#

Trust me i tested it

earnest phoenix
#

Hm

#

Whatever i got 2 cpus

split hazel
#

My bot can climb to around 20GB memory in around a days uptime just from the guild member & user cache growing (but we cant really clear those as the bot needs them 24/7 for everything)

earnest phoenix
#

On my vps

split hazel
#

Probably sweeping useless members can be a step in the right direction

earnest phoenix
#

20gb the fuck

#

How many guilds if it uses 20gb

split hazel
#

but memory isn't a huge issue

#

it doesn't use 20GB straight away

earnest phoenix
#

Ye but how many guilds

split hazel
#

as the cache grows it eventually reaches that

earnest phoenix
#

2 billion?

split hazel
#

10k

blissful scaffold
#

most of the cache will be cached users

earnest phoenix
#

10k and 20gb christ

blissful scaffold
#

big servers take a lot of cache if you cache everything

quartz kindle
#

Lul

earnest phoenix
#

Imagine 2gb on 200 guilds which my bot had

split hazel
#

the bot is in quite a lot of big servers too, further adding to the members cache

quartz kindle
#

Im pretty sire if my bot ever reaches 10k, ot wont use more than 100mb ram

earnest phoenix
#

But why does it need every member cached tho

split hazel
#

well if the bot calls discord api everytime it wants a member we'd be api banned quickly

earnest phoenix
#

But why does it need members so badly

blissful scaffold
#

maybe the bot needs the members for statistics or other calculations, there can be tons of reasons why a bot needs access to members at all times

earnest phoenix
#

If you dont need their presences then kill off the PRESENCE_UPDATE event

#

Saved probably half the memory

blissful scaffold
#

the ONLY thing my bot needs is the presences of every member

earnest phoenix
#

Christ

quartz kindle
#

Lmao

earnest phoenix
#

Thats just

split hazel
#

Pretty much the ordinary things a discord bot may need but has to have them way more

earnest phoenix
#

Look my bot had presence requirements, 3GB memory on 2 days can you imagine 200 guilds and 3GB MEMORY USAGE

#

So i killed off the presence event and bam, 100mb usage now

split hazel
#

for example 200 users reacting at once, without cache lmao rip the bot

quartz kindle
#

Lmfao

split hazel
#

it does happen aswell

quartz kindle
#

But like

blissful scaffold
#

My bot hovers around 300MB with 50ish servers

earnest phoenix
#

@blissful scaffold my bot is in 255 with 140mb now

quartz kindle
#

You dont need to have a cached member for many of those things

earnest phoenix
#

Was 3GB

blissful scaffold
#

Im not that worried about RAM, its cheap

quartz kindle
#

For example, discord sends member info on each message

earnest phoenix
#

Not on vpses

#

Costs hella lot there

split hazel
#

we need to see if a member is in a specific guild or/and the roles they have

earnest phoenix
#

For a 16 yo atleast

blissful scaffold
#

I think I saw 8GB for 5ish euro/month

split hazel
#

and also if they are in a voice channel at times

quartz kindle
#

Ah thwn yeah good luck lul

earnest phoenix
#

8gb/5eur lmao sounds like terrible to me

#

10 eur/4gb is better tbh

split hazel
#

not upon message or reactions. most of the time those are needed outside of that

quartz kindle
#

I mean

#

Honestly

earnest phoenix
#

Look if ram isnt a problem then continue but you could just save so much @split hazel

quartz kindle
#

If your bot requires things like caxhing all presences, and it ever grows big, ypid be better off writing a custom lib for it, and a custom storage solution

split hazel
#

presences are already disabled those are useless

#

aswell as typing events

earnest phoenix
#

So the presence update is disabled?

split hazel
#

yes

#

emoji cache is also cleared too

earnest phoenix
#

The heck u got like 30 million members then?

split hazel
#

on intervals

#

well around 3 million members across all shards and clusters but it can get larger

#

users*

#

some guilds have like 90k members

earnest phoenix
#

100k members on my bot, 140mb total bot usage, 23mb with just 1k members

#

Hmmm

#

This member cache is so terrible

#

But hey atleast it works

split hazel
#

we're working on implementing some features that will sweep members that haven't reacted or basically are dead

earnest phoenix
#

Atleast my bot doesnt rape my vps's RAM anymore with presences

quartz kindle
#

I have 200k mbers

#

60mb total

earnest phoenix
#

Yes

#

My new version of my bot can hit 29mb on the same application id

#

But to reach that low the cpu gets a load every few mins

quartz kindle
#

Are you using sweeping?

earnest phoenix
#

Yup

#

Using snowflakes of members and users

#

And i just sweep all emojis and other stuff with it

quartz kindle
#

I tried that for a while, moved on to something now

earnest phoenix
#

Well sweeping everything is great until that one guild member needs it again

split hazel
#

Honestly I did try to get what uses what amount of memory via chrome debugger

earnest phoenix
split hazel
#

I am not an expert in that area so all I saw in my perspective was a lot of jibberish

#

with occasional human words

quartz kindle
#

I use the raw event to intercept caching and prevent it from happening

earnest phoenix
#

Hmm

#

Atleast 140mb is low enough

#

My vps has 4gb, ~3gb free

split hazel
#

i wish i knew how some people debugged the amount of memory a specific feature uses

earnest phoenix
#

When music is in use 2gb free

quartz kindle
#

How mich you pay for it?

earnest phoenix
#

Who me or speedy

quartz kindle
#

You

earnest phoenix
#

10$/month

#

Every 5th month free

quartz kindle
#

ah

#

Im usong the 3$ one, with 1gb ram

earnest phoenix
#

Because of referrals getting me ~1.20$/month

#

Depending how much they buy

#

Every month

#

Thingy

quartz kindle
#

Ye

earnest phoenix
#

Wait ur at gg too?

quartz kindle
#

Ye

earnest phoenix
#

Nice

#

may i share my referral with you

quartz kindle
#

Lmao

earnest phoenix
#

I need every cent

quartz kindle
#

I dont think ill ever use it

earnest phoenix
#

Hosting is expensive at age 16

quartz kindle
#

Get donations from yoir bot

earnest phoenix
#

Especially when hosting a bot that only gets used for music in 3/255 guilds its in

#

The other 250 guilds are just dead

quartz kindle
#

Lul

earnest phoenix
#

Or just dont use the bot at all

quartz kindle
#

One of my anticaching features

#

Is get rid of unused channels, users and members

#

At login, my client.channels.size is 0

#

Lmao

earnest phoenix
#

Thats what my cache sweeper on my new bot versikn does

#

It uses snowflakes that tell when the last interaction was and that stuff

#

If its under a few minutes i usually delete it from the cache

#

Like 3 minute inactivity or smth

#

= gone

quartz kindle
#

I ised to do that, but i found out tje message event automatixaly repopulatws channel cache

#

Fk spellong

earnest phoenix
#

Yeah well

#

Thats messages in a channel

quartz kindle
#

So i stopped that from happenong

earnest phoenix
#

Not every channel right?

quartz kindle
#

Now it only caches the channel if the message is an actual command

earnest phoenix
#

Just the channel where a message created

#

Welp

#

Ill gtg to sleep rather quite soon now lol
Tomorrow hangin out with my gf again

quartz kindle
#

Lul

#

Cya

#

flexing the fact he has a gf smh

earnest phoenix
#

Well

#

2 weeks yes

#

Known her for 1.6 years and its finally official

#

funky flex but alright

split hazel
#

imagine

tribal forum
#

How do I do /linkmc

#

To get discord tag

quartz kindle
#

Wrong server

tribal forum
#

So uhh what’s the right one πŸ˜‚

#

Cause this server confused my Brain xD

quartz kindle
#

Click on the button that says support server

tribal forum
#

Okay

#

Thanks

#

Why am I so confused

#

So uhh Where 😰 sorry for using your tine

#

Time**

#

Where do I find support server

quartz kindle
#

How did you get here?

tribal forum
quartz kindle
#

And clicked where?

tribal forum
#

Well I searched up Ecpe Discord Clicked the first link and clicked join and Verified phone

quartz kindle
tribal forum
#

Yes

quartz kindle
#

Top.gg is a website that lists discord servers and bots. The join discord button at the top is to join this server which is the server about the website top.gg

tribal forum
#

Can you link it, or no

quartz kindle
#

If you scroll down on that page, you should be able to see the actual information of the server you want

tribal forum
#

Thanks

blissful scaffold
#

The link to join on that page is invalid

stable horizon
#

Why are you installing discord

#

@uncut gull

lean palm
#

hey bois when your using message.awaitReactions, once a user reacts does it stop looking for reactions?

sudden geyser
#

depends on what options you give it

stable horizon
#

I read opinions lol

lean palm
#

but like if i set the time to 1 min than is their a option to not make it exit the collector?

west raptor
#

huh? you want to set the timer to 1min but have it cancel out or smth?

lean palm
#

i'm just trying to get it to collected multiple emojis

#

but after it collects one than it stops collecting

west raptor
#

master or stable

#

same on master

lean palm
#

if you dont set a max emojis is what it just assumed as tho ?

#

if you know

west raptor
#

wdym? if you dont set a max amount of emojis it wont have a max

lean palm
#

true lol

#

idk i'm just reaching here

#

thanks for the help anyways

stoic gate
#

Hey can someone clear this up for me? When you create a new shard, it connects using a new gateway correct? Does this mean each shard has an individual Global API Rate Limit?

west raptor
quartz kindle
#

@stoic gate not afaik

#

REST rate limits have nothing to do with sockets

#

Idk about socket commads tho, such as request guild members and update user presence

#

The api says 120 gateway events per 60 seconds

stoic gate
#

So across all shards, you globally will only ever have 120 events per 60 seconds?

#

I’m just trying to understand how a large bot could ever realistically be under the Global Rate Limit

ivory pebble
#

What library would you recommend if I wanted to build a web dashboard for a bot

prime cliff
#

php hahaa

ivory pebble
#

...

#

I’m thinking of using react but not sure where to start

sick cloud
#

how do i export a class in node v13 as a default?

so instead of new kita.Server() i can do new kita()
currently exported like this:

const server = class Server {
...
}

export server;
delicate zephyr
#

I mean

#

Instead of doing const car = class

#

You can just write the class and then export the class

#

@sick cloud

#
class Thing {}

export Thing;
earnest phoenix
sick cloud
#

but will that i achieve what i want @delicate zephyr

#

@earnest phoenix up to you

delicate zephyr
#

@sick cloud yes

#

It will

#

You'll be able to do new Kita()

sick cloud
#

that doesn't work

delicate zephyr
#

The fuck

sick cloud
earnest phoenix
#

yeah but before i did that then it cloud not find commands dir and etc

delicate zephyr
#

do module.exports = Server

#

@sick cloud ^ should work

sick cloud
#

but that's not emca right

#

like, conflicting

delicate zephyr
#

Wdym

sick cloud
#

export class Server { works

delicate zephyr
#

oh

sick cloud
#

but i have to do import { Server } from './Server.js';

sick cloud
#

now it doesn't know what it is

#
import './Server.js';

export const server = Server;
                      ^

ReferenceError: Server is not defined```
#

export default class Server {

delicate zephyr
#

You need to do import './Server.js' as Server

sick cloud
#

using as doesn't work either

delicate zephyr
#

No

#

I'm trying to think

#

Oh

#

Ffs es6

#

import Server from './Server.js'

#

Es6 sucks

sick cloud
#

so this now

import Server from './Server.js'

export default Server;
#

that works

#

however when i try to actually use it

import * as kita from './src/index.js';

const server = new kita();

i have to use new kita.default()

#

.-.

delicate zephyr
#

This is why I hate es6

sick cloud
#

yea

delicate zephyr
#

Using module.exports is so much easier

sick cloud
#

i might switch back

delicate zephyr
#

I'm pretty sure you can use both with es6

#

Try

sick cloud
#
const Kita = require('./src/index');
const port = 80;

const app = new Kita();

app.get('/', (req, res) => {
    /res.send('<h1>This is page 1</h1>');
});

app.start(port, () => {
    console.log(`Ready to go on port ${port}`);
});
#

πŸ‘Œ

#

also no i cant mix them

delicate zephyr
#

Ah rip

sick cloud
#

@delicate zephyr gonna ask for your opinion on rendering - since i'm trying to keep this lib light, should i include html rendering support (ie. ejs, etc) or just basics (strings and .html files)?

earnest phoenix
#

anyone know a good way to make an exp bar using PIL in python. I used to have the code by i reset my pc, google is no help kek

delicate zephyr
#

@sick cloud use ejs since it'll be nicer for you to develop

sick cloud
#

this is a "light" replacement for express though not just for me

earnest phoenix
#

ok so i got my bot running but how do i keep it online 24/7

sick cloud
#

its got full support for ejs and all but you have to make the renderer yourself rn

#

@earnest phoenix pm2

earnest phoenix
#

pm2?

mossy vine
#

tony are you basically remaking fastify

sick cloud
#

no, just making this for fun

mossy vine
#

so yes but for fun

#

gl

sick cloud
#

its already done

mossy vine
#

nice

sick cloud
#

@earnest phoenix

npm install pm2 -g
pm2 start <your bots filename>.js --name <your bots name or something>
#

ie.

pm2 start bot.js --name cool-bot```
earnest phoenix
#

ok

#

Hi

#

ill try that

sick cloud
earnest phoenix
#

OK....

#

so now its running right?

#

24/7

sick cloud
#

@earnest phoenix yes

#

and then theres some basic commands

pm2 stop <the name you set>              <---- stop the bot/take it offline 
pm2 restart <the name you set>           <---- restart the bot
pm2 logs <the name you set>              <---- view logs and errors. if you can't see the full error use "--lines 50" to see 50 more for example
earnest phoenix
#

aight ty

mossy vine
#

wait hold up

#

are you running it on your pc

#

or a server

earnest phoenix
#

no?

#

vps

#

galxygate

#

took a long time to understand everything

mossy vine
#

run pm2 startup and pm2 save

sick cloud
#

i was gonna say to run those too

mossy vine
#

then it will keep running even if your server restarts for whatever reason

#

iirc pm2 startup gives you a command to paste

earnest phoenix
#

but if i change the bots code do i just need to replace those files or what?

#

i mean on pc

mossy vine
#

yeah

sick cloud
#

replace the files on your vps then run pm2 restart like i sent before

earnest phoenix
#

only that i don't need to type all those things again

#

ok

#

ty

mossy vine
#

you could set up a git repo for your bot and then you can just fetch/pull on your vps and restart

earnest phoenix
#

ok

quartz kindle
#

Or use a code editor that supports sftp

#

You can also use pm2 in watch mode, which will restart your bot automatically whenever a file changes

modest maple
#

many

#

many things

#

oofed last night

#

i need to work out why its suddenly failing to connect to the ws

delicate zephyr
#

What code are you getting

modest maple
#

[Errno 10061] Connect call failed ('192.168.0.25', 34566)

#

thats it xD

#

its not a discord ws

delicate zephyr
#

I mean from the ws

#

Oh

#

Then nvm

modest maple
#

you havent actually assigned client at all

#

or even got the client object

#

which is an issue in itself

#

because client cant use cogs

#

you need the bot object to begin with

#

also client.latency wont work

uneven wyvern
#

is there any way to detect the most used color in a picture using JavaScript?

lofty vine
#

lol

uneven wyvern
#

what

summer torrent
#

use colorthief package

quartz kindle
#

If you just want red/green/blue values, you can unpack the image into pixels, add them all up and divide by amount of pixels lol

summer torrent
#

^

earnest phoenix
#

@mossy vine is i update the bot do i need to do pm2 startup and pm2 save again?

lofty vine
#

how do I trigger a message when a specific user is tagged? there is list of userids in a database if the users in database are mentioned then it should trigger a message.

#

feel free to ping me

mossy vine
#

@earnest phoenix no

earnest phoenix
#

ok

quartz kindle
#

@lofty vine check if message contains a mention. If it does, check if id exists in database. If does, send message

lofty vine
#

how?

#

id thingy

summer torrent
#

@lofty vine which library

lofty vine
#

js

summer torrent
#

discord.js?

lofty vine
#

discord.js

#

yea

quartz kindle
#

message.mentions.first() gets the first mention (ordered by id), if it exists

summer torrent
lofty vine
#

um

quartz kindle
#

Well you can also do this ^ but then yoi need all the relevant members in your database preloaded/cached in your code

lofty vine
#

yea how to do that

summer torrent
#

:readthedocs:

lofty vine
#

okay as you say!

quartz kindle
#

What database?

lofty vine
#

keyv

#

sqlite*

quartz kindle
#

How long is the list of ids?

#

That you need custom messages for

lofty vine
#

0-30

quartz kindle
#

You can load them all at start up

#

And save them into a variable

lofty vine
#

using enmap?

quartz kindle
#

enmap is the same as keyv, a database wrapper

lofty vine
#

o

#

how do I store them all in a variable?

quartz kindle
#

Do you know how to create objects and arrays?

#

Do you know any js?

lofty vine
#

yea ik

quartz kindle
#

Then check your database documentation on how to get all values

#

And save them in an object or an array

lofty vine
#

o okay! thanks!!

quartz kindle
#

Then use this object/array when checking if message contains a mention

lofty vine
#

ye thanks!

#

but I can't find out the way to store them all in a variable //{tried checking documentation at keyv and sqlite3}

quartz kindle
#

Keyv doesnt have a way to get all entries, unless using the raw option

#

Bht since you dont have a lot of entries

#

Just loop over them

lofty vine
#

loop?

#

but how do you loop over all entries?

#

typos sorry

quartz kindle
#

Good qiestoon, apparently keyv doesnt support tgat either lol

lofty vine
#

sad

#

any other way to do that?

quartz kindle
#

Literally a million ways

lofty vine
#

um...?

quartz kindle
#

You can simply forget keyv and just do ```js
const userIds = [id1,id2,id3,id4,etc...]

lofty vine
#

lol

#

but I need the data to be stored throughout reboots and want users to add data to it

quartz kindle
#

Then get a different db

lofty vine
#

wrapper?

#

db wrapper?

quartz kindle
#

Whatever floats your boat

#

You can use a wrapper, an orm or an actual db

#

There exist hundreds of solutions with varying levels of complexity

lofty vine
#

okay thanks

#

can I do that task using enmap?

quartz kindle
#

I think so, i havent used it

lofty vine
#

hard to code these things 😐

quartz kindle
#

I use sqlite directly, without wrappers and orms

lofty vine
#

sqlite3?

quartz kindle
#

Just a driver, in my case i prefer better-sqlite3

lofty vine
#

okay

#

does it have any way to fetch all data??

quartz kindle
#

Its a driver, therefore it directly uses the SQL language

#

It can do anything an SQL database can

#

But you need to learn SQL, its an entire different language

lofty vine
#

yea they teach us sql in school

#

ay thanks!

uneven wyvern
#

how can i convert rgb to hex?

summer torrent
#

ask google

quartz kindle
#

(255).toString(16) = "ff"

#

You can play around with that

uneven wyvern
#

i have that code const rgbToHex = (r, g, b) => '#' + [r, g, b].map(x => { const hex = x.toString(16) return hex.length === 1 ? '0' + hex : hex }).join('') console.log(rgbToHex(0, 51, 255)); // '#0033ff'

but since color-thief returns me the rgb in a array that won't return me the hex rather a error

quartz kindle
#

Show what it returns

#

Just a part of it if too big

drifting tiger
#

how to make

#

bot

grizzled raven
#

tim

#

since you have used better sqlite before

#

how did you like

drifting tiger
#

how to make bot ⁉

grizzled raven
#

wait nvm il, just search it up

drifting tiger
#

<@&304313580025544704>

coral trellis
#

-atmods @drifting tiger

gilded plankBOT
#

@drifting tiger

Please do not mention (ping) more than one or two moderators for help, unless there is an emergency.

Here are some examples of emergencies:

  • Raids / Multiple members mass spamming.
  • Severe disruption of Discord's ToS (NSFW content, etc)
  • Anything that requires more than 2 moderators to handle.
drifting tiger
#

what thonkku

modest maple
#

Dont @ mods

#

to ask that question

#

or anything

#

in general

drifting tiger
#

how

quartz kindle
#

@grizzled raven better-sqlite3 has a very good explanation on the differences from other libs in their github. The main thing is that its a sync lib, so you have to work around that by using efficient queries, other than that its much faster than other libs

sinful lotus
#

instead of pinging moderators

#

saves a lot of time || and a possible mute ||

grizzled raven
#

yeah ik that

#

but like have you ever like cleared deleted rows from the database?

low wasp
#

@sinful lotus i already linked them to the faq

quartz kindle
#

@grizzled raven sqlite should automatically reuse deleted row ids no?

low wasp
#

no it doesnt

#

even if you delete all rows it will keep going up

quartz kindle
#

I remember reading in their docs that it does

modest maple
#

i just use a unique uuid4 code for my Ids

low wasp
#

In other words, the purpose of AUTOINCREMENT is to prevent the reuse of ROWIDs from previously deleted rows.

uneven wyvern
#

TypeError: Cannot read property 'toString' of undefined

``` @quartz kindle
low wasp
#

x aint defined...

uneven wyvern
#

it's defined

earnest phoenix
#

the error says otherwise

low wasp
#
const rgbToHex = (r, g, b) => '#' + [r, g, b].map(x => {
  console.log(x)
  const hex = x.toString(16)
  return hex.length === 1 ? '0' + hex : hex 
}).join('')
console.log(rgbToHex(0, 51, 255)); // '#0033ff'
#

console log x and see if its returning it

quartz kindle
#

@low wasp for autoincrement yes, i dont use it, i have user ids as primary key, so the hidden rowid col is regenerated

uneven wyvern
#

it returns me
0
51
255

low wasp
#

rowid is autoincrement

quartz kindle
#

Not if you have your own primary key

low wasp
#

true

uneven wyvern
#

@quartz kindle can you help?

quartz kindle
#

No time now

uneven wyvern
#

Ok

jade briar
#

hello

#

why does the mobile version not display players?

earnest phoenix
#

how to get my bots cpu usage

tiny tinsel
#

There is also process.cpuUsage()

delicate zephyr
#

@earnest phoenix what Lang?

earnest phoenix
#

js

low wasp
tiny tinsel
#

Check both.

earnest phoenix
#

@tiny tinsel

#

i got my command but

#

it just sends me an number and with that number i would like to do this

#
let cpupercent = Math.round((cpu * max) / 1000) / 10;
```but what should the max be
#

for my server count i have use this

#
const { stringify } = require('querystring');
const { request } = require('https');

const update = () => {
  const data = stringify({ server_count: client.guilds.size });
  const req = request({
    host: 'discordbots.org',
    path: `/api/bots/${client.user.id}/stats`,
    method: 'POST',
    headers: {
      'Authorization': 'API TOKEN',
      'Content-Type': 'application/x-www-form-urlencoded',
      'Content-Length': Buffer.byteLength(data)
    }
  });
  req.write(data);
  req.end();
};

client.on('ready', update);
client.on('guildCreate', update);
client.on('guildRemove', update);
#

but still not showing me the server count

grizzled raven
#

@quartz kindle even if you delete a row, the data is still there

#

i think sqlite just wont bring it up

summer torrent
#

use official js library

earnest phoenix
#

@earnest phoenix the content type is json not wwwform

#

i have use that only

#

the content-length header is useless

#

mean???

#

after you successfully POSTed and get a 200 response code, you'll have to wait a minute or two for the guild count to update

#

but

#

still not showing

#

the servers

quartz kindle
#

@grizzled raven if you mean the actual content of the row, not just the rowid, then it depends on the sync mode

#

Sqlite uses lots ot lazy processing to give control back to the user asap

#

Many changes remain in memory and take a while to be commited to disk

#

If you use synchronous off/0 for example, it operates at the fastest performance but doesnd sync data immediately

slender thistle
#

@earnest phoenix Last time I checked /stats content-type required application/x-www-form-urlencoded

earnest phoenix
#

the docs say json params

#

lol

slender thistle
#

Who reads docs amirite

tiny tinsel
#

Selenium Chrome Driver vs Selenium Firefox Driver is crazy.

grizzled raven
#

hm

#

i dont

#

huh

earnest phoenix
#

hi i have a question that discord botom is running 0-24 but i'm not getting any errors but after a couple of hours of running it stops spontaneously i can't do anything log as the bot is running on a linux system with this command
sh -x start.sh &
I can do something to find out why the bot stops working
could I somehow log my activity?

#

are you using a free host

delicate zephyr
#

@slender thistle it can use both

#

iirc

slender thistle
#

Yeah I just took a look at how dblpy sends the request

delicate zephyr
#

@earnest phoenix you could use something like tmux or screen to be able to see the console while your bot is running

dull terrace
#

Yes, me I use screen on Ubuntu πŸ˜‰

earnest phoenix
#

screen gay

#

it's so buggy from my experience

#

i switched to tmux

#

@earnest phoenix home mini server machine

mossy vine
#

well you could always use a process manager like pm2

earnest phoenix
#

all I need to do is create a log file and save everything that happens

lofty hamlet
#

Hi

#

My bot does not want launch

#

That's discord ?

#

API OR OTHER ?

earnest phoenix
#

error code? console log ??

lofty hamlet
#

No

#

Nothing

#

My bot have 3K servers i klnow discord