#development

1 messages · Page 1363 of 1

young flame
#

which i didn't i just gave an example of what i had so you can see where you messed up

ionic dawn
young flame
#

ok?

rocky hearth
#

can I use promises in Array.map

pale vessel
#

what do you mean?

#

you can resolve the promise first and assuming it's an array/collection, you can map it afterwards

rocky hearth
#

I mean I don't want to iterate over if the current function has not completed

steel drum
#

map the array after the promise is resolved like flaze said

rocky hearth
#

I dont want to iterate over my array twice, so I'll use for await (const datum of data)

pale vessel
#

you're not iterating it twice

pale sapphire
#

I maded a covid bot

#

It has all countries

#

Hehe

ionic dawn
#

Lé API

rocky hearth
#

@pale vessel Actually I wanted to do something like this.

emojies.map(async emoji => await msg.react(emoji));
#

will be it sync or async?

pale vessel
#

sync

#

async won't work on map and forEach

#

you need to use a for loop

ionic dawn
#

is OAuth easy?, I mean i'll start with a dashboard soon and I never read about it

pale vessel
#

yes

slender thistle
#

It's not exactly hard

drowsy raven
#

Who knows how to do my bot to detect if a message has a image? AndriusZoom

pale vessel
#

check the message.attachments property

harsh blade
drowsy raven
#

Ty

earnest phoenix
#

@rocky hearth You can basically map it then use Promise.all()

#
await Promise.all(emojis.map(emoji => msg.react(emoji)));```
solemn jolt
#
message.author.presence.game.name

Why this code is error in name

earnest phoenix
#

Because that code is deprecated which belongs to v11

solemn jolt
#

How i can change to v12

earnest phoenix
#

Which version of discord.js are you currently using

solemn jolt
#

V12

#

12.4.0

earnest phoenix
#

<User>.presence.activities returns an array of activities, Iterate through them and show all one by one

solemn jolt
#

Ok

#

Thank you

earnest phoenix
#

Np

harsh blade
earnest phoenix
#

Does that happen on startup or

harsh blade
#

Startup

earnest phoenix
#

What version of d.js are you willing to use?

harsh blade
#

Any

earnest phoenix
#

But i see discord.js@11.5.1 which is not maintained anymore

harsh blade
#

oh wth

earnest phoenix
#

Do npm i discord.js@latest

harsh blade
#

Commands dont work on the console for some reasin

earnest phoenix
#

How they not work exactly

harsh blade
#

no output and dosent change anything

#

Basically just plain text

earnest phoenix
#

Did the bot even start up?

harsh blade
#

Bootloop

#

but was working earlier

earnest phoenix
#

Show me your console

harsh blade
earnest phoenix
#

Do node -v

#

What's the output

harsh blade
earnest phoenix
#

Exit the process first

harsh blade
#

how

earnest phoenix
#

Ctrl + C

harsh blade
#

its not a terminal

#

its ptero panel

earnest phoenix
#

Then just click the button where it force stops the session or whatever the button is called

#

There must be a button for it

harsh blade
#

the "stop" button?

earnest phoenix
#

¯\_(ツ)_/¯

harsh blade
earnest phoenix
#

Now run it

#

The command line i said

harsh blade
#

No output

ebon mango
#

(node:8064) UnhandledPromiseRejectionWarning: DiscordAPIError: Unknown Message
at RequestHandler.execute (Z:\IR ELITE V.4.6\node_modules\discord.js\src\rest\RequestHandler.js:154:13)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async RequestHandler.push (Z:\IR ELITE V.4.6\node_modules\discord.js\src\rest\RequestHandler.js:39:14)
(Use node --trace-warnings ... to show where the warning was created)

what its error

waxen cloak
#

Error: The server is not an instance of http.Server

#

can someone please help me

harsh blade
#

The command line i said
@earnest phoenix i cant run any commands

#

is there a manual way to do it

near stratus
#

How do I get total number of channels in a server ?
(I'm using discord.js)

open flicker
#

Hello, does Mongodb have a function to add a line to all documents in the collection?

pale vessel
#

@near stratus <Guild>.channels.cache.size

#

channels.cache is a collection of cached channels of the guild

#

you can use Map.size to get the size/length of the collection

near stratus
#

Thanks @pale vessel

#

Lemme try it

harsh blade
#

Any ideas? i dont have root access so i cant run any terminal commands, only file access

sick fable
#

Alright , I coded a command which opens a ticket but I want only the one who reacted on ticket to access that channel. But there's an error that Is the one who reacted on the emoji to open a ticket can't see the channel.

#

Sending code

#

It's two paragraphs

#
async def ticketcreate(ctx):
	embed = discord.Embed(title = "Hey! Create a Ticket by reacting below!" , colour = ctx.author.colour)
	message = await ctx.send(embed=embed)
	embed = await message.add_reaction("🎫")
	
	
@client.event
async def on_raw_reaction_add(payload):
    author = ctx.author
    guild_id = payload.guild_id
    guild = client.get_guild(guild_id)
    user = payload.user_id
    emoji = payload.emoji.name  
    if emoji == "🎫":
        overwrites = {
            guild.default_role: discord.PermissionOverwrite(read_messages=False),guild.author: discord.PermissionOverwrite(read_messages=True, send_messages=True)
        }
        ticket = ctx.author.nMs
        await guild.create_text_channel(f'ticket-{ticket}' , overwrites=overwrites)```
waxen cloak
#

Error: listen EADDRINUSE: address already in use :::5000

#

why hostname is not getting used

#

its taking 0.0.0.0

#

😦

quartz kindle
#

thats hardcoded

#

it doesnt do ip discovery

waxen cloak
#

how to change it?

tribal siren
#

is this python

#

nah, just asking

quartz kindle
#

@waxen cloak you dont change it, you just ignore it and write your own ip address and it will work

waxen cloak
#

where to pass my IP

harsh blade
#

How can i make new line

earnest phoenix
#

wrong kind of a slash

#

hi

#

the opposite way, \

harsh blade
#

Oh

#

Thanks

waxen cloak
#

@quartz kindle

quartz kindle
#

@waxen cloak not there

#

you put your ip instead of 0.0.0.0 wherever you want to use this webhook

#

for example in the top.gg webhook settings of your bot

waxen cloak
#

@quartz kindle but i am getting this in the logs

fluid basin
#

make sure nothing else is running on the same port

#

check if you still have another instance of the bot running

harsh blade
#

My bot dosent understand emotes in roles, is there any way to fix it?

waxen cloak
#

can it be because of the shards?

harsh blade
fluid basin
#

@waxen cloak yeah that might be the case

#

you will need to run it on the master node

#

or one shard only

waxen cloak
#

ok

#

let me try

#

thanks

fluid basin
#

then redirect the vote using ipc to other shards if they need to use it

quartz kindle
#

@harsh blade the problem is not emotes

#

the guild owner is not cached, you need to fetch it

harsh blade
#

Oh?

#

How do i do that? im new to developing bots n stuff

quartz kindle
#
let owner = await message.guild.members.fetch(message.guild.ownerID);
console.log(owner.roles)
harsh blade
#

i have to add that but where?

quartz kindle
#

instead of guild.owner.roles

harsh blade
#

im not using that

#

@quartz kindle

quartz kindle
#

then what are you using

harsh blade
#

can i send you the code?

waxen cloak
#

@fluid basin @quartz kindle i am creating webhook in my ready.js i think its on main node only no?

quartz kindle
#

@waxen cloak you need to go to your top.gg bot edit page and configure the webhook there

waxen cloak
#

yes i have done that

#

but i my logs i see this

quartz kindle
harsh blade
#

its line 10

quartz kindle
#

ah so the problem is message.member being null

earnest phoenix
#

Good morning I am passing an old code that I have to silence to a new version of discord js, when writing the command it fails and this error occurs: TypeError [INVALID_TYPE]: Supplied overwrites is not an Array or Collection of Permission Overwrites.🥀

#

its line 10
@harsh blade in new version is let role = message.guild.roles.cache.find

quartz kindle
#

so you need to do await message.guild.members.fetch(message.author.id)
before using message.member

harsh blade
#

so uh, i insert that in fron of line 10?

quartz kindle
#

wherever as long as its before any line that uses message.member

#

also, see what spaguetti said

harsh blade
#

@harsh blade in new version is let role = message.guild.roles.cache.find
@earnest phoenix Aight

quartz kindle
#

unless you're still using v11

earnest phoenix
#

@earnest phoenix Aight
@harsh blade that error happened to me today, I fixed it by putting the .cache

harsh blade
#

await message.guild.members.fetch(message.author.id)
Isnt there anything infront? like let =

solemn jolt
#

What sheft and unsheft doing in js

quartz kindle
#

no need, but you can if you prefer

#

for example

#
await message.guild.members.fetch(message.author.id);
console.log(message.member)

or

let member = await message.guild.members.fetch(message.author.id);
console.log(member)
earnest phoenix
#

mm

quartz kindle
#

client.user.displayAvatarURL()

fluid basin
#

Error: client does not have property displayAvatarURL

#

did you even read the error

pale vessel
#

no

fluid basin
quartz kindle
#

shouldnt it be error: displayAvatarURL is not a function?

#

lmao

#

see

fluid basin
#

oh yeah

#

that was for properties

earnest phoenix
#

when

fluid basin
#

lol wot

pale vessel
quartz kindle
#

discord.js v11?

pale vessel
#

how is your bot still working

quartz kindle
#

lmao why are people still using v11

fluid basin
#

a boomer

harsh blade
fluid basin
#

hey tim im using v11

#

nah

quartz kindle
#

@harsh blade if you're still using v11 dont add cache, thats for v12 only

pale vessel
#

WAIT WHAT

earnest phoenix
#

lmao why are people still using v11
XDDD

fluid basin
#

lol selfbots are not allowed fyi

quartz kindle
#

@gray finch you know thats illegal right xddd

pale vessel
#

you got me at the first half willi

fluid basin
pale vessel
#

uh, no

quartz kindle
#

its not allowed

#

thats why they removed it in v12

fluid basin
#

i mean

#

yeah

earnest phoenix
#

I am passing an old code that I have to silence to a new version of discord js, when writing the command it fails and this error occurs: TypeError [INVALID_TYPE]: Supplied overwrites is not an Array or Collection of Permission Overwrites.🥀

fluid basin
#

theres a good reason why they removed it

quartz kindle
#

they didnt remove it from v11 because they dont remve things from old versions

pale vessel
#

is your presence generated by the selfbot too

#

JUST

#

this dude rn

#

i can't

fluid basin
#

lol ok smh

quartz kindle
#

@earnest phoenix overwritePermissions is to replace all overwrites, not a single overwrite for a role or user

#

to update a single overwrite, use updateOverwrite()

earnest phoenix
#

oo

#

thanks

#

message.channel.updateOverwritePermissions??

harsh blade
pale vessel
#

lol

quartz kindle
#

no just .updateOverwrite()

earnest phoenix
#

ok

quartz kindle
#

@harsh blade ah i forgot, in v11 its message.guild.fetchMember

fluid basin
#

damn why is there so many people using v11

quartz kindle
#

lmao idk

#

its like we time traveled

#

what year is this? 2018?

harsh blade
#

Cuz im 11 years old

quartz kindle
#

LOL

#

you know that discord itself is 13+ right?

fluid basin
#

well d.js isnt 11 years old so

harsh blade
#

you know that discord itself is 13+ right?
@quartz kindle Jk im uhh old

earnest phoenix
#

The only thing I don't understand about this change is that I can't create a cache for my bot status to show users

quartz kindle
#

x doubt

pale vessel
#

xd

quartz kindle
#

@earnest phoenix you want to show online users or total number of members in all guilds?

earnest phoenix
#

usernumero

quartz kindle
#

yes thats only online users

earnest phoenix
#

total number of members

quartz kindle
#

the changes that discord made now requires you to enable the "server members" and the "presences" intents in your discord developer portal

#

otherwise you will not receive information about online members

harsh blade
#

Ok so, now it fetches my server info and some other info before giving this error

quartz kindle
#

however you can get a number of total members in all guilds by adding the guild.memberCount property of all guilds

earnest phoenix
#

the changes that discord made now requires you to enable the "server members" and the "presences" intents in your discord developer portal
@quartz kindle I had to open a ticket to discord to activate those two options

quartz kindle
#

@harsh blade what do you have on line 15 now?

harsh blade
#

let hasPermission = role ? message.member.roles.sort((a, b) => b.calculatedPosition - a.calculatedPosition).first().calculatedPosition >= role.calculatedPosition

quartz kindle
#

and you added the await guild.fetchMember before that?

harsh blade
#

and you added the await guild.fetchMember before that?
@quartz kindle Thats line 10

quartz kindle
#

can you show it?

harsh blade
quartz kindle
#

does the member show in the console?

harsh blade
#

Yeah

#

oh wth

#

now it works

quartz kindle
#

its possible that the message.member variable is not updated after fetching the member, not sure since v11 is pretty old

#

so instead of using message.member use member

#

that way it will use the variable you fetched directly, which is a safer option and should always work

#

if it all works you can remove the console.log

earnest phoenix
#

The bot creates a role called new-role but neither changes the name nor removes the permissions, the error is here but I don't know where

#

TypeError: tomute.addRole is not a function

#

I know why it is

pale vessel
#

roles.add in v12

earnest phoenix
#

thanks bro

knotty basin
#

i need help with something

#

do you guys know how to do this

#

or is this on youtube?

#

ello?

halcyon pecan
#

Aaahhhh a chat system

knotty basin
#

help please

halcyon pecan
#

Uhhh I can't

knotty basin
#

oof

#

ok

#

is it on youtube?

quartz kindle
#

its not hard to make something like that

knotty basin
#

how tho

quartz kindle
#

but it can be a bit complex, so it requires some knowledge and logical thinking

knotty basin
#

i just copy things lol

quartz kindle
#

you wont find that to copy

knotty basin
#

do it need discord.js

#

probably always needed

#

i think

#

i .

quartz kindle
#

its not language or library dependent

#

it can be done on whatever library you use

knotty basin
#

k

#

ty

earnest phoenix
#

I have read the documents but nothing helps me, I do not know what is wrong or why, the bot create the role but neither change the name nor do anything with it

#
  let muterole = message.guild.roles.cache.find(r => r.name === "muted")
  if(!muterole){
    try{
      muterole = await message.guild.roles.create({
        data: {
        name: 'muted',
        color: '#000000',
      })
      message.guild.channels.cache.forEach(async (channel, id) => {
        await message.channel.updateOverwrite(muterole, {
      SEND_MESSAGES: false,
      ADD_REACTIONS: false
        })
      })
quartz kindle
#

you're changing the overwrites for the channel where you used the command

#

multiple times

faint stump
#

I need some help
So I write a command and the code look like this:

const flag = require('country-flags-svg')
...
let country = args[0]
        if(!country) return message.channel.send('Please name a country')
        
        let embed = new Discord.MessageEmbed()
        .setColor("RANDOM")
        .setTitle(`Flag of ${country}`)
        .setImage(flag.findFlagUrlByCountryName(country))

And I don't know how to catch an error when I write a wrong country name so my bot can response to that.

sick fable
#

Fuck Js

pale vessel
#

no u

sick fable
#

:c

earnest phoenix
#

you're changing the overwrites for the channel where you used the command
@quartz kindle So do I have to remove the overwrite?

quartz kindle
#

@faint stump what does this return if you use an invalid country? flag.findFlagUrlByCountryName(country)

faint stump
#

No

#

It will respose with a link that contain flag image of that country

pale vessel
#

but it's svg

faint stump
#

Yea

quartz kindle
#

@earnest phoenix lets say you have 30 channels in your guild
with that code, you are editing the overwrites for the channel where you used the command in, 30 times. instead of editing the overwrites of each channel in your guild once

#

@faint stump yes but what does it return if you give it an invalid country

faint stump
#

I dont know yet, it just give me error in log box

quartz kindle
#

for example what happens if you do console.log(flag.findFlagUrlByCountryName("bla"))

#

what is the error?

faint stump
#
(node:13000) UnhandledPromiseRejectionWarning: DiscordAPIError: Cannot send an empty message
    at RequestHandler.execute (F:\DiscordBot\node_modules\discord.js\src\rest\RequestHandler.js:170:25)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:13000) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a
promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:13000) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
#

An error

earnest phoenix
#

@earnest phoenix lets say you have 30 channels in your guild
with that code, you are editing the overwrites for the channel where you used the command in, 30 times. instead of editing the overwrites of each channel in your guild once
@quartz kindle And how do I make him do it just once

quartz kindle
#

and that error only happens if you give it an invalid country?

faint stump
#

Yes

quartz kindle
#

if the country is correct, it works?

faint stump
#

Yes x2

quartz kindle
#

console.log it

#

see what it gives you

faint stump
#

Ok

quartz kindle
#

@earnest phoenix its just logic, check your code again

earnest phoenix
#

okokok

faint stump
#

Hold on a second

quartz kindle
#

instead of using each channel of the guild, you're doing everything to message.channel

#

message.channel is always the same channel, the channel where you used the command in

faint stump
#

When I write a correct country name, example Vietnam, it log this https://upload.wikimedia.org/wikipedia/commons/2/21/Flag_of_Vietnam.svg

quartz kindle
#

and when you write a wrong country name it logs what?

faint stump
#

Nothing

quartz kindle
#

undefined?

earnest phoenix
#

Hello does anyone know any good and free place to host bot ?

faint stump
#

But when I change from console.log to message.channel.send, it log error

quartz kindle
#

so you can probably do something like this ```js
let url = flag.findFlagUrlByCountryName(country);
if(!url) return message.channel.send("invalid country")

#

@earnest phoenix good and free do not exist unfortunately, you have to chose one or the other

faint stump
#

Oh

quartz kindle
#

the best free option i know of is google compute engine, but it requires a credit card to create an account

faint stump
#

Let me try

quartz kindle
#

amazon also gives you a free vps but only for 12 months

#

and then there is stuff like repl.it and heroku, which work well but dont allow your bot to be online 24/7, it will be offline a few hours per month probably

#

an actual good hosting starts at about $3 per month

earnest phoenix
#

I think I'll try it on Amazon, because as I'm starting out, I have no funds to host the bot and host his page

quartz kindle
#

amazon also requires a credit card to sign up afaik

earnest phoenix
#

an actual good hosting starts at about $3 per month
@quartz kindle I am Brazilian so things get more expensive

quartz kindle
#

do you have a debit or prepaid card?

#

brazil has stuff like nubank and mercadopago/pagseguro debit cards

#

those should work for creating an account at google

elder loom
#

3$ a month?

earnest phoenix
#

do you have a debit or prepaid card?
@quartz kindle I have a credit card

elder loom
#

i pay like

quartz kindle
#

then i'd go for google compute engine

#

thats where i started my bot

elder loom
#

7 dollars a month for my hosting 😂

quartz kindle
#

@elder loom yeah i pay 3

faint stump
#

Now this happend when I don't type any country:

(node:10868) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'toUpperCase' of undefined
    at isEqual (F:\DiscordBot\node_modules\country-flags-svg\dist\lib\api.js:6:38)
    at F:\DiscordBot\node_modules\country-flags-svg\dist\lib\api.js:19:14
    at Array.find (<anonymous>)
    at findFlagUrlByPredicate (F:\DiscordBot\node_modules\country-flags-svg\dist\lib\api.js:10:27)
    at Object.findFlagUrlByCountryName (F:\DiscordBot\node_modules\country-flags-svg\dist\lib\api.js:16:12)
    at Client.<anonymous> (F:\DiscordBot\main.js:13:25)
    at Client.emit (events.js:315:20)
    at MessageCreateAction.handle (F:\DiscordBot\node_modules\discord.js\src\client\actions\MessageCreate.js:31:14)
    at Object.module.exports [as MESSAGE_CREATE] (F:\DiscordBot\node_modules\discord.js\src\client\websocket\handlers\MESSAGE_CREATE.js:4:32)
    at WebSocketManager.handlePacket (F:\DiscordBot\node_modules\discord.js\src\client\websocket\WebSocketManager.js:384:31)
(node:10868) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a
promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:10868) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
elder loom
#

i'm using a dutch hosting service bcs i prefer paying

quartz kindle
#

actually 2.77 or something, because i get 1 month free

elder loom
#

with ideal

#

actually 2.77 or something, because i get 1 month free
@quartz kindle where?

quartz kindle
#

galaxygate

elder loom
#

oh

#

yeah they don't have a ideal payment option

quartz kindle
#

it depends how much power you need tho

#

mine is 1gb ram

#

yours is probably better for that price

elder loom
#

i need like 200-1gb

earnest phoenix
#

Ah ok I will try on google engine, thank you very much for your help

elder loom
#

mines bad

#

4,75 euros a month

#

400 mb ram

quartz kindle
#

what the fux

elder loom
#

but it has 1.5 tb/s ddos preotection

#

protection*

quartz kindle
#

dude, hetzner has like 4gb ram for 4 euro

elder loom
#

can i pay with ideal there?

quartz kindle
#

hmm not sure

elder loom
#

i'll see

#

give me a sec

earnest phoenix
#

One more thing, website hosting is free, I wanted to host on .xyz ?

quartz kindle
#

google compute engine is a VPS, virtual private server, its like a full computer that you remote control, so you can do anything on it, including running websites

elder loom
#

it doesn't support ideal

quartz kindle
#

yeah doesnt look like ti

elder loom
#

i just got the exact same screen xd

#

sad

earnest phoenix
#

Ah got it, thanks for the help

faint stump
#

Waiting too long and now I fixed myself KEKW

quartz kindle
#

nice

#

@elder loom still, 400mb for 7 euro is attrocious, im sure there ae better options

#

google compute engine is 600mb for free

faint stump
#

Anyway, thanks for your help

elder loom
#

@elder loom still, 400mb for 7 euro is attrocious, im sure there ae better options
@quartz kindle 4,75 euros tho

unique nimbus
#

what

quartz kindle
#

ah right, 7 dollars

#

6.5 for 1gb KVM, or 5.95 for 1gb non-KVM

unique nimbus
#

I use Contabo

#

idk what ideal is tho

quartz kindle
#

dutch payment company thingy

unique nimbus
#

hm

viscid gale
#

@faint stump u got ur answer? if not have an if statement saying if undefined, don't toUpperCase it

quartz kindle
#

it was an internal error in the flags library for passing an invalid country

faint stump
#

And now I realise that discord embed don't support .svg link/image

#

While I'm using a svg image pack

quartz kindle
#

ye

faint stump
#

What should I do, there is no npm pack about country image at png type

earnest phoenix
#

In the case to host my bot on google engine is it in the estancia tab? @quartz kindle

quartz kindle
#

@earnest phoenix yes, instancias de vm

earnest phoenix
#

Ok

#

thanks

quartz kindle
#

familia de maquina, proposito geral
série N1
tipo f1 micro

#

thats the one that is free

young flame
#

moon is back

earnest phoenix
#

Can you give me a step by step on how to host the bot and the website?

#

Tim do you speak portuguese?

sudden geyser
#

welcome to earth moon

faint stump
quartz kindle
#

yes i do

earnest phoenix
#

yes i do
@quartz kindle What ?

quartz kindle
#

speak portuguese

earnest phoenix
#

Ah sim

#

Então queria saber se pode me dar uma ajuda

#

sou novo na progrmação

#

mechia mais com php, html, css e redes

#

ai se puder me dar um passo a passo apara hospedar meu bot e meu site

quartz kindle
#

vc ja usou SSH, linux e terminal?

earnest phoenix
#

APenas terminal no Vs

#

Shh e linux ainda irei aprender

quartz kindle
#

a melhor opção de hospedagem é linux

earnest phoenix
#

@earnest phoenix its just logic, check your code again
@quartz kindle And tried but nothing

quartz kindle
#

na hora de criar a instancia vc seleciona o sistema operacional, pode colocar ubuntu 20 por exemplo

#

depois vc vai conectar no vps usando SSH, procura um guia de SSH para google compute engine, eles tem um esquema de chaves q vc precisa configurar

earnest phoenix
#

Mais isso eu faço no engine

#

ou no Linux ?

quartz kindle
#

vc faz no painel do google, onde vc criou a instancia

earnest phoenix
#

deixa me ver

faint prism
#

Tim speaks all the romance languages

quartz kindle
#

depois quando tiver a chave e o ssh configurado, vc pode baixar um aplicativo de SSH pra connectar nele fora do painel do google

#

o programa de SSH de dá um terminal remoto onde vc opera o linux da maquina pela linha de comando

#

deve ter varios guias explicando como configurar o compute engine, da uma pesquisada

#

tenho q sair agora

#

@faint prism uvuvwevwevwe onyetenyevwe ugwemubwem ossas

earnest phoenix
#

xde

quartz kindle
#

i g2g now

faint prism
#

wasnt expecting that to translate to english, but it did
I got memed

earnest phoenix
#

Plataforma de CPU e GPU
Serviço de VM confidencial

Ativar o serviço de computação confidencial nessa instância de VM.
Contêiner

Implante uma imagem de contêiner nesta instância de VM. Saiba mais

#

ativo algum desses dois ?

#

@quartz kindle

#

its for host a bot on google cloud?

sudden geyser
#

@earnest phoenix can you show the stacktrace

earnest phoenix
#

yes

#

@earnest phoenix can you show the stacktrace
@sudden geyser ok

sudden geyser
#

Can you show what line 1 - 10 of message.js looks like, because the stacktrace points to say it's coming from the library.

earnest phoenix
pale vessel
#

a dm maybe?

sudden geyser
#

message.guild maybe caused the error

#

As it can be null

restive furnace
#

crear is misspleeed too probably

#

and sould be createDB instead

sudden geyser
#

I also don't know why you're trying to call await like a function on line 51: await(tomute.roles.add(muterole.id));.

And tomute.removeRole(muterole.id); is not correct, as it should be tomute.roles.remove(...) now.

restive furnace
#

i cant write ugh

earnest phoenix
#

This error was only given when I changed some of the code that passed above

#

I also don't know why you're trying to call await like a function on line 51: await(tomute.roles.add(muterole.id));.

And tomute.removeRole(muterole.id); is not correct, as it should be tomute.roles.remove(...) now.
@sudden geyser I have changed that and it gives the same error

#

I don't know why it gives the error in message.js

sudden geyser
#

Because message.guild is nullable?

earnest phoenix
#

I'm going to put the code as it was before and tell you, wait

#

Keep giving the error, I don't know why

sudden geyser
#

The stacktrace you showed us tells us it's coming from message.guild.id.

#

Have you fixed that first

earnest phoenix
#

yes

sudden geyser
#

Now what error do you get instead.

pale vessel
#

is it a sentence or a question think3d

earnest phoenix
#

Now what error do you get instead.
@sudden geyser cannot read property id of null

#

on message.js but message.js is perfect has no error

sudden geyser
#

It still doesn't look like it's coming from the file you keep showing us. The only two places it could possibly have come from based on the file are:

  • The expression for when you defined muterole
  • When you re-defined it in the try block.

However, it's not possible to come from either of those two sources as the first one would return undefined, while the second one would keep the old value since it could only throw.

So, it is coming from message.js. So, it's probably not perfect as you claim it is.

#

The root of your error last time was that message.guild is nullable. You solve that error by checking if it's null beforehand.

earnest phoenix
#

How do I check if it is null?

#

I'm sorry,I dont know about this topic a lot because it's the first time that happens to me****

#

the error jumps in logs when I try to mute someone

sudden geyser
#

You check with equality operators: if (something === null) {...}

earnest phoenix
#

ok

#

mmm

#

how can you assign ownership rights on pc?

crisp fable
#

Server Settings -> Members -> Click on a User -> Transfer Ownership

tired panther
#

this is not dbl related xD

crisp fable
#

But that isn't related to development so you shouldn't ask in here

#

yeah

earnest phoenix
#

Server Settings -> Members -> Click on a User -> Transfer Ownership
@crisp fable i will search the owner

tired panther
#

do it

abstract coyote
#

does anyone know what exactly I can do to fix that?

compact briar
abstract coyote
#

ye

#

ty!

earnest phoenix
#

Does anyone know where to host website and bot for free

balmy knoll
#
function test1 {
  // Some Code
  function test2 {
    // Some Code
    return setTimeout(/*Something*/);
  }
  // Some Code
}

In node.js, is there any method to block both test1 and test2 by replacing the return in the test2 function?

earnest phoenix
#

pay for a cheap vps @earnest phoenix

#

@balmy knoll huh?

abstract coyote
#

Does anyone know where to host website and bot for free
@earnest phoenix for simple websites, you can use github pages. However for the bot, I suggest you don't use Free hosts. See pins for more

earnest phoenix
#

oh do you mean return out of test1 if you return out of test2

#

@earnest phoenix for simple websites, you can use github pages. However for the bot, I suggest you don't use Free hosts. See pins for more
@abstract coyote I am somewhat new to website programming and I don't know how to do that

balmy knoll
#

yes

earnest phoenix
#

return a boolean in test2

#

It's how I'm getting started now I have no funds to host the bot

#

then based on the boolean value return out of test1

#

or you can throw an error but that's not advised

abstract coyote
#

@abstract coyote I am somewhat new to website programming and I don't know how to do that
@earnest phoenix Check some tutorials on Github Desktop and github pages, they are quite straight forward and kind of simple :)

compact briar
#

just host it on your pc until you learn what you are doing then. take some time to research where to host it and how to build a website for it.

abstract coyote
#

Or yeah, the best way would be to just invest in a VPS and host both the website and the bot on there.

earnest phoenix
#

Or yeah, the best way would be to just invest in a VPS and host both the website and the bot on there.
@abstract coyote Yes, but as I had to pay designers, I ran out of funds

abstract coyote
#

Till then, host it on your pc as shaggst8r suggested. Maybe try making it as good as possible so when you can afford the host you can have it all prepared to go

#

Hmm

compact briar
#

pay designers? you can learn everything for free online

abstract coyote
#

Ye thats what i was gonna say XD

#

It is quite simple to do as well

earnest phoenix
#

Yes, but I preferred a designer

compact briar
#

my advice is to start researching and learning how to do it yourself. having something you did on your own makes it mean more to you. it takes time, yes, but its worth it in the long run. it will be impossible to run the website/bot if you dont actually know whats going on

earnest phoenix
#

ah regarding the bot and the website it is already awfully ready I'm just having problems hosting it

compact briar
#

host it from your pc until you have money to pay for a vps

earnest phoenix
#

understand

compact briar
#

but my advice still stays the same. you need to understand what the bot and website code actually means before trying to grow it.

abstract coyote
#

can I ask how much the designers charged?

compact briar
#

^^ curious as well

abstract coyote
#

i am rly curious xD

earnest phoenix
#

As I'm learning to program now everything went well, the only problem was the hosting

compact briar
#

how much did it actually cost?

abstract coyote
#

^^^^^^^^^^^^^^^^^^^^^^^^^^^^

earnest phoenix
#

can I ask how much the designers charged?
@abstract coyote They charged R $ 15.00 for the logo and R $ 30.00 for the emojis

compact briar
#

emojis?

abstract coyote
#

30 for emojis?

compact briar
#

like discord server emojis?

abstract coyote
#

oh

#

for discord

slim atlas
#

After an update for 2nd bot in CSS description, idk why but bot prefix don't appear, so i will put it in on website, down, in description. It's possible to be decline for that?

abstract coyote
#

wait aren't we talking abt the website?

earnest phoenix
#

Yes, I'm Brazilian so things are a little more expensive

abstract coyote
#

After an update for 2nd bot in CSS description, idk why but bot prefix don't appear, so i will put it in on website, down, in description. It's possible to be decline for that?
@slim atlas so sry that I can't help, but that looks so cool!

earnest phoenix
#

like discord server emojis?
@compact briar yes like that only for my bot, that only I have access

abstract coyote
#

wait

#

but

earnest phoenix
#

Hello, how can I do so that I can put text in paragraphs in the same field for my embed messages?

abstract coyote
#

aren't we talking abt a website here?

compact briar
#

wait wait wait so they didnt build a website, just designed the top.gg page?

astral yoke
#

thats what i saw

abstract coyote
compact briar
#

thats what it looks like..

earnest phoenix
#

So for the bot thing it was R $ 45.00 in total and for some logos on the site it was R $ 40.00

astral yoke
#

jesus

abstract coyote
#

thats

#

a bit extreme..

#

but then again

#

if they did a good job for the money

#

anyways imma head out

earnest phoenix
#

I found a good job until

abstract coyote
#

try checking out github pages for the website

#

and idk i heard digital ocean has like a free trial on some hosting? maybe check that out

#

see u

earnest phoenix
#

It's because here in Brazil things are more expensive

abstract coyote
#

i have no clue if digitalocean does good hosting or anything and what their service is actually

#

but check it out

#

see ya!

earnest phoenix
#

See you

tired panther
#

How to see the join position?

pale vessel
#
  1. get all members
  2. sort them by their join timestamp
  3. get the member's position
  4. ???
  5. profit
#

you need the guild members intent for this

#

it's mandatory for fetching all members

tired panther
#

xD thats to much work, to much cache, and to much data, not worth it xD

pale vessel
#

indeed

#

i removed mine

tired panther
#

How long is ur code?

pale vessel
#

not that long

#

but in order to optimise it, you have to use binary search

#

since for example, finding a position of an id inside an array of 100k elements can be extremely slow

#

a bot like @earnest phoenix does this, it's really fast, you can use @earnest phoenix jp [member] to test it

vivid oar
tired panther
#

ufff

faint prism
#

Use radix. It's blazing fast

#

So I've heard

cinder patio
#

Don't you mean redis?

slim atlas
thin turret
#

?

abstract coyote
#

thats the nicest top.gg page ever XD

earnest phoenix
ornate tendon
#

const dbl = new DBL(yourDBLTokenHere, { webhookPort: 5000, webhookAuth: 'password' });
Where do i Get the Webhook Port and the WebhookAuth

solemn latch
#

port is whatever you set it to, doesnt really matter as long as its not in use 5000 is okay most of the time

#

auth is the password you define in your code and on the top.gg website in your bots edit page under the webhook section

ornate tendon
#

oh wait

#

i will check it

coarse dragon
#

you probably have left it empty

ornate tendon
#

port is whatever you set it to, doesnt really matter as long as its not in use 5000 is okay most of the time
@solemn latch soo i can use 5000 port

pale vessel
#

try it and see

#

it'll error if the port is used

ornate tendon
#

then what port shall i use

solemn latch
#

try 5000

pale vessel
#

bruh

#

yeah, try

solemn latch
#

if it doesnt work, it doesnt work

pale vessel
solemn latch
#

then you can try 5001

#

if that doesnt work 5002

ornate tendon
#

if it doesnt work, it doesnt work
@solemn latch how can i get to know port is not working

solemn latch
#

it errors

#

and says port in use

pale vessel
#

inb4 they ignore you too

solemn latch
#

99% of ports are available

ornate tendon
#

it errors
@solemn latch in the log?

solemn latch
#

yes

ornate tendon
#

oh no error

#

ok

#

thank you

slender wagon
#

what are discord's default image sizes?

#

like 36 etc...

#

if u don't know what i am talking about here : ```js
user.avatarUrl(36)

solemn latch
#

depends on the image, pfps are 128 i believe

pale vessel
#

power of two

drowsy raven
#

How can I do my bot to copy a user message?

#

Eg. Rg!say hello

crimson vapor
#

you mean send a message with the content of the user's message?

faint prism
#

just trim off the prefix and command, then send back the remaining contents of the msg

crimson vapor
#

^

earnest phoenix
#

what library is this in even

drowsy raven
#

How lol

pale vessel
#

if you know the basics of the programming language you're using, it should be simple

crimson vapor
#

that doesn't matter

#

(language/lib)

#

js: msg.channel.send(args.join(' '))

pale vessel
#

the concept is there, applicate it to whatever you're using

#

"applicate"

#

is that even a word

#

what would be the correct word

digital meadow
#

Whatever I want ?

crimson vapor
#

any link that points to your bot host with the correct port

digital meadow
#

Uh

#

How can I get this link ? If I have a VPS

#

(Sorry)

crimson vapor
#

Well if you have a domain you could use that, or you could use the ipv4 of the vps

digital meadow
#

?

crimson vapor
#

shit I mean ipv4

#

my bad

digital meadow
#

Ok thanks a lot

#

Don't worry

drowsy raven
#

Hiw to add a prefix? I don't really yse a prefix, only commands with the "prefix" in the text

astral yoke
#

let prefix = ""

#

then when you use a command just do ${prefix} command

#

thats the easy way of it

earnest phoenix
#

hmm

hollow sedge
drowsy raven
#

Oh tyty

earnest phoenix
#

@sudden geyser Ok, i solve the error

rocky hearth
#

what is the difference between createReactionCollector and awaitReactions?

pale vessel
#

createReactionCollector uses events, awaitReactions just wraps it in a promise form

#

if you want to detect messages one by one, you need to use createReactionCollector

#

since you can use the collect event

rocky hearth
#

if you want to detect messages one by one, you need to use createReactionCollector
"you mean to detect reactions...." right??

pale vessel
#

yeah

#

i thought you were talking about createMessageCollector and awaitMessages

#

they're both using the same concept anyway

rocky hearth
#

ok, Is there any event that gets triggered when a reaction is removed from the collector?

pale vessel
#

yes, it's the remove event iirc

rocky hearth
#

no I dont find that.

#

Aah wait

sturdy gazelle
#

is it bad to host your bot on your own computer?

faint prism
#

Not very reliable, but no harm

rocky hearth
#

Why would it be??

sturdy gazelle
#

people telling me its a security risk or smthn

#

i dont see why and its a lot easier for me

faint prism
#

It might be inefficient. A bot doesn't need much processing power or memory as a PC would provide.

sturdy gazelle
#

well i dont turn my laptop off when i go to sleep anyway

faint prism
#

Not to mention shutting it down, power outages, or internet issues that can happen as a result of self-hosting

#

Other than that, no harm unless you have an open eval

#

In which case it's basically a RCE security risk to your personal machine

rocky hearth
#

am I doing it correct?. the remove event is not getting triggered

sturdy gazelle
#

well those dont happen very often and people dont use my bot much so im not worried ab it

crimson vapor
#

ik someone who hosts a small bot on a 128gb R3700x iirc

sturdy gazelle
#

what i wouldnt give for 128gb

faint prism
#

well those dont happen very often and people dont use my bot much so im not worried ab it
@sturdy gazelle Like I said, just don't have an open eval, and it's fine

sturdy gazelle
#

whats an open eval if u dont mind me asking?

pale vessel
#

am I doing it correct?. the remove event is not getting triggered
@rocky hearth dispose must be true

#

did you click the link i sent

#

e.g. createReactionCollector(fn, { dispose: true })

rocky hearth
#

Ooh ok thanks

faint prism
#

whats an open eval if u dont mind me asking?
@sturdy gazelle A command that arbitrarily attempt to do eval() on text

pale vessel
#

uh, its in the docs

#

man

sturdy gazelle
#

aight we dont do that here

faint prism
#

alright 🙂 all good then

sturdy gazelle
#

my bot is mainly just connect four

rocky hearth
#

Hehe I too created many games, like connect 4, puzzle16, tictactoe etc

#

Its very fun though

sturdy gazelle
#

nice

#

i made my bot so that people could play against my connect-4 machine learning program i wrote a while back

#

also wow now that i see what eval does i can see why that would be a huge risk

faint prism
#

haha yeah

sturdy gazelle
#

im sorta new to javascript but not coding

rocky hearth
#

I was trying to implement a cross-server games. So that people can seek games against others

faint prism
#

Comes with a fancy warning too

sturdy gazelle
#

i implemented tournaments for cross server games

#

its a lot simpler than going through the mess of people being able to dm others when they have no mutual servers

rocky hearth
#

u already did it. Wow so cool

faint prism
#

Oh nice

#

Is it open-source?

sturdy gazelle
#

yessir

faint prism
#

I'd like to see how you handle the matchmaking

sturdy gazelle
#

allow me to give you a brief tour

#

please forgive my newness to js, i really tried

#

so in the game folder, c4-game.js contains the game object

earnest phoenix
#

do you guys know any game engines that run outside of browsers and support javascript? i don't want to learn a whole new language C# for unity

sturdy gazelle
#

c4-make-game.js has the command to make games

rocky hearth
#

@earnest phoenix GameMaker 2. It has language called GML. It is easier than js

earnest phoenix
#

yes but i only know js

rocky hearth
#

it wont take u a single day, to get it

sturdy gazelle
#

game-holder is the game registry of all the games in progress

faint prism
#

please forgive my newness to js, i really tried
@sturdy gazelle I can tell. Quite the complex project!

sturdy gazelle
#

the connect-4 ai is semi closed source

rocky hearth
#

Also iirc, GML is based around js

#

Is there any shortcut on mac that gets me back to the previous channel I was in?

sturdy gazelle
#

i do have a working connect four ai open source but it isnt a child/slave program. that one is closed source but if youre really smart and good at java you could enslave the open source version 🙃

rocky hearth
#

Does the dispose event on <ReactionCollector> emitted when the reaction is removed entirely?

pale vessel
#

yeah

rocky hearth
#

ok that's only for one reaction. What if all the reaction are removed from a message. Is there also an event for that

feral kiln
#

Hi 🙂 I want to make a bot that deletes every message from a channel that is not a command, could this be considered api abuse? I really want to understand this better, to see if it's possible to make or not

pale vessel
#

i dont think so

#

but what you can do is check for any other reaction whenever the dispose event is emitted

#

if there's no reaction on the message anymore then it means that all of the reactions are gone after that dispose event

rocky hearth
#

@feral kiln You can ask in the official djs server

pale vessel
#

what i meant was js collector.on("dispose", () => { if (!message.reactions.cache.size) { // no more reactions } });

#

something like that

rocky hearth
#

Yeah I got you tuvm

quartz kindle
#

the remove event is emitted when a single user is removed from a reaction

#

the dispose event is emitted when all users are removed from a reaction and the reaction is deleted from the message

#

there is no event for removing all reactions from the message

rocky hearth
#

yes. thanks

drowsy raven
#

I made a prefix, how to use it in a bot response from a user?

rocky hearth
#

wdym

drowsy raven
#

I did this:

#

Now I want to use it in commands

rocky hearth
#

ooh so u have just started

drowsy raven
#

Yes

safe creek
#

Is there anyway I can make tabs on my bots description so you can close and open it so it hides and shows the text when pressed

pale vessel
#

of course

rocky hearth
#

I suggest u to follow djs guide. It will take u through the basics

drowsy raven
#

Okay

pale vessel
#

embed your website or style your description directly

drowsy raven
#

Ty

cinder patio
#

It would be a little hard to do without JS, but it's possible

drowsy raven
#

Btw, where can I "place" the bot for don't getting offline?

pale vessel
#

i'd say use an iframe

safe creek
#

embed your website or style your description directly
@pale vessel but with what I only know BDFD

#

Not Java etc. ;-;

pale vessel
#

i can't really help you with that, sorry

safe creek
#

oh ok

rocky hearth
#

@drowsy raven U need to host it somewhere, like heroku is a free service for that

sand dome
#

I'm using digitalocean, it's not easy to use when it goes to bots but it's nice for python (networking etc.)

drowsy raven
#

Oh nice

#

Ty

rocky hearth
#

How can I Structure the client??

quartz kindle
#

structure the client?

rocky hearth
#

djs doesn't allow to Structure the <Client>

quartz kindle
#

wdym by that

#

Structures.extend("client")?

rocky hearth
#

Yes yes

quartz kindle
#

nope, but you can do class Client extends Discord.Client {}

#

you can also hack its prototype

rocky hearth
#

Yes but that doesn't allow me to use my extended client like this, <Message>.client.myOwnProp

quartz kindle
#

it does

pale vessel
#

why do you need to extend the client for that

quartz kindle
#

as long as you replace the original

#

you dont even need to replace the original

#

message.client is the client instance, which means its the client you create with new Client

rocky hearth
#

@pale vessel Not only for that. I've bunch of stuff to extend

pale vessel
#

ah

rocky hearth
#

ok Lemme try to extend it then

umbral zealot
#
const MyClient extends Discord.Client {
  constructor(options) {
   super(options);
   this.myOwnProp = 'blah';
  }
}

There. Problem solved.

rocky hearth
#

Does extending the client also work if I'm already using a command handler - Commando

pale vessel
#

why not

quartz kindle
#
class ABC extends Discord.Client {}

let client = new ABC();

client.on("message", message => {
  message.client.constructor.name // ABC
})
rocky hearth
#

So do i need to extend Client or CommandoClient?

quartz kindle
#

no idea, never used commando

pale vessel
#

doesnt CommandoClient use Client anyway

rocky hearth
#

I guess I should extend, CommandoClient, to access itself too.

umbral zealot
#

yes, you should be extending the commando client.

rocky hearth
#

Also I'm experiencing a weird bug in vscode. Everytime I autoimport smthing. It gets added to the very top of file instead of merging with already imported package

old cliff
#

How can I access my enmap sqlite db file from a webserver on a completely different machine ?

umbral zealot
#

you would have to literally build a web server with an aPI for that, on the machine where your sqlite is

#

because sqlite doesn't have a "server", it cannot be directly accessed from another machine.

earnest phoenix
#

you would have to literally build a web server with an aPI for that, on the machine where your sqlite is
@umbral zealot the way you worded it sounds like it's a super duper hard thing to do
i only use six lines of code for most of my express.js servers (including spacing)

umbral zealot
#

It'll take a bit more than 6 lines of koa.js code to write an API for an sqlite database 😛

earnest phoenix
#

just evaluate the request param to_exec if the Authorization header matches the security pass and boom done

lime granite
#

hi

#

i have question

earnest phoenix
#

Boom Pepega

quartz kindle
#

does that mean you're basically evaling your sql requests?

#

10/10 security :^)

lime granite
#

guys i have question

earnest phoenix
#

Ask

lime granite
#

i requested verification but a developer said that your bot need to made 3 month and it will get verified but my bot made 1 month so its true or not?

earnest phoenix
#

Verification doesn't require the bot to be old for a specific amount of time

lime granite
#

thank you very much 🙂

earnest phoenix
#

@quartz kindle Just do it on a private server mmLol

#

does that mean you're basically evaling your sql requests?
@quartz kindle cough cough It eez wat it eez cough cough

#

It eez deez nuts

#

I think I might have figured it out
Server

const express = require("express");
const app = express();

app.get("/exec_sql", (req, res) => {
if (!req.params.to_exec) return res.sendStatus(400);
if (!req.get("Authorization") != process.env.SECURITY_PASS) return res.sendStatus(403);

try {
let output = <sql function for executing stuff which i dunno>(req.params.to_exec);
res.set("Content-Type","text/plain");
res.status(200).send(output);
} catch (error){
res.status(<whatever 300-400 status code seems right for this).send(error.message);
}
});

Client

const phin = require("phin");
phin({
url: "ip of server",
headers: {
authorization: process.env.SECURITY_PASS
}
}).then(<do smth>);
#

@old cliff

solemn jolt
#

I have a collection in mongoDB like this

{
    "_id": {
        "$oid": "5fa0186b686604af2886e09e"
    },
    "worldWhitelist": [{
        "type": "712906491635695647"
    }, {
        "type": "737611247989686333"
    }, {
        "type": "282859044593598464"
    }, {
        "type": "565962204327968769"
    }, {
        "type": "735874386200100974"
    }],
    "ownerCode": "735874386200100974",
    "__v": {
        "$numberInt": "0"
    }
}

How i can create a query or a list for worldWhitelist in array

willow mirage
#
TypeError: args[0].toString(...).slice(...).join is not a function
const area = args[0].toString().slice(0, 1).toUpperCase() + args[0].toString().slice(1).join("");
#

the fuck

pale vessel
#

you can only join an array

#

that's a string

#

try removing the .join(), maybe

willow mirage
#

but .slice(1) return array ?

pale vessel
#

no, args[0] is already a string, you don't need to use .toString()

#

slice() works for strings too

willow mirage
#

uh ok

pale vessel
#

so you can simply use args[0].slice(1)

tardy hornet
#

its sending everymessage like 20 times

sturdy gazelle
#

what is the discord bot verification process like? i havent found much of anything on google 👀

slender wagon
#

so basically i am stuck at creating my bot dashboard, ```js
router.get('/about', (req, res) => res.render('about'));

i need to let only the logged in users to access this
#

logged in with discord

earnest phoenix
#

@crisp fable

crisp fable
#

so you use nodejs

earnest phoenix
#

hmm

crisp fable
#

try to look for "discord.js ban command" on youtube

#

most people have a link to their github repository with all the code in it in their description

sudden geyser
#

eh I wouldn't suggest that.

earnest phoenix
#

hm ok

crisp fable
#

if you really need to copy paste everything

#

they don't want to write off code from a video as it's "too long"

#

¯\_(ツ)_/¯

earnest phoenix
#

most people have a link to their github repository with all the code in it in their description
@crisp fable hm ok

#

ok thx

sudden geyser
#

Eh, I personally think those videos teach people to write code in only one fashion when they're new to the language

crisp fable
#

welp that's how i learned discord.js stuff

#

through youtube tutorials and mostly the docs

#

docs are actually easy to understand but most people don't even know how to structure code

trim saddle
#

@earnest phoenix are you running your bot on glitch

crisp fable
#

seems like they are

#

even tho glitch isn't really good for bot hosting

#

not really secure either

trim saddle
#
  1. they don't allow bot hosting/uptime services anymore
  2. DBL declines glitch bots now
solemn latch
#

Wait what

crisp fable
#

yes

solemn latch
#

Dbl declines glitch bots?

umbral zealot
#

Yes because bots on glitch run 24/7 are breaking the ToS

trim saddle
#

glitches intention was static websites

umbral zealot
#

yeah and then people like me went "here's how to host your bot on this free service"
And then glitch went "oh no!" and then "oh we can make money off it"

solemn latch
#

Glitch is still allowed as a paid platform correct?

umbral zealot
#

I would assume so but who the fuck is dumb enough to pay $8/month for that shit when you can have a full VPS somewhere else?

trim saddle
umbral zealot
#

A 2gb RAM, 400MB space VPS for $10/month? lol don't make me laugh.

trim saddle
#

me and the boys using galaxy gate

umbral zealot
faint prism
#

Galaxy gate OP

rose warren
#

Pulseheberg is better value

#

Been using them since May

solemn latch
#

Oh? Where are they hosted

rose warren
#

They're based in France

#

But their site is in English too

#

And you can send support tickets in English

quartz kindle
#

hetzner is 2gb ram for 2.89 euro

#

but if you just want raw stats, and dont care much for quality, contabo is unbeatable

solemn latch
#

France is too far for me.

lyric mountain
#

I would assume so but who the fuck is dumb enough to pay $8/month for that shit when you can have a full VPS somewhere else?
@umbral zealot with $8 you can buy TWO vpss

#

glitch is overpriced af

umbral zealot
#

yep

strong tundra
#

contabo is in the usa as well iirc

quartz kindle
#

contabo's prices are ridiculous, they have absolutely no competition

strong tundra
#

yeah i haven't seen anything as good either

#

even on like lowendtalk

lyric mountain
#

contabo has servers in both europe and america

#

the only issue I found using contabo was high ST between 17:00 and 19:00

quartz kindle
#

anyone has the 5 euro contabo plan?

#

vps s ssd

lyric mountain
#

but that was when I used the cheapest plan

#

hasn't happened since then

#

anyone has the 5 euro contabo plan?
@quartz kindle used to have

quartz kindle
#

what made you move out? the issue above?

lyric mountain
#

yep

#

I upgraded to the next plan

#

no ST issues since then

strong tundra
#

oh usa is one more eur/m

#

smh

quartz kindle
#

you moved to the 8.99 eur?

lyric mountain
#

yep

quartz kindle
#

6 cores and 16gb its a fucking beast

#

ever ran nixbench on it?

lyric mountain
#

put beast on that

#

ever ran nixbench on it?
@quartz kindle nope, how do I do it?

strong tundra
#

god even then 6eur/mo for 8gb ram and 4 vcores

#

fucking insane shit

quartz kindle
#

curl -sS https://raw.githubusercontent.com/jgillich/nixbench/master/nixbench.sh | sh

strong tundra
#

is nixbench better than nench?

lyric mountain
#

I feel like contabo could have a plan between £4 and £9

#

like

#

£9 is fucking overkill

quartz kindle
#

havent tired nench

karmic vessel
#

Hello

strong tundra
#

oh nench doesn't have geekbench

#

ill try it on my oracle server Thonk

steel drum
#

ovh is extremely reliable

#

10/10 would recommend

lyric mountain
#

almost finished the benchmark ig

quartz kindle
#

my galaxygate is paid for another 10 months or so, so im not switching now

#

but im looking for something with fast disk speeds

blissful coral
#

If I am logging into my client 3 times at the same time (shards) will that rate limit me?

strong tundra
#

it shouldn't?

quartz kindle
#

yes

strong tundra
#

oh wait no

blissful coral
#

@quartz kindle I think you can apply for a partnership with gg and get faster speeds

lyric mountain
#

AES 5GB/s lul

quartz kindle
#

only 1 shard can connect every 5 seconds

strong tundra
#

i think it has to be one at a time right

#

yeah

blissful coral
#

Ok

#

So 5 seconds it is

#

LMAO

quartz kindle
#

partnership with gg? wut

blissful coral
#

gg = galaxgygate

quartz kindle
#

ye but wat partnership

blissful coral
#

If I remember correctly they do have one

#

I forgot

quartz kindle
#

and how much faster speeds

lyric mountain
#

1 MB/s faster

strong tundra
#

darn nixbench doesn't work with arm64

lyric mountain
quartz kindle
#

your server runs on arm?

strong tundra
#

my pi does

quartz kindle
#

ah

strong tundra
#

it's "working" on the oracle server though

solemn latch
#

Mmm pie

quartz kindle
#

@lyric mountain results pls

strong tundra
#

it's kinda slow though, dunno if that's normal or not

lyric mountain
#

still haven't finished

#

only got cpu and disk until now

quartz kindle
#

good enough, network is whatever

strong tundra
#

yeah same (cpu at least)

lyric mountain
#

got geekbench and host data

#

how much more stuff is going to be benched?

strong tundra
#

i think it's net and that's it

quartz kindle
#

net speeds is the last thing

lyric mountain
#

last one then ig

quartz kindle
#

tests download from like 20 different places

#

downloading form china/japan usually results in shit like 1MB/s

lyric mountain
#

100 MB/s IO speed is fast right?

quartz kindle
#

nope

#

i got 400 on galaxygate

strong tundra
#

i get 1000 or so on my pc

halcyon pecan
#

bruh

lyric mountain
#

1000+ is NVMe

strong tundra
#

but i have ~50 on my oracle server

lyric mountain
#

imagine having a NVMe vps

strong tundra
#

nvme would probably be higher honestly

quartz kindle
#

50 is attrocious

halcyon pecan
#

Guys what can cause a Dissconect from Gateway thing?

quartz kindle
#

but still better than google compute engine

solemn latch
#

A disconnection can

strong tundra
#

lol

quartz kindle
#

hosts have a bunch of nvme's on raid

halcyon pecan
#

brah

quartz kindle
#

but they limit their speeds based on your plan

strong tundra
#

geekbench is taking a while

halcyon pecan
lyric mountain
#

oh my

#

everything is red

strong tundra
#

oh no

halcyon pecan
#

Still trying to figure the MessageDelete Error lmao

solemn latch
#

Red is ded

earnest phoenix
#

I do not understand why every time I put a require with a file I get the error that it has not found the module

halcyon pecan
#

i can make it rainbow?

lyric mountain
#

red is ded but you have redemption

strong tundra
#
OS        : linux
Platform  : ubuntu 20.04
CPU       : AMD EPYC 7551 32-Core Processor```
halcyon pecan
#

wait imma make it Rainbow

strong tundra
#

epic

quartz kindle
#

epyc is epic

lyric mountain
#

still no net data

strong tundra
#

i can only use 2 cores out of the 64 logical cores 😔

quartz kindle
#

@earnest phoenix show logs.js

strong tundra
#

gonna wait for net to finish then ill post it on random paste site and link here

earnest phoenix
quartz kindle
#

@earnest phoenix you're trying to use SQLite before you require it

earnest phoenix
#

so where do i put it

quartz kindle
#

require always goes first

lyric mountain
#

damn, powershell fckd the benchmark output

quartz kindle
#

lmfao

lyric mountain
#

do you know how can I scroll up?

strong tundra
lyric mountain
#

or is there a file created?

earnest phoenix
strong tundra
#

did you install it

quartz kindle
#

did you install it

solemn latch
#

did you install it

earnest phoenix
#

i have it installed

quartz kindle
#

are you sure