#development

1 messages · Page 1456 of 1

sterile lantern
#

oh wait

#

is it because the interval is just

#

updateCount();

#

because in updateCount();, count is set to 1 once again

#

thats probs the reason

#

maybe maybe not

solemn latch
#

where is it doing that in updateCount

sterile lantern
#

oh wait

#

it isnt nvm its outside

#

well that dont make sense

#

also its every 5 mins

#

which is weird

drifting wedge
#
2|stats  | FileNotFoundError: [Errno 2] No such file or directory: ''```
solemn latch
#

do you have another interval?

sterile lantern
#

no

solemn latch
#

do you have any other events

sterile lantern
#

uhh no

solemn latch
#

so this isnt a bot, just this right?

sterile lantern
#

yes

#

its just a webhook thing

#

and in index.js its the stuff that i sent

#

uhh yea still happening

#

every 5 mins

#

which is strange

#

it seems like count reset every 5 min??

main trench
#

anyone know how to seperate words in a db since logging it as a array does nothing

solemn latch
#

so you can see when it restarts

sterile lantern
#

uh yes something pops up one second

#

i used this for quick.db @main trench

  let money = db.all().filter(data => data.ID.startsWith(`money`)).sort((a, b) => b.data - a.data)```
#
Timeout {
  _idleTimeout: 20000,
  _idlePrev: [TimersList],
  _idleNext: [TimersList],
  _idleStart: 872,
  _onTimeout: [Function],
  _timerArgs: undefined,
  _repeat: 20000,
  _destroyed: false,
  [Symbol(refed)]: true,
  [Symbol(asyncId)]: 3,
  [Symbol(triggerId)]: 1```
#

this prints

#

on start up

main trench
sterile lantern
#

oh

#

then not too sure abt that

#

uh is the word in an array?

#

if so doesnt it automatically store like "a", "b"

main trench
#

i just need to get it to separate each word and it will work

main trench
sterile lantern
#

oof

solemn latch
#

below your let count = 1 line add a console.log("count init");

main trench
#

im doing db.push i guess i could try db.add to see if that works idk

drifting wedge
#

is json supposed to have []

#

?

hollow sedge
#

json can handle arrays

sterile lantern
#
count init
Timeout {
  _idleTimeout: 20000,
  _idlePrev: [TimersList],
  _idleNext: [TimersList],
  _idleStart: 414,
  _onTimeout: [Function],
  _timerArgs: undefined,
  _repeat: 20000,
  _destroyed: false,
  [Symbol(refed)]: true,
  [Symbol(asyncId)]: 6,
  [Symbol(triggerId)]: 1```
#

it prints

#

so now we wait?

solemn latch
#

yeah

sterile lantern
#

this printed

solemn latch
#

first one it will always print that, since count was set to 1 on startupp

sterile lantern
#

sent an embed

#

mhm

main trench
#

db.add throws an error nice ```let word = [${args[1]}]

    db.push(`wordsdb_${message.guild.id}`, word)``` this is my current code
#

if i have one word in the db it works fine but once i add 2 it breaks

sterile lantern
#

uh i dont think that would work

#

because is it not just replacing the word

#

everytime

main trench
#

i dont want it to replace

sterile lantern
#

oh yeah db.push doesnt do that nvm

main trench
#

i want it to have multiple words each separated so a mod can blacklist a lot of words

sterile lantern
#

so you want a space in between them?

#

so you want g!bl word1,word2

main trench
#

nah

#

g!bl add "word 1" g!bl add "word2"

sterile lantern
#

that should work

main trench
#

its either how im logging it or how im fetching it

#

```let words = db.fetch(wordsdb_${message.guild.id})

let badlink = new MessageEmbed()
    .setDescription(`You cannot say bad words in **${message.guild.name}**`)
    .setColor("RED")

if(message.content.toLowerCase().includes(words)) {
message.delete()
message.author.send(badlink);
}``` this is how i fetch it

hollow sedge
#

quick.db isnt the best for stuff like this

drifting wedge
#
6|stats    | KeyError: 0```
hollow sedge
#

well

drifting wedge
#

ye so i think it breaks the list

hollow sedge
#

actually its not the best for anything

drifting wedge
#
    process = subprocess.Popen(['pm2', 'jlist'],
                        stdout=subprocess.PIPE,
                        stderr=subprocess.PIPE)
    stdout, stderr = process.communicate()
    list1 = stdout#.decode("utf-8")
    print(list1)
    #list1 = json.loads(list1)
    if list1:
        list1 = json.loads(list1)
    else:
        list1 = {}```
#

this is basically it

main trench
#

mongo would require me to change everything which isn't something i want to do right now

sterile lantern
# solemn latch yeah

weird, its been 5 min (should post the same thing again) but its not posting it

main trench
#

and i would run into this same situation

sterile lantern
#

ig console.log did something?

#

oh.. im so dumb

#

i think its bc uptime pings it every 5 mins

#

is that da reason

solemn latch
#

is it refreshing all your variables?

sterile lantern
#

uh so basically

#

repl.it projects stay up every 30 mins

#

so i have uptime to ping it every 5 mins

#

ping it as in restart the index.js

#

so i think thats probably

#

the exact reason

#

why its happening

#

😔

#

i mean i dont think pinging does anything

#

it just starts the project

hollow sedge
#

no, pinging will keep it up

#

but getting an actual server is recommended

drifting wedge
#

uhhh so i cant send the entire json

sterile lantern
#

yea but this is just a webhook

drifting wedge
#

but it works when i do python3

sterile lantern
#

so how would i fix

drifting wedge
#

i think it errors

hollow sedge
#

yeah dont do that idk what the problem is tho

drifting wedge
#

but it doesnt log it

main trench
#

imma just assume there is no way to get this working with quick.db KEKW

hollow sedge
#

there probably is

solemn latch
main trench
#

the issue is separating the words

drifting wedge
#

any1 got ideas?

hollow sedge
#

you could just make it into json @main trench

sterile lantern
#

i cant see the logs

#

when i exit out

#

hm one sec

hollow sedge
#

like its a bad way but its the only way i can think of

main trench
stark abyss
#

i can't find proper docs for canvas npm ._.

hollow sedge
#

yeah

#

you would get the list in JSON form, load it, add the word, stringify it, and then push to your DB

#

I THINK

main trench
#

[ [ 'yes' ] ] interesting

#

this is what gets logged

#

ok so adding 2 words brings this up [ 'no', 'yes' ]

drifting wedge
#

@hollow sedge ok so this is what i think

#

it returns it in json form

#

but i have to make it json

hollow sedge
#

yes

drifting wedge
#

ye list1 = json.loads(list1) works

#

but when i try it with pm2 it bugs out

#

with python3 run file it just prob also does

#

but it doesnt show

main trench
#

@hollow sedge ok so how should i format it into JSON then?

hollow sedge
#

with node.js i think its JSON.stringify(blacklist)

main trench
#

aight

#

so all in bl.js put it into a string then log that string

hollow sedge
#

and JSON.parse(json_blacklist) to read it

main trench
#

aight

hollow sedge
#

uh

#

yeah i think you can do that

main trench
#

ill put this in main.js for now to see what happens

drifting wedge
#
6|stats    |     if "arch_cluster" in list1[i]["name"]:
6|stats    | KeyError: 0
6|stats    | Traceback (most recent call last):
6|stats    |   File "/root/botstats.py", line 79, in <module>
6|stats    |     updatestats()
6|stats    |   File "/root/botstats.py", line 21, in updatestats
6|stats    |     list1 = json.loads(list1)
6|stats    |   File "/usr/lib/python3.8/json/__init__.py", line 357, in loads
6|stats    |     return _default_decoder.decode(s)
6|stats    |   File "/usr/lib/python3.8/json/decoder.py", line 337, in decode
6|stats    |     obj, end = self.raw_decode(s, idx=_w(s, 0).end())
6|stats    |   File "/usr/lib/python3.8/json/decoder.py", line 355, in raw_decode
6|stats    |     raise JSONDecodeError("Expecting value", s, err.value) from None
6|stats    | json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)```
#

thiis is error

#

i feel the json is just fucked up and doesnt even exist lmao

sterile lantern
#

because i went out of my repl now its sending every 5 mins

#

and i dont really know any other alternatives to fixing it

main trench
#

ReferenceError: json_words is not defined interesting

solemn latch
#

well, it would be strange if it was rebooting it just because of the ping. especially since repl doesnt seem to restart peoples bots when it gets a ping

sterile lantern
#

but the thing is

#

it sends every 5 mins

#

the same thing

#

if no update

#

so its most likely cause of uptime

#

since if i stay on the website, it doesnt send it

#

if i exit, every 5 mins it starts sending again

#

which is annoying

solemn latch
#

does uptime not send if your on the page?

sterile lantern
#

no

#

because its already online

main trench
#

@hollow sedge json failed it logged the word 4 times

solemn latch
#

so your uptime is letting it go offline?

sterile lantern
#

uh no

hollow sedge
sterile lantern
#

i dont think it pings when im on the website

#

maybe it does

#

well regardless of that, it still sends every 5 mins

#
  updateCount()
}, 20000);``` should i put this in the async function?
#

maybe dats the reason

solemn latch
#

in what async function

sterile lantern
#

the updateCount one

solemn latch
#

that would just make a new interval every time it runs

sterile lantern
#

o

drifting wedge
#

can someone please help me?

hollow sedge
#

i have an idea

#

try running .strip on the output @drifting wedge

drifting wedge
#

list124.strip("[]")

#
    list124.strip("[]")```
#

pm2 jlist output

#

im stripping []

hollow sedge
#

wait no

#

strip the spaces too

#

the leading and trailing spaces

solemn latch
#

since i have never used repl, i dont know how it works, so i dont know the most effective solution.
Potentially repl runs all the top level code on every web request? @sterile lantern

drifting wedge
#

wat?

hollow sedge
#

list123.strip("[] ")

solemn latch
#

you could test that by acessing the same page your uptimer does and see if it sends the embed

sterile lantern
#

o

main trench
#

    let wordz = JSON.parse(json_words)``` this threw an error while ```let wordz = JSON.stringify(words)

    let badlink = new MessageEmbed()
        .setDescription(`You cannot say bad words in **${message.guild.name}**`)
        .setColor("RED")
   
   if(message.content.toLowerCase().includes(JSON.parse(wordz))) {
    message.delete()
    message.author.send(badlink);
   }``` logged one word 4 times @hollow sedge
drifting wedge
#

oh lmao

#

something is wrong

hollow sedge
#

wait no

#

i meant to put it into your db do JSON.stringify(words) and to read it from your db to JSON.parse(json_words_from_db)

main trench
#

it seems quick.db automatically logs things as an array as shown here [ 'yes', 'no' ]

drifting wedge
#

uhhh

#

its only returning b''

#

not even the list

sterile lantern
#

it does not send anything

hollow sedge
drifting wedge
#

wait lemme figure this out lmao

solemn latch
#

@sterile lantern it seems it did run your code however, "count init" the next cycle it should have send the embed right?

main trench
#

@hollow sedge the only way to get this to work is to turn [ 'yes', 'no' ] into [ 'yes' ], [ 'no' ] somehow

sterile lantern
#

i think this is the old count init

#

yea old console log

solemn latch
#

thats the page your uptime is going to right?

#

not your dashboard.

sterile lantern
#

yes

#

to ping the project

#

and when you go that link

#

that pops up

solemn latch
#

why would your repl page send the console?

sterile lantern
#

i have no clue

fiery trellis
#

How do you do the vote requirement command?

sterile lantern
#

maybe bc im signed

#

in

#

one sec

fiery trellis
#

They will need to vote before using the command

sterile lantern
#

yea it still posts

#

use a db and on a vote, store the users id. for the cmd, check if the users id is stored in the db, if not, send error msg

twilit geode
#

after creating a channel with guilds.channels.create how do I get the ID of it

sterile lantern
#

uh

#

fetch it?

twilit geode
#

lol

mellow kelp
#

does that function not return a promise of a channel or something?

sterile lantern
#

^

#

it needs a name im pretty sure

mellow kelp
#

yea

twilit geode
#

ok yes, i use guilds.channels.create("Commander Setup")

mellow kelp
#

what does that return

twilit geode
#

but Im not sure how to get the ID afterwards

twilit geode
mellow kelp
#

um k

twilit geode
#

this is when it joins a new guild

#

btw

earnest phoenix
#

Hi, is anyone here good with sharding?

#

For some reason my message event duplicates when using sharding

drifting wedge
#

lib?

earnest phoenix
#

Discord.js

mellow kelp
drifting wedge
#

nop

earnest phoenix
twilit geode
drifting wedge
#

and now?

mellow kelp
#

dang

#

discord won't even accept my id or passport

#

and nobody responds on the support page either

twilit geode
south sinew
# mellow kelp discord won't even accept my id or passport

ive been having issues with their verification too, its taken 2 weeks for them to just escalate it to the dev team and ive still gotten no response from them, meanwhile my bot is siting at 100 guilds unable to be added to any more

mellow kelp
mellow kelp
#

"we'll escalate this ticket to the dev team"

#

well its been 18+ days

sterile lantern
#

so the issue is most likely that its being rerunned every 5 mins

mellow kelp
#

wait actually 1 month

twilit geode
sterile lantern
#

so im not exactly sure how to make it so it doesnt do that

mellow kelp
hollow sedge
#

you dont have to be 18

twilit geode
twilit geode
hollow sedge
#

cant you also give your school ID

mellow kelp
#

here its kinda strict

mellow kelp
#

obviously covering my face

twilit geode
mellow kelp
#

We were unable to continue as the documents you sent are invalid

#

maybe

hollow sedge
#

yeah

mellow kelp
#

but they should at least tell me

twilit geode
#

they kinda need to see your face

hollow sedge
#

thats not really an obviously

#

no

mellow kelp
#

im not comfortable with sending an image of my face to some company out there

hollow sedge
#

its kind of a given that you need to send your ID without covering any part of it

#

its not "some company"

#

its discord

mellow kelp
#

well yea

sterile lantern
#

plus its only like

#

one person

hollow sedge
#

if you dont trust them with your ID

#

you shouldnt trust them with your messages

sterile lantern
#

u shouldnt trust them with

#

yea

mellow kelp
#

nah messages are another thing lmao

sterile lantern
#

messages can easily be leaked

hollow sedge
#

not really

sterile lantern
#

private ones too

twilit geode
#

but they're not

hollow sedge
#

yeah

sterile lantern
#

yea

#

same thing goes for the id

#

only one person can see it

#

then its probably removed

#

or gone from wherever it was

solemn latch
sterile lantern
#

hmph,

solemn latch
#

there is a solution out there without doing that, i just dont know how repl works.

sterile lantern
#

maybe ill just let it be tbh

#

what solution would that be?

solemn latch
#

🤷‍♂️

sterile lantern
#

bc im on the website that uptime pings

#

and it hasnt sent

#

for ~20 mins

mellow kelp
#

dang

solemn latch
#

if i knew how repl works, id be able to help.

hollow sedge
#

why cant you just store the count in your db

#

oh wait

fiery trellis
#

What is the code of voting requirements command?

hollow sedge
#

woo just suggested that

sterile lantern
#

i mean all that for a webhook

#

tbh

twilit geode
#

who needs repl help

sterile lantern
#

ill do it soon

fiery trellis
#

Because im dumb at the dbl api thingy

sterile lantern
#

me

twilit geode
#

wassup

sterile lantern
#
const axios = require('axios');
const discord = require("discord.js")
let GROUP_ID = groupidhere
let GOAL = 27000
let count = 1
let wid = process.env.wid 
let wtoken = process.env.wtoken

let webhook = new discord.WebhookClient(wid, wtoken)
async function updateCount() {
    let response = await axios.get(`https://groups.roblox.com/v1/groups/${GROUP_ID}/`)
    let response_count = response.data.memberCount 
    //console.log("got request")
    if (count < response_count) {
        console.log(response_count, count) 
     const embed = new Discord.MessageEmbed()
.setColor("#FFDAB9")
.setThumbnail('this is a joke')
.setAuthor('kewlg')
.addFields(
        { name: 'Current Count:', value: response_count, inline: true },
    { name: 'Members left till 27k:', value: GOAL - response_count, inline: true },
    //    { name: 'Goal', value: GOAL, inline: true },
    )
.setFooter("group Member Counter")
.setTimestamp()
webhook.send(embed).catch(async err => {
    console.log(chalk.red('Issue with posting in: ' + err));   
});  
  if (count == 0) {
            count = response_count
            return;
        }
        count = response_count
}
}

setInterval(() => {
  updateCount()
}, 20000);```
#

this sends

twilit geode
#

ah

sterile lantern
#

every 5 mins

#

even if

#

no member joined/left

#

so basically the same embed every 5 mins

#

unless someone joins

twilit geode
#

thats not a repl problem

solemn latch
#

its sending because count is resetting.

twilit geode
#

thats just code

sterile lantern
#

count is resetting bc i think its being rerun by repl

twilit geode
#

i thought you meant you needed packages or something lol

fiery trellis
#
Ello```
mellow kelp
#

whoa several people are typing

twilit geode
sterile lantern
#

hmm

#

well tbh ill just use a db then

green kestrel
errant hornet
#

How can I make it so my bot can get the role id by the author mentioning it?

mellow kelp
#

well ya got a point

twilit geode
mellow kelp
#

well screw it im gonna make another attempt KEKW

earnest phoenix
#

stop being paranoid, you lost your privacy the moment you stepped on surface internet lol

green kestrel
#

They all got your face and your voice, so do Facebook if you use watscrap

mellow kelp
#

yea true

analog imp
mellow kelp
#

lmao imagine some fbi agents actually watching us on camera

hollow sedge
mellow kelp
#

how boring must that job be

twilit geode
#

how would one get the top channel's ID?

#

im so frustrated

mellow kelp
#

wdym top channel

analog imp
#

the first channel in a category?

earnest phoenix
#

I need help with sharding oof

#

My bot seems to duplicate the message event when I use sharding.
It doesn’t happen if I don’t use sharding

boreal iron
errant hornet
#

I need it to get the role ID

mellow kelp
mellow kelp
analog imp
#

ahh gotcha

boreal iron
#

Nah... I’m not gonna upload any personal data, too never have and never will

errant hornet
#

Ye

#

Yea

hollow sedge
#

Well..cool but sometimes it's necessary

earnest phoenix
#

Rip my bot ig for now

hollow sedge
#

No one wants to share personal data

mellow kelp
#

thats message.mentions.roles

#

bruh i thought you had sent an actual embed for a sec lmao

#

forgot about the opengraph thing

errant hornet
#

How*

#

That would get me <@&id>

mellow kelp
#

message.mentions.roles.first().id or something

boreal iron
# hollow sedge Well..cool but sometimes it's necessary

Aye not speaking about necessary data to use specific services
But for example I never used FB, Whatsapp, Google services etc.
Therefore I’ve blocked any related existing service of these network wide (at least in my network)

errant hornet
mellow kelp
#

no problem

boreal iron
#

Not to mention all the tracking services etc.

analog imp
#

yeee

boreal iron
#

Just makes your life better...

analog imp
#

ooferino i thought you were meaning users cached in the client

hollow sedge
#

Yeah I mean that's fair

#

But there's literally zero tracking on whatsapp

mellow kelp
#

bruh ive had gps on for like 5 days now without noticing

hollow sedge
#

It's encrypted end to end

#

And they're not making money from it I think

boreal iron
#

Hehe good joke

mellow kelp
#

is it tho

#

i mean

#

i imagine the devs trying to to the best they can and they make this really unstable thing lmao

hollow sedge
#

Wdym is it tho

#

Yes it is

mellow kelp
#

and just put "100% secure with end to end encryption" praying for no one to attack em

hollow sedge
#

That's why it's so popular

mellow kelp
#

well yea

hollow sedge
#

It's facebook, they aren't just some random company

#

So it's secure

mellow kelp
#

well probably

boreal iron
#

Nope it’s not and since Snowden we know it’s not only any related FB services agencies can listen to

hollow sedge
#

I don't understand what you're saying

#

Snowden was about the NSA not facebook

boreal iron
#

Then you might need to google for your so-called end-to-end encryption and how it doesn’t exist because of some pressure by governments

#

Mostly USA ofc

hollow sedge
#

Please

#

Like the US is going to pressure a huge company like facebook worth billions

boreal iron
#

Each big company is forced to open their software for specific purposes

hollow sedge
#

Into doing that

boreal iron
#

Facebook, Google, Amazon, Apple, etc.

hollow sedge
#

I mean if you're going to question if that's secure, you might as well question whether or not the moon landing is real

boreal iron
#

Well secure is a different story

sudden geyser
#

The EU is doing the same thing.

boreal iron
#

Secure for most of the attackers trying to steal your data, yeah

hollow sedge
#

So..the government is investigating facebook..for something they told them to do?

#

No that's obviously not the case

boreal iron
#

Any company has backdoors in their software to not be banned by the US government

#

That’s no secret anymore in 2020

hollow sedge
#

Do you have a reputable source on that

boreal iron
#

Yeah like millions of leaked documents anywhere around the internet even before Snowden

hollow sedge
#

I mean that facebook has a backdoor

boreal iron
#

I wonder how old you are to believe the companies keep your data privately

hollow sedge
#

Data isn't the same as encrypted messages

boreal iron
#

Each message you sent on any platform, each picture you sent, anything is stored an searchable by keywords for example in PRISON, which is only one common software used by NSA for example

mellow kelp
#

ah yes

#

laren

hollow sedge
#

Are we not specifically talking about whatsapp

#

Because that is not public

boreal iron
#

We’re talking about any service you’re sharing text or pictures. What else you do on the internet?

mellow kelp
#

watch memes

hollow sedge
#

well I'm specifically referring to whatsapp as you are saying that facebook has built a backdoor into it

mellow kelp
#

wut

earnest phoenix
#

find a beach with sand and throw it there

boreal iron
#

Aye each message you sent is being saved on the facebook/whatsapp servers before transmitting to the recipient and "officially" deleted after an amount of time

#

But it’s not

#

Of course not

mellow kelp
#

i didn't understand ur question

solemn latch
#

payton?

earnest phoenix
#

who is payton

solemn latch
#

whats payton

mellow kelp
#

don't you mean python

gilded olive
#

whats payton

boreal iron
#

Ouch

mellow kelp
#

why is payton

#

who is payton

hollow sedge
#

if EA made a programming language

earnest phoenix
#

LOL

gilded olive
mellow kelp
#

"For another console.log, please pay $5"

#
  • EA, creator of javascript
gilded olive
#

pepega

#

code for what

#

which lib

earnest phoenix
#

and i need a villa but not everyone gets what they want in life

gilded olive
#

language

solemn latch
#

normal bot?

gilded olive
#

give context

mellow kelp
#

if you wanna make a bot you can check out tutorials on yt

gilded olive
#

ew

earnest phoenix
#

avoid yt

gilded olive
#

ok

#

which programming language

earnest phoenix
#

here we go again

gilded olive
#

what???
🗿

earnest phoenix
#

there should be an iq test before entering this channel

gilded olive
#

you want to make a bot

#

correct?

gilded olive
#

you want to pay someone to make you a bot?

vague latch
gilded olive
#

and that cost is

#

bruh momento

mellow kelp
#

(╯°□°)╯︵ ┻━┻

#

yes

gilded olive
#

(╯°□°)╯︵ ┻━┻

mellow kelp
#

||||

gilded olive
#

uh huh

mellow kelp
#

why is there a spoiler slash command

#

¯_(ツ)_/¯

#

┬─┬ ノ( ゜-゜ノ)

gilded olive
#

||idk||

mellow kelp
#

cool

#

__

gilded olive
#

(╯°□°)╯︵ ┻━┻

mellow kelp
#

o

gilded olive
#

/unshrug

#

sigh

#

what will it do

#

uh huh

solemn latch
#

this isnt the channel to hire devs, if you want to hire a dev, check fiverr

gilded olive
#

go on

#

uh huh

#

i mean that isnt hard

#

you could learn how to do it yourself

gilded olive
#

:)

earnest phoenix
#

just use a public bot instead?

boreal iron
#

There are a million bots out there already, use one

gilded olive
#

learn a programming language first

earnest phoenix
#

and i want a million dollars

gilded olive
#

F

earnest phoenix
#

then you won't get your custom logo and stats

hollow sedge
#

Lol

boreal iron
twilit geode
mellow kelp
gilded olive
#

no you start here

hollow sedge
#

Sand tutorials for payton pls

mellow kelp
#

Wait yes I retract what i said

mellow kelp
twilit geode
gilded olive
#

no

#

hollow sedge
#

Wait what?

earnest phoenix
#

they're undoubtedly going to fail at their goal, so why not use a public bot, there are already hundreds of thousands out there that do the same thing

gilded olive
#

yea use like mee6 or dyno

earnest phoenix
#

oversaturated market

boreal iron
#

lmao

earnest phoenix
#

if you pay me

#

nothing is free

#

ok bye

gilded olive
#

i mean

earnest phoenix
#

you won't be missed

gilded olive
#

if its in py

#

i could make that

#

in like 10 minutes

hollow sedge
#

@earnest phoenix WAIT

gilded olive
#

but hostings all your problem

hollow sedge
#

I'll do it

gilded olive
earnest phoenix
gilded olive
#

pepega

earnest phoenix
#

lmfao

gilded olive
#

i mean yali

#

if you want i could do it for free

boreal iron
#

yikes

gilded olive
#

lol

earnest phoenix
#

and that's how you become a bitch to capitalism

hollow sedge
#

@earnest phoenix if you learn Python I'll do it for free

gilded olive
#

but hosting it would be your problem

hollow sedge
#

You da host

mellow kelp
#

you da host

gilded olive
#

😭

ripe laurel
#

You should let Yali do it by himself so he actually learns something

gilded olive
#

he does not want to

ripe laurel
#

I think he should 🙂

mellow kelp
#

well yea

gilded olive
#

ok

mellow kelp
#

you need to put some effort

earnest phoenix
#

they do not differentiate programming languages from communication languages, do you really think they're able to do that

mellow kelp
#

start by learning the basics of the programming language you want

earnest phoenix
#

you're overestimating

#

lol

#

programming is just not meant for some people

mellow kelp
#

really?

hollow sedge
#

You know what Yali? U da host

mellow kelp
#

i thought what with enough effort pretty much anyone can code

earnest phoenix
#

PolyMatter has an amazing video on this

hollow sedge
#

Oh no he sent me a friend request

mellow kelp
hollow sedge
#

Wait what

#

Why did he say thx

#

I would taken that as an insult

earnest phoenix
#

programming requires being able to logically think and resolve problems, and some people just can't do that

hollow sedge
#

It's not a tutorial

earnest phoenix
#

that isn't a tutorial lol

hollow sedge
#

Read the title

ripe laurel
#

Not everybody should code, but everyone can code (loosely everyone).

opal plank
#

hmmm

earnest phoenix
#

but not everyone can program

opal plank
#

how old are you? just curious

hollow sedge
#

get owned

#

:(

gilded olive
#
import discord
from discord.ext import commands

intents = discord.Intents.all()
bot = commands.Bot(command_prefix="!", intents=intents)

@bot.event
async def on_ready():
  print("Bot ready lol")

@bot.event
async def on_message(message):
  if message.content == "hello":
    await message.channel.send("hi")

@bot.command()
async def hello(ctx):
  await ctx.send("Hello")

bot.run("TOKEN")``` @earnest phoenix you want code i give you code
hollow sedge
#

Lol

mellow kelp
#

lmfao

ripe laurel
#

I dunno, depends how driven you are. There are a lot of mountains/valleys while learning to program/code.

opal plank
#

@earnest phoenix legit though, how old are you?

hollow sedge
#

The code that you can get from the discord py docs in a second

gilded olive
#

would be perfect to learn

opal plank
#

aight, quite young to code

mellow kelp
#

help mongodb compass is killing my computer's ram

hollow sedge
#

Nah

gilded olive
hollow sedge
#

14 is fine to get started

mellow kelp
#

same

gilded olive
#

lmfaoooo

mellow kelp
#

14 year old gang rise

gilded olive
#

yessir

earnest phoenix
hollow sedge
#

Oh god

gilded olive
#

😭

hollow sedge
#

he is 100% going to mess up on the token at least

#

If he even gets to running the code

#

Which is highly unlikely

ripe laurel
#

I don't think he will get far without knowing the standard library. He doesn't have his toolbelt :(.

gilded olive
#

LMFAO

earnest phoenix
#

buy it

gilded olive
#

giveaways

earnest phoenix
#

too bad

#

sucks to be you

hollow sedge
#

And we do?

gilded olive
hollow sedge
#

we have money to give to you?

gilded olive
#

i mean if you want the 0.00 in my paypal

#

feel free

hollow sedge
#

I mean I'll take half of that

#

0/0= undefined so I mean

#

That must be something

#

Wait

#

It's 0/2 im dumb

#

Sweet dreams

gilded olive
#

sadness and sorrow

hollow sedge
#

Lol

gilded olive
#

bye

hollow sedge
earnest phoenix
#

am i high or did the api not used to return public flags via REST?

#

that's so weird

#

huh

#

confusion

boreal iron
#

Really weird is a transparent shell window

lone ether
#

...

gilded olive
#

zsh

summer torrent
hollow sedge
earnest phoenix
hollow sedge
#

Oh

earnest phoenix
#

i'm using win terminal for my terminal

#

it has native support for acrylic design

summer torrent
#

win terminal is so good

earnest phoenix
#

yup

#

and the WSL2 support is superb

summer torrent
#

I've never used WSL and I don't know what it is

#

Windows Subsystem for Linux 🤔

boreal iron
#

At least it’s a real sub system now and not just cosmetic anymore

earnest phoenix
#

this

crimson vapor
#

WSL is hot imo

hollow sedge
#

Wth

#

Slash commands are insane

mellow kelp
#

¯_(ツ)_/¯

solemn latch
#

whats insane about them 🤔

#

looks like they just standardize some stuff.

glass nacelle
#

any advanced mongoose user?

mellow kelp
#

not exactly advanced, but i know mongoose

hollow sedge
summer torrent
#

yes

glass nacelle
#

well i want to do something like in sql but i don't know if i can
i need to set the coins basing the actual coins + the coinss i will add in this case i want to do this

coins = coins-lvl*50 WHERE userID = ?

and i tried to do the same in mongo but idk if i can without using the data from another query because if i do this coins are now NaN

hollow sedge
summer torrent
#

^

#

for decrease just $inc with negative number

slender thistle
#

$set: {field: data[field] - 10} inb4

hollow sedge
#

What if you don't have the data

glass nacelle
#

yeah i tried that but i want to use the data from the own document

//like
$set{
coins: /*equals to actual coins*/ "$coins" -/*minus the actual document level*/ "$lvl" * 50
}
slender thistle
#

Then you're fucked

glass nacelle
hollow sedge
#

For complex operations like that I would just grab the value and update it

#

Like I'm sure there's a way to do it

#

But it probably isn't worth it

boreal iron
#

At least SQL based engines can use the column name as value in your query, but that won’t help you okeh

drifting wedge
#

list1 = json.loads(list124)

7|mon  | json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)``` any ideas anyone? py, linux, on pm2 (running python3 works fine)
hollow sedge
glass nacelle
hollow sedge
#

Is there a reason why you switched to mongo lol

boreal iron
hollow sedge
#

I don't understand what you're saying either lol

boreal iron
glass nacelle
#

the reason sql is too slow

hollow sedge
#

IK

boreal iron
hollow sedge
#

AHH

mellow kelp
#

yea i change because of that too

#

or it just seemed simpler to me

hollow sedge
boreal iron
#

Aww god damn Discord mobile

hollow sedge
#

SQL is faster than mongo

boreal iron
#

Can’t handle bad connections

hollow sedge
#

Oh lol

mellow kelp
#

"MongoDB supports JSON query language along with SQL but RDBMS supports SQL query language only. ... MongoDB is almost 100 times faster than traditional database system like RDBMS, which is slower in comparison with the NoSQL databases."

#

i guess its kinda just preference

#

so don't start a fight lmao

glass nacelle
#

but well if is not another way to do this i just go to the simple way

hollow sedge
#

Mongo is definitely not 100 times faster than SQL

mellow kelp
#

yeah well maybe not 100x

hollow sedge
#

That's not even what they're saying tho

mellow kelp
#

that would be lightspeed bruh

hollow sedge
#

RDBMS is not SQL

#

I mean it is

mellow kelp
#

hmm

hollow sedge
#

But they don't specifically say SQL

mellow kelp
#

maybe its some super-slow version of sql

#

but anyways

hollow sedge
#

Also no good MongoDB async

#

Postgres has asyncpg

mellow kelp
#

but apart from the speed and that stuff

#

it's just preference i guess

hollow sedge
#

And use case

mellow kelp
#

yea

boreal iron
#

@hollow sedge still didn’t get what u said above or I missed ur answer due a short mobile disconnect

lucid prawn
hollow sedge
summer torrent
boreal iron
#

Im talking about the general possibility to use columns as values in your query, for example count = count + x, or table.col1 = table.col2 * 100

glass nacelle
boreal iron
#

Which doesn’t require to fetch the value before editing it relatively to the current value saved in the database

hollow sedge
#

Ah I see

#

Again, I think it's possible with MongoDB it would just take a few more operators

glass nacelle
#

^

#

and i don't want to make the holy bible in my code

normal plaza
#

how to set rainbow role

#

?

mellow kelp
#

get the role id

#

and assign it

hollow sedge
#

Love how descriptive you are

mellow kelp
#

lmfao yes

boreal iron
hollow sedge
#

Rainbow role doesn't mean anything to us

summer torrent
mellow kelp
#

yo i remembered the mario kart rainbow road

glass nacelle
hollow sedge
glass nacelle
#

i think he want to change the color of a role every x seconds

hollow sedge
#

That thing was so frustrating

normal plaza
#

so whe i set that role that nicname cahnge colour its against tos?

mellow kelp
#

blue shell vietnam flashbacks

hollow sedge
#

Lol

#

More like me falling off for the tenth time and raging

boreal iron
mellow kelp
#

probably spam to the discord api

#

yea

boreal iron
#

Speaking about a rainbow effect requires a high frequently change

mellow kelp
#

that doesn't sound like a great idea

crimson vapor
#

@mellow kelp could you help me find this bug that won't write data to the .poggers?

mellow kelp
#

kay

#

dm

drifting wedge
#

how can i run a python script on a vps 24/7?

#

cant use pm2

earnest phoenix
#

tmux

#

or screen

#

either

drifting wedge
#

uhh any other one?

#

like if i close it, it wont exit the proccess

earnest phoenix
#

that's what that does lol

drifting wedge
#

i didnt get it

earnest phoenix
#

they create a "window" outside of your SSH session

#

@drifting wedge axtually

#

Pm2 support python

#

pm2 is bloat

#

don't use it

drifting wedge
#

pm2 works

earnest phoenix
#

literally just use tmux or screen to create a new session

drifting wedge
#

but for this one specific thing

#

it didnt work

earnest phoenix
#

jesus fucking christ

#

literally just install screen

#

type in screen

#

enter

#

and you're done

#

you've created a session outside of your SSH session

drifting wedge
#

which one better

#

screen or tmux?

earnest phoenix
#

i prefer tmux but it's more complicated

slender thistle
#

systemctl KEKW

earnest phoenix
#

so you should probably just go for screen

twilit geode
#

is there a way to change the bots role

earnest phoenix
#

chances are your distro came with screen preinstalled

twilit geode
#

like the one that is automatically generated by it

earnest phoenix
#

nope

#

well

#

you can change the color

#

but the bot itself cannot change it

twilit geode
#

dang

#

ok

drifting wedge
#

pls

earnest phoenix
drifting wedge
#

gib full step by step guide

drifting wedge
slender thistle
#

systemctl is quite a pain to set up ngl

drifting wedge
#

alr, so wanna do it for me?!

#

jk

drifting wedge
#

uhh do i pip screen>

slender thistle
#

Is screen persistent between reboots?

twilit geode
#

just use PM2

earnest phoenix
twilit geode
earnest phoenix
#

why would you use pm2 though that's beyond me

delicate shore
#

Slash commands not in any lib rn
Which is sed

earnest phoenix
#

it's so much bloat for such a simple task

drifting wedge
twilit geode
slender thistle
#

Well, if it's not persistent, then I'm not using it

drifting wedge
#

python3 it

#

is it persistant?

slender thistle
#

I'm not going to be constantly restarting my shit over and over xd

drifting wedge
#

i dont mind lmao

drifting wedge
#

ive had my vps for 1 1/2 months

#

only restarted 1

twilit geode
#

why do you need screen?

drifting wedge
#

time

twilit geode
#

@slender thistle are you trying to code your bot while its live?

slender thistle
#

I don't need screen, I was just curious

#

I'm trying to use something that will run my process automatically even after machine reboots

earnest phoenix
#

linode also has a great tutorial on screen

slender thistle
#

which systemctl already does for me

drifting wedge
slender thistle
#

So pm2 is persistent?

twilit geode
drifting wedge
#

pm2 is

earnest phoenix
#

tmux is persistent too

#

pm2 is so much bloat

#

oh my god

drifting wedge
#

uhh is screen persistant?

boreal iron
#

@slender thistle just create a service with auto restart

earnest phoenix
#

screen -S "session name"

twilit geode
earnest phoenix
#

there's so much stupid in this chat right now

slender thistle
#

kekw

twilit geode
drifting wedge
#

ok @slender thistle halp with systemctl pkls

#

pls

slender thistle
#

Do nae rely on my explanations and use Google for this one kek

earnest phoenix
#

both tmux and screen are meant to create "windows" that are split from your SSH session and are meant to run even when your SSH session dies

screen is not persistent between restarts
tmux saves sessions every 15 minutes and is persistent
pm2 is just bloat

slender thistle
#

It'll help better since I've mostly copied everything from some website

#

I cba to move my stuff back to tmux I'm not gonna lie

#

Would you say systemctl is sufficient?

drifting wedge
#

ok

hollow sedge
#

i mean..couldnt you just run a script on startup if you really wanted that?

drifting wedge
#

how use tmux

earnest phoenix
#

google it

delicate shore
#

Pm2 is best

#

No match for it

earnest phoenix
#

it is bloat

#

lol

slender thistle
#

systemctl is quite easy to manage tbf

earnest phoenix
#

there's also tmux resurrect

slender thistle
#

ooo

earnest phoenix
#

pm2 is absolute garbage

#

why would you use node for something that can be accomplished with native shell

drifting wedge
#

how do i installl tmuxxx

#

plss

slender thistle
#

Hey cry

drifting wedge
#

im dumb af

earnest phoenix
#

there's a fuckton of tutorials online lol

slender thistle
#

How about I buy 5 separate machines and have 24/7 SSH sessions running bots on each

earnest phoenix
#

lmfao

#

big brain

boreal iron
#

lmao

#

Sounds like a good profit for the Hoster

delicate shore
drifting wedge
#

nightbot got it cuz the dev works for discord

#

100%

slender thistle
#

Who said it would be only one hoster

delicate shore
#

It's public now
But no lib has it

earnest phoenix
#

everyone has access to slash commands

#

tbf it's not that hard to implement it yourself

#

it's a bunch of nesting

delicate shore
#

👀

earnest phoenix
#

and you need a webserver to actually handle commands

drifting wedge
#

now will all prefixes be /?

boreal iron
earnest phoenix
#

bots don't have to use slash commands

delicate shore
#

Commands*

slender thistle
#

Oh great I'm fucking abusing those when I get a laptop

drifting wedge
#

wdym

earnest phoenix
#

rip bot reviewers

delicate shore
#

Why

slender thistle
boreal iron
#

lmao

earnest phoenix
#

when bots start integrating slash commands it's going to be annoying to differentiate between like 30 different help commands

boreal iron
#

I would call it fun - obviously not for the reviewers

drifting wedge
#

how do i get to the tmux window?

#

i made one

#

how do i find it now

earnest phoenix
#

if you made one

#

you're already inside of it

delicate shore
#

New update is messed up

drifting wedge
#

if i close it

#

how do i open it

delicate shore
#

It won't ping a role along with text

drifting wedge
#

do i just do tmux?

earnest phoenix
#

tmux ls

#

running just tmux creates a new window

drifting wedge
#

if i close it what happens>

earnest phoenix
#

take a guess

drifting wedge
#

lmao

earnest phoenix
#

it stays alive

drifting wedge
#

how do i delete it

earnest phoenix
#

if you close out of the SSH session

#

that is

drifting wedge
#

delete the window

#

tmux is auto restart?

earnest phoenix
#

you just kill-session the session

boreal iron
#

Why didn’t he want to use screen again?

earnest phoenix
#

idfk

#

but literally just find a guide

#

on google

boreal iron
#

Ow scrolled up and see... just because it’s not persistent

earnest phoenix
#

tmux doesn't auto save out of the box though iirc

boreal iron
#

Just creating a cronjob on system startup creating a screen session would have worked too

earnest phoenix
#

yes

drifting wedge
#

how do i open tmux? cant find in docs

#

like open the screen

earnest phoenix
#

i-

#

🚶‍♂️

boreal iron
#

run the command and —help or -h

#

As argument

drifting wedge
#

i did

#

it doesnt say

#

docs also

boreal iron
#

Oh iOS doesn’t wanna add two - behind each other

earnest phoenix
#

is it really that hard to use google?

drifting wedge
#

yes

#

it is\

earnest phoenix
#

sucks to be you

drifting wedge
#

i did look lmao

#

i open one

#

but i cant seem to like open one

#

i make a new one

#

but not open a current one

earnest phoenix
#

you're already in one when you open it

boreal iron
earnest phoenix
#

you're in the session that you just created

drifting wedge
#

if i close the ssh

#

how do i open it again

sudden geyser
earnest phoenix
#

oh my fucking god

boreal iron
#

Using the command and open the session again

delicate shore
#

Guys does npm packages help in the thing
That slash commands
There are 2 npm packages for that so

#

Should I try

boreal iron
#

after getting the list of sessions

drifting wedge
#

omg

delicate shore
#

What happend

drifting wedge
#

imma just ask cry to stop responsing

drifting wedge
#

cuz he;s gonna think im an idiot

delicate shore
sudden geyser
#

Probably some reserved name

hollow sedge
#

so..how is it already out?

earnest phoenix
#

then you decide what to do with it

hollow sedge
#

i mean that's still pretty quick

boreal iron
#

It’s like a window running in the background if you lock your Windows PC

hollow sedge
#

i dont see anything for slash commands on npm

delicate shore
#

There is

earnest phoenix
# drifting wedge cuz he;s gonna think im an idiot

you keep on asking the same thing over and over and over again when your question has been answered 3 times and you could've used google to answer your question yourself in just five fucking seconds

delicate shore
hollow sedge
#

ik what npm is

delicate shore
hollow sedge
#

nvm

#

yeah just found it

#

its a very specific search tho

earnest phoenix
#

how nice it is of google to outline the thing you need in a gigantic fucking box

#

you don't know how to use google properly

drifting wedge
sudden geyser
#

The confusing part is this:

When a user uses a Slash Command, your app will receive an Interaction. Your app can receive an interaction in one of two ways:

  • Via gateway event, INTERACTION_CREATE <docs>
  • Via outgoing webhook

These two methods are mutually exclusive; you can only receive Interactions one of the two ways. The INTERACTION_CREATE gateway event will be handled by the library you are using, so we'll just cover outgoing webhooks.

In your application in the Developer Portal, there is a field on the main page called "Interactions Endpoint URL". If you want to receive Interactions via outgoing webhook, you can set your URL in this field.

drifting wedge
#

i just dont know how to read properly

earnest phoenix
#

huh

#

sec

hollow sedge
#

what if you arent using a library 💀

earnest phoenix
#

they're missing docs for the event

#

lol

#

classical of discord

#

rush it out

sudden geyser
#

mmlol

earnest phoenix
sudden geyser
#

nice

earnest phoenix
#

the event still lacks documentation though

#

they documented this for library consumers

#

not for library developers

#

lol

hollow sedge
#

that doesnt really make sense tho

#

if you're a library consumer wouldnt you read that library's docs

earnest phoenix
#

i dont know what their thought process was