#development

1 messages · Page 1171 of 1

opal plank
#

no endpoints?

carmine summit
#

though you gotta either find their docs or dig that warpper code to see the format their api use
@opal plank in english

opal plank
#

what params does it take?

#

need auth readers?

fluid basin
#

filename is endpoint

its fairly simple tbh, the document path is the api path

#

only get requests

#

key is the required query param

#

done

opal plank
#

none of that is explained in the docs, its all payload return examples from what ive seen

fluid basin
#

yeah well

#

trial and error

#

¯_(ツ)_/¯

opal plank
#

thats the opposite of documenting

#

you dont make a public api and tell your users to 'try and error'

carmine summit
fluid basin
#

well hypixel is a game development company, not an api development company

opal plank
#

doesnt matter

midnight blaze
#

xd

opal plank
#

if they except users to use it, at least document it

#

if its a private api who cares

fluid basin
#

they don't really thats the thing

opal plank
#

at least put THAT much effort

fluid basin
#

90% of the ppl on hypixel are gamers

#

not api consumers

opal plank
#

then why bother with a public api?

#

dont document it then, keep it internal

#

¯_(ツ)_/¯

fluid basin
#

people wanted data, and they implemented that feedback

opal plank
#

makes absolutely no sense

fluid basin
#

ik

#

ok anyways now you can explain to him

#

im outta here for now

opal plank
#

a hell naw

#

someone else take it

midnight blaze
#

" 3 contributors"

opal plank
#

im going to buy food

midnight blaze
#

none of them were able to write a somewhat proper documentation smh

fluid basin
#

well although if you're using the java example, it will work out of box

opal plank
#

thats what i said

#

dig in that wrapper code

fluid basin
#

(and they have a dedicated section in the forums for api-related help)

opal plank
#

follow it till you see whats being sent

carmine summit
#

dig in that wrapper code
@opal plank whats a wrapper code?

fluid basin
#

the entire repo, basically

earnest phoenix
#

oh my god..

carmine summit
#

The docs said that the Java response is formatted in JSON. how can i make java speak???

earnest phoenix
#

Carefully, he might swear

carmine summit
#

How can i make Java spit out JSON?

pale vessel
#

spit out

carmine summit
#

how

opal plank
#

wdym java spit json

#

DUDE

#

ignore the java

fluid basin
#

oh welcome back

opal plank
#

i come back with food and this is what i see :

The docs said that the Java response is formatted in JSON. how can i make java speak???

#

@carmine summit which programming language are you most proficient with?:

strange trout
placid iron
#

So is a give all command API abuse if you have a 1s wait between each role give

#

I'm unsure because that seems to be what Dyno does

digital ibex
#

i’d use 1 second for a server under 50 members

#

and 50 above, i’d use 2 seconds

#

dyno essentially does the same thing

placid iron
#

Ah ok thanks

carmine summit
#

@carmine summit which programming language are you most proficient with?:
@opal plank JavaScript

digital ibex
#

not the 50 member thing btw, same logic i think

opal plank
#

@carmine summit use axios and parse the json yourself

carmine summit
#

I know how to parse json

#

And axios

#

But i dont know the url

#

For the json

#

For the api

digital ibex
#

what r u trying to do?

carmine summit
#

what r u trying to do?
@digital ibex tying to make java speak

opal plank
#

stop

#

dont ever mention java again unless you going to start coding in java

slender thistle
#

Java Script

opal plank
#

shiv

honest perch
#

Javascript also known as java

opal plank
#

he got stuck in his head that his code has to be in java to use an api

#

java =/= js

#

2 different things

honest perch
#

Lmao

safe kelp
#

Anyone?

digital ibex
#

java speak?

honest perch
#

Yea

opal plank
digital ibex
#

huh

carmine summit
#

Umm

opal plank
#

no

#

dont say java

carmine summit
opal plank
#

the only 2 words i want coming out of yer mouth is JSON and javascript

digital ibex
#

im so confused rn

opal plank
#

no, thats the url you wanted

carmine summit
#

Theres no json there

opal plank
#

indeed

carmine summit
#

Only 3butons

opal plank
#

wdym 3 buttons?

carmine summit
#

No json

#

Only buttons

opal plank
#

you said you developed API's right?

carmine summit
#

No

honest perch
#

I am an api

carmine summit
#

What I need is a url requesting an API key that if you open you will see json

#

No buttons

opal plank
#

there aint no buttons

#

its an api call

#

thats the api base url you'll be fowaring your requests to

#

you dont get api key there, you get it here

carmine summit
#

I alr have api key

opal plank
#

then now you CODE an AXIOS/REQUEST to api

#

no buttons

#

CODE

#

in JSON

carmine summit
#

Ehhhhhh

opal plank
#

with JS

#

no java

carmine summit
#

I ussually use a JSON reader

opal plank
#

dont even dare mentioning java again

honest perch
#

Or use node fetch

#

Java fetch mmulu

opal plank
#

read this

carmine summit
#

For example if i go to an API website i see is JSON then i copy it and paste to json reader and then code

opal plank
#

click that nifty link up there

safe kelp
#

Anyone

opal plank
#

and learn that, you only need GET

#

no need for post/patch

honest perch
#

Nodefetch is easier

opal plank
#

indeed, though feel free to help em

#

im more familiar with axios, if he needs help, i can give it with axios

carmine summit
#

Ok. Ok ill dm if i need solutions in Java||Script||

opal plank
#

no

#

keep support here

#

no dm

carmine summit
#

Oke oke

#

Ill ping insted

opal plank
#

good

safe kelp
#

!?!?

opal plank
#

@safe kelp dont ask to ask

#

just state your question

honest perch
#

Hypixel lmao, got perm banned there

safe kelp
#

I stted two times

opal plank
#

oh, eval in py

#

i see

safe kelp
opal plank
#

no clue, py, not my area

safe kelp
#

Okay

honest perch
#

@slender thistle loves py and would be happy to help you

safe kelp
#

Idk how eval works

opal plank
#

we hitting 600 calls per minute

honest perch
#

Yes

safe kelp
#

Level up bot

#

Your bot is a level bot?

#

I mean level system

#

Oh nice

#

What's your language

#

O nice

#

Is java easy?

opal plank
#

im still patiently waiting till a scratch lib comes out

safe kelp
#

Hmm

opal plank
safe kelp
#

I will have to find a java compiler first

#

Nope

#

Don't laugh

#

On Android

opal plank
#

dont say mac

#

oh god, even worse

#

lynch em'

tidal parrot
#

@safe kelp eval evaluates text as code, don't use it

safe kelp
#

Well O said worst than mac

#

@tidal parrot it's just a cmd

tidal parrot
#

Yes

safe kelp
#

Wdym by desktop os?

opal plank
#

whym dont use it?

safe kelp
#

.....

opal plank
#

quite the opposite, DO use evals

#

they are handy af

tidal parrot
#

Eval is unsafe and could easily lead to someone taking over your machine

opal plank
#

thats why you whitelist it

tidal parrot
#

If you don't understand it though, don't use it ;)

honest perch
#

Eval is unsafe and could easily lead to someone taking over your machine
@tidal parrot more like exec

safe kelp
#

Well we can mke it owner only @tidal parrot

tidal parrot
#

That's fine then

opal plank
#

is it that big a deal? iuf you have access to eval you have access to code either way

tidal parrot
#

It just evaluates text as code as initially said

honest perch
#

Just dont put random things in

opal plank
#

be it fucking up with a command or on the code, both are unsafe if you dont know what they do

safe kelp
#

lol android is easy

honest perch
#

client.token

#

Best eval

safe kelp
#

I can also clone gits

opal plank
#

ha jokes on you guys

#

i can show my token

tidal parrot
#

Eval should never be needed except for debugging shit tho

opal plank
#

@honest perch wanna see me eval my token in #commands ?

safe kelp
#

On Android just use py pydroid ide for python and dcoder

#

Simple

#

O

#

Then maybe dcoder support java

#

Openjdk??

#

What's this?

opal plank
#

@honest perch as shown, i evaled my token

#

evals are super handy tools to have

#

being able to access stuff directly from the bots code is super good

carmine summit
#

How can i code a reason?

#

I cannot use args[] since it slices

trim lark
#

what language?

carmine summit
#

Cant use sublenght (or whatever its called I forgot) neither

#

JS

opal plank
#

wdym code a reason?

prisma oriole
#

Is it faster to set up a webhook in a channel (for a logging system) or just fetch the channel and send the logged information

opal plank
#

prob webhook as its just dispatching

prisma oriole
#

ah ok

opal plank
#

logic => webhook => dispatch
logic => fetch => dispatch

prisma oriole
#

makes sense

opal plank
#

not sure it works like that though, take it with a grain of salt

prisma oriole
#

yeah

#

more or less just generalized

#

i could do some tests ig

opal plank
#

indeed

feral aspen
#

Hello

#

Is there a way I can list all the bot's servers it currently on, in the logs?

opal plank
#

yes

feral aspen
#

How can I do that please?

opal plank
#

if you specify which lang, that'd be good

#

¯_(ツ)_/¯

#

library or/and lang

feral aspen
#

I use Node.JS v12

earnest phoenix
#

send code

opal plank
#

@feral aspen discord.js?

feral aspen
#

Yes @opal plank

opal plank
#

@earnest phoenix screenshots are native to windows

#

@feral aspen client.guilds.cache

earnest phoenix
#

Wdyn native?

opal plank
#

use that and loop each

#

Snipping Tools, Print Screen + ctrl v, sharex, gyazo

#

so many options and you take a pic with your phone

feral aspen
#

Wdym

#

I dont know how to do that

opal plank
#

tis why we learn

earnest phoenix
#

const client = new Discord.Client();


client.once('ready', () => {
    client.user.setActivity("Type ?help for a full list of commands",{
        type:"WATCHING"
    })
    console.log('Logged in as The Universe!');
});

client.on('message', msg => {
    if (msg.content === '?help') {
      msg.reply('COMMANDS NOT READY');
    }
  });```
#
      if (msg.content === '?prefix') {
        msg.reply('Change prefix');
      }
    });
  
    client.on("message", async msg => {
      if (msg.content == '?ping') {
        try {
          const m = await message.channel.send("Pinging...");
          const embed =  new Discord.MessageEmbed()
          .setColor("RANDOM")
          .addField(":hourglass: Latency", `**${m.createdTimestamp - message.createdTimestamp}ms**`)
          .addField(":heartbeat: API", `**${Math.floor(client.ws.ping)}ms**`)
          return m.edit(`🏓 Pong!`, embed);
        } catch (error) {
          return message.channel.send(`Something went wrong!: ${error.message}`);
        }
      }
    });

    if (msg.startsWith(!afk)) {
        const status = new db.table("AFKs");
        let afk = await status.fetch(message.author.id);
        const embed = new Discord.MessageEmbed().setColor(0xffffff)

let afk = new db.table("AFKs"),
    authorStatus = await afk.fetch(message.author.id),
    mentioned = message.mentions.members.first();

if (mentioned) {
    let status = await afk.fetch(mentioned.id);

    if (status) {
        const embed = new Discord.MessageEmbed()
        .setColor(0xffffff)
        .setDescription(`This user (${mentioned.user.tag}) is AFK: **${status}**`)
        message.channel.send(embed).then(i => i.delete({timeout: 5000}));
    }
}```
fast yacht
#

wow..

faint prism
#

```

opal plank
earnest phoenix
#
    const embed = new Discord.MessageEmbed()
    .setColor(0xffffff)
    .setDescription(`**${message.author.tag}** is no longer AFK.`)
    message.channel.send(embed).then(i => i.delete({timeout:5000}));
    afk.delete(message.author.id)
}

client.once('ready', () => {
        embed.setDescription(`**${message.author.tag}** now AFK.`)
        embed.setFooter(`Reason: ${args.join(" ") ? args, join(" ") : "AFK"}`)
        status.set(message.author.id, args.join(" ") || `AFK`);
      } else {
          embed.setDescription("You are no longer AFK.");
        status.delete(message.author.id);
      }

      message.channel.send(embed)
    }


client.login('');```
opal plank
#

@earnest phoenix use hastebin

#

too much spam here

earnest phoenix
#

There should be a command for the mods that says that you only need 1 message listener.

#

Did

opal plank
#

omg

#

nested message events

fast yacht
#

I think your callback is missing an paranthesis. @earnest phoenix

opal plank
#

kill it with fire

earnest phoenix
#

Wdym @fast yacht

opal plank
#

@fast yacht THATS WHAT YOU SEE WRONG?

#

there are 6 event listeners!

fast yacht
#
 message.channel.send(embed)
})
opal plank
#

and they are NESTED

carmine summit
#

wdym code a reason?
@opal plank if i do var reason = args[1], only 1 word will be reason. But i need it like 4words to be reason

fast yacht
#

Hahhaaha

opal plank
#

@carmine summit parse from message.content

fast yacht
#

I didn't see the nested stuff. I think discordjs.guide is a good starting point

opal plank
#

@earnest phoenix only 1 client.on('message', => ....

#

what you're doing is basically a : How to memory leak 101

carmine summit
#

there are 6 event listeners!
@opal plank dats wat u get for copy pasta codes

opal plank
#

likely what happened

carmine summit
#

@carmine summit parse from message.content
@opal plank help

opal plank
#

you got message.content

#

which is the whole content payload from message

carmine summit
#

I cannot use message.content.sub

opal plank
#

now remove the subcommand

#

there aint not sub in content

#

you parse it

carmine summit
#

Subscript

#

()

opal plank
#

substring*

carmine summit
#

Yeah

opal plank
#

you do it yourself

#

or .replace()

carmine summit
#

But the command is ?kick @soneone reason reason reason reason

opal plank
#

so?

carmine summit
#

What i need is

earnest phoenix
#

join

opal plank
#

what you need is to listen dude, im giving you all the directions you need

carmine summit
#

To remove ?kick ansd @someone

#

And define it

opal plank
#

.replace() or substring with index of mention

carmine summit
#

How i do that?

opal plank
#

learning those methods, beforehand

#

i assumed you knew js

carmine summit
#

I knew replace()

#

But what am i going to put inside the ()

opal plank
#

substring can be used to split the string on a certain index

#

those are called parameters

#

if you dont know function parameters you dont know enough js to be making a bot, likely

carmine summit
#

I know

opal plank
#

you dont

carmine summit
#

I dont?

opal plank
#

start with that

#

then read this

carmine summit
#

I know replace

opal plank
#

then read the other 2

heavy anchor
carmine summit
#

Ive been working on 1k lines of code of JS in my bot

opal plank
#

big code isnt good code

carmine summit
#

I already have 1k lines

restive furnace
#

spoonfeed
noone did spoonfeed

opal plank
#

line count doesnt mean anything

#

quite the oposite, optmized code usually is smaller

fast yacht
#

Does anyone know discord ToS and global databases. e.g. if the bot shows a rank of players and it shows players across discord servers. ok or not ok?

opal plank
#

take pride in quality, not quantity

carmine summit
#

Why is smaller better?

opal plank
#

@fast yacht not okay

#

you can show position in global rank iirc

#

but not any identifiers of users that arent in the same server

fast yacht
#

ok

#

thank you

opal plank
#

@carmine summit optimized is better

carmine summit
#

How can i make my code smaller?

#

And optimized

opal plank
#

long code doesnt mean good code

restive furnace
#

by learning basics of JS

opal plank
#

^^

#

and good practices

carmine summit
#

I know tha basicsssssss

restive furnace
#

doesnt seem tho

carmine summit
#

Its just

#

Ive invested so much time in coding

#

That its now too long

sharp owl
#

so i've wanted to get my bot verified for so long

opal plank
#

take some time and re write it

#

or do small steps

sharp owl
#

and this is so dumb because the only part i'm stuck on is "identity verification"

#

the other parts I can fill out fine 😦

restive furnace
#

you need to take photo of your passport or smth

carmine summit
#

Its all full of if(){}else if(){}else{}

restive furnace
#

you can

#

and use modular code kthx

#

thats how you make your code smaller

#

Its all full of if(){}else if(){}else{}
yanderedev?

carmine summit
#

Eh?

restive furnace
#

use switch statements too

carmine summit
#

I dont know swithc statements

restive furnace
#

its basics of JS

#

so you should

sharp owl
#

switch(item) {
}

carmine summit
#

Alright theb i dont know the basicis of js

sharp owl
#

case "something": {

}

forest drift
#

does anyone know how Heroku works? Ive been trying for hours and have given up

carmine summit
#

case "something": {

}
@sharp owl im trying to avoid case because i dont understand it

#

And it gives plenty of error

restive furnace
#

case "something": {

}
better practice: ```js
let thing = "test";

switch(thing)
{
case "test":
console.log("switch found 'test'");
break;

default:
console.log("switch didnt find 'test' in the string");
break;
}

#

also dont copy paste

#

thats why it gives plenty of errors

carmine summit
#

Then itl be more bulky than my codes

restive furnace
#

just dont copy paste, its bad practice

carmine summit
#

If i use codes itl be more bulky

#

Cuz every if statement is unque

delicate shore
#

I really need someone

#

to help em

#

me

#

i just bought galaxy gate VPS

faint prism
#

Go on

restive furnace
#

dont ask to ask

delicate shore
#

but i have no idea what to do next

faint prism
#

Host the bot on it

restive furnace
#

ssh root@ip in ur cmd line ok then

faint prism
#

That's backwards

heavy anchor
#

I think that’s backwards

faint prism
#

Lmao

delicate shore
#

someone said to install filezilla

faint prism
#

yeah if you want. Or git clone the project

delicate shore
#

ok so

#

now i need to enter

#

my databse name ?

#

and pswrd

faint prism
#

Uh

#

The vps login for ssh

delicate shore
#

here

honest perch
#

ok so i have a 60 char mongo password as the gen didnt go any higher

#

now this

restive furnace
#

use sftp btw

faint prism
#

You can use sftp to connect with the same credentials as ssh

delicate shore
#

i have no idea what are you guys saying

#

Can you pls tell me from basics

restive furnace
#

host = ip, username = same as ssh, password = same as ssh, port = 22

delicate shore
#

ip of my vps

#

or mine

restive furnace
#

vps ofc

delicate shore
#

i am using debian

#

just fyk

restive furnace
#

yeah it doesnt matter

#

you can use any linux what does use ssh

delicate shore
#

everyone said linux unstable

steep marsh
#

;-;

solemn latch
#

Linux is generally extremely stable.
Debian, ubuntu, your favorite websites all use Linux 99% of the time to serve you data

tender cargo
#

Can someone help with music player bot I am writing

restive furnace
#

windows is unstable on server side tbh

tender cargo
restive furnace
#

uses 3/4 of ur ram too

tender cargo
#

true

#

anyone helping_

#

?

restive furnace
#

Linux is generally extremely stable.
Debian, ubuntu, your favorite websites all use Linux 99% of the time to serve you data
I like Fedora, RHEL & Arch, but yeah, it is personal choice :p.

delicate shore
#

ok so

#

i tried

#

it gives error

restive furnace
#

what

#

error

tender cargo
#

bruh

#

no one?

solemn latch
#

GG sends you an email with the info

delicate shore
tender cargo
#

plesss

restive furnace
#

wrong pswd/username

#

anyone helping_
bE pAtIeNt

solemn latch
#

root is your user
Galaxygate sent you an email with the password

#

Double check your using the correct ip, also sent in the email.

delicate shore
restive furnace
#

ok now u can post ur files there

solemn latch
#

Ay

restive furnace
#

and tjhen make ssh connection and start the bot

delicate shore
#

ok now u can post ur files there
@restive furnace from my pc?

restive furnace
#

yes

pale vessel
#

yes

tender cargo
#

hey everyon

delicate shore
#

including node modules file

restive furnace
#

dont transfer node modules

delicate shore
#

ok

near ether
#

i made an eval command that uses the sharding manager's existing broadcastEval; but how can i make it eval asynchronously?

restive furnace
#

await

#

(async() => {})();

near ether
#

so like this?
manager.bcEval((async() => {myCodeHere})();

restive furnace
#

yep

#

expect

pale vessel
#

inside a string

restive furnace
#

^

near ether
#

oh yea that too

delicate shore
#

how to install packages

near ether
#

thanks

delicate shore
#

in my vps

pale vessel
#

install nodejs

#

and then you can use npm

restive furnace
#

^ and npm install

pale vessel
#

just npm i and it'll check your package.json

delicate shore
#

install nodejs
@pale vessel i wanna ask where is terminal

pale vessel
#

ssh to it

restive furnace
#

ssh root@ip

pale vessel
#

use putty or something

delicate shore
#

first let me transfer my files to that

#

then i will come bacl

#

do i need to transfer everything

#

in root?

restive furnace
#

no

#

home/root and optiomally mkdir whatever && cd whatever

delicate shore
#

is @solemn latch here

#

ok he's gone

fringe axle
#

How can I send a message to a specified channel id?

#

Without cache

#

@ me if you know.

misty sigil
#

You need to do the funny cache stuff afaik

#

well you dont need to

cinder patio
#

you'd have to fetch the channel, but I guess that also involves cache

misty sigil
#

not fetching it

#

fetching it makes a req to the api

fringe axle
#

:O

misty sigil
#

but that might get you ratelimited

cinder patio
#

You could make the HTTP request to send to the channel yourself

fringe axle
#

client.channels.cache.get("744906283756290048").send(banEmbed); I used this but it's with cache

misty sigil
#

whats wrong with it?

#

all channels are cached by default in d.js anyways

#

(unless you're using discord.js-light)

fringe axle
cinder patio
#

Check your discord.js version

fringe axle
#

v12

delicate shore
#

home/root and optiomally mkdir whatever && cd whatever
@restive furnace
NGL I'm not getting anything
It just looks like I wasted 3$

misty sigil
#

it isn't hard

#

I'll help

#

Do you have a FTP program?

restive furnace
#

^

delicate shore
#

😃

#

FTP yes I do

cinder patio
#

There's no way cache can be undefined if you are using v12+

misty sigil
#

Are you connected?

delicate shore
#

Yes I am

misty sigil
#

You can just drag files across into root

delicate shore
#

All the files into root only ?

misty sigil
#

no

#

into a folder

#

in root

delicate shore
#

So I drag and drop full folder

#

I have my bot code in folder called Blacksheep

#

So should I drag whole folder

#

In root

#

Except node modules

misty sigil
#

Yea

#

Do you have node on the VPS?

delicate shore
#

No

#

That what I am having trouble with mainly

misty sigil
#

Ah. I was the same too.

delicate shore
#

XD

misty sigil
#

I think that you can just apt-get install nvm

#

idk

#

lemme look it up acc

restive furnace
#

node

#

but i recommend nvm, even its might be complicated for beginners

quartz kindle
#

apt will usually give you an outdated version of node

#

thats why nvm is recommended

misty sigil
#

oh yea it does

zenith terrace
#

Nevermind is recommended?

quartz kindle
#

:^)

royal ore
#

hey anyone here?

#

i need help

#

Error: read ECONNRESET

#

i used randompuppy

#

for meme command

#

and this error came

#

pls help

#

if u reply pls ping me

zenith terrace
#

Not giving us much to help you

delicate shore
#

@misty sigil I'm back

misty sigil
#

Did you install nvm?

delicate shore
#

no

#

what is it?

misty sigil
#

It's node version manager

delicate shore
#

do i need to download it

misty sigil
#

allows you to install different versions of node

delicate shore
#

from somewhere

misty sigil
#

apt-get install nvm works iirc

delicate shore
#

no

#

where do i need to run

#

this command

misty sigil
#

in the ssh

delicate shore
#

here somewhere?

misty sigil
#

thats ftp

#

not ssh

earnest phoenix
#

bruh

delicate shore
#

how do i use ssh

earnest phoenix
#

open command prompt and do ssh root@ip

delicate shore
#

oh ok

#

now ?

earnest phoenix
#

do ls

#

check if your files are there

delicate shore
earnest phoenix
#

bruh

delicate shore
#

don't bruh on me

earnest phoenix
#

bruh

delicate shore
#

as i said i am new

#

to this

misty sigil
#

are you sure they transferreD?

delicate shore
#

If you wanna help then do,
I am not forcing you
Just don't bruh on me

#

are you sure they transferreD?
My files are being downloaded

#

from glitch

misty sigil
#

you need to put them on the vps

#

using ftp

delicate shore
#

what is happening

#

all is going in root

misty sigil
#

its still transferring

delicate shore
#

idk why

heavy anchor
#

I like CyberDuck

topaz fjord
#

it says at the bottom it's still transferring

delicate shore
#

all is going in root

heavy anchor
#

It's simple and gets the job done

delicate shore
#

i thought it is not meant

#

to go in root folder

misty sigil
#

its going into /root/app

delicate shore
#

yes

pale vessel
#

but that's where you are

topaz fjord
#

the home folder for root user is /root

delicate shore
#

It's taking so much time

#

it is just 64 mb

#

;-;

earnest phoenix
#

cause that directory doesnt exist

delicate shore
#

so

#

it will create it?

earnest phoenix
#

you are trying to move some files to a server?

delicate shore
#

yes

earnest phoenix
#

just ftp into the server using the commandline

#

and mput all the files

delicate shore
#

i am

#

so much time

earnest phoenix
#

no youre not, youre using a ftp client loll

#

use winscp

#

much better

delicate shore
#

FileZilla FTP

valid frigate
#

doesnt matter

#

probably has to do with your internet

delicate shore
#

probably has to do with your internet
@valid frigate yea it's shit rn

valid frigate
#

yeah then just wait

delicate shore
#

;-;

earnest phoenix
#

dont wait

#

exit it

delicate shore
#

no

earnest phoenix
#

trust me

valid frigate
#

no its probably better to wait

#

your internet speed is out of your control rn

#

unless some retard on ur network is downloading a huge zip

delicate shore
#

yes

#

i am

#

downloading

cinder patio
#

mmm... does that include your node modules folder?

delicate shore
#

fortnite new update

#

mmm... does that include your node modules folder?
@cinder patio no

cinder patio
#

okay good

opaque seal
#

There is a bug in my code that's driving me crazy and I can't understand what the actual fuck is wrong with my code, if someone is used to discord.js please help me

earnest phoenix
#

@delicate shore open cmd and ftp to the server ip

#

or sftp

valid frigate
#

thats what filezilla does internally

#

bruh

restive furnace
#

its just bcs his downlaoding fortnite update

earnest phoenix
#

not true

restive furnace
#

its big

valid frigate
#

aight well all you can do is wait

delicate shore
#

4 gb

restive furnace
#

you could pause the downloading tho

valid frigate
#

the fuck

delicate shore
#

and my parents watching amazon prime

#

So my net shit and me wait

valid frigate
#

its working

delicate shore
#

it's literally stuck at 53.1MIB

earnest phoenix
#

best option would be to use the server to ftp to ur local machine and mget the files

opaque seal
#

There is a bug in my code that's driving me crazy and I can't understand what the actual fuck is wrong with my code, if someone is used to discord.js please help me
I will need to stream my code on discord, cause it's on different files, dm me if you feel like helping me

restive furnace
#

best option is to git pull

#

since it uses vps network

#

and which is probably faster

misty sigil
#

I will need to stream my code on discord, cause it's on different files, dm me if you feel like helping me
@opaque seal What is the error

#

also use pastebin

earnest phoenix
#

@opaque seal just explain the issue here

opaque seal
#

Its pretty long to explain, and I get no errors, I can try but it would be a lot easier streaming it

earnest phoenix
#

then provied screenshots if needed

forest token
#

Hi, do you know how to turn a Minecraft API Webpage into a temporary json file?

misty sigil
#

no point

#

i'd just store it in memory

forest token
#

I wanted to do a command that gives you someone's uuid

delicate shore
#

What the f

restive furnace
#

just store it ib memory

delicate shore
#

i cancelled fortnite update

#

but now speed is more slow

opaque seal
#

Basically I have a value in a database called autochat, that's initially set to false. I can change its value with this command https://hastebin.com/ocijenuqiv.js
My bot creates temporary voice channels and it will check for that value to see if it has to create a text chat too, this is the part of the code that does that https://hastebin.com/falavafive.js

When the autochat variable in the database is set to true everything works fine, but when it's false instead it just doesn't save the 'vcs' to the database
@earnest phoenix

valid frigate
#

its your internet bruh

delicate shore
#

its your internet bruh
@valid frigate 100 mb/s

valid frigate
#

its your vps bruh

#

bet

restive furnace
#

run speedtest in the vps too

delicate shore
#

is it possible

forest token
#

just store it ib memory
But if I do that, I'll have to copy every user's uuid

topaz fjord
#

if it's a problem with the vps ask in the gg server for help about it

misty sigil
#

const { uuid } = fetch(uuid)

#

or something

#

that stores it in memory

opaque seal
#

Basically I have a value in a database called autochat, that's initially set to false. I can change its value with this command https://hastebin.com/ocijenuqiv.js
My bot creates temporary voice channels and it will check for that value to see if it has to create a text chat too, this is the part of the code that does that https://hastebin.com/falavafive.js

When the autochat variable in the database is set to true everything works fine, but when it's false instead it just doesn't save the 'vcs' to the database
@earnest phoenix
Basically when I remove the if(generators[genIndex].autochat){} everythings works

restive furnace
#

is it possible
@delicate shore it is

forest token
#

I mean a command like uuid An_user_name, and it gives An_user_name's uuid

delicate shore
#

@delicate shore it is
@restive furnace how

restive furnace
#

google

#

cuz idk

delicate shore
#

the fuck

#

is wrong

earnest phoenix
#

@opaque seal do you have a screenshot of the runtime error that got thrown in the exception handler

opaque seal
#

It doesn't throw any error that's the issue

#

makes no sense

delicate shore
#

fuck

earnest phoenix
#

well in ur code, you are nullchecking it, but youre not handling anything if the condition is false

#

start from there

opaque seal
#

Why would I need to handle that

earnest phoenix
#

isnt it obv tho, ur db value can be both true or false

opaque seal
#

yeah but I need to do stuf only if that value itìs true

earnest phoenix
#

then i hounestly dont see the issue

opaque seal
#

me neither

#

and it's driving me nuts

pure lion
#

@delicate shore what's up?

earnest phoenix
#

you wanan save vcs to the database even if its set to false?

delicate shore
#

@delicate shore what's up?
@pure lion nothing much

#

fucking myself

#

shifting to galaxy gate

pure lion
#

What is the issue

#

Oh

#

Dm me

delicate shore
#

looks like I am hacking

pure lion
#

I need a user and an IP

#

If you need help with setup

delicate shore
#

i will contact you if i need

#

currently my net is shit

pure lion
#

:() okay

delicate shore
#

and it's taking over 2 hrs

#

for 60 mb

pure lion
#

Maybe contact galaxy gate

opaque seal
#

you wanan save vcs to the database even if its set to false?
@earnest phoenix basically I create the temporary voice channel and if that value is true I also create a text chat

pure lion
#

Also why not oxide.host?

delicate shore
#

oxide

#

everyone said

#

galazy fate

#

galaxy gate

pure lion
#

Oxide is far better

delicate shore
#

oxide price was more

pure lion
#

Twice the ram for like 15% more

delicate shore
#

or less

#

Twice the ram for like 15% more
@pure lion i really don't need that much ram

#

1 gb ram

#

is fine i g

fluid basin
#

yikes

#

slow

delicate shore
#

yes

fluid basin
#

oxide stinky ovh reseller

delicate shore
#

is oxide better

#

than GG

#

@delicate shore they are both good, but gg is known to be faster
@golden condor

fluid basin
#

well oxide is reselling from what I see

golden condor
#

h

#

they are both good

misty sigil
#

oxide's alright

#

got good customer support

delicate shore
#

they are both good
@golden condor i took it as u said , but gg is known to be faster

golden condor
#

They are both good

misty sigil
#

got GREAT customer support actually

golden condor
#

Oxide is cheaper

#

Gg is faster

opaque seal
#

@earnest phoenix I guess I'll drop that feature lmao

fluid basin
#

gg is closer to discord's gateway

delicate shore
#

oh ok

misty sigil
#

Oxide comes close

golden condor
#

But oxide has great customer support as Matt says

earnest phoenix
delicate shore
#

I mean i can get support here from you guya

misty sigil
#

Montreal, Canada to be precise

golden condor
#

Also discord has servers areound the world

#

So.....

misty sigil
#

I mean i can get support here from you guya
@delicate shore we can't help on vps side

cinder sandal
#

How to make arguments without commas
discord.js
@cinder sandal

earnest phoenix
#

what

delicate shore
#

@delicate shore we can't help on vps side
@misty sigil like?

misty sigil
#

nicholas can

#

if you request they can help

#

more indepth than we can

fluid basin
#

actually idk if oxide is reselling

delicate shore
#

ok

fluid basin
#

but their locations seem really irky

golden condor
#

Oxide is good

delicate shore
#

why is every dedicated server atleast 100$/month

golden condor
#

Fairly

fluid basin
#

they're located in the UK

cinder sandal
#

how to make arguments WITHOUT commas
join(" ") doesn't work

delicate shore
#

isn't there any cheaper

golden condor
#

Because it's a dedi

fluid basin
#

but their servers are in france and canada

delicate shore
#

@golden condor what do u use

golden condor
#

It's gonna be expensive

#

Contabo

delicate shore
#

ok

cinder sandal
#

e

misty sigil
#

why is every dedicated server atleast 100$/month
@delicate shore not all

earnest phoenix
#

@cinder sandal wdym

misty sigil
#

have you seen oneprovider's dedis?

fluid basin
#

scaleway used to be super cheap

delicate shore
#

no?

fluid basin
#

but now its wtf

earnest phoenix
#

yeah scaleway upped their prices

golden condor
#

Vpses are vms, dedis are full machines, that's why.

fluid basin
#

dedis definitely outperforms vps

#

hands down on that

cinder sandal
#

@cinder sandal wdym
@earnest phoenix my arguments are just arg1,arg2
i want them to be arg1 arg2
.join(" ") doesn't fix it

misty sigil
#

LuL

#

not all

fluid basin
#

yeah unless your provider is trash

misty sigil
fluid basin
#

bruh

#

my rpi is a dedi

#

fight me

golden condor
#

Oxide isn't that bad

opaque seal
misty sigil
#

idk LUL

fluid basin
#

whats wrong with hdd

misty sigil
#

slow

golden condor
#

They have great support and great plans and are fairly chea0

opaque seal
#

I mean...

fluid basin
#

but intel atom though bloblul

cinder sandal
#

my question is still unanswered

delicate shore
#

it is still taking so long 😢

earnest phoenix
#

your question doesn't make sense

fluid basin
#

whats taking long

delicate shore
#

everyone knows

#

who were here

#

earlier

#

it does like 1 mb per min

cinder sandal
#

even .join(" ") doesn't work

why

fluid basin
#

lol

#

your isp slow

dire obsidian
#

guys any way to access domain email?

fluid basin
#

you need a domain email host or domain email server

#

if your domain comes with web hosting from the place you bought/obtained it

#

they should include a free email service

dire obsidian
#

let me see

delicate shore
#

get free domain

#

freenom

dire obsidian
#

i allready have it

delicate shore
#

but not hosting

dire obsidian
#

CENSORED.ga

delicate shore
#

then use netifly

#

or cloudfare

dire obsidian
#

hosted on github pages

#

also i add cloudfare yesterday

delicate shore
#

@misty sigil are u here for next 40 mins

misty sigil
#

no

delicate shore
#

till when u are

#

can u tell me next steps

#

after file uploaded

fluid basin
#

if you're using freenom, they only provide the domain, no webhosting etc (unless you purchased it of course)

#

so you either have you host your own email servers (on a vps), or use a email service

#

neither is free so yuh

delicate shore
#

glitch won't work

#

this time

dire obsidian
#

yee yee

fluid basin
#

also some vps providers do not allow outgoing email, so just check to be sure

delicate shore
#

apt-get install nvm

fluid basin
#

(if you're going to host your own email servers)

delicate shore
#

how to do so

fluid basin
#

do what

dire obsidian
#

github dont support email right?

delicate shore
fluid basin
#

nope

#

so far I only know 2 options if you want a custom domain email

#

and they are the 2 described above

dire obsidian
#

anyways, if you want contact me, just dm me ¯_(ツ)_/¯

#

or simply add my gmail

median hare
#

When will random people be able to use my bot?!?! I cant post this int the faq cuz i dont have the permissions sry

delicate shore
#

why would we want to contact you

#

When will random people be able to use my bot?!?! I cant post this int the faq cuz i dont jave the permissions sry
@median hare what the-

silk heron
#

Boa tarde Como traduzir as conversas

fluid basin
#

english only please

median hare
#

Ye

delicate shore
median hare
#

Can some1 help me

cinder sandal
#

ah

delicate shore
#

for other

#

kangyages

#

languages

fluid basin
#

gosh, only when your bot is approved people can see it in this server

#

end of story

cinder sandal
#

.split(' ') doesn't even work, i want arguments with spaces not those commas

slender thistle
#

Is there any way to say search for either ' OR ", not both in regex?

For example: I want to find "test" or 'test' but not 'test"

delicate shore
#

no

cinder sandal
#

.split(" ")
@delicate shore same thing, splitts by commas

delicate shore
#

i was wrong

#

wait

#

just do .split().join(" ")

fluid basin
#

@slender thistle what are the constraints?

#

only alphabetical/alphanumberic or something else

delicate shore
#

apt-get install nvm

fluid basin
#

how about a mix?

#

"test'test"

dire obsidian
#

"test", "test"

slender thistle
#

I'm somewhat confident I wouldn't fuck it up that bad 🤔
Constraint? Just anything, I guess

#

Actually, I think I found an interesting way to keep my thing up-to-date

fluid basin
#

hmm

#

regex is really dependent on your use case

delicate shore
slender thistle
#

I mean, my text just happens to be a version number

fluid basin
#

wait why would there be quotation marks then

slender thistle
#

"0.1.4", '0.0.1', that kind of crap

fluid basin
#

ah ok I see

#

then thats easy

slender thistle
#

I mean, I have the option of using a namedtuple and then getting its properties

#

But... eh 🤔

fluid basin
#

/^("[0-9.]+"|'[0-9.]+')$/

#

lets break that down

slender thistle
#

spoonfeed KEKW

#

Nah it's fine

fluid basin
#

well as long as you get it

slender thistle
#

I can see what it does, for the most part

fluid basin
#

its hard to explain regex

cinder sandal
#

@delicate shore throws me an error while adding .join
args.shift is not a function

slender thistle
#

I bet

warm marsh
#

shift is a method of arrays

#

not strings

slender thistle
#

It's kinda hard to understand it properly yourself imo

cinder sandal
#

so

warm marsh
#

Don't add .join?

cinder sandal
#

no arguments splitted by spaces...

warm marsh
#

?

cinder sandal
#

this is impossible to make them

warm marsh
#

Splitting args by spaces?

cinder sandal
#

yes

warm marsh
#

string.split(/\s+/)

fluid basin
slender thistle
#

Hey, I just opened that website KEKW

#

that's actually neat

fluid basin
#

owo

slender thistle
#

just need to allow for optional characters at the end and we're all good

#

thanks btw teehee

fluid basin
#

np

cinder sandal
#

string.split(/\s+/)
@warm marsh tried, still splits by commas

fluid basin
#

show us your code then

warm marsh
#

Using /\s+/ shouldn't split via commas.

fluid basin
#

if this doesn't solve your problem, the issue does not lie here, but somewhere else in your code

cinder sandal
#
if (message.author.bot) return;
  // prefix
  if (message.content.indexOf(process.env.PREFIX) !== 0) return;

  // command handler or something 
  const args = message.content.slice(process.env.PREFIX.length).trim().split(/\s+/)
  const command = args.shift().toLowerCase();```
fluid basin
#

and what is the message that you trigger the bot with?

cinder sandal
#

<say arguments

fluid basin
#

and?

#

what should the output be?

cinder sandal
#
message.channel.send(`${args}\n - ${message.author}`)```
fluid basin
#

lol

#

did you even join

#

${args.join(' ')}

#

not ${args}

cinder sandal
#

oh

fluid basin
#

bruh

cinder sandal
#

i will try rn
i type so fast that i make typos

restive furnace
#

dont type so fast

cinder sandal
#

@fluid basin tysm it works

fluid basin
#

np

acoustic bridge
#
global voice
    channel = ctx.message.author.voice.channel
    voice = get(client.voice_clients, guild=ctx.guild)


    if voice and voice.is_connected():
        await voice.move_to(channel)

    else:
        voice = await channel.connect()

I'm looking for the opposite of connecting. For example if someone tries a voice channel command (such as play) and the user is not connected the bot should throw an error

#

example: "You are not connected to a voice channel!"

grizzled raven
#

@slender thistle i know i'm late but hey you can group the first quote and reference it

slender thistle
#

Got an example handy?

grizzled raven
#

("|')[whatever]\1

slender thistle
#

🤔

#

that's new

delicate shore
#

Fuck

#

It still says one hour left

#

To upload my code with ftp

#

On VPS

#

But only 20MIB

grizzled raven
#

but if you use groups randomly like i used to then that might be messing things up

slender thistle
#

... yeah, I'll probably just use the way willi gave me

sudden geyser
#

@acoustic bridge check if ctx.message.author.voice is equal to None

grizzled raven
#

okay sure

slender thistle
#

a little bit modified to, well, ([\']([^\']*)[\']$|[\"]([^\"]*)[\"]$)

sonic lodge
#

whoa

grizzled raven
#

lol what

delicate shore
#

@grizzled raven just unboost

grizzled raven
#

i have to wait 7 days but that's off topic

sonic lodge
#

@slender thistle you should use backreferencing

slender thistle
#

I don't really need to sanitize the input inside the string, so I'm just going the get first '|", get the content before the next '|", and then get the last '|" way

#

Is there a pro to using backreferencing?

grizzled raven
#

well if it works it works, i'd just do my way as it's probably easier to understand lmao

slender thistle
#

it's very well easier to read

sonic lodge
grizzled raven
slender thistle
#

if only this shit worked with Python now

sonic lodge
#

great news

slender thistle
#

regex101 isn't helping me 😂

acoustic bridge
#

@acoustic bridge check if ctx.message.author.voice is equal to None
@sudden geyser That didn't work. Remains the same error

cinder sandal
#

i want to make a reason thing for my warn command, the reason incluxdes the user mention, how do i remove it?

sonic lodge
#

wdym it isn't helping you

slender thistle
#

Just not finding my string but I can fix that myself

cinder sandal
#

i want to make a reason thing for my warn command, the reason incluxdes the user mention, how do i remove it?
@cinder sandal

slender thistle
#

thanks for the advice ThumbsUp

zenith terrace
#

person above likes unflipping tables

#

fuk

#

this is development

#

I need to read channels better

sudden geyser
#

That didn't work. Remains the same error
@acoustic bridge what did you try? Can you share some of your code

acoustic bridge
#
global voice
    channel = ctx.message.author.voice.channel
    voice = get(client.voice_clients, guild=ctx.guild)


    if voice and voice.is_connected():
        await voice.move_to(channel)

    else:
        voice = await channel.connect()

    if ctx.message.author.voice is None:
        await ctx.send("You are not connected to a Voice Channel!")
safe kelp
#

Use before else

#

By using elif

sudden geyser
#

You need to do it before where you define channel

#

as there's a possibility ctx.message.author.voice.channel throws an error since .voice is an optional