#development

1 messages · Page 1146 of 1

delicate shore
#

what about that?

golden condor
#

Is it in .gitignore

delicate shore
#

oh ok

#

i opened the terminal

golden condor
#

Did you ignore it?

delicate shore
#

what's that?

golden condor
#

Ok now

#

.gitignore basically ignores things you tell it to when commiting. Normally you remove config files, node_modules and some other stuff

dusty shale
#

@golden condor @ashen widget Is head bot dev in our team. please explain him the api thing

delicate shore
#

i didn' ignore it

#

anyways what's the next step

golden condor
#

Ok

#

Now

#

Do

ashen widget
#

ya tell @golden condor

golden condor
#

git remote add main <GitHub repo URL>

#

@ashen widget you can make a simple API with express

delicate shore
#

how to get repo url

golden condor
#

It will be in the search bar when you are viewing iy

#

*it

ashen widget
#

@ashen widget you can make a simple API with express
@golden condor not experienced with express can you tell how or refer me to a vid

delicate shore
#

ok

golden condor
#

uh

#

That's the url

ashen widget
#

dm me

#

@golden condor

golden condor
#

@ashen widget it's kinda hard to explain

#

But it's simple

ashen widget
#

any vid if you have

delicate shore
#

@golden condor nothing happend

golden condor
#

I don't

delicate shore
golden condor
#

If nothing showed up

#

Then it worked

#

Now

#

git add .

delicate shore
#

git add.

golden condor
#

Adds all your files to be commited

#

git add .

delicate shore
#

error

golden condor
#

No it has to have a space

delicate shore
#

how can i select files

#

to be added

golden condor
#

do you want a folder or a specific file or all of it?

delicate shore
#

all

golden condor
#

That adds all

#

Now

delicate shore
#

ok

golden condor
#

You do a commit messsge

delicate shore
#

ok

golden condor
#

git commit -m "message here"

delicate shore
#

message in ""?

golden condor
#

Yes

#

But you need ""

#

Around it

delicate shore
golden condor
#

ok

#

Then

delicate shore
#

now?

golden condor
#

git push --set-upstream main master

delicate shore
#

do i need to change somthing here

#

something*

golden condor
#

Nope

#

I can still it from your console

#

*tell

delicate shore
#

what

golden condor
#

git push --set-upstream main master -f

delicate shore
#

now

golden condor
#

That should be done

#

Check your repo

delicate shore
#

Thanks so much

#

:::)))

golden condor
#

No problem!

delicate shore
#

i wanna change these names can i ??

#

like checkpoint

#

thing

golden condor
#

You can't change commit names

delicate shore
#

can i remove it

#

i don't need it

#

i no longer use their example

#

i made my own code. If yes then how can i remove it

golden condor
#

You can delete the folder

#

From your system

#

And then do

delicate shore
golden condor
#

git add .
git commit -m "message here"
git push -f

#

No

fringe axle
delicate shore
#

is gitiginore important

fringe axle
#

let muterole = message.guild.roles.find(`name`, "Muted");

golden condor
#

V11?

fringe axle
#

v12

twilit rapids
#

guild.roles.cache...

fringe axle
#

Oh, thanks!

delicate shore
#

is gitiginore important
because it sayszychorp

golden condor
#

No

#

It isn't

fringe axle
#

guild.roles.cache...
@twilit rapids same error

golden condor
fringe axle
#

let muterole = message.guild.roles.cache(`name`, "Muted");

golden condor
#

It's .cache.find

twilit rapids
#

guild.roles.cache.find()

fringe axle
#

Oh, my fault

pale vessel
#

did you provide a function?

#

find(x => x.name === "Name")

fringe axle
#

No

#
async run(message, client, args) {
    if (!
        message.member.hasPermission('MANAGE_ROLES')) return message.channel.send("You dont have the permissions! You are missing the ``MANAGE_ROLES`` permissions");


  let argsC = message.content.split(" ").slice(1);

  let muterole = message.guild.roles.cache.find(`name`, "Muted");

  if (!argsC[0]) {
    return message.channel.send('Please mention someone');
  }
  const search = argsC.slice(0)[0];

    let {
      member
    } = message;
    if (message.mentions.members.size > 0) {
      member = message.mentions.members.first();
    } else if (search) {
      member = client.findersUtil.findMember(message.guild, search);
    if (member.size === 0) {
      return message.channel.send(`❌ No members found \`${search}\`!`);
    } else if (member.size === 1) {
      member = member.first();
    } else {
      return message.channel.send(client.findersUtil.formatMembers(client, member));
    }
};

  if (member.hasPermission("MANAGE_GUILD")) return message.channel.send("Failed to mute the user! (Higher permissions)");

  if (!muterole) {
      try {
          muterole = await message.guild.createRole({
              name: "Muted",
              color: 0xDF9C9D,
              permissions: []
          })
          message.guild.channels.forEach(async (channel, id) => {
              await channel.overwritePermissions(muterole, {
                  SEND_MESSAGES: false,
                  ADD_REACTIONS: false
              });
          });
      } catch (e) {
          console.log(e.stack);
      }
  };
    if (member.roles.has(muterole.id)) return message.channel.send(`**${member.user.username}** is already mute`);

  member.addRole(muterole.id)
    .then(message.channel.send(`**${member.user.username}** has been mute.\nPlease see if the *Muted* role is greater than the role of the person you want to mute.`))

    }
}
#

That's my code.

pale vessel
#

you didn't have to post the whole code

fringe axle
#

Oh

pale vessel
#

hm wait

fringe axle
#

What you need to look what's wrong?

pale vessel
#

what version are you on?

fringe axle
#

v12

#

discord.js v12

pale vessel
#

we can't help much here

fringe axle
#

;_;

#

Other codes worked too.

#

And here is only one new thing: the muted role.

delicate shore
#

hey @golden condor i had a question if u don't mind

golden condor
#

Ok

delicate shore
#

can i make changes on my github repo and directly update them in vps?

#

not glitch

golden condor
#

Yes

delicate shore
#

the vps

#

how ?

#

here

golden condor
#

You can use a github webhooks which posts to your webserver on the vps

delicate shore
#

You can use a github webhooks which posts to your webserver on the vps
github has webhoook?

golden condor
#

Yes

delicate shore
#

and callum

#

idk why

#

the github took name of my

#

user on pc and it says commit was made by it

#

but pc is of my bto

golden condor
#

Yes it will do that because you haven't said a name

delicate shore
#

bro

paper cliff
#

it's not github, it's git

#

github is a hub for git repositories

golden condor
#

You haven't told Git what to call you

#

So it just uses your name from your pc

delicate shore
#

ok

#

how to tell git

#

what to call me

golden condor
#

uh

paper cliff
golden condor
#

That ^^

paper cliff
#

If you're using Github Desktop instead of Git CLI it probably won't work

delicate shore
#

ok

#

no i am not

#

and is github repo bad or good ?
since everyone can see my code u know

paper cliff
#

Your GitHub repository should be private then?

delicate shore
#

i mean i should announce it publically

#

o

paper cliff
#

You can make a GitHub repository private

#

And if you don't want to use the Microsoft GitHub thing, you can make a private repository into your VPS directly

delicate shore
#

ok thnx :)

restive pebble
#

Github is nice with open source x)

delicate shore
#

but

restive pebble
#

x)

delicate shore
#

everyone can just copy paste my code ;;-;

restive pebble
#

GWjianWut <3 open source

honest perch
#

everyone can just copy paste my code ;;-;
@delicate shore then make a private repo

golden condor
#

Just make it super hard to read

delicate shore
#

yeh i did

restive pebble
#

lul

delicate shore
#

Just make it super hard to read
@golden condor lol how

restive pebble
#

Talent

delicate shore
paper cliff
#

No nobody can't read your code if it's a private repository?

restive pebble
#

make ulta wierd classes and lots of files

#

x)

paper cliff
#

What are you talking about

delicate shore
#

oo

paper cliff
#

Github is nice with open source x)
Discord is nice with their app

restive pebble
#

Gitlab is also a thing

paper cliff
#

it doesn't mean they respect or will continue to respect your privacy

restive pebble
#

ok

earnest phoenix
#

Bruh

paper cliff
earnest phoenix
#

Escape the emoji

paper cliff
#

^

#

yea

earnest phoenix
#

And only the id for reactions

delicate shore
restive pebble
#

[x]

delicate shore
#

i wish i was a bot ;-;

restive pebble
delicate shore
#

i would have free nitro

restive pebble
#

u can be a bot in github

delicate shore
paper cliff
#

Not really, it's just normal user accounts

delicate shore
paper cliff
#

yes

delicate shore
restive pebble
#

u can make tho kek

delicate shore
#

no

#

u cannot make global emotes

restive pebble
#

use that botclient.tk

delicate shore
#

bru

earnest phoenix
#

Umm

delicate shore
#

it got banned

#

if u dunno

restive pebble
#

thats epic

#

x)

paper cliff
#

Not really, Mixer streamers were able to create global emotes

earnest phoenix
#

What does an async function do

paper cliff
#

until they closed it

restive pebble
#

Promise

paper cliff
#

but the quality was poor cause u know

#

Mixer

restive pebble
#

Mixer is good

#

cuz Ninja GWjianWut

delicate shore
#

Mixer banned

#

i mean closed

paper cliff
#
async function ok () {
  await doThat()
}

// same as
function ok () {
  return new Promise((resolve, reject) => {
    doThat()
      .then(resolve)
      .catch(reject)
  })
}
#

@earnest phoenix ^

#

something like that

earnest phoenix
#

Thanks

short siren
#

On the ok function you aren't resolving or rejecting

earnest phoenix
#

?

paper cliff
#

I am

short siren
#

I thought resolve and reject are like callbacks. resolve('promise resolved') or reject('promise rejected')

paper cliff
#

They're

pure lion
#

is there a way for me to send data from my backend script to my frontend one?

paper cliff
#

api?

golden condor
#

Yes

#

An api

pure lion
#

i hav

#

api

paper cliff
#

@short siren i don't know if this example can help you

#
async function asyncBased () {
  const reply = await message.channel.send('Hello world!')
}

// same as
function promiseBased () {
  return new Promise((resolve, reject) => {
    message.channel.send('Hello world!')
      .then(reply => resolve(reply))
      .catch(err => reject(err))
  })
}
#

btw .then(reply => resolve(reply))
is the same as .then(resolve)

#

I don't have a really good example to give you

#

@pure lion use your api

#

ah yea okie

#

from backend to frontend

#

websockets are cool for that

short siren
#

But on the second one you're trying to resolve a promise that doesn't exist with .then

paper cliff
#

?

pure lion
#

can i emit something

paper cliff
#

with websockets you can

#

@short siren wdym

pure lion
paper cliff
#

yes

pure lion
#

UUUUUUUUUUUUUUUUUGH

paper cliff
#

it's also really easy to setup

pure lion
#

ik

#

but UUUUUUUUuuuuuuuuuuuuuuuGGGGGGGGGGGGh

paper cliff
#

wha-

#

why uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuugh

pure lion
#

i forgot how to set it up even though i literally made a webrtc app with it a few weeks ago

paper cliff
#

client:
const socket =io()

pure lion
#

doc time

grim zephyr
#

is this the right place to ask for a bot widget?

pure lion
#

oh

#

p a y m e

paper cliff
#

server:
const io = require('socket.io-server')(httpServer)

pallid igloo
#

xD

paper cliff
#

something like that (im not sure)

#

@grim zephyr you mean a fidget spinner?

#

:x

grim zephyr
#

bruh

short siren
#

.then is used to resolve s promise you are trying to use it a resolve a promise but that promise doesn't exist. You are supposed to say whether it gets resolved or rejected. Like...

function checkName(name) {
   return new Promise ((resolve, reject) => {
   if (name == "Connor") {
      resolve('good name')
   } else {
      reject('bad name'(
   }
})
}```js
pallid igloo
#

@paper cliff no, top.gg bot widget.

sick cloud
#

dumb jquery question time: how do i get an elements attribute, like an inputs type, is it .attr()?

short siren
#

Ignore sloppy formatting tried to write on phone

paper cliff
#

wtf?

#

@short siren my example was good, what are you talking about

pure lion
#

why not use async

#

edjit

pallid igloo
#

Edjit?

paper cliff
#

@sick cloud .val() ?

pure lion
#

edjit

paper cliff
#

wait yeah ok

pallid igloo
#

oh..

#

JQuery

#

oof

sick cloud
#

val is the actual value

paper cliff
#

yea didn't read carefully

#

.attr('type')

#

should do that?

pallid igloo
#

edjit
Full Stack Dice#2213

#

idk, I'm just guessing

pure lion
#
const express = require('express');
const app = express();
const socket = require('socket.io')(app)
```this a good server boi?
short siren
#

Danny you are creating a new promise but not returning anything

sick cloud
#

yea that worked

paper cliff
#

@short siren re-read my example.

pure lion
#
- .then()
+ async/await
short siren
#

I have

restive pebble
#

ES 2020

sick cloud
#

awesome

short siren
#

It doesn't make sense

sick cloud
#

also no thats not real ty

paper cliff
#

@pure lion I think you have to pass the httpServer

#

not the app

pure lion
#

@sick cloud what are you doing it looks cooooooooooooool

sick cloud
#

making the oauth2 dashboard for my website/platform

earnest phoenix
#

steal

pure lion
#

:o

earnest phoenix
restive pebble
#

@pure lion ok

pure lion
#

what is ok

restive pebble
#

that should work

pure lion
#

cooool brb

zinc condor
#

https://waifu.pics/
I made a user contributed public API for image endpoints for discord bots
anyone can upload and all images are manually checked by a moderator

A very large user controlled image database

restive pebble
#

listen to server atleast lol

delicate shore
#

is

sick cloud
#

gotta add regenerate secret now mm

earnest phoenix
#

no

#

tony don't

#

i gonna steal that secert

delicate shore
#

who is owner of

sick cloud
delicate shore
#

mee6

sick cloud
#

lmao it wont work

pure lion
#

wait

#

is that like an oauth2 generator dashboard ting?

pallid igloo
#

Bruh

paper cliff
#

no

pallid igloo
#

Where is that?

#

@sick cloud which website?

paper cliff
#

It's in his app

pure lion
#

if not im going to make one soon™️

restive pebble
#

genSalt

pure lion
#

yes

pallid igloo
#

I need to buy a tm

restive pebble
#

and passport will do

delicate shore
#

@pure lion are u have sadie added as friend?

pure lion
#

no

restive pebble
#

passport is epic for auth

delicate shore
#

shoot

sick cloud
#

@pure lion it is but for my website not discord at all

pure lion
#

ooooooooooo cool

sick cloud
#

so you can make bots on my own app, i guess

#

but not bots

#

@pallid igloo my wip one

earnest phoenix
#

i gonna spoil it

pure lion
#

wait imma go check how the fok i did socket

restive pebble
#

u making a ws?

#

GWjianWut cool

pallid igloo
#

so you can make bots on my own app, i guess
@sick cloud I have been working on an IDE since 3 years. It's a smart one for me, It just checks for the require blocks and auto-installls the packages.

#

Thats why I get alot of "package not found" errors

sick cloud
#

ok?

paper cliff
#

200 OK

pallid igloo
#

What is your project centered around?

#

it's like an online Application simplifier or oauth2 setup guide or smth?

sick cloud
#

no

#

it's the developer portal for my website

earnest phoenix
#

tony

#

can i spoil it?

pure lion
#

what is status code 522 :(

sick cloud
#

@earnest phoenix yea

earnest phoenix
#

new di-

pure lion
#

:o

earnest phoenix
#

that's enough

paper cliff
#

Isn't a 522 a CloudFlare error?

honest perch
#

I swear if its another discord bot list

pallid igloo
#

Is it better to operate slice functions on a webhook link to get id or token or use nodefetch for it?

#

Bcs fetching works easily

paper cliff
#

You can slice into it

pallid igloo
#

and tells the error

paper cliff
#

I mean I see no issues on doing that

pallid igloo
#

@paper cliff Which is more efficient?

paper cliff
#

.split

pallid igloo
#

ikik.

paper cliff
#

Fetching makes a request

pure lion
#
const express = require('express')
const app = express()
const server = require('http').Server(app)
const io = require('socket.io')(server)
```this is what i did
paper cliff
#

yes that's great now

#

io.on('connection', socket => ...)

#

ur good to go

pallid igloo
#

So I should use Slice if possible?

pure lion
#

ur good to go
but i still got the error

paper cliff
#

I said .split twice

#

so yes

#

@pure lion what error?

pure lion
#

522

#

:d

paper cliff
#

ah lol

#

nginx?

pure lion
#

yup

paper cliff
#

did you made changes to your nginx conf?

#

to include Upgrade, Connection header

#

and proxy http version 1.1

pure lion
#

where?

paper cliff
#

to your nginx conf

pure lion
#

yeah got that

#

but like w h e r e

restive pebble
#

createServer bruh

paper cliff
#

uh

pure lion
#

ah

paper cliff
#

.Server is the same as .createServer literally

restive pebble
#

GWjianWut ok

paper cliff
#

so it doesn't matter

delicate shore
#

is there any limits

#

for bots?

restive pebble
#

me old user rip

delicate shore
paper cliff
#

what limits

#

uh

restive pebble
#

idk

paper cliff
#

you mean ratelimits for the api?

delicate shore
#

like u can only upload 5 bots

#

or 6 bots

restive pebble
#

ask oliy GWjianWut

paper cliff
#

may be it can help you

delicate shore
#

taht

restive pebble
#

i did the same thing no error rip

paper cliff
#

@delicate shore I don't think there is a limit

delicate shore
#

okk

restive pebble
#

GWjianWut millions of bot x)

delicate shore
#

XD

paper cliff
#

if ur a pro coder millions of bot is not enough

#

:')

restive pebble
#

lol

pure lion
#

wait shit

delicate shore
#

i mean

#

i can make million of bots with one command each

restive pebble
#

it says something ig

delicate shore
#

:bigbrain:

restive pebble
#

cuz u need help command

#

so minimum 2

delicate shore
#

;-;

restive pebble
delicate shore
pallid igloo
#

I wish I could test my own bot.

paper cliff
#

I mean

restive pebble
#

sed

delicate shore
#

why cannot u test

paper cliff
#

Why do you bother creating commands

delicate shore
#

your own bot ?

paper cliff
#

where you can pick some random things on the internet :')

pallid igloo
#

why cannot u test
@delicate shore for top.gg

restive pebble
#

x)

pallid igloo
#

Just like the mods xD

delicate shore
#

oj

#

burh

paper cliff
#

find an open source bot, edit the name and voila

restive pebble
#

lol

pallid igloo
#

Oof

restive pebble
#

nice

pure lion
#
    location / {
        proxy_pass http://127.0.0.1:8080;
        include    nginxconfig.io/proxy.conf;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_set_header Host $host;
    }
```making better-dbl2 is hard uwu
paper cliff
#

yes

restive pebble
#

bot list omega

pure lion
#

bo^2 list

restive pebble
#

express.post()

pallid igloo
#

My bot dashboard is on my localhost 6767

restive pebble
#

why making socket for bot list

paper cliff
#

I am waiting for someone to create

restive pebble
#

nice

#

ask oliy

paper cliff
#

or Discord Boomer List

restive pebble
pure lion
#
nginx: [emerg] "proxy_http_version" directive is duplicate in /etc/nginx/sites-enabled/ale-bot.xyz.conf:27
```fuck the what
pallid igloo
#

@paper cliff I gotchu covered. Ferb, I know what we're gonna do today

pure lion
#

why making socket for bot list
idk i want to get shit from mongoose and then display it at the frontend

#

:D

restive pebble
#

react

pure lion
#

i cbf

paper cliff
#

frameworks are bad imo

pallid igloo
#

Uhh, What's the issue? Use node?

#

Node is better

pure lion
#

Uhh, What's the issue? Use node?
node: server side javascript

pallid igloo
#

Express can use it.

pale vessel
#

nothing is better

pallid igloo
#

Express could throw it at the frontend

pure lion
#

but yeah idk where its duplicated at

#

sooooooooooooooooooooooooooooo fuck

pallid igloo
#

oof....

restive pebble
#

rip

fluid basin
#
    location / {
        proxy_pass http://127.0.0.1:8080;
        include    nginxconfig.io/proxy.conf;
        proxy_http_version 1.1; <---- HERE
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_set_header Host $host;
    }
```making better-dbl2 is hard uwu
nginx: [emerg] "proxy_http_version" directive is duplicate in /etc/nginx/sites-enabled/ale-bot.xyz.conf:27
```fuck the what
pallid igloo
#

I love nodejs for some reason, it's one of the only languages I like coding in, after Php

restive pebble
#

same kek

pallid igloo
#

php is one language you need to know to get a job

paper cliff
#

wtf

pallid igloo
#

Bcs nobody will hire you without it.

restive pebble
#

lol

pallid igloo
#

or very few people will.

paper cliff
#

imagine getting a job using php

restive pebble
#

just learn php

#

x)

#

to get job

pallid igloo
#

Basics of php are hard, advanced shit is easy.

#

It's irregular

#

Seriously

paper cliff
#

A real language people should learn to use instead of using php is Nim

pure lion
#

fixed the nginx

restive pebble
#

cool edit

pure lion
#

but its not loading the bg

pale vessel
#

imagine getting a job using php
@paper cliff luke did lmao

honest perch
#

Php is bad @pallid igloo

pure lion
#

i feel like im missing something really stupid

honest perch
#

No one hires you from php

paper cliff
#

who is luke

honest perch
#

A human

#

I think

pure lion
#

i am stuck

mint yoke
#

Hi

paper cliff
#

hello to you gentleman

weak rain
#

HI i want help with VSC as i dont know how to start my bot their

#

can u help me with that

paper cliff
#

learn a lang

#

learn JS, python or whatever you want

#

code

#

run

weak rain
#

hm i have my code

paper cliff
#

sell your bot and earn millions of vbucks

weak rain
#

i previously used glitch for editing

#

now its trash\

paper cliff
#

you have the code, you now need the knowledge to run it

weak rain
#

i used glitch

#

it was easy their

paper cliff
#

just figure it out

#

yourself

pure lion
#

im having issues (code 522) on my website where its not loading the background and ive been told its a nginx error

    location / {
        proxy_pass http://127.0.0.1:8080;
        include    nginxconfig.io/proxy.conf;
        proxy_set_header Connection "Upgrade";
        proxy_set_header Host $host;
    }
```it started having issues when i added a http server/socked.io to my server side script here:
```js
const express = require('express')
const app = express()
const server = require('http').Server(app)
const io = require('socket.io')(server)
```it loads the rest of the page, just not the background image
paper cliff
#

comment out your socket part

pure lion
#

mkay

paper cliff
#

does it do that again?

#

cause it seems unrelated

pure lion
#

in my index?

paper cliff
#

uh

#

server side yes?

pure lion
#

same error

#

aaaaaaaaaa

sick cloud
#

how do you copy text using a button

pure lion
#

navigator.clipboard.writeText(String)

sick cloud
#

doesn't work?

pure lion
#

the what

#

weird

#

it works for my webrtc app

paper cliff
#

didn't know writeText is a promise

#

such a weird thing

#

lol uh ok

pure lion
#

w e i r d

sick cloud
#

^

pure lion
#

o?

sick cloud
leaden bronze
#

php is alpha

sick cloud
#

just doesn't wanna work

leaden bronze
#

change my mind

pure lion
#

thats so weird

paper cliff
#

Access to the contents of the clipboard is gated behind the Permissions API

#

Well you need the permission

pure lion
#

pag

paper cliff
#

I don't know what permission lmao

#

but yea

pure lion
#

i have ssl maybe its that

sick cloud
#

oh it fails if i dont have permission

#

Calls to the methods of the Clipboard object will not succeed if the user hasn't granted the needed permissions using the Permissions API and the "clipboard-read" or "clipboard-write" permission as appropriate.

paper cliff
#

yes and verify that navigator.clipboard is defined

#

in some browsers it's even disabled

#

so weird

#

idk

delicate shore
#

ok

#

cannot read property permissionsFor of null

sick cloud
#

yep it works when i use it with permission given

paper cliff
#

voiceChannel is null

#

that's it

delicate shore
#

wha

#

i havd defined Voicechannel

pure lion
#

yep it works when i use it with permission given
how gib perm?

delicate shore
#

dice

pure lion
sick cloud
#

regen also works but that reloads and its slow rn

pure lion
#

thats so cool tho

paper cliff
#

@delicate shore that simply means the user is not connected to a voice channel

pure lion
#

are you fucking serious

sick cloud
#

This version of discord.js is incompatible with discord. Please upgrade to V12.

#

move to v12

paper cliff
#

it means you have to upgrade

#

just read

#

wtf

#

npm install discord.js

weak rain
#
operable program or batch file.```
pure lion
#

anyone hab fix to my issue

weak rain
#

whats this

sick cloud
#

these errors gettin good

paper cliff
#

just read please

#

guys

sick cloud
#

install node

weak rain
#

my bot is not starting

pure lion
#
operable program or batch file.```

did you insatalllllllllllllllllllllllllllllllllllllllll node

weak rain
#

i just opened my glitch repo

#

downloaded it

sick cloud
#

once you install node you have to reboot your terminal or ide also

weak rain
#

and runned in vsc

#

okay

sick cloud
#

have you installed node

#

https://nodejs.org/ download and run the installer

weak rain
#

no

#

ok

paper cliff
#

no

#

what error exactly please be accurate

sick cloud
#

read the v11->v12 migration doc

paper cliff
#

traceback error
that's not useful

#

:x

sick cloud
#

send the error

paper cliff
#

that's still unhelpful

sick cloud
#

and why don't you have syntax highlighting

void vale
#

Hi. I can't change the message via the discord api

HTTP/1.1 405 Method Not Allowed
paper cliff
#

what message

#

just read ^

#

ur using a wrong http method

#

it's probably a PATCH or a POST

void vale
#

channels/742678688079806536/messages/743024591328378973

paper cliff
#

then it has to be a PATCH

#

lmao that question

restive willow
#

I wonder...

leaden bronze
#

OwO

pure lion
void vale
#

@paper cliff thx

pure lion
#

This channel lmao

paper cliff
#

lmaoooooooooo

leaden bronze
#

that is the most retarded thing i have ever read

delicate shore
#

@pure lion can u come dms

leaden bronze
#

lol

pure lion
#

this channel is not for trolling

paper cliff
#

you can't sue them if you're in the USA btw

leaden bronze
#

good.

paper cliff
#

btw, a bot needs to be 'hosted', it has to be connected to Discord 24/7 to receive and send messages

weak rain
#

@sage estuary same

paper cliff
#

it's like a simple program

#

if you close your computer, the program is closed

#

stop trolling

#

wtf

earnest phoenix
#

low effort troll

paper cliff
#

just get out of here

restive willow
#

Funny rofl moment 🤣🤣😂😂

leaden bronze
#

buy big box

#

put in big box

earnest phoenix
#

@coral trellis

paper cliff
#

why am I replying to this guy

leaden bronze
#

Put the bot inside of a box

golden condor
#

You host it yourself, discord doesn't do it for you

#

@sinful belfry token leak

restive willow
#

its code from the web chill

paper cliff
#

ah shit

leaden bronze
#

haha

restive willow
#

its just some random github thing

leaden bronze
#

lmao

restive willow
#

one of the comments is "A sample github bot"

#

hes just a bad troll

sinful belfry
#

@sage estuary is isn't a smart idea to send your token here at all, please reset it through the developer portal

golden condor
#

It literally says

//Sample GitHub bot```
leaden bronze
#

his making a fork

restive willow
#

lol

leaden bronze
#

xd

paper cliff
#

Fork the project and maintain it yourself

#

the current version is v12 that's it

weak rain
#
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)
    at Function.Module._load (internal/modules/cjs/loader.js:841:27)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
    at internal/main/run_main_module.js:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}```
#

what to do

#

i installed node

velvet bluff
#

@weak rain apparently that file is missing when called by the code

weak rain
#

it is their

#

server.js

golden condor
#

@sage estuary no

weak rain
#

@weak rain apparently that file is missing when called by the code
@velvet bluff file is their bro

paper cliff
#

Just read: it's not

wary flame
#

Is it in that exact location?

velvet bluff
#

Or you specified the wrong path for the file

#

As I can see you’re searching the file in the drive labelled E

wary flame
#

"E:\Thunder V2\server.js"

velvet bluff
#

It’s an error in your code

weak rain
#

hm

velvet bluff
#

You’re searching in the path that 112batman specified

paper cliff
#

dude

#

read the documentation

wary flame
#

@sage estuary Look it up on internet, literal first result

paper cliff
#

dang it

wary flame
#

Read the error

velvet bluff
wary flame
#

No

paper cliff
#

Can someone please ban this guy already

wary flame
#

Are you even doing python

#

Then how tf would python code work

#

Can someone please ban this guy

pure lion
#

@slender thistle :l

paper cliff
leaden bronze
#

lmao

#

i think his being genuine

wary flame
#

@sage estuary what language are you coding in

velvet bluff
#

Javascript?

leaden bronze
#

js?

#

Ok

wary flame
#

Then look in the discord.js docs

#

Or search discord.js get ping

pure lion
#

@sage estuary if you want help then actually use it and r e a d the errors and documentation

velvet bluff
#

Wait am I allowed to send links here for the docs?

leaden bronze
#

yes

wary flame
#

Yes

velvet bluff
#

Ok

leaden bronze
#

OwO

velvet bluff
#
leaden bronze
#

Admin Admin!

velvet bluff
#

There is the docs

leaden bronze
#

Help theres an unknown link

#

admin admin!

#

lol

velvet bluff
#

lol

#

That’s the official documentation smh

pure lion
#

Java ≠ javascript

velvet bluff
#

Well, java is different than JavaScript

wary flame
#

A lot different

velvet bluff
#

Javascript works with node.js, java works with the JDK

#

They’re not exactly the same

split goblet
#

good morning, where do i add my bot?

paper cliff
#

Still not banned

pure lion
#

he said he was elite hacker so i believed him
photoblobs

slender thistle
#

-faq 1 @split goblet

gilded plankBOT
#

@split goblet

Frequently Asked Questions 📜
paper cliff
#

@split goblet Hi, you can check the faq

velvet bluff
#

he said he was elite hacker so i believed him
what

slender thistle
#

Java and JavaScript are not the same

velvet bluff
#

^

paper cliff
#

Guys seriously... Why are you even replying to that, isn't that obvious he's trolling af?

pure lion
#

how 2 fix eesue

#

im having issues (code 522) on my website where its not loading the background and ive been told its a nginx error

    location / {
        proxy_pass http://127.0.0.1:8080;
        include    nginxconfig.io/proxy.conf;
        proxy_set_header Connection "Upgrade";
        proxy_set_header Host $host;
    }
```it started having issues when i added a http server/socked.io to my server side script here:
```js
const express = require('express')
const app = express()
const server = require('http').Server(app)
const io = require('socket.io')(server)
```it loads the rest of the page, just not the background image
split goblet
#

unfortunately i am translating our conversation, could someone help me?

paper cliff
#

@split goblet Check the link above

#

@pure lion Disabling the upgrade header thing fix that?

pure lion
#

okay brb

split goblet
#

I'm from Brazil, I don't know how to speak English rssrsr, I'm still new to this developer business :)

paper cliff
wary flame
#

Why are you even trying to download visual studio

#

You shouldn't use vs for js

paper cliff
#

stop replying to this guy pls omg

slender thistle
#

VS isn't for hosting bots

paper cliff
#

@split goblet Hey, did you check the link above?

split goblet
#

@paper cliff hi how did you get the developer tag?

wary flame
#

Its for coding

slender thistle
#

VS is an IDE, Integrated Development Environment. An IDE will only help you write proper code

paper cliff
#

@split goblet You get the developer badge if you have a verified bot

slender thistle
#

Never said that, you just need to install an interpreter/compiler for your language

pure lion
earnest phoenix
#

Thonk wut happend ?

weak rain
#

i m unable to install quick.db on VSC

split goblet
#

@paper cliff I do bots on my phone unfortunately I don't have a computer :( one more day I'll get it

pure lion
#

on localhost?
nginx

wary flame
#

@weak rain What OS?

paper cliff
#

@split goblet What device? Android/iOS?

#

@wary flame He's on Windows

pure lion
#
    location / {
        proxy_pass http://127.0.0.1:8080;
        include    nginxconfig.io/proxy.conf;
        # proxy_set_header Connection "Upgrade";
        proxy_set_header Host $host;
    }
weak rain
#

windows

paper cliff
#

@pure lion Are you testing that locally or on a server?

pure lion
#

server

#

no

#

lmfao

wary flame
#

You need to install visual studio build tools and some other dependencies, they have a guide on that linked on the npm page.

earnest phoenix
#

LoL

weak rain
#

its saying unable to find python wtf

earnest phoenix
#

how ur banned ?

paper cliff
#

Compiling on Windows is such a pain in the ass

pure lion
#

they said i was selfbot which is not true
where and show

paper cliff
#

@pure lion Send me the link of your website if you can please

honest perch
#

Shiv

#

Check dms

split goblet
#

I do bots on my phone unfortunately I don't have a computer :( one more day I'll get it@paper cliff

paper cliff
#

@split goblet That wasn't my question

weak rain
#

its saying unable to find python wtf

slender thistle
#

Aye Misly I did, I usually try to reply whenever I'm actually able to do something

wary flame
split goblet
#

I'm not understanding anything, I'm not from the United States, I'm from Brazil so I have to keep translating :(@paper cliff

slender thistle
#

Once your bot is online and working, yes

paper cliff
split goblet
#

Thank

#

well, i'm trying something in this developer world :) it will take my bot right

#

@paper cliff

weak rain
paper cliff
earnest phoenix
#

is there a way to share emojis across shards?

paper cliff
#

They're already shared

#

You can already use any emoji from any server (if you have your bot in it) in any server

earnest phoenix
#

yeah but my bot is stating unknown emoji when i try my help menu on another server in another shard

#

but working on my server

paper cliff
#

??

#

Oh you're fetching the name of the emoji

#

I see

earnest phoenix
#

yes

#

any way around that?

weak rain
#
internal/modules/cjs/loader.js:1187
  return process.dlopen(module, path.toNamespacedPath(filename));
                 ^

Error: The specified module could not be found.
\\?\E:\Thunder V2\node_modules\canvas\build\Release\canvas.node
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1187:18)
    at Module.load (internal/modules/cjs/loader.js:985:32)
    at Function.Module._load (internal/modules/cjs/loader.js:878:14)
    at Module.require (internal/modules/cjs/loader.js:1025:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (E:\Thunder V2\node_modules\canvas\lib\bindings.js:3:18)
    at Module._compile (internal/modules/cjs/loader.js:1137:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
    at Module.load (internal/modules/cjs/loader.js:985:32)
    at Function.Module._load (internal/modules/cjs/loader.js:878:14)

E:\Thunder V2>```
earnest phoenix
#
const reactEmoji = ['742861599035097158', '742861156787552287', '742860390517440573', '❓', '👻']
    const emoji = ['walletcoin', 'serverconfig', 'setuplogo', '❓', '👻']```
#

see

paper cliff
#

just do that

#

:walletcoin:

#

wait

weak rain
#

id and name

paper cliff
#

:walletcoin:

#

shit

weak rain
#

like this

paper cliff
#

Yes you have to put something like that :<:walletcoin:742861599035097158>

#

it will be converted to your actual emoji

nocturne grove
#

that's not the problem. The problem is that the emoji is not available on that other shard

paper cliff
#

You need both the emoji name & emoji

#

It is

#

I mean sure it's not in the bot cache

#

but it's usable

nocturne grove
#

it works totally on the other shard

paper cliff
#

Just use the entire id:name format

#

Yes you have to put something like that :<:walletcoin:742861599035097158>

weak rain
#

a for animated

nocturne grove
#

bots cannot use emoji's from servers they aren't in. Apparently this also counts for shards

weak rain
#

no a for non animated

paper cliff
#

This doesn't count for shards

#

As I said

#

just above

#

use the entire reference <:id:name>

nocturne grove
#

so you're saying id's work if it's on the same shard, and "discord emoji language" works accross shards?

paper cliff
#

uh

#

yes

#

?

weak rain
#

can someone help me

paper cliff
#

ids only literally fetch the emoji from your cache

weak rain
#

I just cant install quick.db

paper cliff
#

the entire reference doesn't do that

#
message.channel.send(`My message < :partyblob:4985561956196>`)```
#

@nocturne grove ^

#

i hate discord formatting omg

#

@weak rain what's the error

weak rain
#

its saying unable to find python wtf

hollow gulch
#

hello i need some help something is wrong with my bot

paper cliff
#

then install python?

hollow gulch
#

it does not work

paper cliff
#

Did you check the documentation?

hollow gulch
paper cliff
#

just read the error

#

bot is not defined

weak rain
#

@paper cliff i tried

paper cliff
#

@weak rain and?

weak rain
#

but it gave more errors

#

so i used undo

nocturne grove
#

the entire reference doesn't do that
@paper cliff yeah but he wants to react with an emoji. Will that still work?

paper cliff
#

It should yes

split goblet
#

Good morning guys, I just created my bot I wanted to help you how do I get the verification that is missing?

pallid igloo
#

What do you mean by verification?

#

Whitelisting?

hollow gulch
#

I cant find the problem

tight plinth
#

there is no verification

#

@hollow gulch dont copy paste code and learn js

split goblet
#

Like checking that I have the developer tag?

hollow gulch
#

?

#

i dont paste

#

and copu

#

copy*

tight plinth
#

apparently

split goblet
#

Yes

hollow gulch
#

i watched youtube tutourials

tight plinth
#

youre dont know wat youre doing sooo

pallid igloo
#

@hollow gulch U litterally do, That is a basic level issue.

tight plinth
#

youtube tutorials

#

plz no

#

@split goblet bot verification is another story

#

its not bc u created a bot that u have a badge

pallid igloo
#

If you are following discord.js, Please refer to https://discordjs.guide/ It is maintained by the library devs and is the only up-to-date guide.

tight plinth
#

^

paper cliff
#

@split goblet To obtain the developer badge, your bot has to be in more than 75 servers

tight plinth
#

official guide > yt

pallid igloo
#

ikr

split goblet
#

Yes, how else did I get it? or need to boot the bot on multiple servers?@tight plinth

tight plinth
#

75

#

no fakes

#

also learn how to read

pallid igloo
#

@split goblet You need to keep your bot online for atleast 12 hours/day and That bot needs a minimum of 75 guilds with atleast 14 non bot members each.

split goblet
#

Got it thanks ae kkkk not wise it's going to be a long walk

tight plinth
#

@pallid igloo nope

#

your bot needs to be in 75 non-fake servers. fake=server you own/bot farms...

pallid igloo
#

Oh.

tight plinth
#

there is no other requirement for now

paper cliff
#

@pallid igloo stop spreading false information everytime omgggggggggggg

pallid igloo
#

Alr I'm sorry, I'll take a break from this server for a week.

tight plinth
#

you better

split goblet
#

In fact, Some developers create server and fakes accounts to win just that tag :(

sick fable
#

Uhh

tight plinth
#

discord decline them forever lol

#

report them

#

quic

weak rain
#

how should i open Powershell with administrator

pure lion
#

right click on windows button => powershell (administrator)

tight plinth
#

use cmd

weak rain
#

hm ok

#

its not opening in the folder i want to

earnest phoenix
#

Sup

#

@weak rain use cd

pallid igloo
#

its not opening in the folder i want to
@weak rain You can use cd or change directory in order to change where you want to go. Check with dir if that directory you wanna go is actually there or not.

#

Dir is for windows

#

LS for Linux and Max

earnest phoenix
#

So is cd

pallid igloo
#

cd works in all 3 iirc.

earnest phoenix
#

@paper cliff tried your way still nope

delicate shore
#

u

weak rain
#

;-;

unkempt creek
#

s

delicate shore
#

@weak rain ngl your pfp make it looks like ur gay

paper cliff
#

@earnest phoenix what way I forgot

weak rain
#

@delicate shore no

split goblet
#

Guys my bot needs 12 hours online to appear the green ball?

sharp urchin
#

i made a bot

#

im currently testing it

split goblet
#

mine I did now I'm also testing :)

paper cliff
#

@split goblet No, if it's online, you should see the green ball automatically

leaden rover
#

I'm using discord.py and I need my bot to be able to show how many guilds its on inside an embed.

#

How do I do that?

split goblet
#

he's online just to stay with ???????@paper cliff

paper cliff
#

@split goblet ??????

#

@leaden rover Did you even read the documentation before asking that question?

split goblet
#

??

leaden rover
#

Yes

paper cliff
#

@split goblet what?

leaden rover
#

I have this currently:
embed.add_field(name=":star: **Servers:**", value="`f'len{client.guilds}'`", inline=True)

paper cliff
#

wtf

#

Your syntax is incorrect

embed.add_field(name="⭐ Servers:", value=f"{len(client.guilds)}", inline=True)
leaden rover
#

Oh ok

pale vessel
#

len{}?

pallid igloo
#
const DBL = require('dblapi.js');
const dbl = new DBL(yourDBLTokenHere, { webhookPort: 5000, webhookAuth: 'password' });
dbl.webhook.on('ready', hook => {
  console.log(`Webhook running at http://${hook.hostname}:${hook.port}${hook.path}`);
});
dbl.webhook.on('vote', vote => {
  console.log(`User with ID ${vote.user} just voted!`);
});

This is the code from the docs, I wanted to ask What is the webhookAuth? Is that something like we set a password or on the lines of that?

paper cliff
#

It's like a password that you have to configure in top.gg too

leaden bronze
#

:()

#

what do you use the top.gg api for?

#

does it have any specific cool features?

pallid igloo
#

Vote tracking, Widget making, Servers, etc.

#

it's all about for the people with top.gg bots

leaden bronze
#

right

leaden rover
#

Is it client.guilds ir bot.guilds?

pale vessel
#

whatever you defined your client as

delicate shore
#
npm WARN deprecated request-promise@4.2.6: request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported```
restive furnace
#

it just warn

#

but see those if u want to know why

delicate shore
#

ok

#

thnx

quartz kindle
#

if you're using those, you should use something else

#

if a package you're using is using those, then the package authors should update it to not use those

umbral pollen
#

Guys i just have a question , i have just uploaded my discord bot in top.gg like 2 weeks ago and still it is not coming in the website

quartz kindle
#

verification can take 3 weeks

earnest phoenix
#

Some1 knows how to make a logs vote of dbl?
In python

quartz kindle
umbral pollen
#

@earnest phoenix they will ping me ??

earnest phoenix
#

Ok

#

This is not the channel to ask in @umbral pollen move to #support

woven sundial
#

Hello everyone pikachuhello
I have a .json with some information like that

{
"stats" :{
some datas
},
"monitors" :[
{
"id" : id,
"type" : 4
},
{
"id" : anotherID,
"type" : 3
}
]
}```
my question is : How to get the first elements or the second ?

I tried ```myfile.monitors[0].id``` but it returns me ```TypeError: Cannot read property '0' of undefined```
Can someone help me ?
golden condor
#

@woven sundial that should work

woven sundial
#

it doesen't ...

golden condor
#

that is strange

#

is it an api fetch?

woven sundial
#

its request for uptime robot api

golden condor
#

then why are you requiring a file?

#

wait

#

can you show the whole code

#

or the bit where you fetch?

woven sundial
#

yep that'll be better lol

golden condor
#

can u show that?

woven sundial
#

sure

golden condor
#

You might have forgotten to await it

#

http requests are promises

woven sundial
#
exports.run = (client, message, args) => {
  var Discord = require("discord.js");

  var request = require("request");
          
  var options = { method: 'POST',
    url: 'https://api.uptimerobot.com/v2/getMonitors',
    headers:
     { 'cache-control': 'no-cache',
       'content-type': 'application/x-www-form-urlencoded' },
    form: { api_key: 'MY-API-KEY', format: 'json', logs: '1' } };
            
  request(options, function (error, response, body) {
    if (error) throw new Error(error);
            
    console.log(body);
    console.log(body[0].monitors)
});

    
   
};
golden condor
#

huh

#

weird

#

ohhhhhhhhhhhhh

pallid igloo
#

No async await

golden condor
#

You used body[0]

#

it's body.monitors[0] no?

woven sundial
#

yep I tried some things 😦