#development

1 messages ยท Page 1660 of 1

drowsy epoch
#

On my vps i get this error, anyone know a fix?

#

because npm install quick.db aint work

cinder patio
#

maybe instead of trying to fix this error... try to fix the npm install quick.db one?

quartz kindle
#

install build essentials

#

with apt

frigid mountain
#

Codding language
I use node.js

Help with
i created my first bot now i need to make commands ,I want to make a command were the bot dm the mentioned user a message sent from the person used the command
etc.+dm @breadlife#7389 hi man

cinder patio
#

sudo apt-get install build-essential

#

Assuming linux server ^

drowsy epoch
#

Y as the opetion

drowsy epoch
cinder patio
#

y

drowsy epoch
#

k

#

these servers are new to me

#

OFC my internet drops out when i do that

cinder patio
#

your VPS' internet?

drowsy epoch
#

home

cinder patio
#

That doesn't stop the installation

frigid mountain
#

Codding language
I use node.js

Help with
i created my first bot now i need to make commands ,I want to make a command were the bot dm the mentioned user a message sent from the person used the command
etc.+dm @breadlife#7389 hi man

lyric mountain
#

first of all, you need to make that command opt-out

frigid mountain
#

how

lyric mountain
#

as in, the user can choose not to receive messages

old cliff
#

whats the permission required to fetchInvites?

lyric mountain
#

MANAGE_INVITES iirc

old cliff
#

in the dev portal

lyric mountain
#

manage server maybe?

#

like, think as an user

#

what perm would allow you to access invites page?

old cliff
#

MANAGE_CHANNELS ?

#

cause its per channel invite

lyric mountain
#

don't think so

#

like, the invites menu is in server config screen

drowsy epoch
#

@cinder patio All i had to do was npm uninstall quick.db

#

and npm i quick.db

lethal gulch
#

how can i do something like this

drowsy epoch
#

Using CSS & HTML

cinder patio
#

You don't, the white text over the white background is unreadable

drowsy epoch
lyric mountain
#

there's actually text in those white parts lul

#

background is #FFFFFF

drowsy epoch
#

lol

lyric mountain
#

text is #FEFEFE

drowsy epoch
#

laughs

lethal gulch
# drowsy epoch i got this error now:

Error: Could not locate the bindings file. Tried:

First step:

  1. Delete node modules.
  2. Delete package.json .
  3. Delete package-lock.json

After

  1. Type npm init to create package.json file
  2. Run the bot and load all modules
    (i did this)
lyric mountain
#

also boy, imagine using those commands without turk keyboard

quartz kindle
lethal gulch
umbral zealot
#

That's the first rule of life.

green kestrel
#

phew

#

just finished creating a 2800 question set for animal crossing

#

that was hard work

sick fable
#

breh

#

can someone please help me? I am coding a command which sends the deleted message and if that deleted message has the image in it, The bot will set that attachment as an image.

solemn quartz
#

hi, how to make the bot leave?

#

i mean

#

in code

sick fable
#

First, get the server id

#

or guild id

umbral zealot
#

guild.leave() ๐Ÿ˜•

sick fable
#

yeah

#

help me pleasee

solemn quartz
#

not with a command

sick fable
#

idk then

umbral zealot
#

How then

solemn quartz
#

if the bot hasnt administrator perm it leaves

#

thats it

#

sad

umbral zealot
#

Oh, that's... uhm... super bad.

vivid fulcrum
#

have fun having 4 total guilds

umbral zealot
#

Like, don't do that

#

Have fun never being approved on top.gg KEKW

solemn quartz
#

lol

umbral zealot
#

Alright well, just get guild.me on guildCreate and check its permissions

solemn quartz
#

wat

solemn quartz
umbral zealot
#

on the guildCreate event, you get a guild object. That object has a me property which is your bot's member on that guild

#

Check that member's permissions. if it doesn't have the ones you want, call guild.leave()

solemn quartz
#

lets just not do that

umbral zealot
#

Ok so what do you want then

solemn quartz
#

problem solved

umbral zealot
#

Oh yes, remove the problem completely, alright. thumbs_up

solemn quartz
#

:))

#

actually i forgot how to fucking make an eval command

umbral zealot
#

eval(code)

solemn quartz
#

after not coding for 2 years

#

yeah i mean

final sphinx
#

hello I'm looking for a developer to make an economy bot (more details in mp) against money

solemn quartz
#

const code = args.join(" ")
const evaled = eval(code)

#

thats all i know

solemn quartz
#

??

umbral zealot
summer torrent
solemn quartz
#

Should'nt this work?

#

im italian i dont even know if what i said is an actual sentence

umbral zealot
#

work, sure.

#

it's not good but it would work

pale vessel
solemn quartz
#

oh

#

thanks

earnest phoenix
#

what should i do now?

#

I Got Rate Limited

#

And I Can't Start My Bot ;_;

vivid fulcrum
#

sit and wait

earnest phoenix
slender thistle
#

an hour minimum

earnest phoenix
#

;_; Really

vivid fulcrum
#

๐Ÿคทโ€โ™‚๏ธ

#

make a request to discord and check the headers

cobalt spruce
#

Invalid Response Json Body

#

wats dis

vivid fulcrum
#

the request returned a response that isn't valid json

solemn quartz
#

what should i add

earnest phoenix
#

Ok Fixed

umbral zealot
solemn quartz
#

You made that? @umbral zealot

#

the link

#

it uses your id so ig

#

wait what is config?

#

im italian i dont understand everything

umbral zealot
#

Yes, I wrote most of that entire guide

solemn quartz
long crow
#

config is like the imported module that have the bot's owner id

solemn quartz
#

well i think this site will be my best friend forever

long crow
#

I did learn the basic from it, yes

solemn quartz
#

well then we should all thank hindsight :DDDD

cinder patio
#

The parent of the text needs to be a block

#
<div style="text-align: center">
<b>Text</b>
</div>
worldly fulcrum
sour flame
#
import discord
from discord.ext import commands
import json
import os
import random

os.chdir("C:\\Users\\ravi_\\Desktop\\Discord Bots\\Mail")

client = commands.Bot(command_prefix = m!)


@client.event
async def on_ready():
    print("Ready")

@client.command()
async def balance(ctx):
    await open_account(ctx.author)

    users = await get_bank_data()

    wallet_amt = users[str(user.id)]["wallet"] 
    bank_amt = users[str(user.id)]["bank"] 


    em = discord.Embed(title = f"{ctx.author.name}'s balance", color = discord.Color.red())
    em.add_field(name = "Wallet balance",value = wallet_amt)
    em.add_field(name = "Bank balance",value = bank_amt)
    await ctx.send(embed = em)

@client.command()
async def beg(ctx):
      await open_account(ctx.author)

    users = await get_bank_data()

    user = ctx.author

    earnings = random.randrange(101)


    await ctx.send(f"Some gave you {earning} coins!!")




    users[str(user.id)]["wallet"] += earnings
    
    with open("bank.json","w") as f:
        json.dump(users,f)


async def open_account(user):
 
    user = await get_bank_data()

    if str(user.id) in users:
         return False
    else:
        users[str(user.id)] = {}
        users[str(user.id)]["wallet"] = 10
        user[str(user.id)]["bank"] = 0
    
    with open("bank.json","w") as f:
        json.dump(users,f)
    return True





async def get_bank_dat():
    with open("bank.json", "r") as f:
        user = json.load(f)
    return users





client.run("Token")
``` My error ```  File "C:\Users\ravi_\Desktop\Discord Bots\EconomyManager\main.py", line 9
    client = commands.Bot(command_prefix = m!)
                                            ^
SyntaxError: invalid syntax
``` I want my prefix to be m! so tell meh how to do that without an error
lyric mountain
#

you can't compare a string with m!

#

because m! don't exist

#

what exists is "m!"

#

remember:

#

quoted = string
not quoted = variable/method/class/whatever

earnest phoenix
#

KEKW

sour flame
#

oh I have to quote m!

earnest phoenix
alpine hornet
#

Hey guys! I just got into coding, and I have no knowledge on an error that I'm getting. Can someone shoot me a dm?

lyric mountain
#

just show the error here

alpine hornet
#

Ohhhh, I can post ss. My bad.

#

I'm not sure if I can proceed or not.

sour flame
#

if your not using vscode to do it then procced but if yes then idk

alpine hornet
#

That's a yes.

lyric mountain
#

no

#

it has nothing to do with vscode

#

@alpine hornet install visual studio

alpine hornet
#

Should I be good?

lyric mountain
#

visual studio

#

not vscode

umbral zealot
#

yo that's not necessary

#

you do'nt need a 30GB install shit just to run a node-gyp build

#

Run npm i -g --add-python-to-path --production windows-build-tools in an admin command prompt or powershell.

#

that should fix it.

alpine hornet
#

I run that in powershell?

umbral zealot
#

an admin powershell, yes

#

"run as administrator"

alpine hornet
#

Gotcha.

solemn quartz
#

Guys how to make a shutdown cmd?

#

could this work?

#
    if(message.author.id !== config.ownerID) return;
    client.destroy()
    client.login(config.token)
  }```
long crow
#

after you destroy, why you want to login again?

solemn quartz
#

my bad

#

my brain was thinking about shutdown and restart at the same time

#

im stupid

long crow
#

It's either process.exit(0) or <client>.destroy() will do

#

to reboot it you can do with pm2 module and such

solemn quartz
#

yeah but i am on replit.com, and this site literally gives you a button to make it run

long crow
#

you can't do pm2 on replit

#

that's that

solemn quartz
#

im trying to pass it

#

on vsc

#

yeah it works on vsc

#

i think im going to use vsc forever.

sour flame
#
    users = await get_bank_data():
                                 ^
SyntaxError: invalid syntax ``` 
```js
 
import discord
from discord.ext import commands
import json
import os
import random

os.chdir("C:\\Users\\ravi_\\Desktop\\Discord Bots\\Mail")

client = commands.Bot(command_prefix = "m!")


@client.event
async def on_ready():
    print("Ready")

@client.command()
async def balance(ctx):
    await open_account(ctx.author)

    users = await get_bank_data():

    wallet_amt = users[str(user.id)]["wallet"] 
    bank_amt = users[str(user.id)]["bank"] 


    em = discord.Embed(title = f"{ctx.author.name}'s balance", color = discord.Color.red())
    em.add_field(name = "Wallet balance",value = wallet_amt)
    em.add_field(name = "Bank balance",value = bank_amt)
    await ctx.send(embed = em)

@client.command()
async def beg(ctx):
      await open_account(ctx.author)

    users = await get_bank_data()

    user = ctx.author

    earnings = random.randrange(101)


    await ctx.send(f"Some gave you {earning} coins!!")




    users[str(user.id)]["wallet"] += earnings
    
    with open("bank.json","w") as f:
        json.dump(users,f)


async def open_account(user):
 
    user = await get_bank_data()

    if str(user.id) in users:
         return False
    else:
        users[str(user.id)] = {}
        users[str(user.id)]["wallet"] = 10
        user[str(user.id)]["bank"] = 0
    
    with open("bank.json","w") as f:
        json.dump(users,f)
    return True





async def get_bank_dat():
    with open("bank.json", "r") as f:
        user = json.load(f)
    return users
``` The error above and code
lyric mountain
#

Remove that :

vivid fulcrum
#

json db

#

pls

#

why

lyric mountain
#

Lul

unreal estuary
#

ew json database

#

cry

vivid fulcrum
#

yes hello

unreal estuary
#

hello

sour flame
#
File "C:\Users\ravi_\Desktop\Discord Bots\EconomyManager\main.py", line 35
    users = await get_bank_data()
                                 ^
IndentationError: unindent does not match any outer indentation level``` Now what
lyric mountain
#

Fix indentation

#

Do you even python?

sour flame
#

yes the basics

modest maple
#

clearly not the basics

earnest phoenix
#

lmfao

sour flame
#

I did shift tab and noting happened

#

Oh wait needed to save it...

old cliff
#

Nice

wary kraken
#

What should I add to the top row?

vivid fulcrum
#

what

#

oh

#

well what's that supposed to be

#

also you definitely need more padding on your elements

#

make it less dense

old cliff
#

๐Ÿ‘

lyric mountain
#

so everything anime MCs needed were paddings?

old cliff
#

Yes

sour flame
#
 File "C:\Users\ravi_\Desktop\Discord Bots\EconomyManager\main.py", line 35
    await users = get_bank_data()
    ^
SyntaxError: cannot assign to await expression ``` What to do
quiet topaz
#

how to make this in discord.js?

#

I know its not that new, but I cant find it in the docs

blazing portal
#

It's not in v12 yet, it will probably be released with v13

quiet topaz
#

ok and with an other discord api?

blazing portal
#

idk

sour flame
# sour flame ``` File "C:\Users\ravi_\Desktop\Discord Bots\EconomyManager\main.py", line 35 ...

code ```js
import discord
from discord.ext import commands
import json
import os
import asyncio
import random

os.chdir("C:\Users\ravi_\Desktop\Discord Bots\Mail")

client = commands.Bot(command_prefix = "m!")

@client.event
async def on_ready():
print("Ready")

@client.command()
async def balance(ctx):

await open_account(ctx.author)

users = await get_bank_data()

wallet_amt = users[str(user.id)]["wallet"]
bank_amt = users[str(user.id)]["bank"]

em = discord.Embed(title = f"{ctx.author.name}'s balance", color = discord.Color.red())
em.add_field(name = "Wallet balance",value = wallet_amt)
em.add_field(name = "Bank balance",value = bank_amt)
await ctx.send(embed = em)

@client.command()
async def beg(ctx):
await open_account(ctx.author)

await users = get_bank_data()

user = ctx.author

earnings = random.randrange(101)

await ctx.send(f"Some gave you {earning} coins!!")

users[str(user.id)]["wallet"] += earnings

with open("bank.json","w") as f:
json.dump(users,f)

async def open_account(user):

users = await get_bank_data()

if str(user.id) in users:
return False
else:
users[str(user.id)] = {}
users[str(user.id)]["wallet"] = 10
user[str(user.id)]["bank"] = 0

with open("bank.json","w") as f:
json.dump(users,f)
return True

async def get_bank_dat():
with open("bank.json", "r") as f:
user = json.load(f)
return users

client.run("NO-NO-MY-TOKEN")

#

Can ya help meh with my problem?

lyric mountain
#

your indentation couldn't be wronger

slate oyster
#

I set up my bot so that it will insult me when this section of the code starts working properly

slate oyster
earnest phoenix
#

lol

jagged sun
#

Hey, a small question: I've just started my bot with MongoDB Atlas and wanted to migrate the data I had into more collections. I backed up the data as JSON Files and kinda f*cked up, because all my primary keys got changed, what made me lose about 400 user-ids. Is there a way to recover old data or at least view a history of what I did?

earnest phoenix
#

well

#

look at atlas db

jagged sun
slate oyster
#

Well, my bot works now, and it insulted me

sour flame
slate oyster
jagged sun
#

The primary keys were the user-ids, there are no more relations to the users

slate oyster
#

Oh, ok

jovial elk
#

Hello everyone, does anyone know if there is an easy way in the discord library to track if someone have 2 open instances of the same command or prevent them from opening 2 active instances of the same command? e.g. if a command uses **bot.wait_for **, and i dont want same user to open same command twice, i know there are multiple ways i can implement this, i was just was wondering if the discord library had something made already

cinder patio
#

You should implement it yourself

#

From my understanding they don't want a cooldown

jovial elk
#

ok thanks guys ๐Ÿ™‚

#

yea i was gonna implement it my self, but i thought, that if discord has something already implemented, then it would have been better

earnest phoenix
#

?

lyric mountain
#

like, it is easy as in "the implementation is easy", but hard as in "the concept is hard"

slender wagon
#

is there any opensource command handler for discord.js that you guys would suggest

lyric mountain
#

some people use comando

#

although I suggest doing one yourself

#

it's not that hard

slender wagon
#

yeah

brazen violet
#

can i know how to return http status 200 to the webhook?

cinder patio
#

res.sendStatus(200)

brazen violet
cinder patio
#

In this case it doesn't matter because you're not sending anything else

#

but yeah

brazen violet
#

ok

unreal estuary
#

im using heroku postgres for my discord bot

#

is it good

modest maple
#

well, its better than JSON

unreal estuary
#

anythings better than json

modest maple
#

its a good DB itself but the deployment in free versions is pretty weak

unreal estuary
modest maple
#

paid version though is powerful

unreal estuary
lyric mountain
#

you could just buy a vps and host both

marble juniper
#

is there some sort of event that fires in nodejs when a new thing gets printed to the console?

lyric mountain
#

would be cheaper and more performant

lyric mountain
#

not an event tho

#

but you can put that in a loop to listen to any newline

vivid fulcrum
#

read stdout

#

stdout returns Stream which implements EventListener

#

has a data event

quick ridge
#

what can i do for this

lyric mountain
#

holy

#

blue letters on dark background

earnest phoenix
#

what even is that-

lyric mountain
#

do you even eye?

unreal estuary
#

why does it look like that

#

sad my eyes

earnest phoenix
#

Are you hacking someone or something ( อกโ€ข อœส– อกโ€ข )

lyric mountain
#

custom console colors

#

nono, hack color is green

earnest phoenix
#

Wait no that lenny face is creepy

#

ah ok

unreal estuary
quick ridge
earnest phoenix
#

Do you guys have online school?

quick ridge
earnest phoenix
#

yh same lol

marble juniper
#

sounds easier to me

vivid fulcrum
#

that would be the "proper" way of doing it anyway

#

you can even take a design approach where you emit an object that contains the data necessary

#

i.e.

//take it that priority is an enum that scales up
//INFORMATION | WARN | ERROR | CRITICAL...

{
  priority: 0,
  source: "penis.js#run()",
  message: "Hello!",
  error: null | an Error object
}
#

you can even add a toString method in that object that would combine all of that into a single string

sterile lantern
#

can webhooks add emojis to their own messages?

vivid fulcrum
#

reactions?

sterile lantern
#

yes

vivid fulcrum
#

nope

sterile lantern
#

damn

#

rip

vivid fulcrum
#

webhooks aren't actually users

sterile lantern
#

yeah

#

ima add a bot that adds reactions on a message that gets sent in a specific channel

#

or maybe just do it manually tbh

sour flame
wary kraken
#

what should I add to a bot (As in economy)

summer torrent
#

games

lyric mountain
#

coronavirus

wary kraken
long crow
#

Bitcoin miner

lapis geode
#

blackjack PES_ThumbsUp

wary kraken
quiet topaz
#

overpriced hardware

wary kraken
#

No premium CH_PepeRave

solemn quartz
#

guys quick help

wary kraken
solemn quartz
#

how to get the guild owner's id

#

?

wary kraken
vivid fulcrum
#

that'll give you the owner member object

#

not the id

#

the owner is not granted to be in cache

quiet topaz
#

guild.ownerID

vivid fulcrum
#

^

solemn quartz
#

k ty

crude bough
#

Why doesn't my code print anything on a vote?

    @commands.Cog.listener()
    async def on_dbl_vote(self, data):
        print('Vote recieved!')
        print(data)
feral aspen
#

message.author.JoinedAt Is that a thing?

quiet topaz
#

no, but message.member.joinedAt is

feral aspen
#

Oh, thanks.

dusty onyx
#

does anyone know how to solve asyncpg.exceptions.InvalidTextRepresentationError: invalid input syntax for type json errors? i have no idea why theyre popping up as all my json is valid, and it appears at random occasionally, as far as i can tell

modest maple
#

apparently your json is invalid bloblul

dusty onyx
#

but whyyy ....i ran the exact command that caused the error and it worked fine, yet when another user did they got the error qwq

modest maple
#

well what's your json

dusty onyx
#

ah wait i think i see the issue

#

i wasnt json.dumping that specific method ๐Ÿ˜ญ

unreal estuary
feral aspen
#

No worries.

#

๐Ÿ‘

#

Thanks though.

unreal estuary
pale vessel
#

that's english

earnest phoenix
#

not a good question

unreal estuary
#

whats the difference between .avatarURL() and .displayAvatarURL()

vivid fulcrum
#

read the docs

unreal estuary
#

A link to the user's avatar if they have one. Otherwise a link to their default avatar will be returned.

#

and avatarURL() is just "A link to the user's avatar."

#

ok cool

snow urchin
#

css is being a pain right now lol, need help aligning divs in the center of the page like the following
div1 div2
div3 div4
div5 div6
etc

cinder patio
#

Any reasons not to use a framework like bootstrap or tailwind?

vivid fulcrum
#

flexboxes!

#
unreal estuary
cinder patio
#

You don't have to

#

But it makes it way easier

sudden mortar
#

i make a bot to

unreal estuary
#

yeah ik

#

idrk why i dont use it

sudden mortar
unreal estuary
#

most websites i make are small anyways

sudden mortar
#

yea

unreal estuary
#

maybe its something about making all the code myself or having full control of it lol

sudden mortar
#

let me post the bot

cinder patio
#

You still have full control

#

bootstrap is just utility classes

vivid fulcrum
#

and proper design language

#

chances are that your site doesn't follow consistent design language and/or looks like crap

#

you should only really separate from frameworks when you've had a few years of uiux experience and have "the eye" for it

unreal estuary
#

sad maybe my website does look like crap?

#

cry

sudden mortar
#

ugh

unreal estuary
sudden mortar
#

nothing

vivid fulcrum
#

but it's genuinely just skill, you just have to practice ui/ux to become good at it

sudden mortar
#

i just made a bot and posted it

#

lol

fickle magnet
#

found a way to convert objects to binary

cinder patio
#

I mean

vivid fulcrum
#

um

#

well technically they were in binary in the first place

#

what you're probably doing is stringifying the object and then converting the text to binary

#

which is inefficient

fickle magnet
#

I ment a byte array

#

@vivid fulcrum

#

I was just practicing how to do it

blissful coral
#

Still binary tho

#

I think

tired panther
#

I was working on a function, but it was making the code very sl0w:

applyText(canvas, text, defaultFontSize, width, font, option){
        const ctx = canvas.getContext("2d");
        do {
            ctx.font = `${(defaultFontSize -= 1)}px ${font}`;
        } while (ctx.measureText(text).width > width);
        if(defaultFontSize > 100 && option) ctx.font = `${100}px Gagalin`;
        return ctx.font;
    } 
``` any idea if there is alternative?
blissful coral
#

hm

tired panther
blissful coral
#

Very

earnest phoenix
#

how do i add a gif on a image

#

like a welcome image with animated avatar

#

how you usually would

unreal estuary
unreal estuary
#

(:

earnest phoenix
#

am i wrong tho?

unreal estuary
#

you are so right

#

(:

earnest phoenix
#

ok

#

ig i already knew that, didn't need to point it out smh

drifting wedge
#
if message.content == message.content.upper() and len(message.content) > 5 and not profanity.contains_profanity(message.content):``` this is correct no?
#

the contains profanity part?

#

py ofc cuz other langs for nerds

#
AttributeError: module 'profanity' has no attribute 'contains_profanity'```
unreal estuary
#

i find python more complicated than js so u r a nerd

vivid fulcrum
#

that library is 7 years old

#

and abandoned

#

also don't bother with profanity filters

#

read from here

earnest phoenix
#

yeah they're easy to bypass

#

but it is your choice to do it

drifting wedge
#

yeah i dont care that much

#

i just wanna block like normal cuss words

#

eh ill just use a txt

earnest phoenix
#

use a json to fetch the words

#

imo it's way easier

livid lichen
#

Hey I feel stupid for asking this but how would I make a countdown to 30 using a for loop?

earnest phoenix
#

anyone know how to do this reply thing with d.js?

livid lichen
vivid fulcrum
#

you can install from the github repo

earnest phoenix
earnest phoenix
vivid fulcrum
#

probably

#

sec

livid lichen
#

Most likely.

earnest phoenix
#

cuz i rlly wanna add that to my bot

vivid fulcrum
#

yeah you can just install from the repo

#

be aware there might be some breaking changes

earnest phoenix
#

do you think d.js13 will be drop in enough?

#

i dont wanna have to rewrite

vivid fulcrum
#

๐Ÿคทโ€โ™‚๏ธ i don't track the development

#

also

earnest phoenix
#

๐Ÿ˜”

vivid fulcrum
#

if you're going to do it, make sure to fork it then install from your fork

#

this way you can control upstream changes

#

i don't think this has changed but i'll check the source just to make sure

#

okay it hasn't

earnest phoenix
earnest phoenix
#

but send me link and ill run a test bot w/ it

vivid fulcrum
#

just search for djs github

#

first thing on google

#

im on mobile so it's a pain in the ass

earnest phoenix
#

search through the pull requests section

vivid fulcrum
#

replies were merged a looooong time ago

earnest phoenix
#

really?

vivid fulcrum
#

yes

vivid fulcrum
#

sec let me get on my laptop

earnest phoenix
#

i just wanna download the v13 code freerealestate

vivid fulcrum
earnest phoenix
#

had no clue

#

how the fuck do i get d.js 13 freerealestate

#

its not on the internet

#

aaaaa

#

i give up

fickle magnet
#

bots automatically reboot themselves right?

quartz kindle
#

not yet at least

earnest phoenix
#

๐Ÿ˜”

quartz kindle
#

there is v12 and master

#

master will eventually become v13 at some point

earnest phoenix
#

i want to do inline reply ๐Ÿ˜ฉ

quartz kindle
#

you can try using master

earnest phoenix
#

๐Ÿค”

#

tbh idek what im using

#

i just do bat npm install discord.js

quartz kindle
#

thats v12

earnest phoenix
#

okay

#

i assumed so

earnest phoenix
#

most likely not tho

#

how do i get master? do i get it from the github?

quartz kindle
#

yes

#

npm install discordjs/discord.js

earnest phoenix
#

that moment when i wish i was on linux rn

long crow
#

there are few broken changes v12 to v13

#

like intents

earnest phoenix
#

whelp i need to be able to fetch members so

quartz kindle
#

breaking changes

earnest phoenix
quartz kindle
#

not broken changes

long crow
#

it past tense

#

kekw

quartz kindle
#

ye but like

#

broken assumes its broken

#

when its not

#

lul

long crow
#

The other changes, not really sure

earnest phoenix
#

still wish i was on linux rn

#

yo tim i kinda am liking the looks of d.js v13

fickle magnet
earnest phoenix
fickle magnet
earnest phoenix
earnest phoenix
#
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno -4058
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://git@github.com/discordjs/discord.js.git
npm ERR! enoent 
npm ERR! enoent 
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Joseph Winkie\AppData\Roaming\npm-cache\_logs\2021-03-19T22_10_11_921Z-debug.log
PS C:\Users\Joseph Winkie\Documents\discordbot\invite-count-bot-v1.0.0> ```
fickle magnet
earnest phoenix
quartz kindle
#

to install packages directly from github

earnest phoenix
#

know what

#

fuck it

#

laptop time

quartz kindle
#

you can easily install git on windows

fickle magnet
#

is there a way u can do a java version

earnest phoenix
quartz kindle
#

then do it lul

earnest phoenix
fickle magnet
#

I figured

earnest phoenix
#

not familiar with the java d.api wrapper

quartz kindle
#

use a process manager

fickle magnet
#

Im just using java because it is easier to import and export files on it

quartz kindle
#

keeping a process running is not the program's job, it requires an external mechanism or tool

earnest phoenix
long crow
#

dual boot

earnest phoenix
earnest phoenix
fickle magnet
quartz kindle
#

thats not almost full lmao

earnest phoenix
quartz kindle
#

still, you can dual boot with 20gb

#

or just run a vm

earnest phoenix
#

๐Ÿ˜ฉ

#

also what distro

#

ive used arch and i have debian on my laptop rn

quartz kindle
#

whatever you prefer

#

i heard good stuff about debian

earnest phoenix
#

๐Ÿ˜ฉ choices

earnest phoenix
quartz kindle
#

im on ubuntu rn but i feel like switching to debian at some point, if i ever get another vps

modest maple
#

i personally prefer Ubuntu over debian

earnest phoenix
#

ยฏ_(ใƒ„)_/ยฏ

quartz kindle
earnest phoenix
#

but ubuntu is nice bc you can just boot installer, and let it run and its more ready to go than windows

quartz kindle
#

well im talking about mostly for servers

modest maple
#

For me its mostly because of python work and Rust

earnest phoenix
modest maple
#

Ubuntu is easier for me to setup with py3.8 pre-installed on 20 and rust installs considerably easier than debian which for some reason installing can be a real pain

#

although i use docker for everything i occasionally still need it

earnest phoenix
#

do you ever go through your screenshots and wonder what crack you were smoking?

quartz kindle
#

i wanted to give arch a try, but i heard it has issues with jemalloc

earnest phoenix
#

tho i think it might work on my desktop bc i built it so generic intell chipset right?

quartz kindle
#

perhaps

earnest phoenix
#

arch is pretty nice tho ngl

quartz kindle
#

drivers in general are a pain in most linux distros

earnest phoenix
#

aur is like a selling point

quartz kindle
#

good thing you dont need drivers for servers

earnest phoenix
#

sharex wyd

earnest phoenix
#

for d.js is it possible to do a client restart command?

#

like the bot restarts

unreal estuary
#

u can destroy the client

#

then login again

#

i think

#

client.destroy()

sterile lantern
#

process.exit

#

wait nvm thats different

unreal estuary
#

lol

sterile lantern
#

yeah destroy then

#

client.login(token)

unreal estuary
sterile lantern
#

LOL thanks u too

unreal estuary
earnest phoenix
eternal osprey
#

hey

long crow
#

hey Awsome

eternal osprey
#
 
    let filtered = allItems.filter((x) => x[1]);
    let final = filtered.map((x) => x[1])
    console.log(final)
    

  
   
    if(message.content.includes(final)){```why is this not triggering my message.channel.send code?
#

i am typing hello guys, one of the words in the array

#

but it doesn't trigger it

earnest phoenix
earnest phoenix
# eternal osprey ```js let filtered = allItems.filter((x) => x[1]); let final = filtere...
earnest phoenix
earnest phoenix
#

i made a reload command but for some reason other people are able to use it too

#
if(!message.author.id === "560282666361159690") {
    return;
  }
  else{```
#

i did that but still

#

oops lemme bin that

earnest phoenix
#

okay

vivid fulcrum
#

no lol

#

that comparison is if(false == string)

earnest phoenix
vivid fulcrum
#

do !== for NOT operations

earnest phoenix
#

okay

earnest phoenix
# earnest phoenix ```js if(!message.author.id === "560282666361159690") { return; } else{`...
- if (!yourVariable === yourOtherVariable) // !yourVariable is coereced to a boolean value
+ if (yourVariable !== yourOtherVariable) // checks that one is not equal to the other

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Expressions_and_Operators#Comparison

eternal osprey
#

thanks voltrex and jj33

earnest phoenix
vivid fulcrum
#

...no

#

that if statement is incorrect

earnest phoenix
#
if(message.author.id !== "560282666361159690") {
    return;
  }```
#

this basically ^

vivid fulcrum
vivid fulcrum
earnest phoenix
#

okay lemme ask my freind to test it out

earnest phoenix
#

yea

earnest phoenix
vivid fulcrum
#

sure

earnest phoenix
#

but now i gotta know how to make the bot restart command

#

๐Ÿ˜ญ

vivid fulcrum
#

you're better off using !== though

#

type safety is key

earnest phoenix
#

like pm2

#

and then process.exit()

earnest phoenix
#

tell him not me

#

im not good at those ๐Ÿ˜ญ

#

lmao

#

i said use a process manager, literally the easiest thing to set up

vivid fulcrum
#

pm2 is a bunch of overengineered garbage

earnest phoenix
vivid fulcrum
#

cron jobs and you're done (on linux)

earnest phoenix
#

fs?

#
message.channel.send('Restarting...').then(m => {
        client.destroy().then(() => {
          client.login('token');
        });
      });
``` would this work?
#

no

#

because the client will be destroyed

vivid fulcrum
#

you're effectively doing nothing with that

earnest phoenix
#

and it won't even restart probably

#
if(message.author.id == "560282666361159690") {
    await message.channel.send("๐Ÿ” | restarting.")
    process.exit()
}``` @earnest phoenix  and then launch the bot using ```bat
:loop
node index.js
goto loop```
earnest phoenix
#

oh i got one

earnest phoenix
#
(message.content === 'restartthebot') { 
if (message.author.id !== 'Owners ID') return; message.channel.send('Restarted.').then(() => { process.exit(1); }) };```
#

^ ?

#

yes but you need a process manager or cron job

#

but the cmd name is too long so yes it will be restart not restartthebot

#

Doing any of that doesn't restart a process

earnest phoenix
#

okay

#

but otherwise that will work @earnest phoenix and just launch it using bat script

latent heron
#

How do I write an eval command

#

My code not work angryrage

earnest phoenix
#

this is hard af Lol

#

Just use eval()

latent heron
#

How do I import it

earnest phoenix
#

It's native

drifting shell
#

amogus

latent heron
#

So import native

#

Thank you!!

earnest phoenix
#

Bro

#

import amogus

earnest phoenix
drifting shell
#

import am0gus

latent heron
#

One day I'm gonna sell an API endpoint service that sends you random among us fanart pics

slender wagon
#

What the hell

latent heron
#

Just you wait

earnest phoenix
#

yes

vivid fulcrum
#

now im intrigued

earnest phoenix
#

Also make a limit to query those

gilded ice
earnest phoenix
#

amogus.sus/api/pics?search=query&limit=number

gilded ice
#

I know that it gets off topic sometimes but Jesus

earnest phoenix
# latent heron How do I write an eval command
    }else if (message.content.startsWith("+eval") && (message.author.id == ownerID))){
        message.channel.send("`` `" + JSON.stringify(eval(message.content.substring(6, message.content.length))) + "`` `")
    }``` remove the backticks
gilded ice
#

I'm on mobile but

#

What

vivid fulcrum
#

yall really need to get your command handling sorted

#

this hurts my soul

earnest phoenix
nimble kiln
blissful coral
#

uh

#

the hell is that command

earnest phoenix
#

Something bad

#

Stinky

gilded ice
#

Wow I always wanted to execute 1832 lines of code before running the command

blissful coral
#

yea

slim heart
#

do not

#

ever do that

blissful coral
#

jesus

nimble kiln
#

I love my if's

#

Just got around 60 commands

vivid fulcrum
#

js allows beautiful patterns and yall come up with... if else ๐Ÿ˜ญ

earnest phoenix
#

if else if else if else if else if else if else if else if else if

gilded ice
#

You'd better be trolling or we're gonna have a biiig problem

slim heart
#

import util from 'util'

function clean (text): string {
  if (typeof (text) === 'string') { return text.replace(/`/g, '`' + String.fromCharCode(8203)).replace(/@/g, '@' + String.fromCharCode(8203)) } else { return text }
}
...
{
  ...
  exec: async (ctx) => {
    if (ctx.message.author.id !== '142408079177285632') ctx.send('error message')

    const worker = ctx.worker

    try {
      const code = ctx.args.join(' ')

      // eslint-disable-next-line no-eval
      let evaled = eval(code)

      if (typeof evaled !== 'string') { evaled = util.inspect(evaled) }

      void ctx.embed
        .color(0x28bf62)
        .title('Eval Successful')
        .description(`\`\`\`xl\n${evaled}\`\`\``)
        .send()
    } catch (err) {
      void ctx.embed
        .color(0xdb0b0b)
        .title('Eval Unsuccessful')
        .description(`\`\`\`xl\n${clean(err)}\`\`\``)
        .send()
    }
  }
}```
what i do
nimble kiln
marble juniper
#

lol

nimble kiln
#

I even copy pasted all my commands, because I use them for two different versions

agile lance
#

Ew imagine using else if

latent heron
agile lance
#

Just use fs or something

earnest phoenix
gilded ice
#

What is ctx

earnest phoenix
#
if (evaled instanceof Promise) evaled = await evaled;```
nimble kiln
#

I only heard ctx in python before

earnest phoenix
nimble kiln
#

context

gilded ice
#

Just use rust

#

Faster than js

slim heart
#

i do that too

earnest phoenix
slim heart
#

ok

earnest phoenix
#

Smelly

gilded ice
slim heart
#

i just removed a bunch of stuff cuz its a bunch of cross cluster options and stuff

vivid fulcrum
#

context in all libraries is just a plain ass object wrapping all the properties you get from the message event and your args and shit

#

aka sane people organization

gilded ice
#

Actually just go straight to the discord ASM lib

slim heart
gilded ice
#

Who gives a shit

latent heron
#

U good?

gilded ice
slim heart
#

no where

#

semicolons can eat my

latent heron
#

Imagine needing semicolons still

slim heart
#

so 2017

gilded ice
#

Semicolons look nice

#

(

slim heart
#

i use standard

gilded ice
latent heron
#

๐Ÿ—ฟ

earnest phoenix
#

๐Ÿ—ฟ Not using semicolons

gilded ice
#

๐Ÿ˜Ž

#

Floor gang = semicolon gang

slim heart
#

floor gang stinky then

gilded ice
#

Lewd

eternal osprey
#

hey guys i have a little question.the first words in each line are the keywords. The 2nd are the roles.

right now it does indeed check for the message that has been sent and it does indeed compare it with the keywords
however
it does not ping the right role
let final2 = filtered.map((x) => x[2])
i am pretty sure it is this one line
as it only gets the 2nd string
how would i code it so that it will get the exact role corresponding to the used keyword?

slim heart
#

why do u keep just talking in codeblocks

drifting shell
#
imagine not talking in code blocks
eternal osprey
#

i used it wrong

slim heart
#

nvrm i was thinking of someone else mb

eternal osprey
#

any tips?

vivid fulcrum
#

why not just use JSON for this type of configuration

#

if this is for a database you're about to get slapped to mars

wary kraken
#

Ummm, Slash commands hate me
Code:js client.api.applications(client.user.id).guilds(guild.id).commands().post({data}); Output:```
UnhandledPromiseRejectionWarning: DiscordAPIError: Missing Access

nimble kiln
#

Is there more output than just Missing Access?

#

A stacktrace for example?

#

Maybe it doesnt have send perms or something

eternal osprey
wary kraken
#
(node:2490) UnhandledPromiseRejectionWarning: DiscordAPIError: Missing Access
    at RequestHandler.execute (/home/runner/DeSync/node_modules/discord.js/src/rest/RequestHandler.js:154:13)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async RequestHandler.push (/home/runner/DeSync/node_modules/discord.js/src/rest/RequestHandler.js:39:14)
(node:2490) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:2490) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code
wary kraken
nimble kiln
#

ah well, I was hoping for something else

wary kraken
#
client.on("guildCreate", function(guild) {
  doslashcommand(guild, "test", "test", "Bugs", "Command used to test stuff", 6, false);
});

function doslashcommand(guild, name, description, optionname, optiondescription, type, required) {
    const data = {};
    data.name = name;
    data.description = description;
    data.options = new Array();
    
    const option = {};
    option.name = optionname;
    option.description = optiondescription;
    /*
     * type list:
     * 1 = SubCommand
     * 2 = SubCommandGroup
     * 3 = String
     * 4 = Integer
     * 5 = Boolean
     * 6 = User
     * 7 = Channel
     * 8 = Role
    */
    option.type = type; // 6 = User
    option.required = required;

    data.options.push(option);

            client.api.applications(client.user.id).guilds(guild.id).commands().post({data});
}```
eternal osprey
#
    const allItems = fs
      .readFileSync("./keywords1.txt", "utf8")
      .split("\n")
      .map((x) => x.split(/ +/))
    
    let filtered = allItems.filter((x) => x[1]);
    let final = filtered.map((x) => x[1])

    

  
   
    let m = final.some(a => message.content.includes(a))```how do i store the keyword that was used in the senetence?
earnest phoenix
earnest phoenix
wary kraken
earnest phoenix
#

That's a permission, not a scope

wary kraken
#

thank you

earnest phoenix
#

If you're trying to get the word corresponding to the keyword, just use a json

wary kraken
#

works like a charm thank you @earnest phoenix

earnest phoenix
#

๐Ÿ‘

#

no error is logged though

wet geyser
#

Hi, I had a problem. The problem is

An error has occurred while validating your input:
The "Servers this bot is in" section is formatted incorrectly.

earnest phoenix
#

nvm i got it

wet geyser
#

can you help me

earnest phoenix
#

what language?

#

@wet geyser

wet geyser
#

js

earnest phoenix
#

scroll down to that part

dusky sundial
#

What have you written in "Servers your bot is in"?

wet geyser
#

That's the problem

earnest phoenix
#

put the server id

#

not the server name

wet geyser
#

Is that correct

#

ุŸ

earnest phoenix
#

this is development not top.gg support channel

#

ask in there

#

ty

dusky sundial
#

Try adding a space after the commas

#

and yes, any further questions about this should be in #support

livid lichen
#

Bot.api.applications(Bot.user.id).guilds(733437879933599866).commands.post({
  data: {
    name: "e",
    description: "lol"
  }
});

Bot.ws.on('INTERACTION_CREATE', async interaction => {
  const command = interaction.data.name.toLowerCase();
  const args = interaction.data.options;

  if (command === 'e') {
    Bot.api.interactions(interaction.id, interaction.token).callback.post({
      data: {
        type: 4,
        data: {
          content: "E indeed!"
        }
      }
    })
  }
});
```Hi! I'm making slash commands with Discord.js, but I keep getting this error: `DiscordAPIError: Missing Access.`. What am I doing wrong?
wet geyser
livid lichen
#

Oh! Where may I find the scope? I had no clue about this.

#

Found it. Thanks for the help!

earnest phoenix
#

is it possible for me to work on the voting api system before my bot has been accepted?

opaque acorn
#

Hi, how do I get my bot to ask users for moderation permissions?

earnest phoenix
#

Pretty sure the API won't send any payloads since your bot is not approved yet, but the webhooks are always available so go ahead, you can also test it easily, as there's a Test webhook button @earnest phoenix

summer torrent
earnest phoenix
opaque acorn
earnest phoenix
#

JavaScript is a programming language, not a library

opaque acorn
#

Idk

livid lichen
#

Hey! The error is still appearing... even when I reinvite the bot!

#

I'm going to try finding a dependancy.

earnest phoenix
opaque acorn
#

Aaaaa

#

Discord.js

#

Im bad, sorry

earnest phoenix
#

Use <GuildMember>.permissions.has() to check if they have a specific permission

opaque acorn
#

Ok

#

Thx

earnest phoenix
earnest phoenix
#

^

earnest phoenix
#

Iโ€™m learning c++ and Iโ€™m like ๐Ÿ˜ฉ

alpine marsh
#

I would like to learn how to make a bot which logs top.gg votes, gives roles on it etc... where do you recommend me to start?

quartz kindle
#

do you have any coding experience?

alpine marsh
#

nope

#

i would like to know what step to take first

#

what to learn

quartz kindle
#

pick a programming language and look into beginner courses like udemy or codecademy

alpine marsh
#

alright

#

i might pick javascript

#

my friend uses it

quartz kindle
#

popular beginner languages include javascript, python, C# and more

alpine marsh
#

ok

#

welp ill go to those sites

#

ty

sour flame
#
import discord
from discord.ext import commands
import random
import json

client = commands.Bot(command_prefix="!")


@client.event
async def on_ready():
    print("Ready")


@client.command()
async def balance(ctx):
    await open_account(ctx.author)

    users = await get_bank_data()

    wallet_amt = users[str(user.id)]["wallet"]
    bank_amt = users[str(user.id)]["bank"]

    em = discord.Embed(title=f"{ctx.author.name}'s balance",
                       color=discord.color.red())
    em.add_field(name="Wallet's balance", value=wallet_amt)
    em.add_field(name="Bank's vault", value=bank_amt)
    await ctx.send(embed=em)


@client.command()
async def beg(ctx):
    async def balance(ctx):
        await open_account(ctx.author)
        user = ctx.author
        users = await get_bank_data()

        earnings = random.randrange(1000001)

        await ctx.send(f"Someone gave ya {earnings} coins!!")

        users[str(user.id)]["wallet"] += earnings
        with open("bank.json", "w") as f:
            json.dump(users, f)


async def open_account(user):

    users = await get_bank_data()
    user = ctx.author
    if str(user.id) in users:
        return False
    else:
        users[str(user.id)] = {}
        users[str(user.id)]["wallet"] = 10
        users[str(user.id)]["bank"] = 0

    with open("bank.json", "w") as f:
        json.dump(users, f)
    return True


async def get_bank_data():
    with open("bank.json", "r") as f:
        user = json.load(f)

    return users


client.run("Token") 
#

help meh with my error for balance command

quartz kindle
#

the error says it all

steel arch
#

How do i do to call the Data collection of MongoDB, this image could help

lyric mountain
#

What that image represents?

steel arch
earnest phoenix
#

anyone know how to code a football fusion bot?.

old cliff
#

nope

earnest phoenix
#

yeah ig its tuff i find No tutorials

dusky sundial
#

There won't be a tutorial for everything, that's why it's good to practice making your own projects without any help

craggy pine
#

You pretty much should learn a language enough to use your imagination to create a bot for that topic.

dusky sundial
#

Exactly, there's nothing wrong with using a tutorial, but eventually you'll learn how to do things on your own

old cliff
#

how can I broadcast eval to a shad on a different physical server?

blissful coral
#
import kurasuta from 'kurasuta';
import config from '../config.json';
import { join } from 'path';
import chalk from 'chalk';
import { Creative } from './Creative';
const sharder = new kurasuta.ShardingManager(join(__dirname, 'main'), {
  token: config.token,
  client: Creative,
  clusterCount: 3,
  clientOptions: {
    partials: ['MESSAGE', 'GUILD_MEMBER', 'CHANNEL', 'REACTION', 'USER']
  },
  guildsPerShard: 800
});
old cliff
#

then I should switch to kurasuta

blissful coral
#

kurasuta is pog

old cliff
#

does it have multi server boradcast?

#

like broadcast to a different shard on a different physical server?

blissful coral
#

on a completely different localhost?

#

like different IP? @old cliff

spiral tinsel
steel arch
spiral tinsel
#

I may be able to help you out because I use it myself?

#

What are you trying to achieve?

steel arch
spiral tinsel
#

Ic but your trying to connect to a collection?

#

Are you using Atlas?

steel arch
#

Yes

#

Im already connected

spiral tinsel
#

So your just trying to change the value?

steel arch
#

Yes

spiral tinsel
#

I'd recommend making a document for each guild the bot is in and then a value inside named prefix which is a string

#

Do you need help with that?

steel arch
#

I think i can handled

spiral tinsel
#

Ok.

earnest phoenix
#

what is shards

crystal wigeon
#

is there an efficient way to audit logs other than in DB?

#

my DB data occupied legit increased to 8GB in 2 days

#

i tried prometheus. but im kinda confused about how you log from files

#

the grok_exporter seemed kinda confused :c

opal plank
crystal wigeon
#

logs

#

i had to log data fast

#

so

opal plank
#

why?

crystal wigeon
#

i mean, it was a case of urgency

opal plank
#

why you logging so much?

crystal wigeon
#

command logs etc

opal plank
#

commands should take up that much space my dude

crystal wigeon
#

so that players dont scam and claim they never ran the command

#

i mean i dont thing its efficient

opal plank
crystal wigeon
#

8GB in 2 days

#

dem

opal plank
#

im at 4GB, 4 months of data, and this is also including a shitton other data

#

not only the logs

#

the logs table is probably at max 500mb

#

thats why im asking

#

what in the flying fuck you logging

#

to use 8GB

crystal wigeon
#

command logs, when peeps type a command

#

and the update logs. when a user does something and their data gets modified

#

to keep track

#

im sure im doing it inefficiently

opal plank
#

absolutely

#

you should only log stuff you want

#

not log data states

crystal wigeon
#

yeah but if someone loses something at a point

#

or claims that they never did something

#

it would be hard to find

#

without those logs

opal plank
#

then create weekly datapoints

#

instead of logging everything

#

its absolutely dumb to do that

crystal wigeon
#

weekly datapoints?

#

you mean like clear the previous

opal plank
#

yeah, backups

crystal wigeon
#

logs?

#

after a checkout

#

?

opal plank
#

no, backups

#

every 3 or 4 days, create a backup with all users data

crystal wigeon
#

i do daily backups

#

thats not what im saying btw

#

let me

opal plank
#

and then ditch it after 3 backups

crystal wigeon
#

give you a scenario

#

lets say user 1 has 500 gold, he transfers using the command give <user2> this command is logged. there are 2 uses for this, 1 is if they are using alts or doing something else like cross trading. it can act as evidence. so now. the second use case. is once the gold gets transferred the user data changes logs should reflect the changes. if the guy tries to say he never received the gold or tries something. these logs would help

#

im mainly using these logs to find alts

#

and prevent scams

#

and this has worked

#

so far

#

i thought of creating checkpoints

#

and clearing older ones

opal plank
#

try ELK then

crystal wigeon
#

i thought its not open source anymore?

opal plank
#

huh?

#

you DO know what ELK is right?

crystal wigeon
#

yeah elastic search?

#

or nvm

#

xd

opal plank
#

elastic search, logstash and kibana

crystal wigeon
#

ah

opal plank
#

thats the proper procedure for logs

crystal wigeon
#

yeah i read that elastic search revoked their open source license or something. the OS contributors receive nothing and they just claimed it?

#

okies

#

what about grafana + prometheus?

#

im just confused about how to log data into prometheus.

#

for now i used grafana to check logs directly from DB but that was just useless and kinda like a "getting used to grafana" thing

opal plank
#

grafana isnt mean for logs

#

only for metrics

crystal wigeon
#

i see

opal plank
#

while its absolutely hypocritical to tell you this, cuz i do just that

#

but its the do what i say, dont do what i do sort of deal

#

i know its bad but i do it regardless cuz it has a few perks

#

mainly helps me being lazy and only need to have 1 tab open

crystal wigeon
#

xD

crystal wigeon
#

ELK has a lot of hardware requirements?

#

the recommended one are 12cpus wtf

lusty quest
#

prometeus is a time series database, you just query on a selected event to it, depending on the driver it will create a timestamp for you on query

crystal wigeon
#

yeah i figured that out heuehu

lusty quest
#

so you want to have a way to log stuff?

crystal wigeon
#

yeah and monitor them

#

ELK seems expensive

lusty quest
#

just ssh into your server tbh

crystal wigeon
#

lul

#

thats not

#

what i meant

lusty quest
#

so you want to keep transaction logs?

crystal wigeon
#

yep

#

i use winston to log errors and discard from time to time

lusty quest
#

tbh i would just use a database for keeping logs

#

probably a stupid way but way less overkill than starting a ELK stack for logging transactions of a Bot

opal plank
#

someone said overkill?

crystal wigeon
#

well i did the same and my DB racked up 8GB in 2 days

opal plank
#

i heard overkill

crystal wigeon
#

lmao

opal plank
#

elk shouldnt be that hard on your hardware tbh

#

you could just dump shit onto elasticsearch tbh

crystal wigeon
#

ye some tutorial dude, went on saying you need 12cpus and high memory ;-;

#

The Elastic Stack is a great platform for various data analytics use-cases. But how do you get started? This video goes beyond a simple default installation of Elasticsearch and Kibana. It discusses real-world best practices for hardware sizing and configuration, providing production-level performance and reliability.

Short-form instructions an...

โ–ถ Play video
river panther
#

how do i make all these files run in one go?

lusty quest
lusty quest