#development

1 messages · Page 1040 of 1

restive pebble
#

¯\_(ツ)_/¯

earnest phoenix
#

Bruhhh

#

bad choice

#

U can make a virtual CC

pure lion
#

Okay I'm gonna go learn nosql and be cooooool

earnest phoenix
#

hey can someone help me with one thing?

pure lion
#

Yes

pale vessel
#

just ask

earnest phoenix
#

Cannot read property 'get' of undefined

#

-.-

pure lion
#

Or whatever

pale vessel
#

have you tried reading the error

pure lion
#

^

earnest phoenix
#

um ya

pure lion
#

That really helps

pale vessel
#

something before get is undefined

pure lion
#

Send the code too X)

pale vessel
#

that simple, i know

earnest phoenix
#

ok wait

#

let me try

pure lion
#

I'm not a mAgician

#

I'm also starting to regreat using nosql over sql

#

Ah shit

quartz kindle
#

lmao

pure lion
#

It'll be fineeee there's nothing to worry about I'll just delete and start over again

restive willow
#

discord.py: how would i go about changing bot prefix on a per-server basis? I could store it in a DB no problem, but not sure how I'd change the prefix just for one guild

pure lion
#

Whats your db

#

?

short siren
#

Postgres is better ;)

pure lion
#

Pregnabbaabnatsrte?

restive pebble
#

virtual

#

bruh

#

u think heroku is a toy

earnest phoenix
#

so guys uhh... if i switch to a vps uhh will i get errors?

short siren
#

It is a toy

restive pebble
#

it will give u a middle finger that very moment

pure lion
#

Try it and see x)

restive pebble
#

when u give fake card

#

x)

pure lion
#

Can someonneneneene help me with setting shit on a command basis to a mongodb using mongoose please :3

restive willow
#

so guys uhh... if i switch to a vps uhh will i get errors?
@earnest phoenix no its just a case of running python bot.py and leaving it lmao

earnest phoenix
#

@pale vessel men thanks

#

@earnest phoenix no its just a case of running python bot.py and leaving it lmao
@restive willow ?

restive willow
#

or run it with js or whatever

#

you jsut run it like you noirmally would and leave it

pure lion
#

Oh hey you're gagwvusn a stoej too

#

Fuck i can't teprp

#

Type

earnest phoenix
#

oh cool whats the best vps? ill ask my mum to buy one for me x)

restive willow
#

i use galaxygate its $3/mo for the basic plan

pure lion
#

The besht one is one that you owne

#

Can someone come torj my house ajsbaoap me awakeke

short siren
#

There is places like ovh

earnest phoenix
#

oh cool whats the best vps? ill ask my mum to buy one for me x)
please tell me

restive willow
#

i use galaxygate its $3/mo for the basic plan
@restive willow

#

Read The Chat

earnest phoenix
#

yeah but i need more oppinions

short siren
#

Google then

#

There is loads

restive willow
#

allow me to introduce you to google

quartz kindle
#

@earnest phoenix a vps will give you full control over eveything, nothing is automatic

earnest phoenix
#

huh?

quartz kindle
#

you will need to upload the code yourself using sftp/ssh clients, you will need to setup your own process manager such as pm2 to keep it alive, it wont update automatically until you manually restart it, etc

earnest phoenix
#

ok like heroku?

#

but not auto

quartz kindle
#

but a vps is fastly more powerful than any managed/automated provider and much cheaper

earnest phoenix
#

what is best?

quartz kindle
#

there is no best, there are many good ones

earnest phoenix
#

which ones do you recommend?

#

eg. do you use one?

quartz kindle
#

im using galaxygate, but i also have a google compute engine

pure lion
#
mongoose.connect('mongodb://localhost/test', {useNewUrlParser: true, useUnifiedTopology: true});
const db = mongoose.connection;

db.on('error', console.error.bind(console, 'connection error:'));

db.once('open', () => {
  console.log('DB connected')
})

where do i go from here, how would i set a schema from a command file?

earnest phoenix
#

google enginen?

quartz kindle
#

but i heard good things about contabo, ovh, vultr, etc

restive pebble
#

contabo is cheap

#

and good

pure lion
#

🇷🇺

quartz kindle
#

theres also scaleway, vpsdime, and many others

earnest phoenix
#

im using galaxygate, but i also have a google compute engine
@quartz kindle whats a google compute engine?

quartz kindle
#

upcloud is also a good newcomer

restive pebble
#

bruh

clever vector
#

Guys can u help me

pure lion
#

🚀 🖥️

quartz kindle
#

@earnest phoenix its google's vps

short siren
#

I might buy a galaxy gate the prices are quite cheap considering what they are offering

pure lion
#

@clever vector h?

restive pebble
#

aws

earnest phoenix
#

so why you using 2 vps?

pure lion
#

dontasktoask

restive pebble
#

he said he has

short siren
#

AWS are quite expensive ngl

restive pebble
#

no bruh

quartz kindle
#

i use the google one for my website and api, but im gonna move out soon

restive pebble
#

azure is more

quartz kindle
#

google's f1-micro is free forever

earnest phoenix
#

i use the google one for my website and api, but im gonna move out soon
@quartz kindle api wdum

quartz kindle
#

but their disks are slow

short siren
#

I had azure student credit lol

restive pebble
#

enjoy then

pure lion
#

const foo = ({foo:'bar'})

restive pebble
#

bill gates is alwas hot

short siren
#

It ran out

restive pebble
#

tell some nice apis

#

for wrapping

#

or some shit apis also fine

earnest phoenix
restive pebble
#

wut is that lol

earnest phoenix
#

galaxy gate

#

which plan?

restive pebble
#

buy it 3 bucks is cheap

earnest phoenix
#

k

quartz kindle
#

im using the $3 one

earnest phoenix
#

im from UK so must be cheaper

#

lol

restive pebble
#

whats the ram tim

quartz kindle
#

1gb

restive pebble
#

hmmm

#

good

#

for price

quartz kindle
#

there are cheaper ones out there

restive pebble
#

cpu?

quartz kindle
#

1 core

#

xeon

restive pebble
#

kk

earnest phoenix
restive pebble
#

pay lol

#

dont send the ss of credit card details

earnest phoenix
#

no like database shit

quartz kindle
#

chose ubuntu 20, so you dont have to upgrade later

earnest phoenix
#

ok

quartz kindle
#

hostname is just the computer name

restive pebble
#

lts

quartz kindle
#

root password is the admin password for it

restive pebble
#

ubuntu lts

earnest phoenix
#

chose ubuntu 20, so you dont have to upgrade later
@quartz kindle i only see 18.04

restive pebble
quartz kindle
#

guess they didnt add 20 yet

#

welp, you can upgrade to 20 as soon as you login

earnest phoenix
#

do i add protection?

quartz kindle
#

option if you want to pay more

#

but no need

restive pebble
#

ddos

earnest phoenix
#

what did you do?

quartz kindle
#

protects against ddos attacks

#

when people know your ip address and spam it to make it go down

restive pebble
#

ur choice lol

earnest phoenix
#

hmm ill leave

junior maple
#

give me invite for discord mee6

restive pebble
#

use cloudfare

earnest phoenix
#

?

restive pebble
#

if u want to

quartz kindle
#

ddos protection is only needed if you think you're gonna be targeted by evil people for some reason

#

and if your ip address is public for some reason

#

for example if you have a popular game server

earnest phoenix
#

no ill leave

restive pebble
#

u are only doing for bot hosting then no need

earnest phoenix
#

im not famous

pure lion
#

:crying:

quartz kindle
#

dont cry for me argentina

restive pebble
#

lol

pure lion
#

*louder crying*

earnest phoenix
quartz kindle
#

lol

earnest phoenix
#

i have

#

lol

restive pebble
#

bruh

pure lion
#

what do i do, just pass in mongoose.connection? wHaTtHeFuCkAmIsUpPoSeDtOdO

earnest phoenix
restive pebble
#

lol

pure lion
#

h

restive pebble
#

its taken i think

earnest phoenix
#

i put Deku Bot

pale vessel
#

bruh

#

no

pure lion
restive pebble
#

no space bruh

earnest phoenix
#

?

pure lion
earnest phoenix
#

oh

pure lion
restive pebble
#

why spamming that

earnest phoenix
#

anyone got a promo code lmao

pure lion
#

*rubs temples*

#

h o n e y

earnest phoenix
#

i have it lol it not detecting

#

rip

pure lion
#

oov

earnest phoenix
#

just google the site name

#

And you can probably find some

restive pebble
#

yeah he never thought that

pure lion
#

123456789876543210

#

||im stressed aaaaa||

earnest phoenix
restive pebble
#

tell some really hot apis

earnest phoenix
#

im confused uhh whats a street address i forgot

#

api.alexflipnote.dev @restive pebble

#

What street is your house at idk

quartz kindle
#

home address lol

restive pebble
#

no

#

lul

#

tell some other apis

earnest phoenix
#

I normal just type my country

restive pebble
#

cool one

pure lion
#

ice cream api

restive pebble
#

k

pure lion
restive pebble
#

trolling

#

spotify api

#

wrapping

#

is nice idea

#

@earnest phoenix google where i am

earnest phoenix
#

uhhhhhhhhh

#

oko

fair sonnet
#

__

#

_

sinful belfry
#

can you stop that please

#

keep this channel related to development

earnest phoenix
#

How to check how many servers my bot is in?

restive pebble
#

guild size

fair sonnet
#

i have a bot but its not out yet

balmy knoll
sinful belfry
#

what are you trying to use it for?

balmy knoll
#

I want every time my bot is disconnected from a voice chat, I want the bot to perform actions

quartz kindle
#

use the voiceStateUpdate event, or you can use connection.on("disconnect")

earnest phoenix
#

ok how do i use galaxy gate?

balmy knoll
#

Okay, but how do I check that the user disconnected from the voice channel is my bot?

pale vessel
#

id

quartz kindle
#

voiceStates give you a user id

restive pebble
#

filter id

balmy knoll
#

Okay, but it's also likely that my bot will automatically disconnect since it's finished playing music. I only want to detect when my bot is disconnected by another user

quartz kindle
#

@earnest phoenix you need an ssh client, or you can use on of their tools in their admin panel

earnest phoenix
#

uhh how

quartz kindle
#

how what, ssh or admin panel

earnest phoenix
#

im not sure

quartz kindle
#

not sure what

earnest phoenix
#

whihc

#

which thing

quartz kindle
#

the admin panel provides you with tools to access your vps

earnest phoenix
#

ok where is that?

quartz kindle
#

similar to a glitch or a heroku terminal

#

otherwise you can download an ssh client, which works are your own dedicated terminal

#

so you dont need to login into their website every time

earnest phoenix
#

wait i need to pay 1 sec it could be a while intil i can pay tho cuz my mum is at work till 11:30 pm

quartz kindle
#

oh you didnt buy it yet?

earnest phoenix
#

not yet

quartz kindle
#

you need to buy first lol

earnest phoenix
balmy knoll
#

Okay, but it's also likely that my bot will automatically disconnect since it's finished playing music. I only want to detect when my bot is disconnected by another user
@quartz kindle Can you help me with this?

restive pebble
#

ur bot is playing music?

balmy knoll
#

Yes

restive pebble
#

@balmy knoll

#

ok

#

client.playing = true

#

in ur finish event

#

set client.playing = false

#

and if ur bot disconnects while true u can take actions

#

i do like that

pure lion
#

Oh queueconstruct

placid iron
#

@earnest phoenix but does that random package thing have background blur support

earnest phoenix
#

How to fix it?

placid iron
#

do you have it running 2 times

tight plinth
#

you're running your bot two times apparently

earnest phoenix
#

K

lusty quest
#

two bot instances

earnest phoenix
#

CMD was open and VC as well

#

XD

delicate shore
#

Lol

earnest phoenix
#

how to get the user ID of a random user instead of his name and tag? I know how to do message.guild.members.random.first() but it gives the name and tag and I use user IDs in the economy system to prevent with hunting

#

message.guild.members.random.first().user.id ?

#

longest chain i've ever seen

#

lol

lusty quest
#

did you ever made a Embed?

earnest phoenix
#

yez

#

cool kids be like lol

pine falcon
#

Lol

earnest phoenix
#

you not a cool kid 😎

#

and let's get this channel back to topic

quartz kindle
#

that will still only work for online users

#

unless you have fetchAllMembers

earnest phoenix
#

that's what i want exactly

pure lion
#

Sup

quartz kindle
#

also, should be .members.random()

#

no need for first

earnest phoenix
#

why does discord.js have to die every five seconds

pure lion
#

Are you trying to make a someone command?

earnest phoenix
#

it says cannot find module then 5 seconds later its good again

#

Are you trying to make a someone command?
@pure lion already did making a rob command for my economy system but i store user IDs to prevent "witch hunting"

cinder patio
#

That sounds like a you problem

pure lion
#

Oh

earnest phoenix
#

SEE ITS GOOD AGAIN

#

its message.guild.members***.cache***.random() right?

cinder patio
#

if you are on v12 yes

pure lion
#

cache

cobalt spruce
#

hello

#

i have this problem

short siren
#

cache me ouside

cobalt spruce
#

if i add my bot to 2 servers it puts the same logs

pale vessel
#

how bow dat

lusty quest
#

same logs?

earnest phoenix
#

why does message.guild.members.random() give me user ID anyways? it's supposed to give user and tag right? Like it did in v11

lusty quest
#

it should give you the user object

quartz kindle
#

it always gives you the full Object, you should always extract the piece of it you want, and never rely on its auto-extracting, since it can change

#

for example <Member>.user.tag

#

when you try to send a full object, or use it in strings, it will automatically use .toString() for you

#

so you can see in the docs what its .toString() does

cobalt spruce
#

@quartz kindle

#

ur here

#

?

restive pebble
#

Bruh

#

U should not ask like that

#

Simply paste the question lol

cobalt spruce
#

@restive pebble bruh

#

look

restive pebble
#

It dosent mean I will solve it

cobalt spruce
#

i need my bot to work Globaly

#

cuz

restive pebble
#

Ok

cobalt spruce
#

the logs are going in test server 1 and test server 2 at the same time

quartz kindle
#

please explain better, i dont know what you mean

restive pebble
#

Yeah

cobalt spruce
#

for ex

#

i muted boeing

#

its sends
boeing is muted in server 1 and is server 2

#

at the same time

quartz kindle
#

show code

lusty quest
#

i guess use a Database that sends the userid of a Muted user in it. then have a timer running that checks every ~5 minutes if a user is muted if there is a new user in the db mute him on the server where he is not muted

quartz kindle
#

the problem seems to be that the bot is posting log messages in multiple servers lol

cobalt spruce
#

its dont need code

#

but here

quartz kindle
cobalt spruce
#

if i make logs channel is 100 server and i add the bot then

quartz kindle
#

this will look for to ALL channels named logs

#

in ALL guilds your bot is in

restive pebble
#

Lol

#

sort by guild

cobalt spruce
#

@quartz kindle what i replace woth

lusty quest
#

message.guild

quartz kindle
#

message.guild.channels

#

instead of client.channels

restive pebble
#

Imagine sending to all guilds lol

distant jewel
#
Ignoring exception in on_guild_post
Traceback (most recent call last):
  File "/home/pythonbotsgig/.pyenv/versions/3.7.7/lib/python3.7/site-packages/discord/client.py", line 312, in _run_event                                                   
    await coro(*args, **kwargs)
  File "/home/pythonbotsgig/DAREALBOT/events/events.py", line 24, in on_guild_post
    channel = await self.bot.fetch_channel(730747872798179360)
  File "/home/pythonbotsgig/.pyenv/versions/3.7.7/lib/python3.7/site-packages/discord/client.py", line 1316, in fetch_channel                                               
    channel = factory(guild=guild, state=self._connection, data=data)
  File "/home/pythonbotsgig/.pyenv/versions/3.7.7/lib/python3.7/site-packages/discord/channel.py", line 107, in __init__                                                    
    self._update(guild, data)
  File "/home/pythonbotsgig/.pyenv/versions/3.7.7/lib/python3.7/site-packages/discord/channel.py", line 131, in _update                                                     
    self._fill_overwrites(data)
  File "/home/pythonbotsgig/.pyenv/versions/3.7.7/lib/python3.7/site-packages/discord/abc.py", line 294, in _fill_overwrites                                                
    self._overwrites.append(_Overwrites(id=overridden_id, **overridden))
TypeError: __new__() got an unexpected keyword argument 'allow_new'

Why do I get this from

    @commands.Cog.listener()
    async def on_guild_post(self):
        channel = await self.bot.fetch_channel(730747872798179360)
        await channel.send('Server count posted successfully to DBL, next post in 30 mins.')
restive pebble
#

Python

quartz kindle
#

well its not actually sending to all, since its a find function, it only returns one, but sure enough its likely the wrong guild

restive pebble
#

K

#

Random

#

Like it can hit any random logs channel

#

Seems cool

lusty quest
#

i dont think its random. i would guess the collection of guilds is sorted by id so you will send it to the Guild that is at the first place in the collection

hasty lotus
#

Hey, i'm making a little web interface to manage my bot's configuration for the guilds, using express, but just i don't know how to get the data that is on the page. I saw an example looking like that :

app.post("/dashboard/:guildID/manage", async (req, res) => {
   const guild = client.guilds.cache.get(req.params.guildID);
   if (!guild) return res.redirect(404);
   const isManaged = guild && !!guild.member(req.session.user.id) ? guild.member(req.session.user.id).hasPermission("MANAGE_GUILD") : false;
   if (!isManaged && req.session.user.id !== "369564132770578432") res.redirect("/dashboard");
  client.writeSettings(guild.id, req.body);
  res.redirect("/dashboard/"+req.params.guildID+"/manage");
});```
To understand i tried to log req, and req.body, but it send me a giant bunch of things that i didn't understood, and nothing looking like the datas that i had on the website. would anyone know how i could at least just get the data the person entered ?
quartz kindle
#

@distant jewel looks like its coming from internal code, try asking in the dpy support

distant jewel
#

wdym internal code

quartz kindle
#

inside the library

distant jewel
#

ah

#

kk

quartz kindle
#

when you fetch the channel, its trying to update the channel data, and i looks like its failing when updating channel premission overwrites

cobalt spruce
#

@quartz kindle thanks tim

#

is works

#

it

quartz kindle
#

👍

cobalt spruce
#

big brain

#

eat time

#

eat , code , sleep , repeat

quartz kindle
#

^

#

@hasty lotus are you making a post request from client side js?

#

using fetch/xhr/ajax/jquery?

hasty lotus
#

by client side, you mean the js file that has the express server ?

quartz kindle
#

no, the code that is send to the browser

hasty lotus
#
<button type="submit" class="btn btn-primary">Sauvegarder <i class="fa fa-fw fa-save" aria-hidden="true"></i></button>```
#

i've got this

quartz kindle
#

so its a form

#

and the form links to /dashboard/guildid/manage

hasty lotus
#

yes

#
<tbody>
                <% const settings = db.get(`guildconfig_${guild.id}`)
                for (const key in settings) { %>
                  <tr>
                    <th scope="row" class="align-middle"><%= key %></th>
                    <td width="80%"><input type="text" class="form-control form-control-sm" style="text-align: left;" name="<%= key %>" id="<%= key %>" value="<%= settings[key] %>" placeholder="Enter <%= key %>"></td>
                  </tr>
                <% } %>
              </tbody>```
#

that's how i display the data if it can help

#

^^

quartz kindle
#

are you using the bodyparser in express?

hasty lotus
#

no

quartz kindle
#

app.use(bodyParser.urlencoded({ extended: true }));

hasty lotus
#

ok

#

does this require any package ?

quartz kindle
#

should be built in in express, let me check

hasty lotus
#

ok

quartz kindle
#

are you using express v4?

#

try this app.use(express.urlencoded({ extended: true }))

hasty lotus
#

uh idk

#

i guess last version

quartz kindle
#

This middleware is available in Express v4.16.0 onwards.

#

check your package.json

hasty lotus
#

4.17.1

#

so yep

quartz kindle
#

ok, so with the middleware enabled, you should be able to access req.body

#

and it should contain the form data you sent

hasty lotus
#

ok

#

i'll try it ty 🙂

hushed jungle
#

My bot went offline so I checked what caused it but it just says "Killed".

#

Was my NodeJS application murdered 😦

lusty quest
#

the process was killed. did you use some additonal commandline parameters for starting the bot? bcs in future unhandled rejections will kill the process

#

and there is one commandline option for enabeling it already

twilit rapids
#

While the mastermind himself is here, Tim do you have any idea what could be causing this, it appears when I'm doing a rolling restart on Kurasuta, it's a Veza error but even the creator or Veza doesn't know what could be causing it, I might have to add some logging to Veza itself to debug but I thought I could ask you before I do that. It's also weird that it only happens about 50-60% of the time, the other times it just works completely normal.

events.js:292
      throw er; // Unhandled 'error' event
      ^

Error: This socket has been ended by the other party
    at Socket.writeAfterFIN [as write] (net.js:454:14)
    at NodeMessage.reply (/chip/node_modules/veza/dist/lib/Structures/NodeMessage.js:28:32)
    at MasterIPC._broadcast (/chip/node_modules/kurasuta/dist/IPC/MasterIPC.js:45:21)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
Emitted 'error' event on Socket instance at:
    at emitErrorNT (net.js:1340:8)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  code: 'EPIPE'
}```
hushed jungle
#

I only started it using node . and the only error I have is a potential memory leak.

#

EventEmitter leak

#

But it only says that because the limit

#

And I exceed that

#

But that should not make it kill itself

#

I wish it would tell me more why it killed itself

#

It ran for 3 days fine

quartz kindle
#

some part of veza is not handling error and disconnection events properly, or maybe thet pass an error event that kurasuta is not listening to

hasty lotus
#

Hey, just to come back to my web interface, the thing to get the body data worked fine, but when i click the button, the script to save the data in the db works, the db is saved, but the page continue to load, without any errors in the console. Any idea why ?

quartz kindle
#

idk much about veza or kurasuta, but im assuming veza uses tcp sockets and kurasuta uses child processes, in that case when either server or client forcibly exit, ie for restarting, it throws an error down the pipe that must be handled by the other side

earnest phoenix
#

hi guis, i'm new KEKW

twilit rapids
#

Yeah kurasuta should be listening to it

sharder.on('error', error => console.error(error));

And yes they use TCP sockets and child processes

quartz kindle
#

is that in your code or in kurasuta's code?

twilit rapids
#

Mine

quartz kindle
#

fuck typescript libs

twilit rapids
#

lol

quartz kindle
#

you cant see anything in their source code because its not compiled

#

whats MasterIPC.js line 45 after compilation?

twilit rapids
#

uh sec

#

Line 45 exactly is

 message.reply({ success: false, d: { name: error.name, message: error.message, stack: error.stack } });
#

In

    async _broadcast(message) {
        const { d } = message.data;
        try {
            const data = await this.broadcast(d);
            message.reply({ success: true, d: data });
        }
        catch (error) {
            message.reply({ success: false, d: { name: error.name, message: error.message, stack: error.stack } });
        }
    }
quartz kindle
#

and that message.reply calls veza's NodeMessage.js line 28

tulip ledge
#

Timo are u dutch?

twilit rapids
#
 this.client.socket.write(Header_1.createFromID(this.id, false, binarytf_1.serialize(content)));

in

    reply(content) {
        if (this.receptive) {
            this.client.socket.write(Header_1.createFromID(this.id, false, binarytf_1.serialize(content)));
        }
    }
#

Yes I am

tulip ledge
#

I noticed

quartz kindle
#

veza is attempting to socket.write() after the socket has been closed

#

likely that veza is not closing the connection properly

hasty lotus
#

well, Aadappel sounds quite dutch 😂

tulip ledge
#

Just a question but what is veza?

quartz kindle
#

an IPC library

tulip ledge
#

Yeah Aardappel means potato

lusty quest
#

some advanced stuff

hasty lotus
#

oh ok

quartz kindle
#

aardappel is potato? lmao

twilit rapids
#

Yeah

quartz kindle
#

sounds like "hard apple"

twilit rapids
#

Everyone that's not Dutch says that

#

¯_(ツ)_/¯

tulip ledge
#

aard means earth and appel means apple

lusty quest
#

lol sounds like a old german Dialekt

pure lion
#

Applerel

quartz kindle
#

oh its earth apple

#

makes sense

pure lion
#

🌍 🍎

twilit rapids
#

Anyways, I should then add a check in their code to not write if the socket has been closed

#

or handle it

marble geode
#

someone here have intagram i just want test instagram command

lusty quest
#

collects to much data for my taste

tulip ledge
#

I mean looking at the error the connection is being closed by the API you're trying to refer to

quartz kindle
#

something like that, either something is not marking the connection as "closed" properly, after receiving a FIN packet, or the destroyed connection is failing to send it before being killed

tulip ledge
#

Doesn't the conection give a succes message?

quartz kindle
#

but the error mentions "writeAferFIN" so im assuming the killed process is sending it correctly

pure lion
#

Can someone help me with mongoose, I set up the connection and shit but I'm not sure how to add stuff and shiT

tulip ledge
#

Isn't mongoose a mongodb wrapper?

#

Right?

lusty quest
#

its pretty easy

#

yes

pure lion
#

Yeah

#

Am using localhost if that helps

tulip ledge
#

k I suck at mongo but I can try

pure lion
#

Moongo

tulip ledge
#

What are u trying to do?

lusty quest
#

i can help

tulip ledge
#

Let bigbrain here help u

#

Before I fuck something up lmao

pure lion
#

I wanna just know how to add stuff to the db

twilit rapids
#

I'll probably go for a check if the socket is closed or not

tulip ledge
pure lion
#

I know what I want to add(IDs and prefixes etc)

lusty quest
#

thats simple

pure lion
#

:D

#

If I wanna do it in a command file?

lusty quest
#

you need to define a array of settings you want to send to the DB

#
        guildID: guild.id
    };````like this
tulip ledge
#

not sure if it works for mongoose the same way but for MySQL I bind my connection to my client so I can access it in all my files

pure lion
#

OOOOOOO

#

OOOOOOOOOOOOOOOO

tulip ledge
#

Superbrain thats an object not an array or am I stupid?

pure lion
#

OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO

lusty quest
#

ohh wait yes object

earnest phoenix
#

How to set ur bot to have diff preflix? Like the server can change the preflix

pure lion
#

Listen

tulip ledge
#

Multiple prefixes?

lusty quest
#

then reference the Object to your Model and save your model

pure lion
#

Example?

#

I'll only need one then I'm set

#

Hopefully

lusty quest
#
 const newguild = await new Guild(newGuild);
        return newguild.save()
tulip ledge
#

create an array with the prefixes and then run a forofloop over the prefix array and if the message starts with that prefix then set the prefix to that prefix

#

If that made sense

earnest phoenix
#

NOPE

lusty quest
#

Guild is your Model

pure lion
#

Wait...model?

tulip ledge
#

So

pure lion
#

Oh god I'm probably annoying everyone

lusty quest
#

mongoose use models for refering the Database structure

earnest phoenix
#

Can I have the code made?

tulip ledge
#

No

pure lion
#

No

earnest phoenix
#

😦

tulip ledge
#

Spoonfeeding is against the rules

pure lion
#

^

#

Idk if I should have used SQL 😅

lusty quest
#

a model is again a Object

earnest phoenix
#

Its just 1 help 😉

pure lion
#

Oh alright

slender thistle
#

Rules still apply

earnest phoenix
#

k

tulip ledge
#

Create an array like this ["prefix1", "prefix2"]
Then run a for of loop like this:

for (const prefix of prefixArray) {
  // Check if the message starts with "prefix" if so add it to a variable and use that
}
#

This is as much as I'll give u

#

The rest you can figure out yourself

#

Oh wait

earnest phoenix
#

Eventhough I didnt understand Thnx

tulip ledge
#

Forgot the const

#

Then you should first do basic JS before doing this

lusty quest
#
    guildID: {type: String,unique: true,index: true},
    prefix: String});
mongoose.model('Guild', guildSchema);
#

as example

pure lion
#

So if I wanted to store prefixes would I make a new schema?

tulip ledge
#

No

lusty quest
#

you only need one schema

pure lion
#

Okay

tulip ledge
#

The prefixes and GuildID are in the same schema

lusty quest
#

this is the "framework" for your DB

pure lion
#

Ooooook

lusty quest
#

with the Model.save() you create the Document

pure lion
#

So I can have all my shit, like leveling and prefixes and wether it's enabled and disabled?

lusty quest
#

and your Model is defined witht he code i send you earlyer

#

yes

#

you can store stuff like Booleans easy

pure lion
#

So model.save() is like ctx.fillStyle in the sense that it commits the shit to the shit?

lusty quest
#

when a guild is created it sets for everything a default value and store it to the DB

pure lion
#

Ooooooo

#

If I added commands, do I add them to the schema with a Boolean too?

lusty quest
#

if you want to enable stuff you can use a Boolean to have it true or false

#

i have the ability to enable /disable commands in my bot

pure lion
#

And then if I wanted to change it I just somehow get the value from the schema and overwrite it

lusty quest
#

so every time a command is used it checks if the command is enabled

pure lion
#

Okay

lusty quest
#

you can update stuff

pure lion
#

So to recap:
the schema is a sort of master copy of the thing you're gonna create for every guild ID?

lusty quest
#

the schema is how the Database looks

pure lion
#

Okay

lusty quest
#

if the Bot joins a Guild it looks how the schema is build and create a Document after it

#

and fills out some stuff like the guildid and default values

#

how exactly is something you should find out since its spoonfeeding

twilit rapids
#

@quartz kindle after some digging, the socket object has this

writable: true,
pure lion
#

.on('guildCreate', h => { make the schema })

twilit rapids
#

I can just check if that's true and don't write if it's false

lusty quest
#

you call the schema. you create a object that sets the Values in the schema

pure lion
#

Alright

lusty quest
#

then save it

pure lion
#

But what's confused me, where do I write the object? And how do I interact with it? Ex. (In my index) db.once('open', () => { //what goes here?})

#

The docs on quickstart were too quick

lusty quest
#

i dont use db.once(open)

pure lion
#

What do you use?

lusty quest
#

are you sure you use mongoose?

pure lion
#

Yes

#

const db = mongoose.connection

lusty quest
#

i connet to the db and listen to the mongoose.on("connected") event. then i make it global aviable

pure lion
#

Ah

lusty quest
#

mongoose is fun to use if you get the hang of it

pure lion
#

Am confused

quartz kindle
#

@twilit rapids sounds good

lusty quest
#

had the same issue when i used mongoose the first time

pure lion
#

Mongoose is the name of the require in my index

lusty quest
#

can you show your schema?

pure lion
#

Don't have one yet

lusty quest
#

wait nvm

pure lion
#

Yeah

twilit rapids
#

Would be a simple fix ngl

reply(content) {
        if (this.receptive) {
            if (this.client.socket.writable) {
                this.client.socket.write(Header_1.createFromID(this.id, false, binarytf_1.serialize(content)));
            }
        }
    }
tulip ledge
#

u might wanna put like a else return in there

#

Unless u wanna run extra code

pure lion
#
const db = mongoose.connection;

db.on('error', console.error.bind(console, 'connection error:'));

db.once('open', () => {
  console.log('DB connected')
})


if this helps

#

it logs db connected

lusty quest
#

mongoose.connection.on('connected', () => {
            console.log('[NOTICE] Mongoose connection successfully opened!');
        });

``` this is how i do it (dbOptions is a array with connection options)
#

then i export the connection and require it in my mainfile and attach it to my client

#

so i can use client.saveOne(object)

pure lion
#

What are connection opts btw

lusty quest
#
const dbOptions = {
            useNewUrlParser: true,
            useUnifiedTopology: true,
            poolSize: 5,
            connectTimeoutMS: 10000,
            family: 4
        };

``` this are the one i use additional i set some other params
pure lion
#

Alrighty

lusty quest
#
   mongoose.set('useFindAndModify', false);
        mongoose.set('useCreateIndex', true);
        mongoose.Promise = global.Promise;
#

these 3 add some stuff that is handy

pure lion
#

wait im checking if it works properly***

lusty quest
#

the 2nd one creates indexes for the Documents (i had issues with duplicates and this fixed it)

pure lion
#

Okay I'll do that now brb

lusty quest
#

if you need more help feel free to ask

pure lion
#

ill ask in a couple mins

elfin flower
#

if message.content == "|Quote" or "|quote":
quotes = ["Be yourself; everyone else is already taken.", "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe.", "So many books, so little time", "Be who you are and say what you feel, because those who mind don't matter, and those who matter don't mind.", "You know you're in love when you can't fall asleep because reality is finally better than your dreams.", "Revenge is a fools game that fools win"]
await message.channel.send(random.choice(quotes))

#

bot spams again

#

i dont know how to fix it

pure lion
#

are you sending the whole array?

slender thistle
#

Full code please

pure lion
#

^^^

slender thistle
#

in codeblocks

elfin flower
#
@client.event
async def on_message(message)
  if message.content == "|help":
    await message.channel.send("Categories: Server, Games?, Memes, Animals and Misc. The prefix is |")
  

  if message.content == "|server" or "|Server":
    await message.channel.send("Kick, Ban, Mute, Warn, Unban, Unmute, Delwarn, Punishments, Banlock, Kicklock, Purge, ")


#fun stuff
  if message.content == "|memes" or "|Memes":
    await message.channel.send("Meme, Dank, Dad, Template, Anti, Game")

  if message.content == "|animals" or "|Animals":
    await message.channel.send("Animal, Dog, Cat, Snake, Duck, Fox, Ferret, Koala, Bunny, ")
  
  if message.content == "|misc" or "|Misc":
    await message.channel.send("Invite, Dice, Number, Quote, Say, Coin, RPS, Colour")

  if message.content == "|Invite" or "|invite":
    await message.channel.send("Invite with (put the bot link here)")

  if message.content == "|Dice" or "|dice":
    await message.channel.send("Choose: d4, d6, d8, d10, d20, d50, d100")
   # if message.content == "d4":

  if message.content == "|Number" or "|number":
    print("ok")
    await message.channel.send(random.randint(0,sys.maxsize))

  if message.content == "|Quote" or "|quote":
    quotes = ["Be yourself; everyone else is already taken.", "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe.", "So many books, so little time", "Be who you are and say what you feel, because those who mind don't matter, and those who matter don't mind.", "You know you're in love when you can't fall asleep because reality is finally better than your dreams.", "Revenge is a fools game that fools win"]
    await message.channel.send(random.choice(quotes))

  if message.content == "|meme" or "|Meme":
    meme_links = ["meme link", "meme link", "meme link"]
    await message.channel.send(random.choice(meme_links))
#

bad code

slender thistle
#

eh whatever

#

How's it spamming?

elfin flower
#

ill send screenshot

slender thistle
#

Bismillah

lusty quest
#

message.send(quotes[index])
``` could be something for your random quotes
slender thistle
#

Are you sure you don't have many stances of the bot running

lusty quest
#

or mutiple bot instances

slender thistle
#

They're already choosing a random quote

lusty quest
#

ohh right nvm

elfin flower
#

?

#

Are you sure you don't have many stances of the bot running
@slender thistle ?

slender thistle
#

3-8 bots running with the same code under the same token

elfin flower
#

no

lusty quest
#

how many messages did you get when you run your help command?

slender thistle
#

each "instance" responding to the command

elfin flower
#

i never tried my help command lol

#

ill see

lyric mountain
#

how did u never tried it?

elfin flower
#

i tried it rn

#

over 10 messages

lusty quest
#

you have then 10 instances running

#

try to quit all of them and only start one

elfin flower
#

it was pausing

#

it sends 5 then pauses

#

and so on

#

and i assure you, i dont have anything else running

lyric mountain
#

is your client.login inside some loop or event?

elfin flower
#

i used client.run

#

and its not inside a loop or an event

lyric mountain
#

could u show ur actual code?

#

remember to cover sensitive data

elfin flower
#

okay

tulip ledge
#

I tried to add a VARCHAR column to my MySQL table but it said I didn't have enough space and had to use TEXT instead does it work the same or?

lusty quest
#

try Varchar(255)

tulip ledge
#

Alright

#

Oi

#

It worked

#

Ty

lusty quest
#

np

elfin flower
#
@client.event
async def on_ready():
  print("ready")

@client.event
async def on_message(message):
    if message.content == "|help":
    await message.channel.send("Categories: Server, Games?, Memes, Animals and Misc. The prefix is |")
  

  if message.content == "|server" or "|Server":
    await message.channel.send("Kick, Ban, Mute, Warn, Unban, Unmute, Delwarn, Punishments, Banlock, Kicklock, Purge, ")


#fun stuff
  if message.content == "|memes" or "|Memes":
    await message.channel.send("Meme, Dank, Dad, Template, Anti, Game")

  if message.content == "|animals" or "|Animals":
    await message.channel.send("Animal, Dog, Cat, Snake, Duck, Fox, Ferret, Koala, Bunny, ")
  
  if message.content == "|misc" or "|Misc":
    await message.channel.send("Invite, Dice, Number, Quote, Say, Coin, RPS, Colour")

  if message.content == "|Invite" or "|invite":
    await message.channel.send("Invite with (put the bot link here)")

  if message.content == "|Dice" or "|dice":
    await message.channel.send("Choose: d4, d6, d8, d10, d20, d50, d100")
   # if message.content == "d4":

  if message.content == "|Number" or "|number":
    print("ok")
    await message.channel.send(random.randint(0,sys.maxsize))

  if message.content == "|Quote" or "|quote":
    quotes = ["Be yourself; everyone else is already taken.", "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe.", "So many books, so little time", "Be who you are and say what you feel, because those who mind don't matter, and those who matter don't mind.", "You know you're in love when you can't fall asleep because reality is finally better than your dreams.", "Revenge is a fools game that fools win"]
    await message.channel.send(random.choice(quotes))

  if message.content == "|meme" or "|Meme":
    meme_links = ["meme link", "meme link", "meme link"]
    await message.channel.send(random.choice(meme_links))

client.run(bot token)
tulip ledge
#

Thats alot of code

lyric mountain
#

try Varchar(255)
@tulip ledge actually, use VARCHAR(191)

elfin flower
#

yeah

tulip ledge
#

Why 191?

lyric mountain
#

for some reason emojis break varchar columns with 255 as length

tulip ledge
#

I don't need emoji's

lyric mountain
#

and 191 is the highest possible value without having this effect

lusty quest
#

if you store guild names i would use it with 191

lyric mountain
#

yeah

#

people LOVE to use emojis in guild names

tulip ledge
#

No I'm storing some items from the user's inventory

lusty quest
#

then its fine

tulip ledge
#

There is no user input so I don't need emoji's

lyric mountain
#

ah, it's fine then ig

#

btw, just as an addendum, chinese characters and some UTF-16 chars also break 255 fields

quartz kindle
#

what the fuck lmao

lusty quest
#

tim look away the code gives you grey hair

lyric mountain
#

yeah, don't ask me why, spent a whole week trying to find out why my database was having a seizure

tulip ledge
#

lmao

quartz kindle
#

but like, with any string size or only if you actually exceed the string limit?

lyric mountain
#

only VARCHAR(255) fields

quartz kindle
#

but with any string size?

lyric mountain
#

and any length above 191 actually

autumn aspen
#
const sim = require("string-similarity");
module.exports = {
  name: "kick",
  description: "kicks a member",
  execute(message, args) {
    if (!message.member.roles.cache.has("730187390328504381"))
      //Do they have the role?
      return message.channel.send(
        "You do not have the permissions to run this command!"
      );
    if (args.length == 0 || args[0].length == 0) {
      //If no args were provided
      return message.channel.send("You have to specify an user to kick!");
    }
    const member = message.guild.members.cache.get(
      (args[0].search(/<?@?!?([0-9]+)>?/gm) == -1 //Is there a mention in the first argument?
        ? undefined
        : args[0].replace(/<?@?!?([0-9]+)>?/gm, "$1").toString()) || //If so then return the id
        message.guild.members.cache.find(
          //Or else then look for the best match
          member =>
            member.user.username ==
            sim.findBestMatch(
              args[0],
              message.guild.members.cache.map(member => member.user.username)
            ).bestMatch.target
        ).user.id
    );
    if (!member) {
      return message.channel.send(
        "You have to mention an user in this server to kick!"
      );
    }
    if (member.user.id == message.author.id) {
      return message.channel.send("Why would you want to kick yourself?");
    }
    let reason = args; // Get the reason
    reason.shift();
    member
      .kick(
        reason.length == 0
          ? "You were kicked from Server Staff Support server."
          : reason.join(" ")
      )
      .then(() => {
        return message.channel.send(`Sucessfully kicked ${member}!`);
      })
      .catch(Error => {
        message.reply("I was unable to kick that member");
        return console.log(Error);
      });
  }
};

@slender thistle Why do I get a error in VSC "moduel_not_found"

quartz kindle
#

if you store a 10 char name on it with emojis

lyric mountain
#

yeah, it does break

quartz kindle
#

that makes no sense

lyric mountain
#

ig it has something to do how the column is allocated idk

quartz kindle
#

but like

earnest phoenix
#

i doubt that's the case you probably fucked something else up

quartz kindle
#

varchar is variable characters, it should support strings with any length up to 255

lusty quest
#

can confirm that unicode emojis break a 255Varchar had the issue too back when i used Mysql

earnest phoenix
#

are you using proper character encoding

lyric mountain
autumn aspen
#

Like what?

tulip ledge
#

the database assumes a maximum of 4 bytes for each character.

#

emoji's and stuff probably exceed the 4 bytes

lyric mountain
#

emoji are 8 bytes

#

\uABCD\uEFGH

quartz kindle
#

The index key prefix length limit is 767 bytes for InnoDB tables that use the REDUNDANT or COMPACT row format. For example, you might hit this limit with a column prefix index of more than 191 characters on a TEXT or VARCHAR column, assuming a utf8mb4 character set and the maximum of 4 bytes for each character.

hoary lily
#

I cannot understand the control variable that will disable the event emitter

tulip ledge
#

innodb_large_prefix is a setting in my.conf apparently used to change the assumption of 4 bytes per character

#

or idk where

#

It's a setting lol

quartz kindle
#

from what i understand, this only happens on innoDB tables and when using reduntant/compact format, and with utf8mb4 and with a data size of 191+ characters with all of them using all 4 bytes

tulip ledge
#

I use MySQL tho

quartz kindle
#

sounds like a lot of conditions

lusty quest
#

innoDB is the database engine

tulip ledge
#

oh

elfin flower
#

nvm

pure lion
#
const guildSchema = mongoose.Schema({
  _id: mongoose.Schema.Types.ObjectId,
  guildID: {type: String, unique: true, index: true},
  prefix: String,
  w_gChannel: String,
  info: Boolean,
  ping: Boolean,
  poll: Boolean,
  uptime: Boolean
})
mongoose.model('Guild', guildSchema)
mongoose.Model.save()

no idea if this looks good or not but uhHHHH

lusty quest
#

not completly correct

pure lion
#

okay, where am i looking?

lyric mountain
#

at ur screen

pure lion
#

funny

earnest phoenix
#

can the const be below and cmd?

quartz kindle
#

wat

lusty quest
#

you need to create a object for saving data.````
Object{
guildID: guild.id,
prefix: "!"
}

pure lion
#

wat

#

oh

#

ohhhhh

#

ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

lusty quest
#

then reference the Object to the model

earnest phoenix
elfin flower
#

i dont code discord js but i think its this part
mongoose.model('Guild', guildSchema)
mongoose.Model.save()

pure lion
#

so i just change all the shit to defaults?

lyric mountain
#

Can the const be here?
@earnest phoenix no

quartz kindle
#

@earnest phoenix no

pure lion
#

@earnest phoenix no

earnest phoenix
#

So all the const should be above only?

lyric mountain
#

not at all

#

you can't use any variable that's defined after the place of usage

#

because it doesn't exist yet

lusty quest
#

like ```
const db = New Guild(object)
then use db.save()

quartz kindle
#

variable declarations are not hoisted, they have to be declared before being used, in a top down way

pure lion
#

js is interpreted, read line by line

#

alright

earnest phoenix
#

K

#

Thnx

quartz kindle
#

on the other hand, function declarations are hoisted, so if you declare it as a function instead, you can place it anywhere as long as its in the global scope

earnest phoenix
#

K

elfin flower
#

imagine if "discord scratch" existed 😂

😭

lusty quest
#

it does

elfin flower
#

terrible

#

WHAT

tulip ledge
#

I just wanted to say why not declare it as a function

pure lion
#

lololol

lyric mountain
#

imagine if "discord scratch" existed 😂

😭
@elfin flower a guy here created one

elfin flower
#

why

lyric mountain
#

I don't remember who it was

tulip ledge
#

cuz funny

lyric mountain
#

also why not?

lusty quest
#

someone also wrote a bot with brainfuck.js

tulip ledge
#

tf is that

lyric mountain
#

now it's time for a delphi discord lib

lusty quest
#

google esolang brainfuck

earnest phoenix
#

What

#

The

#

Heck

quartz kindle
#

brainfuck.js? why .js

tulip ledge
#

What if we make a bot in binary?

#

Or assembly

#

lmao

pure lion
#

brain.fuck

opal plank
#

make a bot in scratch, its close enough

pure lion
#

:DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD

elfin flower
#

is the person called "Parmesan Linguine" the person who made it

tulip ledge
#
++++++++++
[>+++++++>++++++++++>+++>+<<<<-] De initialiserende loop om de array te maken
>++. Print 'H'
>+. Print 'e'
+++++++. Print 'l'
. Print 'l'
+++. Print 'o'
>++. Print ' '
<<+++++++++++++++. Print 'W'
>. Print 'o'
+++. Print 'r'
------. Print 'l'
--------. Print 'd'
>+. Print '!'
>. Print newline

Holy jezus fuck

pure lion
#

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

tulip ledge
#

Thats hello world

#

Holy jezus

pure lion
#

what the fuck

#

what do the +_?>}{[]}{}{ mean

tulip ledge
#

I have no clue lol

elfin flower
#

i

quartz kindle
#

the brainfuck language is designed to create a fully functional programming language using as little different characters as possible

#

the entire language consists of 8 characters

lusty quest
elfin flower
#

i searched all over google

opal plank
#

this regex is cursed enough that i feel like putting it here

pure lion
#

the entire language consists of 6 characters
😿

opal plank
#

\(0,\w\.default\)\(\w,\w\),\w=\(0,\w\.default\)\(\w,\w\),\w=\(0,\w\.default\)\(\w,\w\),\w=\(0,\w\.default\)\(\w\),\w=\(0,\w\.default\)\(\w\.id)

elfin flower
#

no discord scratch

#

what is that code?

lyric mountain
#

regex

opal plank
#

regex

pure lion
#

:O

elfin flower
#

it hurts my head

opal plank
#

eye sore

lyric mountain
#

what about my url detector regex?
".*?(?:^|[\\W])((ht|f)tp(s?)://|www\\.)(([\\w\\-]+\\.)+?([\\w\\-.~]+/?)*[\\p{Alnum}.,%_=?&#\\-+()\\[\\]*$~@!:/{};']*?)"

elfin flower
#

if i was ever forced to pick one of these:
learn regex or die
i would pick die

quartz kindle
#

actually brainfuck is 8 characters

#

jsfuck is 6 characters

opal plank
#

i learned regex within 6h

#

it wasnt that bad

elfin flower
#

how

tulip ledge
#

I think that brainfuck bot isn't a bot it looks more like a parser or something

opal plank
#

just gotta ignore the urge to say 'fuck this, im out'

elfin flower
#

regex is like **&&(&((((({}{}}{:":&(((TBUS

quartz kindle
#

its a brainfuck interpreter, not a brainfuck bot

opal plank
#

its the same as coding

tulip ledge
#

RIght like i thought

opal plank
#

once you learn what they do, its easy

#

use regex101

tulip ledge
#

Can u link me like a doc for regex?

elfin flower
#

ok im

opal plank
#

thats a great cheat spredcheat

tulip ledge
#

I need to learn it too lmao

opal plank
#

this for general sense

elfin flower
#

ok

lusty quest
#

regex is annoying in the beginning. if you get the hang of it its nice to know

elfin flower
#

ok

opal plank
#

its really not that bad

#

can get thru it within a day easily

twilit rapids
#

@quartz kindle seems like that fixed it, i've been restarting my beta bot the past 15 minutes and not a single issue

elfin flower
#

im gonna

twilit rapids
#

¯_(ツ)_/¯

elfin flower
#

see if my bot still spams

#

it still spams

opal plank
#

the worst part about regex is checking the unicodes for other shit

quartz kindle
#

@twilit rapids nice lmao

twilit rapids
#

Just gonna double check with Kyra (veza dev) if anything can go wrong if it just falls silent if the socket isn't writeable

earnest phoenix
twilit rapids
#

And if everything is fine I'll push to prod

tulip ledge
#

message.ready

#

Read the error

earnest phoenix
#

huh?

quartz kindle
#

the only thing that could fail is if something else is expecting a return message or response, otherwise should be fine

#

you could also make use of that code to recheck/reset the connection state and/or return a proper error

earnest phoenix
lusty quest
#

@earnest phoenix read the error

#

it says message.ready

earnest phoenix
#

This is coming again when I run the command

lusty quest
#

it also says in what line the error is

opal plank
#

ready isnt a thing mah dude

#

reply

#

not ready

twilit rapids
#

Yeah, but that's a bit above my knowledge of veza and sockets

pure lion
#

db.save() is not a function
Oh no
OH NO
OH NOOOOOO

twilit rapids
#

Are you okay

earnest phoenix
#

What should I do now?

pure lion
#

No I'm not okay

quartz kindle
#

message.ready doesnt exist

elfin flower
#

😦 🙂 :() 😐 :}

opal plank
#

we told you

elfin flower
#

bbbbruh

#

:]

opal plank
#

you made a typo

earnest phoenix
#

So what should I do about that?

opal plank
#

fix it

quartz kindle
#

dude

#

lmao

opal plank
#

some people tim, i swear lol

elfin flower
#

h

opal plank
#

'ive pointed out the problem and even said what the problem is

quartz kindle
#

message.reply() replies to a message
message.ready() is not a thing, it doesnt exist in discord.js

#

shouldnt the answer be obvious?

opal plank
#

likely typed re then pressed enter and it auto filled

#

cuz he used it before 2 lines above

elfin flower
#

random.choice() is cool

opal plank
#

though VSC shouldnt fill methods that dont exists

#

maybe im wrong

junior maple
#

Join for my server?

opal plank
#

huh?

lyric mountain
#

@junior maple no

earnest phoenix
#

@opal plank

opal plank
#

PREFLIX?

pale vessel
#

lord have mercy

earnest phoenix
#

Its in a diff folder

#

I have linked it

pale vessel
#

you don't need to check every time

earnest phoenix
#

No

#

Like

opal plank
#

unless its per guild prefix

#

tthough an array or obj would be much better

misty sigil
#

hey friends

earnest phoenix
#

k

#

Hi

#

LOL

misty sigil
#

I'm having trouble with permission overwrites

opal plank
#

if PREFLIX is defined, should be fine running that code

earnest phoenix
#

K

#

It worked

#

Bad choice

#

botghost is bad

#

I tried

misty sigil
#

it is

earnest phoenix
#

U need to pay and stuff

misty sigil
#

you will get denied if you make no custom commands

sudden geyser
#

no you'll just get denied

misty sigil
#

really?

earnest phoenix
#

to remove their ads and U r not doing any actual developping

misty sigil
#

i thought botghost was allowed if you had custom commands

sudden geyser
#

To my knowledge they don't allow any form of bot.ghost bots

opal plank
#

which is right

sudden geyser
#

unless you want to ask a mod

earnest phoenix
#

Botghost is bad

#

That is for sure

sudden geyser
#

okay

misty sigil
#

yea thats generally true

opal plank
#

im aware its hard to catch copy pasted bot stuff without source, but im sure they'll block you if they see you using pre made bots

earnest phoenix
#

if u want to be a true developer bot ghost is bad

misty sigil
#

exactly

sudden geyser
#

I mean don't they put the fact it's on bot ghost in the status

misty sigil
#

yea, unless you pay

opal plank
#

im unsure

#

thats a big yikes

misty sigil
#

tbh i like mee6 more than botghost

sudden geyser
#

the ea of discord

misty sigil
#

and i hate mee6 with a burning passion

opal plank
#

finally

misty sigil
#

yeah i am actually ok with that botghost thing
@earnest phoenix be careful, if the mod team see that, they'll have your bot denied, fast

opal plank
#

someone that agrees mee6 is trash

misty sigil
#

luca is better

#

its sad that its private

autumn aspen
#

Guys I wanna schrimp a pic how can I do

#

bc the middle thing is to big

sudden geyser
#

a lot of people don't like mee6 but it's a bot after all. you don't have to invite it

misty sigil
#

yea

opal plank
#

@misty sigil CONGRATULATIONS, YOU LEVELED UP! YOU ARE NOW LEVEL 9!

misty sigil
autumn aspen
#

lol

earnest phoenix
#

HOW?

opal plank
#

every fucking 5th message

earnest phoenix
#

How u level up?

opal plank
#

i hate mee6

sudden geyser
#

can't you disable it?

earnest phoenix
#

IKR

opal plank
#

i prefer welcomer over mee6

misty sigil
#

@opal plank you are now level 75656
@opal plank you are now level 298731983892177312879382

autumn aspen
#

Guys I wanna schrimp a pic how can I do
bc the middle thing is to big

#

guys

earnest phoenix
#

BRUH

sudden geyser
#

hold what does schrimp mean

opal plank
#

^^

#

was about to ask

autumn aspen
#

BRUH
@earnest phoenix bruh to u

earnest phoenix
#

HUH?

autumn aspen
#

I mean like to it smaller

misty sigil
#

🦐kek

opal plank
#

🦐

autumn aspen
#

do it smaller'

#

@sudden geyser

opal plank
#

schrimp image

earnest phoenix
#

where to use bot commands?

#

#?

opal plank
#

though, for real, what do you mean schrimp a pic?

misty sigil
autumn aspen
#

Oops no I got an idea

misty sigil
sudden geyser
#

So you want to shrink an image. I assume you want it on your bot but I don't have any experience on it sadly.

opal plank
#

shrink?

earnest phoenix
#

SO many MEE6?

misty sigil
#

no mee6 is muted

earnest phoenix
#

K

opal plank
#

hmm without DOM or css i havent really shrank images, i cant help much there

earnest phoenix
#

@somber ingot

#

Yes

misty sigil
#

anyways, can anyone help me setup my channel overrides

opal plank
#

havent you been here long enough to not expect spoonfeeding? thats better

sudden geyser
#

jeremy can you be more specific

opal plank
#

what you struggling with?

reef mantle
#

Hello

misty sigil
#

The error appearing is [INVALID_TYPE]: Supplied overwrites is not an Array or Collection of Permission Overwrites., its something to do with this code js await channel.overwritePermissions(muterole, { SEND_MESSAGES: false, ADD_REACTIONS: false });

reef mantle
#

I think

sudden geyser
#

the first argument should be an array of collection to my knowledge

reef mantle
#

It should be ("MUTE_ROLE")

sudden geyser
opal plank
#

yes indeed

sudden geyser
quartz kindle
#

overwritePermissions is to change ALL permission overwrites for a channel

reef mantle
#

Nvm bye

quartz kindle
#

to update a single permission in a channel, use .updateOverwrite()

#

the code you sent is valid for .updateOverwrite()

opal plank
#

basic question

#

is there a way to write this down without having to rewrite reactions.emoji.name everytime with an array?

quartz kindle
opal plank
#

perfect

#

ty

earnest phoenix
#

How do i accept input in the console? Like windows batch file's set variableName /p =

pale vessel
#

what programming language?

surreal notch
quartz kindle
#

@earnest phoenix interactive input, or input parameters?

opal plank
#

@surreal notch its expecting an object

earnest phoenix
#

I'm in javascrpt

#

I just want to mimic the windows batch file

opal plank
quartz kindle
#

yes, but you want it interactive or not?

#

because for example

earnest phoenix
#

?

quartz kindle
#

you can do this node myapp.js huehuehue somethinghere or even node myapp.js --option=10

earnest phoenix
#

No

quartz kindle
#

which is not interactive

#

the interactive would be ```
node myapp.js
hello, chose a name:

myname
you chose myname

earnest phoenix
#

I want it to be so that when i run something in the app in the console( and by running smth i mean open it) it asks me "Enter smth" anf it gives the value to a variable

#

the interactive would be ```
node myapp.js
hello, chose a name:
you chose myname

@quartz kindle you got it now and a free p i n g for you

#

You want another ping or smth?

#

Lol

quartz kindle
#

you can use process.stdin

earnest phoenix
#

?