#development

1 messages · Page 1115 of 1

jolly quail
#

Just switched to djs12 lol

wanton anvil
#

great job @golden condor

jolly quail
#

client.guilds.cache.get(GUILD ID).channels.cache.get(CHANNEL ID)
Better solution

wanton anvil
#

great job @jolly quail

#

are any pythonistas out here??

#

@jolly quail will the same code what you have run in js work on py

#

that class

jolly quail
#

Guess not

wanton anvil
#

oh

#

can I try discord.utils.get() for that

jolly quail
#

Idk

wanton anvil
#

oh

#

thanks anyways

jolly quail
#

Np lol

slender thistle
#

It's better to just get_guild whenever possible

wanton anvil
#

@slender thistle can I use Client.get_guild for that??

slender thistle
#

For what exactly

#

Documentation time

surreal notch
#

what to do for whenever a personn uses my bot cmd it shows in my channel

wanton anvil
#

@slender thistle for sending a message in a specific channel

surreal notch
#

i use cmd handler

#

lol

slender thistle
#

Yes, you can use get_guild

wanton anvil
#

thanks shivaco

umbral pollen
#
      throw er; // Unhandled 'error' event
      ^
MongoParseError: Invalid message size: 1347703880, max allowed: 67108864
    at processIncomingData (/rbd/pnpm-volume/ea7b8d63-a344-452f-af1d-a100f4db4008/node_modules/.registry.npmjs.org/mongodb/3.5.10/node_modules/mongodb/lib/cmap/message_stream.js:118:7)
    at MessageStream._write (/rbd/pnpm-volume/ea7b8d63-a344-452f-af1d-a100f4db4008/node_modules/.registry.npmjs.org/mongodb/3.5.10/node_modules/mongodb/lib/cmap/message_stream.js:42:5)
    at doWrite (_stream_writable.js:415:12)
    at writeOrBuffer (_stream_writable.js:399:5)
    at MessageStream.Writable.write (_stream_writable.js:299:11)
    at Socket.ondata (_stream_readable.js:705:22)
    at Socket.emit (events.js:193:13)
    at Socket.EventEmitter.emit (domain.js:481:20)
    at addChunk (_stream_readable.js:295:12)
    at readableAddChunk (_stream_readable.js:276:11)
    at Socket.Readable.push (_stream_readable.js:231:10)
    at TCP.onStreamRead (internal/stream_base_commons.js:150:17)```
#

how to fix it ??

crystal socket
#

do you know how to read? MongoParseError: Invalid message size: 1347703880, max allowed: 67108864

#

make the message size smaller

#

e.z.

wanton anvil
#

can anybody say me does top.gg provide a server to run our bot our we should have our own??

crystal socket
#

can anybody say me does top.gg provide a server to run our bot our we should have our own??
@wanton anvil yeah you can run it in #commands but thats only for approved bots

#

i would recommend having your own server

wanton anvil
#

i didn't meant discord server @crystal socket I meant hosting server

slender thistle
#

top.gg doesn't provide any hosting for bots

wanton anvil
#

thanks shivaco

crystal socket
#

^, try glitch and heroku, they are about average free hosts

slender thistle
wanton anvil
#

heroku is kicking my a** off @crystal socket by throwing errors

golden condor
#

No private code tho

umbral pollen
#

``` bash: start.sh: No such file or directory````

#

how to fix this one ??

crystal socket
#

there is no file named start.sh

slender thistle
crystal socket
#

heroku is kicking my a** off @crystal socket by throwing errors
@wanton anvil show errors

golden condor
umbral pollen
#

what to next ??

crystal socket
#

@umbral pollen oh lol, are you trying to get the e p i c badge? all of us are trying to get the badge cause its so e p i c bait not tooken

wanton anvil
#

@crystal socket app not compatible with buildpack

feral aspen
#

Guys

#

If I linked something using fs.writeFile, how can I unlink?

#

I dont want to delete.

crystal socket
#

@crystal socket app not compatible with buildpack
@wanton anvil select another buildback

umbral pollen
#

@crystal socket this is my first bot

wanton anvil
#

I did it @crystal socket didn't work

crystal socket
#

@crystal socket this is my first bot
@umbral pollen k

feral aspen
#

If I linked something using fs.writeFile, how can I unlink?
@feral aspen .

#

any help!?

#

?!

umbral pollen
#

@crystal socket i made one bot with the java but it is not here and this bot , i am making with pythin

#

sorry python

wanton anvil
#

I love python

pale vessel
#

@feral aspen you answered yourself

#

unlink

feral aspen
#

@pale vessel

#

This is my code.

crystal socket
#

@wanton anvil if you have the money, the eaasiest thing is just to get a real host

feral aspen
#
                if(args[2]) {
                let bioStatus = args.slice(2).join(" ");
                if(!bio[user.id]) {
                    bio[user.id] = {
                        name: bot.users.cache.get(user.id).tag,
                        bio: bioStatus
                    }
                    fs.writeFile("./bio.json", JSON.stringify(bio), (err) => {
                        if(err) console.log(err);
                    });
                message.channel.send(`Successfully setted your bio to ${bioStatus}`)
                }
                }
            }
            if(args[1] === "reset") {
                bio[user.id] = {
                    name: bot.users.cache.get(user.id).tag,
                    bio: bioStatus
                }
                fs.unlink("./bio.json", JSON.stringify(bio), (err) => {
                    if(err) console.log(err);
                });```
pale vessel
#

i-

#

smh

crystal socket
#

its about 3-4$/month

pale vessel
#

i don't need your code

feral aspen
#

Ik

#

but should I change anything

#

cause it errored.

crystal socket
#

maybe show the error mmLol

feral aspen
#

Unexpected end of JSON input

#

I am making a profile status thing, where they enter the status and it will save it in a json file.

#

This is the code.

#
                if(args[2]) {
                let bioStatus = args.slice(2).join(" ");
                if(!bio[user.id]) {
                    bio[user.id] = {
                        name: bot.users.cache.get(user.id).tag,
                        bio: bioStatus
                    }
                    fs.writeFile("./bio.json", JSON.stringify(bio), (err) => {
                        if(err) console.log(err);
                    });
                message.channel.send(`Successfully setted your bio to ${bioStatus}`)
                }
                }
            }
            if(args[1] === "reset") {
                bio[user.id] = {
                    name: bot.users.cache.get(user.id).tag,
                    bio: bioStatus
                }
                fs.unlink("./bio.json", JSON.stringify(bio), (err) => {
                    if(err) console.log(err);
                });```
pale vessel
#

you posted that twice

feral aspen
#

Should I change anything?

#

cause it errors.

pure lion
#

I need help with nginx

#

So basically h o w

#

Do I make it work

#

Because it's not working from the online generator thingy

umbral pollen
#
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-cqdI_Z/discord/setup.py", line 5, in <module>
        with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
    TypeError: 'encoding' is an invalid keyword argument for this function```
#

how to fix this ??

crystal socket
#

Because it's not working from the online generator thingy
@pure lion have you sshed into it?

pure lion
#

Yeah I've followed all the instructions

crystal socket
#

how to fix this ??
@umbral pollen step 1. read. step 2. done

#

Yeah I've followed all the instructions
@pure lion so you've sshed in?

pure lion
#

Yeah

delicate shore
#

how to make people add my bot

#

;-;

pure lion
#

Wait I'll send the error

crystal socket
#

how to make people add my bot
@delicate shore torture

#

oh wait i misread it, just make a good bot

pure lion
#

LMaO

delicate shore
#

i did make a good bot pretty sure

#

lmao

#

but

#

people add it and remove it

crystal socket
#

^ its the same for every bot

#

either way imma head out

#

gn

delicate shore
#

it got added in a server with over 130K+ members

#

but it got reoved

#

removed*

pure lion
#

systemctl status nginx.service

#

wait no

#

mi errór

#

lmao im retar

#

nginx: [emerg] host not found in "*<ip>:443" of the "listen" directive in /etc/nginx/sites-enabled/ale-bot.xyz.conf:2
nginx: configuration file /etc/nginx/nginx.conf test failed

sullen harness
pure lion
#

tanq

sullen harness
#

Someone make a stack overflow bot

pure lion
#

we have tim

rain prairie
#

can someone make me a clear command (node ​​js, basics) against a twitch mode command

pure lion
#

what

golden condor
#

no, we don't spoonfeed

pure lion
#

pay me

#

pledge to my patreon and i will

#

giv hard earned moniez

golden condor
#

inhales A D S

pure lion
#

nono

#

its a suggestion

#

if they want something out they gotta put something in

golden condor
#

A suggestion with inhales ** A D S **

smoky forge
#

Hi so suddenly my bot is crashing after a few minutes
Any reasons?
I had it on GCP first and thought that the problem was from their side, but then i deployed locally and seems the problem is from my end

twilit rapids
#

What's the error

smoky forge
#

There is no error

twilit rapids
#

Does it log anything on console when it crashes

smoky forge
#

my server is running

#

nothing

#

my server is running

#

but somehow the bot becomes unresponsive

twilit rapids
#

Do you log errors

smoky forge
#

yeah well i shifted it on local so anything that comes on the console is an error right? or should i add a logger?

twilit rapids
#

Depends if you log anything else, if you don't log anything yourself then most of the things that are logged are errors

still lily
#

i was messing around on youtube and made a discord.js ai bot

pure lion
#

i cant interpret this nginx stuff ahahahaahfhgsgfuheiughfisluehfiureiulbdsv im stuck and im not sure what to do

smoky forge
#

@twilit rapids I am printing all the pokemon that are spawning in various servers

#

somehow the bot becomes unresponsive after a few mins

#

:/

twilit rapids
#

Then, can you show any errors that are logged

smoky forge
#

there are no errors

#

thats the problem

twilit rapids
#

Hm

smoky forge
#

only the bot goes offline from discord

pure lion
#

what do you use to develop?

twilit rapids
#

Are you still running the application

#

Like, you don't close it or ctrl c or anything

smoky forge
#

yeah its still running

#

@twilit rapids can u join my server once and see? I actually added a new feature last night and it has been bad ever since. So i unloaded half of it

#

it can be loaded back anytime..

twilit rapids
#

I'm good thank you, I'm not really sure what's going on though

#

For your bot to go offline without any errors whatsoever is weird

smoky forge
#

yeah totally

#

:/

#

i was guessing some db connection is not closing

twilit rapids
#

Without any other information I can't really help you

smoky forge
#

so i was double checking that

twilit rapids
#

What library are you using

smoky forge
#

pandas for data frame, sqlalchemy for data base combined with psycopg2-binary and ofc discordpy

twilit rapids
#

Then you could maybe ask it in the discord.py server

smoky forge
#

can u share with me the link?

still merlin
pure lion
#

anyone nginx?

#

i am very very stuck

earnest phoenix
#

hii

#

any command that I should add in bot?

lusty quest
#

@smoky forge did you monitor your Rescource Usage? looks like you load a ton of stuff on your VPS with your code

#

@pure lion i know a little bit

smoky forge
#

@lusty quest yeah it was still free.. also if resource would be full i would have got a memory error right?

lusty quest
#

not only ram. ive had a Command that accessed a API. Someone managed to get the AI to DDos my Bot. this got the Bot to become unresponsive

#

if you throw to much stuff at your bot to process it can also become unresponsive

earnest phoenix
#

Hey, I'm from Poland, so sorry for hurting in English, but I have a question, does someone have a script, for example, on the economy or something like that?

lusty quest
#

did you monitor your CPU usage?

#

@earnest phoenix i think you should change your Nick first. and if you use d.js the d.js guide has a example

placid iron
#

My XP is based off Mee6 leveling system

#

It's pretty ugly

honest perch
#

Nvm this is development

earnest phoenix
#

Sorry for nick @lusty quest

honest perch
#

@earnest phoenix you need a database

#

And you need to add on to the money

#

Thats really it

surreal notch
#

How cen i swtch frm db to mongo

lusty quest
#

?

#

what db?

honest perch
#

Mongo is a db

lusty quest
#

i wrote myself a migration tool to switch from Mysql to MongoDB

#

worked almost perfect

surreal notch
#

Quick.db

pure lion
#

@lusty quest coooooooooooooool

#

i require assistance with nginx, ive made a profile here but im not sure what to put in and what not to put in

lusty quest
#

you cant manage to use this tool? wtf i wrote the configs myself

pure lion
#

h

#

im tired lmao idk what im doing

lusty quest
#

what did you want to do with it?

pure lion
#

make my express rtc app website thing accessible

surreal notch
#

||can I make a bot which helps people to tag everyone :)||

pure lion
#

no

surreal notch
#

:)

lusty quest
#

did you want to use SSL?

pure lion
#

yeah

lusty quest
#

you know how to get a SSL cert?

pure lion
#

i have certbot stuff set up

#

all the files are there but i get this error

#

nginx: [emerg] host not found in "*<ip>:443" of the "listen" directive in /etc/nginx/sites-enabled/ale-bot.xyz.conf:2
nginx: configuration file /etc/nginx/nginx.conf test failed

lusty quest
#

did you point the domain to your Server?

pure lion
#

m a y b e

#

fuck im a retard

#

but also it doesnt work if i put in ip:port

lusty quest
#

show your config

pure lion
#

brb

#
server {
    listen                  *ip:443 ssl http2;
    listen                  [::]:443 ssl http2;
    server_name             ale-bot.xyz;

    # SSL
    ssl_certificate         /etc/letsencrypt/live/ale-bot.xyz/fullchain.pem;
    ssl_certificate_key     /etc/letsencrypt/live/ale-bot.xyz/privkey.pem;
    ssl_trusted_certificate /etc/letsencrypt/live/ale-bot.xyz/chain.pem;

    # security
    include                 nginxconfig.io/security.conf;

    # logging
    access_log              /var/log/nginx/ale-bot.xyz.access.log;
    error_log               /var/log/nginx/ale-bot.xyz.error.log warn;

    # reverse proxy
    location / {
        proxy_pass http://ip:443;
        include    nginxconfig.io/proxy.conf;
    }

    # additional config
    include nginxconfig.io/general.conf;
}

# subdomains redirect
server {
    listen                  *ip:8080 ssl http2;
    listen                  [::]:443 ssl http2;
    server_name             *.ale-bot.xyz;

    # SSL
    ssl_certificate         /etc/letsencrypt/live/ale-bot.xyz/fullchain.pem;
    ssl_certificate_key     /etc/letsencrypt/live/ale-bot.xyz/privkey.pem;
    ssl_trusted_certificate /etc/letsencrypt/live/ale-bot.xyz/chain.pem;
    return                  301 https://ale-bot.xyz$request_uri;
}

# HTTP redirect
server {
    listen      *ip:80;
    listen      [::]:80;
    server_name .ale-bot.xyz;
    include     nginxconfig.io/letsencrypt.conf;

    location / {
        return 301 https://ale-bot.xyz$request_uri;
    }
}
lusty quest
#

where is your root?

pure lion
#

which is that :d

lusty quest
#

the path to your web directory

#

root /var/www/example.com/public; add this below your server_name and edit the path

pure lion
#

It's var/www/example.com but ale-bot.xyz

lusty quest
#

edit the path to match your settings

#

also did you got the ip inserted? bcs *ip will not work

pure lion
#

Oh

#

So remove all *s?

lusty quest
#

is ip your server ip or just ip?

pure lion
#

It's my server ip

lusty quest
#

remove *ip:

pure lion
#

Just port?

#

For all or am I dumb stupid retar

lusty quest
#

i havent done nginx configs in a while, i just take what the digitalocean page you send me offers

#

yes but it should be only the port

#

why did you set a ip there?

pure lion
#

I didn't, digitalocean put it there

lusty quest
#

yea bcs you havent defined it

pure lion
#

nginx: [warn] server name "/var/www/ale-bot.xyz/" has suspicious symbols in /etc/nginx/sites-enabled/ale-bot.xyz.conf:4
nginx: [warn] conflicting server name ".ale-bot.xyz" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name ".ale-bot.xyz" on [::]:80, ignored

#

ran nginx -t

#

syntax is okay

lusty quest
#

you have invalid symbols in your path

#

replace - with _

pure lion
#

okay

lusty quest
#

(the folder and in the config)

pure lion
#

Is it weird that a letsencrypt file randomly appeared when I edited?,

lusty quest
#

it just refreshed the file index

pure lion
#

Alright

#

Still suspicious

lusty quest
#

why?

pure lion
#

I removed path name and it's fixed

#

Just ale-bot.xyz

earnest phoenix
#

There is someone who can give you a script for tickets ?

lusty quest
#

its possible that it uses the default settings

#

read rule 7A again

pure lion
#

When I go to the IP it shows the welcome to nginx thing

lusty quest
#

but dont question it if it works

#

if you do you get headache bcs you break it and then try to fix it again

pure lion
#

a

#

It says that 80, 8080 and 443 are already in use

lusty quest
#

possible

pure lion
#

It's being used by nginx

lusty quest
#

so you got 2 nginx instances?

pure lion
#

Nope

#

I think

#

How do I kill all?

lusty quest
#

or did you got apache2 running next to nginx

pure lion
#

This was a blank vps

lusty quest
#

alternative try to bind it to your server ip.

pure lion
#

Through?

lusty quest
#

some linux installations come with Apache preinstalled

#

some wired behavior

#

the config you got from DO already tryed to bind the Ip but the syntax was wrong

#

serverip:port should bind nginx to your serverip on the port

pure lion
#

Where do I put it tho I'm so confused

lusty quest
#

also dont confuse the IPV6 ip with the IPV4

pure lion
#

I'm not

#

I know it's the v4

#

Wait now I'm really confused

#

x(

#

its using www/html

lusty quest
#

bcs it defaults to this path

pure lion
#

Alrighttt how can I change that?

lusty quest
#

set a root directory like i told you

pure lion
#

Unknown directive public

lusty quest
#

did you edited the path to match your path?

pure lion
#

Yeah

lusty quest
#

why does it then cry about puplic?

pure lion
#

Ran -t and that's the error

smoky forge
#

ok its fixed

hallow frigate
#

wait until @hallow frigate realizes that me, Tim and a bunch of others speak Hue-Hue
@opal plank Oh really? that good :D

tight plinth
#

so i have a json object inside a js file, and it looks like that: js "commandNames": { "avatar": "avatar", "help": "aide", "loop": "répéter", //... } . I want to create another object named commandIntervedNames that i can use for other stuff, that basically will look like this: js "commandInvertedNames": { "avatar": "avatar", "aide": "help", "répéter": "loop", //... }. How can i do that without having to re write the translations made in the first object?

pure lion
#

@lusty quest now getting 404 not found when I go to ale-bot.xyz

lusty quest
#

does it worked before?

pure lion
#

Nope that's the first time it's loaded something other than not found

#
function swap(json){
  var ret = {};
  for(var key in json){
    ret[json[key]] = key;
  }
  return ret;
}

@tight plinth pulled from stack

lusty quest
#

is the config valid?

pure lion
#

i removed public

#

and ran -t

lusty quest
#

is it valid?

tight plinth
#

hm

pure lion
#
nginx: [warn] conflicting server name ".ale-bot.xyz" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name ".ale-bot.xyz" on [::]:80, ignored
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
tight plinth
#

looks somehow fine to me

lusty quest
#

is your path correct? does your root directory point to the directory where you got your files for the website?

#

if you are in /var/www try to add your folder name behind your ip in your browser

pure lion
#

alright

#

yep still not found

lusty quest
#

you have somewhere an error, im to tired to figure this out

pure lion
#

a h s h i t

plucky harness
#

is it possible to assign persistant storage to a runnning docker

#

without stopping or restarting it?

lusty quest
#

nope

pure lion
#

ugh idk what to do

#
server {
        listen 80;
        listen [::]:80;

        root /var/www/ale-bot.xyz;
        index index.html index.htm index.nginx-debian.html;

        server_name ale-bot.xyz www.ale-bot.xyz;

        location / {
                try_files $uri $uri/ =404;
        }
}

this is the content of my ale-bot.xyz (not .conf) file

finite nimbus
#

Any free 24/7 discord bot hosting?

summer torrent
#

free hosts are shit

#

buy vps

finite nimbus
#

I want free 😛

summer torrent
#

use glitch or heroku tohrushrug

earnest phoenix
lethal pine
#

embed.add_field(name="Roles:", value=f'{ctx.guild.role}', inline = False)

#

my code is not working

earnest phoenix
summer torrent
#

he wants a free smart

quasi bear
#

Anyone wanna help me set up a VPS

#

Just made a muisc bot cool_cookie

#

music**

muted venture
#

anyone know about the ytdl-core-discord lib?

#

i have a few questions

winter basalt
misty sigil
#

anyone know how i can use canvas as image in an embed?

muted venture
#

so in the ytdl-core-discord lib, how can i see where of the music i am right now? like 1:30 / 3:00 ....

summer torrent
#

@misty sigil .attachFiles

ripe wasp
#

me wen the

muted venture
#

so in the ytdl-core-discord lib, how can i see where of the music i am right now? like 1:30 / 3:00 ....
anyone ??

faint prism
#

That's in the ytdl-core, not the ...-discord extension

#

@muted venture

muted venture
#

but im using ytdl-core-discord one

faint prism
#

That project looked pretty barebones in features

muted venture
slender thistle
#

@lethal pine have you fixed your issue yet

faint prism
muted venture
#

ok, thanks

gleaming sentinel
#

hello

viral iris
#
            let text = args.slice(1).join(" ");
                const embedd = new Discord.MessageEmbed()
        .setColor('#0012f5')
.setAuthor("Unknown Error", bot.user.avatarURL())
        .setDescription('**Usage** : **-challenges {week number}**');
          if (!text)
            return message.channel
              .send(embedd);
    if( args[0] == "1") {
#

i did something wrong ?

faint prism
#

I gotta figure out these embeds

viral iris
#

i should if is -challenges send the first embed

#

but idk why done this

delicate shore
pale vessel
#

what

delicate shore
#

@viral iris how

#

How do you have owner

#

Written next to your name ?

#

Owner badge

viral iris
#

plugin

#

yep

delicate shore
#

Which one

#

Please tell

#

;-;

viral iris
#

i need help ;-;

pale vessel
cobalt spruce
#

BOIS
mee6 is off

delicate shore
#

i need help ;-;
@viral iris
Pls tell plugin ;-

cobalt spruce
#

servers are dieing

delicate shore
#

BOIS
mee6 is off
@cobalt spruce
I know

slender thistle
#

keep this channel on topic please

delicate shore
#

Hmm

viral iris
#
            let text = args.slice(1).join(" ");
                const embedd = new Discord.MessageEmbed()
        .setColor('#0012f5')
.setAuthor("Unknown Error", bot.user.avatarURL())
        .setDescription('**Usage** : **-challenges {week number}**');
          if (!text)
            return message.channel
              .send(embedd);
    if( args[0] == "1") {
#

why this happen

delicate shore
#

Plugin ;-;

solemn latch
#

How are you splitting args

delicate shore
#

^

viral iris
#

i need it like -challenges -> first embed
-challenges 1 send the next commans

delicate shore
#

How u defined args

viral iris
#

folder handler

#
run:(message, args, bot) => {
silver dust
#

UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'get' of undefined

#

how can i fix it?

solemn latch
#

Same error as before

delicate shore
#

Code

#

We can't help without code

solemn latch
#

You cannot use properties of undefined things

#

Check if its defined before doing .get

#

Every time you get that error, it means the same thing

silver dust
#

okay

#

i cant find where its defined

delicate shore
#

yo @viral iris pls tell plugin name ;-;

silver dust
solemn latch
#

Your error tells you what line the error is happening at

silver dust
#
    at Object.run (/Users/alitugratasci/Desktop/humpty/commands/reaction.js:38:42)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:18094) 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:18094) [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.
(node:18094) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'get' of undefined
    at Object.run (/Users/alitugratasci/Desktop/humpty/commands/reaction.js:38:42)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:18094) 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: 2)```
#

full error

slender thistle
#

check reaction.js line 38

silver dust
#

Okay

solemn latch
#

Second line of the error says the location

silver dust
#

let roles = client.reactionroles.get(message.guild.id, "roles")

#

here it is

amber fractal
#

reactionroles is undefined

faint prism
#

nested lambda functions are insane how much space they save

silver dust
#

"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()."

solemn latch
#

All that means is you have an unhandled error

lethal pine
#

@lethal pine have you fixed your issue yet
@slender thistle yup

solemn latch
#

The unhandled error being using undefined.get

silver dust
#

oh

#

reactionroles is undefined

muted venture
#

guys do u have any good lib for playing music from spotify? soemthing same as ytdl-core but for spotify

solemn latch
#

Spotify doesn't have an api for playing music like that iirc

faint prism
#

Spotify should have it's own api if nobody has a package

#

Hm

#

I believe it has a developer section

silver dust
#

found a solution

#

client.reactionroles = new enmap({name:"reactionroles"})

solemn latch
#

They have an api for getting song data, but not playing right?

faint prism
muted venture
#

@solemn latch so how the rythm and other bots can play from spotify?

silver dust
#

i forgot that that

faint prism
#

right, that's the only use case I've had

#

Idk if there is an api call that streams bytes lol

solemn latch
#

I was told rhythm takes song data from spotify and plays from youtube

faint prism
#

That's a good work around

solemn latch
#

More likly to be the right song

muted venture
#

@solemn latch so there should be a spotify to yt convertor api or some shit....

faint prism
#

Spotify API is really friendly though 🙂 I've used it before

muted venture
#

@faint prism so do u have any example to use it in nodejs? cuz i really didn't found anything in github

honest perch
#

there are npm packages

earnest phoenix
#

@earnest phoenix is that a npm package or web scrapping #development message
@delicate shore
what is?

muted venture
#

@honest perch what?

solemn latch
#

Looks like a command 🤔

honest perch
faint prism
#

Idk about that. Why not use their api docs..? It really is easy to make the GET requests

muted venture
#

@honest perch is it have anything like get the link and play it?

honest perch
#

read it

#

it gives you meta data

muted venture
#

@faint prism my vps has some issues with sending request, so i dont think that would be a good idea, or maybe takes some time for me to buy a better vps xD

solemn latch
#

Wrappers just make the request for you

faint prism
#

You can't make GET requests from your VPS...?

muted venture
#

@faint prism it send 3 times request, and i have no idea why

faint prism
#

@honest perch

This uses cheerio to scrape the spotify twitter widget so it is unsanctioned and likely to break
lol idk about that package

honest perch
#

i mean

#

if it works

#

it works

faint prism
#

but for production code? Maybe not the best dependency to add to a project

muted venture
#

it just returns the spotify link

faint prism
#

Of course

#

Now take the title and query youtube with it

honest perch
#
"title": "Immaterial",
  "type": "track",
  "track": "Immaterial",
  "artist": "SOPHIE",
#

query title and artist

#

into youtube

faint prism
#

And use a youtube-dl to grab the media stream

#

and plug that into the discord voice chat stream

muted venture
#

ok that maybe work for now

#

thanks

earnest phoenix
#

hey

#

i want a query if has the bot permissions
how i can do that in discord js?

faint prism
#

Should be a property outlined in discord js docs you can check. Someone else might drop the link if you can't find it.

solemn latch
#

<Guild>.me.permissions
?

earnest phoenix
#

ok thx @solemn latch

solemn latch
#

How you deleted the file or how you copy pasted code into another file?

lethal pine
#
  File "<fstring>", line 1
    (ctx.guild.)
               ^
SyntaxError: unexpected EOF while parsing``` please help
honest perch
#

you have a syntax error

lethal pine
#

yup

#

how to fix it

slender thistle
#

so you didn't fix the issue

#

What do you want to do

lethal pine
#
import discord
from discord.ext import commands
from discord.utils import get
import time
import asyncio```
#

geting error in import discord

#

line 1

slender thistle
#

is it downloaded

lethal pine
#

yup

#

@slender thistle

slender thistle
#

what error are you getting

lethal pine
#
  File "<fstring>", line 1
    (ctx.guild.)
               ^
SyntaxError: unexpected EOF while parsing``` please help

@slender thistle

slender thistle
#

Is that in your interpreter

#

What are you doing to get that error anyway

lethal pine
#

running a simple code

pale vessel
#

check line ending maybe?

#

maybe it's not on unix?

lethal pine
#

hm

placid iron
#

Ctx.guild.

#

What comes after the dot

#

You gotta have something right?

ripe wasp
#

hey guys

#

are any of you familiar with beautiful soup?

placid iron
#

Sorry, only chicken soup

lethal pine
#

Only ctx.guild.

#

@placid iron

misty sigil
#

thats your problem i suppose

lethal pine
#

Checking

misty sigil
#

remove the .

lethal pine
misty sigil
#

remove the . from the end.

earnest phoenix
#

So do I start on the Discord developer website?

#

for build a bot

misty sigil
#

yes

lethal pine
#

There is no .

slender thistle
#

there is

#

ctx.guild. pay closer attention

lethal pine
#

xD

#

?? Now

#

@slender thistle

#

@misty sigil

misty sigil
#

?!

#

i dont see the ctx.guild. section

slender thistle
#

are you sure you installed discord.py on the right Python version

lethal pine
#

Yup

#

💯

misty sigil
#

anyone know how i could make a basic api to post my bot's stats?

sand crown
#

Do any of you have experience with using google sheets as a database?

#

Is it efficient?

misty sigil
#

wtf

lethal pine
#

xD

long matrix
#

Hi

placid iron
#

must be a joke XD

sand crown
#

💓

#

obviously

long matrix
#

Who uses dbm

misty sigil
#

google discord bot economy leveling system lmao

sand crown
#

I only use bing

placid iron
#

i host on google docs

sand crown
#

Don't expose your token

misty sigil
#

its just the first bit

sand crown
#

still

slender thistle
#

the first two parts are useless

misty sigil
#

^

slender thistle
#

How are you running the bot

lethal pine
#

still
@sand crown dont worry about that

#

How are you running the bot
@slender thistle means ?

slender thistle
#

How are you executing the bot files

#

what do you enter in your terminal to run your bot

misty sigil
#

anyone know how i could make a basic api to post my bot's stats to?

lethal pine
slender thistle
#

python3 -m pip show discord.py

lethal pine
#

@slender thistle

#

??

slender thistle
#

don't name your files/folders to discord if there's any

lethal pine
#

nope

#

now what should i do @slender thistle

#

?

opal plank
#

if we only restarted the bingo, screenshots are a thing Avi

lost herald
#

im making a membercount bot for some dude, whats the ratelimit to renaming channels

opal plank
#

prob bad idea to automate api that way. at least make it an hour or two if you're going to

lost herald
#

i mean when someone joins the server it checks last time the bot changed the channel

sudden geyser
#

2 changes per 10 minutes to my knowledge

#

but it's not good to try getting close to rate limits

opal plank
#

go for at least an hour, that'd be my recommendation IF you want to do it

lost herald
#

ofc, ill prob enforce a 30 minute cooldown

#

or an hour

#

ight thx guys

opal plank
earnest phoenix
#

It makes reading code much easier, & you are more likely to get help if you do so

opal plank
#

show higher

#

you cut the error in half

earnest phoenix
#

^ Another reason to do what I mentioned in my above message

opal plank
sudden geyser
#

show the whole error

opal plank
#

show us your CONSOLE, like the whole thing

earnest phoenix
opal plank
#

higher

#

thats still cut in half

sudden geyser
#

missing permissions

opal plank
#

yeah missing perms

#

then you got 2 errors

misty sigil
#

hey guys

sudden geyser
#

hi

misty sigil
#

should i make a public api for my bot

opal plank
#

check for permissions before sending messages and if the message isnt empty

sudden geyser
#

What would you need it public for

misty sigil
#

because i cba to make it private

earnest phoenix
#

I mean, chances are depending on ur framework/language

#

It won't take much to make it private at all

placid iron
#

what is the API gonna do

misty sigil
#

not much

earnest phoenix
#

Django for example takes literally 1 line of code to do so

misty sigil
#

literally just display server count

sudden geyser
#

if it does not need to be public: make it private.
if there is some to benefit from making it public: consider making it public

placid iron
#

ddos time again Kek

misty sigil
#

lmao im sure ill make it private

sudden geyser
#

for example, dank memer has a public api

earnest phoenix
sudden geyser
#

cringe

opal plank
#

who uses your bot?

placid iron
#

ok time to ping 65512

#

XD

earnest phoenix
#

o no, whatever shall I do

opal plank
#

:/

earnest phoenix
#

:pepehands:

sudden geyser
#

The Missing Permissions error means your bot tried to do something it did not have permission to do. The stacktrace is not very helpful but you could experiment and see where the error is coming from.

opal plank
#

'im not using commands, surely no one in the 109 servers isnt'

#

make a global permission checker

earnest phoenix
#

When it comes to debugging, 2 things you should know

  1. Google is ur friend
  2. Spam print statements everywhere if you literally have no idea where its coming from, to help narrow it down
opal plank
#

check if the bot has the permissions it needs before sending the output

#

dont spam print statements

sudden geyser
#
  1. Spam print statements everywhere if you literally have no idea where its coming from, to help narrow it down
    no love for built-in debuggers sad
opal plank
#

learn how to use a debugger

#

Step debugging is your friend

sudden geyser
#

they're both fine imo but built-in debuggers can usually do more

earnest phoenix
#

Nah, just spam 30 print statements instead

opal plank
#

dont spam 30 print/console.log statements

#

you'll just add useless stuff on the bot + having to restart it to apply changes

#

unless you re-requiring dynamic commands

sudden geyser
#

*which varies on your language

opal plank
#

then you'll end up forgetting half of those console.log/prints in your code and you'll get bombarded with console spam down the line

placid iron
#

console.Log("got to the for loop")

console.Log("completed for loop")

console.log("did the image editing")

#

i see nothing wrong with that XD

earnest phoenix
#

We can add our bots to that server?

sudden geyser
#

define "that"

opal plank
#

Definetly use debugger

earnest phoenix
#

-_-

opal plank
#

debugger > print/console.log()

earnest phoenix
#

I see nothing wrong with this @opal plank

opal plank
#

the fact that yuo dont need to restart the bot/reload commands?

#

that you can trace all the variables and values as the code runs?

#

that you dont pollute your workspace with prints/logs?

#

that you use proper debugging tools?

#

¯_(ツ)_/¯

#

idk @earnest phoenix i may have a couple reasons

vestal star
#

I love figma

sudden geyser
#

1000x700

#

how much did you zoom in

vestal star
#

I didn't zoom

#

I recreated

#

discord

sudden geyser
#

ooo

vestal star
#

to make a high quality vector

#

then I just put it on a background (it was transparent) and made a 20px border

#

I don't even have an account called "Proton" lmao

#

I still need to replace the video stock photo that I had there for testing while I was designing

#

O and the text moves

#

and it's all responsive

plucky harness
#

bot goes online and offline when i tries to make it come online
and after 20 tries it finally comes online

lethal pine
#

@slender thistle now it is working

#

and it is working fine

#

thankx for helping me @slender thistle

plucky harness
#

u pinged him twice

lethal pine
#

xD

opal plank
#

legends say 3 times gives you free nitro

dire obsidian
#

@zenith terrace

    try {
        command.execute(message, args);
    } catch (error) {
        message.channel.send('there was an error trying to execute that command!');
        if (message.author.id !== '')
    }
fathom jetty
#

who know how to script

opal plank
#

most of us here jeremy

faint prism
#

Should that if be above the send?

lethal pine
#

xD

fathom jetty
#

o ok

#

can someone help me

slender thistle
#

-ask2ask

opal plank
#

dont ask to ask

gilded plankBOT
#

Don't ask to ask.
Just ask your question, it wastes time if you say "i need help" or "can someone help me?" instead of just saying what the problem is. Save your time and other people's time and just ask the question.

Please read https://dontasktoask.com/ for an explanation on why this is an issue.

fathom jetty
#

make a bot

opal plank
#

just ask

#

do you know a programming language?

faint prism
fathom jetty
#

o

opal plank
#

if you dont, first step is learning a language for programming

fathom jetty
#

sad....

opal plank
#

I'd recommend either py or javascript

#

or haskell if you dont value your life

faint prism
#

or C# if your anal about data types like me

restive willow
#

python prob easiest to learn if thats what u care about

fathom jetty
#

....

faint prism
#

but js has the """"best"""" discord library (I think)

restive willow
#

debatable

opal plank
#

need a lot more quotes in that 'best' mate

faint prism
#

I think

fathom jetty
#

nvm ima just sk others

#

ask*

restive willow
#

theyll tell you the same thing

#

?

fathom jetty
#

no

opal plank
#

ask others about what?

#

if you hoping for spoonfeeding, no one will do that, be it here or elsewhere

fathom jetty
#

helping me make a bot

slender thistle
#

I wonder what answer you are expecting

opal plank
#

we can help, we wont give you pre-made code though

slender thistle
#

They gave you the right direction to make a proper Discord bot and you refuse to listen blobComfySquish

opal plank
#

we expect you at least know the basics of a programming language to get you started

pale vessel
#

well, to get started, you need to get started

opal plank
#

PLEASE

#

PLEEEEASE

slender thistle
#

leave()

pale vessel
restive willow
#

lol

opal plank
#

tell me you arent doing a message event for every command

#

PLEASE

restive willow
#

eeee

#

it doesnt really matter if its a small bot tbf

pale vessel
#

pepelaugh oh no no no

#

it does matter wtf

opal plank
#

it does

pale vessel
#

are you ok

opal plank
#

memory leaks

#

dont use multiple listeners

slender thistle
#

for them to suffer the consequences

#

chill

faint prism
#

My bot triggers on every message event 😄

#

But not to reply

opal plank
#

thats why im asking if they have multiple event listeners for message

dire obsidian
#

im making a userinfo commands, somebody knows the function to get: msg.author.precense or something?

opal plank
#

presence*

slender thistle
#

msg.member.activity probably

opal plank
#

py or djs?

slender thistle
#

presence is attached to members, not users

opal plank
#

d.js has method for that

vestal star
#

anyone know what's wrong with my svg? it does not do this when scaled up

I'm talking about the tiny line

opal plank
#

you can access via author

slender thistle
#

Interesting

opal plank
#

its rather convenient

#

omg im retarded

#

d.js has a resolver already

#

i was doing it by hand

vestal star
#

LMAO

quartz kindle
#

lmao rip

placid iron
#

i have one listener for every cog 😎

astral hill
#

Giving the reaction + under the user's message, he gets experience. Anyone know how to do this in DBM?

vestal star
#

?

#

DBM?

lusty quest
#

Discord Bot Maker

#

funny enought if you have asked me this a year ago i would know a answer

#

but now i can only give you one in plain js.

#

better ask in the DBM discord

pure lion
#

sup i deleted the default file and made the root of my website the correct one but im still getting the welcome to nginx also its not letting me point to it using my domain

vestal star
#

Eww DBM

golden condor
#

Oh shut up

vestal star
#

@pure lion are you sure you deleted the right file?

pure lion
#

99% sure

golden condor
#

@pure lion change it in sites_enabled

pure lion
#

okay

#

delete the shortcut?

golden condor
#

What shortcut

#

The one in the main file you mean?

pure lion
#

idk in sites enabled theres a shortcut to the default file

vestal star
#

Oh god, are you on linux?

pure lion
#

yea

vestal star
#

K, what folder are you in (pwd)

pure lion
#

wait brb

#

i may be a retard

opal plank
#

welcome to the club

vestal star
#

k...

pure lion
#

alright

#

so

#

s o

#

nginx: [warn] conflicting server name ".ale-bot.xyz" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name ".ale-bot.xyz" on [::]:80, ignored

#

s o

vestal star
#

show me ur nginx.conf

pure lion
vestal star
#

k

#

What is in ur sites_enabled

pure lion
#

sorry just flexing my bots agility to bin stuff

#

wait

vestal star
#

great..

pure lion
#

this

vestal star
#

umm why are they shortcuts...?

pure lion
#

i d k

#

they link to the sites-available

vestal star
#

what did you do?
is this just a fresh install of nginx?

pure lion
#

nope

#

from like 2 days ago

vestal star
#

There won't just be random shortcuts

#

What distro are you on?

quartz kindle
#

sites-available and sites-enabled are two separate folders

#

standard nginx configuration usually includes symlinking the config files between both

pure lion
#

What distro are you on?
english

vestal star
#

k

quartz kindle
#

so if you change one, the other is changes as well

#

its normal for them to be shortcuts

pure lion
#

so yeah what the fu-

quartz kindle
#

but its not normal for you to have two config files for the same website

vestal star
#

Idk, I don't use nginx as a web server...

quartz kindle
#

delete the xyz file and keep the .conf file

#

also check the other folder to make sure it matches

pure lion
#

the one not named .conf has

server {
        listen 80;
        listen [::]:80;

        root /var/www/ale-bot.xyz;
        index index.html index.htm index.nginx-debian.html;

        server_name ale-bot.xyz www.ale-bot.xyz;

        location / {
                try_files $uri $uri/ =404;
        }
}

the one named .conf has

server {
    listen                  443 ssl http2;
    listen                  [::]:443 ssl http2;
    server_name             ale-bot.xyz;
    root            /var/www/ale-bot.xyz/;

    # SSL
    ssl_certificate         /etc/letsencrypt/live/ale-bot.xyz/fullchain.pem;
    ssl_certificate_key     /etc/letsencrypt/live/ale-bot.xyz/privkey.pem;
    ssl_trusted_certificate /etc/letsencrypt/live/ale-bot.xyz/chain.pem;

    # security
    include                 nginxconfig.io/security.conf;

    # logging
    access_log              /var/log/nginx/ale-bot.xyz.access.log;
    error_log               /var/log/nginx/ale-bot.xyz.error.log warn;

    # reverse proxy
    location / {
        proxy_pass http://145.239.115.76:443;
        include    nginxconfig.io/proxy.conf;
    }

    # additional config
    include nginxconfig.io/general.conf;
}

# subdomains redirect
server {
    listen                  8080 ssl http2;
    listen                  [::]:443 ssl http2;
    server_name             *.ale-bot.xyz;

    # SSL
    ssl_certificate         /etc/letsencrypt/live/ale-bot.xyz/fullchain.pem;
    ssl_certificate_key     /etc/letsencrypt/live/ale-bot.xyz/privkey.pem;
    ssl_trusted_certificate /etc/letsencrypt/live/ale-bot.xyz/chain.pem;
    return                  301 https://ale-bot.xyz$request_uri;
}

# HTTP redirect
server {
    listen      80;
    listen      [::]:80;
    server_name .ale-bot.xyz;
    include     nginxconfig.io/letsencrypt.conf;

    location / {
        return 301 https://ale-bot.xyz$request_uri;
    }
}
quartz kindle
#

ye get rid of the non-conf one

pure lion
#

alright

quartz kindle
#

that port 8080 there is also wrong

#

should be 443

pure lion
#

:0 it worked kinda

#

okay, where exactly tim?

quartz kindle
#

on the subdomains redirect section

pure lion
quartz kindle
#

now the reverse proxy part is also wrong

pure lion
#

i put in the IP

#

also okay

quartz kindle
#

assuming your node server is in the same machine

lusty quest
#

is your A Record for the domain correct?

quartz kindle
#

proxy_pass should be localhost or 127.0.0.1 and your node.js port

pure lion
#

theres no a record yet jajajajajjaja

golden condor
#

Can you go elsewhere please

grim aspen
#

@coral trellis

solemn latch
#

@slender thistle

golden condor
#

@star

pure lion
#

lmao

golden condor
#

@sinful belfry qt help us

coral trellis
#

Ty

lusty quest
#

throw the -atmod bomb

solemn latch
#

Get that bread

golden condor
#

Ok hes gone

tulip ledge
#

Whats happening in here lol

solemn latch
#

Just a spammer, mods saved us

tulip ledge
#

Oh lmao

pure lion
#

tim is port 8080 okay for the reverse proxy ting?

tulip ledge
#

Depends

solemn latch
#

If your local port is 8080

quartz kindle
#

yes its fine

tulip ledge
#

is port 8080 free?

pure lion
#

its my vps

#

so should be fine

tulip ledge
#

Should be fine

quartz kindle
#

it should be the port your node.js is using

golden condor
#

You should use port 80 for nginx

pure lion
#

with http://?

golden condor
#

Unless I misunderstood

quartz kindle
#

yes

#

http://localhost:8080

solemn latch
#

The reverse proxy isn't the port nginx is using @golden condor

golden condor
#

Or if you are feeling fancy 127.0.0.1

#

So I misunderstood

pure lion
#

IP not found

#

eeeee

golden condor
#

What

quartz kindle
#

did you upload the nginxconfig folder and all the extra conf files?

pure lion
#

i ran -t and there were no errors

#

would now be a good time to create an A name x)

quartz kindle
#

yes lol

pure lion
#

ok brb

#

root host is fine i assume

quartz kindle
#

yes, it doesnt matter for proxies

pure lion
#

h m its not working

quartz kindle
#

proxy_pass ignores the root folder

pure lion
#

oh

#

yeah theres still nothing

solemn latch
#

You said earlier you have no a records

pure lion
#

i made

solemn latch
#

Okay

#

It can take 24 to 48 hours for that to propagate

pure lion
#

well fuck

#

it usually takes a few minutes

solemn latch
#

It can take a few minutes

#

It can take much longer

pure lion
#

*cryig*

solemn latch
golden condor
#

You should use cloudflare

#

Free DDoS protection plus it's proxied so it instantly propogates dns

solemn latch
#

Am i the only one who hates cloudflare

golden condor
#

Yes

solemn latch
#

A lot of the time discord going down is because cloudflare

lusty quest
#

why tf would you hate them?

golden condor
#

If you can give a justified reason for hating it then fair enough

solemn latch
#

It just goes down a lot.
The number of reroutes is insane

lusty quest
#

its possible that its not even cloudflare

golden condor
#

A lot of the time discord going down is because cloudflare
@solemn latch no, cloudflare is rarely ever down, there was only tat one time.

lusty quest
#

like even large Websites rely on Cloudflare

solemn latch
#

Really? Discord was blaming the increase of client ping for months on cloudflare

golden condor
#

Discord was really unprofessional for ages

solemn latch
#

This was a few weeks ago

golden condor
#

If they didn't have cloudflare, they would be ddosed all the time

solemn latch
#

Cloudflare isn't the only ddos protection provider

golden condor
#

Yeah

lusty quest
#

its possible that they configured something wrong

golden condor
#

But it's one of the best

solemn latch
#

Its one of the largest, not the best imo

earnest phoenix
#

discord often goes down because of gcp, not cloudflare

golden condor
#

And they provide the services for free on unlimited domains, that's a massive thing.

earnest phoenix
#

there have been a few instances of downtime because of cloudflare, the rest are gcp issues

opal plank
#

blame the furry staff

#

its always teh best solution

earnest phoenix
#

that too

pure lion
#

hm

earnest phoenix
#

their staff are extremely incompetent

solemn latch
#

🤷‍♂️

#

Theres just always something going on with cloudflare

golden condor
#

They have hundreds of servers

earnest phoenix
golden condor
#

What do you expect?

earnest phoenix
#

am i blind

opal plank
earnest phoenix
#

re-routed does not mean that it's down, it just means it's been rerouted to another server

golden condor
#

Just because a few are rerouted doesn't make it bad.

pure lion
#

okay its propagated but still no work

solemn latch
#

🤷‍♂️ reroutes often mean periods of downtime

opal plank
#

is it actually cloudfare that is having issues rn?

golden condor
#

It just means that those servers are re routing their traffic

#

No

#

Cloudflare is fine.

pure lion
#

*cries* lmao what do

opal plank
#

so whats this whole convo on about?

solemn latch
#

I dont like cloudflare

golden condor
#

Provide a valid reason why.

solemn latch
#

Id rather pay another company for ddos protection

golden condor
#

You don't have to pay for cloudflare

solemn latch
#

Which I do

pure lion
#

i dont like not having access to my website so please help

opal plank
#

free and good or paid and good?

golden condor
#

And their free plan is good enough

solemn latch
#

Absolutely it is

quartz kindle
#

@pure lion show your current conf file

golden condor
#

But what is the problem with them, I don't understand

pure lion
#

for?

golden condor
#

Nginx

quartz kindle
#

the website conf file

pure lion
#

o

#
server {
    listen                  443 ssl http2;
    listen                  [::]:443 ssl http2;
    server_name             ale-bot.xyz;
    root            /var/www/ale-bot.xyz/;

    # SSL
    ssl_certificate         /etc/letsencrypt/live/ale-bot.xyz/fullchain.pem;
    ssl_certificate_key     /etc/letsencrypt/live/ale-bot.xyz/privkey.pem;
    ssl_trusted_certificate /etc/letsencrypt/live/ale-bot.xyz/chain.pem;

    # security
    include                 nginxconfig.io/security.conf;

    # logging
    access_log              /var/log/nginx/ale-bot.xyz.access.log;
    error_log               /var/log/nginx/ale-bot.xyz.error.log warn;

    # reverse proxy
    location / {
        proxy_pass http://127.0.0.1:8080;
        include    nginxconfig.io/proxy.conf;
    }

    # additional config
    include nginxconfig.io/general.conf;
}

# subdomains redirect
server {
    listen                  443 ssl http2;
    listen                  [::]:443 ssl http2;
    server_name             *.ale-bot.xyz;

    # SSL
    ssl_certificate         /etc/letsencrypt/live/ale-bot.xyz/fullchain.pem;
    ssl_certificate_key     /etc/letsencrypt/live/ale-bot.xyz/privkey.pem;
    ssl_trusted_certificate /etc/letsencrypt/live/ale-bot.xyz/chain.pem;
    return                  301 https://ale-bot.xyz$request_uri;
}

# HTTP redirect
server {
    listen      80;
    listen      [::]:80;
    server_name .ale-bot.xyz;
    include     nginxconfig.io/letsencrypt.conf;

    location / {
        return 301 https://ale-bot.xyz$request_uri;
    }
}
opal plank
#

oof

quasi plume
#

e

quartz kindle
#

your node.js server is on right?

pure lion
#

yeah

quartz kindle
#

can you see it if you access youripaddress:8080?

pure lion
solemn latch
#

Did you let this stuff past ufw?

pure lion
#

i cant access through that

#

maybe

#

i think i did

quartz kindle
#

you cant see your node.js server?

solemn latch
#

Ufw status

pure lion
#

nope

sage bobcat
#

One message removed from a suspended account.

pure lion
sage bobcat
#

One message removed from a suspended account.

pure lion
#

@sage bobcat no

quartz kindle
#

try this:
add another location block in your config file with something like this ```nginx
location /test {
return 200 'ok';
}

#

then try accessing youripaddress/test

pure lion
#

ok

quartz kindle
#

btw dont forget to restart nginx

#

every time you change configs

pure lion
#

yeah

#

btw location under where?

quartz kindle
#

right after your reverse proxy

pure lion
#

a

quartz kindle
#

or before

#

doesnt matter

#

btw

#

do the same in the port 80 server block

#

right before or after the return 301 location block

pure lion
#

alright

faint prism
#

Just don't block 22. Whatever you do, don't block it.

pure lion
#

gets locked out<

solemn latch
#

#worth

#

Id presume oxide provides a way to recover

faint prism
#

Install UFW on VPS -> Enable UFW and block all risky ports -> SSH connection terminates -> ??? -> Profit

dire obsidian
#

how to get the bot id like msg.channel.send('my id: ${client.id}') ?

faint prism
#

yes

#

+3 weeks

solemn latch
faint prism
#

No.
Problem.
Bro.

dire obsidian
#

ah

#

thanks

solemn latch
#

The docs are great for that stuff

dire obsidian
solemn latch
#

The guide isn't the docs

pure lion
#

took too long to respond

faint prism
#

CPU holding up okay currently. It has a few guilds and one extremely active one... Kinda nervous it's at 20% already ngl

dire obsidian
quartz kindle
#

@pure lion port 80 is working, but 443 isnt

#

your firewall is blocking 443

pure lion
#

oh

#

makes sense how unblocc

faint prism
#

Does anyone else see this error occasionally?
A MessageReceived handler is blocking the gateway task

quartz kindle
#

you can try sudo ufw allow in "Nginx Full"

#

to unblock all ports nginx uses by default

earnest phoenix
#

Does anyone else see this error occasionally?
A MessageReceived handler is blocking the gateway task
@faint prism you're blocking the handler for more than 3 seconds

#

the handlers are on the gateway thread

#

just run your blocking methods in another task

pure lion
#

tim

solemn latch
#

did windows get rid of the pip feature for videos?

pure lion
#

it sends me a download when i visit /test

#

OOOOOOOO

earnest phoenix
#

did windows get rid of the pip feature for videos?
windows never had native pip?

pure lion
#

got rid of test

quartz kindle
#

yes we didnt specify a content type, so it defaults to octet-stream which is a download

pure lion
#

502 bad gateway

solemn latch
#

nvm, it was firefox @earnest phoenix i swapped to chrome when i reinstalled windows a few months back

dire obsidian
solemn latch
#

fantastic feature