#development

1 messages Β· Page 428 of 1

knotty steeple
#

dart GWqlabsThonkery

frank wyvern
#

Anyone got any ideas why:

#
            response = await client.wait_for('message', check=lambda m: m.author == message.author and m.channel == message.channel)
            mentions = response.mentions
            
            print(mentions)```
prints an empty string when roles are mentioned?
knotty steeple
#

what library is that GWqlabsThonkery

trim plinth
upper zodiac
#

Am i the only one here use dbm

trim plinth
#

no there is a few more around here that use dbm

knotty steeple
#

dont waste money on dbm

#

you can just easily code a bot for free

floral stone
#

No you can't. Learning isn't free

trim plinth
#

but it is

#

you can learn a lang at codecademy, sololearn, etc for free

floral stone
#

Learning requires time and time isn't free. That's what my dad said.

trim plinth
#

tru

#

but you could easily just learn during free time if you have it

earnest phoenix
#

it depends how much free time you personally have

trim plinth
#

if you don't have free time...well fucc

floral stone
#

only coding will set you free

earnest phoenix
#

I am a free man thats for sure

knotty steeple
#

i mean free without money πŸ‘€

#

you can easily learn basic javascript, python and other languages on codecadamy

earnest phoenix
#

Does someone have a login example with discord (in express or Koa)? or can someone teach me how to do it?

civic fulcrum
topaz fjord
#

like i said passport is good for that stuff

earnest phoenix
#

okay thanks

earnest phoenix
#

learning how to use node yay

drowsy sentinel
#

glhf

radiant ridge
#

Is anybody experienced with sharding in discord.py? I'm not sure if I'm doing it right

quasi marsh
#

Do you use rewrite?

gilded blaze
#

How long do refresh tokens last?

fluid basin
#

refresh tokens as in?

quasi marsh
#

For oauth2

fluid basin
#

well idk... is it not stated on discord api docs

quasi marsh
#

I'm not 100% sure

topaz fjord
#

the access token contains a expires_in parameter

#

or should at least

quasi marsh
#

But I think I saw 64800 somewhere in my oauth url

#

Which correlates to 18 hours

topaz fjord
#

when the expires_in is reached

inner jewel
#

that's probably token expiration

topaz fjord
#

you use the refresh token to get a new access token

inner jewel
#

refresh tokens last longer than that

#

afaik

quasi marsh
#

I'd assume as much

topaz fjord
#

@inner jewel do refresh tokens last a little bit longer after the access token expires?

inner jewel
#

afaik yes

#

best place to ask would be DAPI

topaz fjord
#

but if that refresh token expires u need to get a new token

uncut slate
#

it's 86400 btw, 1 day @quasi marsh

vital lark
#

the loli needs some help pls help me pls ```nginx

Main: augu.me

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

# Don't enable gzip while in Production
gzip off;
server_name www.augu.me augu.me;

location / {
    proxy_pass http://localhost:3001/;
    proxy_redirect off;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-ForwardedFor $proxy_add_x_forwarded_for;
    proxy_set_header X-NginX-Proxy true;
}

}

fluid basin
#

hmm?

vital lark
#

yes

fluid basin
#

wuts wrong

bitter sundial
vital lark
#

when I use it with Express, it redirects to a 502

#

wait

abstract mango
#

i don't think you need all the extra headers Thonk

#

and yeah

#

do you have a express server running

#

502 means server down

vital lark
#

yes

bitter sundial
#

is that the right port

vital lark
#

Yes

#

3002

fluid basin
#

you wrote 3001

#

xd

abstract mango
#

beaned

vital lark
#

no u

#

I think a fuck up

abstract mango
#

lol

vital lark
#

let me test again

#

and nope

#

I did a minor change

#

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

bitter sundial
#

is it 3001 or 3002

vital lark
#

3002

#

wait

abstract mango
#

then change your proxy_pass to 3002

#

lol

bitter sundial
#

you wrote 3001

vital lark
#

I meant 3002

abstract mango
#

:oof:

frail kestrel
#

oof

vital lark
abstract mango
#

502

vital lark
#

yes

#

while express is running

bitter sundial
abstract mango
#

521 then 502 for some reason

fluid basin
#

lmao

vital lark
#
# node Website.js
[Website]: rembot.xyz is online~
abstract mango
vital lark
#

yes

#

I'm testing on bot website

bitter sundial
#

change the server_name

vital lark
#

wait

abstract mango
#

same

vital lark
#

am using ```
server {
listen 80;
listen [::]:80;

# Don't enable gzip while in Production
gzip off;
server_name www.rembot.xyz rembot.xyz;

location / {
    proxy_pass http://localhost:3002/;
    proxy_redirect off;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-NginX-Proxy true;
}

}

#

I'm dumb

bitter sundial
#

also why no gzip in prod

vital lark
#

idk

fluid basin
#

lol

vital lark
#

I like it off

#

ok

#

and this is when I see the nginx status sudo systemctl status nginx.service ```
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2018-06-09 09:11:04 CEST; 2min 58s ago
Process: 25357 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exited, status=0/SUCC
Process: 25367 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Process: 25362 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Main PID: 25369 (nginx)
Tasks: 2
Memory: 1.8M
CPU: 17ms
CGroup: /system.slice/nginx.service
β”œβ”€25369 nginx: master process /usr/sbin/nginx -g daemon on; master_process on
└─25370 nginx: worker process

Jun 09 09:11:04 no_u systemd[1]: Starting A high performance web server and a reverse proxy server...
Jun 09 09:11:04 no_u systemd[1]: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument
Jun 09 09:11:04 no_u systemd[1]: Started A high performance web server and a reverse proxy server.```

bitter sundial
#

that / after the port is bothering me a bit

fluid basin
#

no its okay

#

actually its better to have it

bitter sundial
#

it looks bad ok

fluid basin
#

you don't want it to rewrite internally to http://localhost:3002myfile.html

vital lark
#

Hmm

bitter sundial
#

it doesnt do that

fluid basin
#

weird

#

discord html parser

bitter sundial
#

see my config

fluid basin
#

http://localhost:3002myfile.html

#

I meant this

vital lark
#

h

#

oh*

fluid basin
#

this is what I use @vital lark

location / {
        proxy_set_header        Host $host;
        proxy_set_header        X-Real-IP $remote_addr;
        proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
         proxy_set_header        X-Forwarded-Proto $scheme;

        proxy_pass http://127.0.0.1:3001/;
    }
vital lark
#

let me try it

fluid basin
#

works fine for me

vital lark
#

nope returns a 502

abstract mango
#

then your express is fukt

vital lark
#

let me check logs

abstract mango
#

do you have logs

#

lol

vital lark
#

yes

#

Hmm [09/Jun/2018:08:46:50 +0200] "GET / HTTP/1.1" 200 2440 "-" "Mozilla/5.0 (compatible; Discordbot/2.0; +https://discordapp.com)"

fluid basin
abstract mango
#

you need express logs not nginx logs

fluid basin
#

express died

#

try ssh port forward

vital lark
#

oh

fluid basin
#

and access the url

abstract mango
#

nginx just shows that's it working
it doesn't show the backend working :p

vital lark
#

hmm

#

how do I see them? I never done that before πŸ‘€

fluid basin
#

try connecting directly to the express using port forward

#

are you connected using ssh

vital lark
#

yes

fluid basin
#

and wuts your machine os

vital lark
#

Ubuntu 16.04

fluid basin
#

okok

#

just disconnect from the ssh server

#

then for the ssh url, you put this

#
ssh [username]@[server_ip] -L 3002:localhost:3002```
#

then once you've connected

vital lark
#

wait

upper zodiac
#

@knotty steeple i download free dbm from chrome

vital lark
#

@fluid basin for the OS machine, were you taking about like my PC machine?

fluid basin
#

yea

#

oops I forgot to mention that

vital lark
#

oh, I use Windows.

fluid basin
#

yea its your pc

#

Oh so putty?

vital lark
#

I thought you meant VPS machine

#

Termius

fluid basin
#

ooh ok

vital lark
#
earnest phoenix
#

not sure on terminus, but if you have putty you can use plink to do the port forwarding thing

bitter sundial
#

try curling the express from your terminal

vital lark
#

so like curl -i <url>?

#
HTTP/1.1 301 Moved Permanently
Date: Sat, 09 Jun 2018 07:34:42 GMT
Transfer-Encoding: chunked
Connection: keep-alive
Cache-Control: max-age=3600
Expires: Sat, 09 Jun 2018 08:34:42 GMT
Location: https://rembot.xyz/
Server: cloudflare
CF-RAY:<no_u>```
fluid basin
#

wait wot

vital lark
#

I did curl -i <url>

#

that's what poped up

upper zodiac
#

It's okay if i ask for donation on my bot right

#

#nidmoney4hostin

vital lark
#

no

upper zodiac
#

Mantaro does

fluid basin
vital lark
#

plus this is the wrong channel

quasi marsh
#

If you use embeds you can add them as a footer but this isn't really the right chat for that

upper zodiac
#

Ouh wrong chat

fluid basin
#

yeah so

vital lark
#

So what?

fluid basin
#

Its redirecting for some reason

#

can you do curl -i localhost:3002 on your vps

vital lark
#
curl -i localhost:3002
HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Content-Length: 1804
ETag: W/"70c-r54GfRuYEfQCr6S8rt16TXPwUHg"
Date: Sat, 09 Jun 2018 07:50:29 GMT
Connection: keep-alive

<!--
                     _           _                    
                    | |         | |                   
  _ __ ___ _ __ ___ | |__   ___ | |_  __  ___   _ ____
 | '__/ _ \ '_ ` _ \| '_ \ / _ \| __| \ \/ / | | |_  /
 | | |  __/ | | | | | |_) | (_) | |_ _ >  <| |_| |/ / 
 |_|  \___|_| |_| |_|_.__/ \___/ \__(_)_/\_\\__, /___|
                                             __/ |    
                                            |___/     

    Author: August (Chris)
    Page: Homepage
-->
<!DOCTYPE html>
<html>
    <head>
        <title>RemBot &bull; Home</title>
        <link rel="icon" href="https://cdn.discordapp.com/avatars/447229568282132510/63ab015184c99b3546ae87202cffa226.png?size=1024" />
        <link rel="stylesheet" href="css/index.css" /> <!-- ModestaCSS Helpers uwu -->
        <link rel="stylesheet" href="https://modesta.alexflipnote.xyz/css/modesta.min.css" /> <!-- ModestaCSS -->
    </head>
    <body>
            <section class="fullscreen">
                <div class="center-object">
                    <section class="me">
                        <img draggable="false" src="https://cdn.discordapp.com/avatars/447229568282132510/63ab015184c99b3546ae87202cffa226.png?size=1024" class="image-title" />
                        <h1 class="title">RemBot</h1>
                        <span class="undertitle">Rem is a discord bot made in the Eris library.</span>
                    </section>
                    <div class="buttons">
                        <a href="/invite" class="btn hover amethyst-nodark" target="_blank">Invite me!</a>
                        <a href="/discord" class="btn hover discord" target="_blank">Discord Server</a>
                    </div>
                </div>
            </section>
    </body>```
fluid basin
#

hmm weird

vital lark
#

wait it's my HTML page

fluid basin
#

yeah it is supposed to be that

#

Maybe its CF

#

Login to your cloudflare and either clear cache or enable development mode

vital lark
#

Let me do it on my browser

fluid basin
#

See if that works

#

its returning 521 then 502

vital lark
fluid basin
#

idk why

#

no I mean go to cloudflare clear cache

vital lark
#

@fluid basin How do I do that

fluid basin
#

yes

vital lark
#

ok

fluid basin
#

just purge everything to be safe

vital lark
#

I did it

fluid basin
#

alright

#

weird its returning 521

#

Are you sure the IP of rembot.xyz points to your VPS

abstract mango
#

disable cf for now? or that ^

vital lark
#

Yes

fluid basin
#

yes omg wtf

#

too many redirects

#

its your nginx

vital lark
fluid basin
#

its spamming 301s

#

can you show us your nginx conf

#

the complete one

quasi marsh
#

Try putting your cloudflare certificates to full (strict)

#

That works for me

fluid basin
#
Date: Sat, 09 Jun 2018 07:56:41 GMT
Transfer-Encoding: chunked
Connection: keep-alive
Cache-Control: max-age=3600
Expires: Sat, 09 Jun 2018 08:56:41 GMT
Location: https://rembot.xyz/
Server: cloudflare
vital lark
#

It is on full (strict)

#

and ```nginx
server {
listen 80;
listen [::]:80;

# Don't enable gzip while in Production
gzip off;
server_name www.rembot.xyz rembot.xyz;

location / {
    proxy_set_header        Host $host;
    proxy_set_header        X-Real-IP $remote_addr;
    proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header        X-Forwarded-Proto $scheme;
    proxy_pass              http://127.0.0.1:3002/;
}

}

fluid basin
#

thats all?

vital lark
#

No

#

there is more

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

    # Don't enable gzip while in Production
    gzip off;
    server_name www.voided.pw voided.pw;

    # OwO
    location / {
        proxy_pass http://localhost:3000;
        proxy_redirect off;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-NginX-Proxy true;
    }
}


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

    # Don't enable gzip while in Production
    gzip off;
    server_name www.augu.me augu.me;

    location / {
        proxy_pass http://localhost:3001;
        proxy_redirect off;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-NginX-Proxy true;
    }
}

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

    # Don't enable gzip while in Production
    gzip off;
    server_name www.rembot.xyz rembot.xyz;

    location / {
        proxy_set_header        Host $host;
        proxy_set_header        X-Real-IP $remote_addr;
        proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header        X-Forwarded-Proto $scheme;
        proxy_pass              http://127.0.0.1:3002/;
    }
}
fluid basin
#

Yeah there might be something else thats constantly redirecting

vital lark
#

I showed rembot.xyz because that's what I'm using to test

fluid basin
#

well something is redirecting it in an infinite loop

#

can you check if apache is running

#

sudo systemctl status apache

vital lark
#
● apache2.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)

Jun 09 08:32:04 vps149491 systemd[1]: Starting LSB: Apache2 web server...
Jun 09 08:32:04 vps149491 apache2[4943]:  * Starting Apache httpd web server apache2
Jun 09 08:32:05 vps149491 apache2[4943]:  *
Jun 09 08:32:05 vps149491 systemd[1]: Started LSB: Apache2 web server.
Jun 09 08:42:55 vps149491 systemd[1]: Stopping LSB: Apache2 web server...
Jun 09 08:42:55 vps149491 apache2[24123]:  * Stopping Apache httpd web server apache2
Jun 09 08:42:56 vps149491 apache2[24123]:  *
Jun 09 08:42:56 vps149491 systemd[1]: Stopped LSB: Apache2 web server.```
#

here is nginx @fluid basin ```
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2018-06-09 09:22:48 CEST; 38min ago
Process: 25455 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exited, status=0/SUCC
Process: 25465 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Process: 25460 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Main PID: 25467 (nginx)
Tasks: 2
Memory: 1.8M
CPU: 16ms
CGroup: /system.slice/nginx.service
β”œβ”€25467 nginx: master process /usr/sbin/nginx -g daemon on; master_process on
└─25468 nginx: worker process

Jun 09 09:22:48 vps149491 systemd[1]: Starting A high performance web server and a reverse proxy server...
Jun 09 09:22:48 vps149491 systemd[1]: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument
Jun 09 09:22:48 vps149491 systemd[1]: Started A high performance web server and a reverse proxy server.```

fluid basin
#

alright

#

interesting...

#

something is redirecting to use https and its redirecting to https again which causes a loop and then 502

vital lark
fluid basin
#

yea

vital lark
#

nothing is redirecting tho

fluid basin
#

look at the url bar

vital lark
#

it's just passing localhost:3002 aka the express server

fluid basin
#

its constantly loading

vital lark
#

Yes

fluid basin
#

yeah which is why I say its going on and on

#

infinite loop

vital lark
#

but what is it going on and on for?

#

different port

fluid basin
#

did you configure anything else on cloudflare

#

or maybe its your VPS

vital lark
#

Nope

#

All I did was clear cache

fluid basin
#

ahh okok

#

did you do anything else when setting up etc

vital lark
#

Nope

#

I had the domain since Jan 2018

fluid basin
#

aight

warm igloo
#

Ohhh man

fluid basin
#

hi hoister

warm igloo
#

Hi

fluid basin
#

btw augu can you go to the crypto section of cloudflare and see the type of SSL used?

warm igloo
#

I not You say

vital lark
#

it's using pem

fluid basin
#

As well as if "Always use HTTPS" is enabled

#

pem?

vital lark
fluid basin
#

you can try turning it off

#

Lets see if it works

vital lark
#

I turned it off

frail kestrel
#

fyi augu's on my vps

vital lark
#

^

#

I use void's vps

fluid basin
#

alright clear cache

warm igloo
#

Lil xan

fluid basin
#

cuz it redirects to https

#

which is why

vital lark
#

Done

frail kestrel
#

augu!!

#

rembot.xyz is working

vital lark
#

it is πŸ‘€

warm igloo
#

Tira a mΓΊsica cara

fluid basin
#

weird why is it redirecting to https

warm igloo
#

Pela amor de Deus

frail kestrel
#

wait what

#

no

fluid basin
warm igloo
#

Tira a mΓΊsica (Google Traslatert)

frail kestrel
#

No

vital lark
frail kestrel
#

Either that or start speaking English

warm igloo
#

(Google Translator

#

Plis

vital lark
frail kestrel
#

@languid dragon help

languid dragon
#

what

warm igloo
#

I From Brazil

fluid basin
#

thats ok

frail kestrel
#

other langs in development

warm igloo
#

😊

fluid basin
#

@vital lark its fine having that enabled, we will need to figure out why is it redirecting to https and constantly redirecting to https again even when on https

vital lark
#

yes

warm igloo
#

A Music issos good

fluid basin
#

can you dm me your express code?

vital lark
warm igloo
#

Ok @vital lark

fluid basin
#

You posted it a while ago, but I didn't really catch it

vital lark
#
const express = require('express');
const path = require('path');
const app = express();
app.disable('x-powered-by');

app
    .set('view engine', 'ejs')
    .set('views', path.join(__dirname, 'views'))
    .use(express.static(path.join(__dirname, 'public')))
    .get('/', (req, res) => {
        res.render('index.ejs');
    })
    .get('/discord', (req, res) => res.redirect('<discord server>'))
    .get('/invite', (req, res) => res.redirect('<invite>'))
    .listen(3002, () => console.log('[Website]: rembot.xyz is online~'));
fluid basin
#

can I see the index.ejs?

#

thats where its causing some trouble

#

I guess

vital lark
#
<!--
                     _           _                    
                    | |         | |                   
  _ __ ___ _ __ ___ | |__   ___ | |_  __  ___   _ ____
 | '__/ _ \ '_ ` _ \| '_ \ / _ \| __| \ \/ / | | |_  /
 | | |  __/ | | | | | |_) | (_) | |_ _ >  <| |_| |/ / 
 |_|  \___|_| |_| |_|_.__/ \___/ \__(_)_/\_\\__, /___|
                                             __/ |    
                                            |___/     

    Author: August (Chris)
    Page: Homepage
-->
<!DOCTYPE html>
<html>
    <head>
        <title>RemBot &bull; Home</title>
        <link rel="icon" href="https://cdn.discordapp.com/avatars/447229568282132510/63ab015184c99b3546ae87202cffa226.png?size=1024" />
        <link rel="stylesheet" href="css/index.css" /> <!-- ModestaCSS Helpers uwu -->
        <link rel="stylesheet" href="https://modesta.alexflipnote.xyz/css/modesta.min.css" /> <!-- ModestaCSS -->
    </head>
    <body>
            <section class="fullscreen">
                <div class="center-object">
                    <section class="me">
                        <img draggable="false" src="https://cdn.discordapp.com/avatars/447229568282132510/63ab015184c99b3546ae87202cffa226.png?size=1024" class="image-title" />
                        <h1 class="title">RemBot</h1>
                        <span class="undertitle">Rem is a discord bot made in the Eris library.</span>
                    </section>
                    <div class="buttons">
                        <a href="/invite" class="btn hover amethyst-nodark" target="_blank">Invite me!</a>
                        <a href="/discord" class="btn hover discord" target="_blank">Discord Server</a>
                    </div>
                </div>
            </section>
    </body>
</html>```
fluid basin
#

oh nope this looks okay

#

weird...

#

it must be something else

#

yes now its 521

#

web server down

#

can you check if nginx is running and having no issues?

vital lark
#
● nginx.service - A high performance web server and a reverse proxy server
   Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2018-06-09 10:15:38 CEST; 32s ago
  Process: 26873 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exited, status=0/SUCC
  Process: 26882 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
  Process: 26879 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
 Main PID: 26885 (nginx)
    Tasks: 2
   Memory: 3.0M
      CPU: 24ms
   CGroup: /system.slice/nginx.service
           β”œβ”€26885 nginx: master process /usr/sbin/nginx -g daemon on; master_process on
           └─26886 nginx: worker process                           

Jun 09 10:15:38 vps149491 systemd[1]: Stopped A high performance web server and a reverse proxy server.
Jun 09 10:15:38 vps149491 systemd[1]: Starting A high performance web server and a reverse proxy server...
Jun 09 10:15:38 vps149491 systemd[1]: nginx.service: Failed to read PID from file /run/nginx.pid: Invalid argument
Jun 09 10:15:38 vps149491 systemd[1]: Started A high performance web server and a reverse proxy server.```
fluid basin
#

can you check the error log?

#

/var/log/nginx/error.log

vital lark
#

sure

#

@fluid basin it's 2k char long

#

Let me upload to hastebin

fluid basin
#

yikes

vital lark
#

It has IP's

#

so it might take a while

fluid basin
#

aight

vital lark
#

wait

#

don't go

#

it has the vps ip

#

FUCK

fluid basin
#

?

vital lark
#

@fluid basin can we settle this thru DM's?

fluid basin
#

aight

#

yayy fixed

#

phew

#

that took some time

#

@vital lark hype

maiden geyser
#

how long does it take for bot verifacation

fluid basin
#

a few hours to a few days

#

depends

maiden geyser
#

ok

fluid basin
#

just wait patiently

vital lark
#

yes

maiden geyser
#

i will im just exited

severe glen
#

do someone has the css of that?

#

how to make the outline of that

spring ember
#

The notification thing?

severe glen
#

including the little triangle

#

no

#

the black rectangle

#

when u hover something

#

when u hover a badge e g

#

how to have a shape like that

spring ember
#

Umm are you on iOS?

severe glen
#

no, windows

#

desktop

spring ember
#

Umm you can try and inspect element

severe glen
#

tru

#

i'm dumb

#

@spring ember yeah i don't manage to get the source of it in inspect mode

#

i mean i can't inspect just the badge

spring ember
#

πŸ€”

#

Can you send the website you're talking about?

uncut slate
#

it's discord

spring ember
#

Oh

#

So that may be a part of react

uncut slate
#

it's their own code

#

react doesn't have any builtin components

spring ember
#

Oh really?

delicate rover
#

@austere meadow So my bot @lyric hollow, nuggetbot was kicked because it started DMing users, I have resolved the problem and it wont be doing that anymore. Would you be so kind to add nuggetbot back into the DBL server.

austere meadow
#

alright

upper zodiac
#

As i know discordbot website upvote are having problem right

#

The upvote not send back to the bot, so pokecord daily now does'nt work

sour saddle
#

Yo guys, do you know how can I get Channel object if i know channel id (in python api)

native narwhal
sour saddle
#

@native narwhal Yep, somehow I've missed that in documentation

#

Thanks

native narwhal
spring ember
#

Do the server one

sour saddle
#

The client one is more versitile as it returns them globally instead of a specific server. At leats I guess it does that

spring ember
#

The client one should be avoided

sour saddle
#

Oh

#

Ok

spring ember
#

Umm it might be the same actually

#

Because it is an API call

sour saddle
#

That's strange

spring ember
#

Use the server one

#

Unless you don't know the server

sour saddle
#

Yeah, I don't know server.Well I could store the server id, but then I'd need to get server with that

spring ember
#

Do you use async or rewrite?

sour saddle
#

async

spring ember
#

Ok go with client then

sour saddle
#

Thanks a lot

spring ember
#

Np

low rivet
#

@spring ember it's not an api call GWcfcThonk

#

all api calls are coroutines

austere meadow
#

is it possible to edit a message without knowing the channel id?

#

i presume its not i was just wondering

sour saddle
#

If you have reference to it

floral stone
#

you'll need to find another way to fetch the message

#

like if it's already there

spring ember
#

@low rivet so is it by cache?

low rivet
#

pretty sure yes

#

just checked rewrite github, yes

spring ember
#

Oh ok

upper zodiac
#

.

low rivet
#

@austere meadow Nope, unless your lib has some interesting cache stuff, ddev docs endpoint for message delete is `/channels/{channel.id}/messages/{message.id}

`

austere meadow
#

ah cheers

earnest phoenix
#

hye guy i want to ask, i making a musik command and the error is Cannot read property 'replace' of undefined

austere meadow
#

args[1] is undefined on const url

earnest phoenix
#

i follow it on youtube Musik bot the series

knotty steeple
#

args is already sliced and joined

#

its not an array anymore

mental solstice
#

possible to send a message and an embed at the same time.. without sending 2 messages

earnest phoenix
#

wait i will rework it

#

😒

austere meadow
#

@mental solstice what lib are you using

knotty steeple
#

also why make it return undefined thonkku

mental solstice
#

discordjs

austere meadow
#

message.channel.send("content", { embed: <embed> })

#

you can provide an embed in the options argument

mental solstice
#

ok, <> required?

austere meadow
#

no

mental solstice
#

thank you, i must have forgotten the comma earlier

earnest phoenix
#

is no error anymore but his not playing music

knotty steeple
#

glitch GWcmeisterPeepoE

#

also i can see nothing in that screenshot

earnest phoenix
#

when i using any command this is a error

knotty steeple
#

...

earnest phoenix
#

:-/

austere meadow
#

he is accessing an array

sour saddle
#

Yeah

austere meadow
#

the 2nd item in the array just doesn't exist

sour saddle
#

I've noticed that now

knotty steeple
#

yes Thonk

#

0 = 1 in arrays its very confusing sometimes

earnest phoenix
#

anyone can't help me?

sour saddle
#

If you want to access the first element in an array just write 0 instead of 1

earnest phoenix
sour saddle
#

yep

earnest phoenix
#

in the args[1]?

#

πŸ‘

sour saddle
#

Actually

#

Error log could specify the exact line

#

I can't see the number from screenshot

#

So

#

Oh

#

Wait

#

server.js:30

#

Yep

#

Thats it

austere meadow
#

whats probably happening is that the guy is running the command like
[prefix][command] [args[0]] [args[1]]
but he's only using args[0] and not args[1]

earnest phoenix
#

If there is no [1] then it errors. If there is no [0] then it'll be an empty string

#

Just check if the array is bigger than 1 kappa

sour saddle
#

Looks like there at least two errors

#

There is another one at server.jsL49

earnest phoenix
#

const url = args[1] ? args[1].replace(/<(.+)>/g, '$1') : '';

#

what are you think when i use this

floral stone
#

In python, is there a way to run 2 python functions at once and it will not continue unless both are finished executing?

sour saddle
#

Try to use threads maybe and check every cycle for a function state

floral stone
#

You got any external links I could look over?

sour saddle
#

You'll have to write a class for every function tho

#

give a sec

floral stone
#

Ah, that doesn't look complicated.

sour saddle
#

Thread is deprecated in pyhton 3.x.x so use threading.thread

floral stone
#

Is the thread module blocking for d.py like requests!?

sour saddle
#

If I understood you correctly, no it shouldn't

floral stone
#

How does it go with returning variables within functions!?

#

You there?

#

and does threading support async?

sour saddle
#

It does, but not that easily

#

You'll have to manually do that

floral stone
#

Manually await it?

#

I need to await wait_for_message() function at the same time for both users.

#

and return what they said to a variable

#

I think that may work

#
         asyncio.ensure_future(do_some_work(5))]
loop.run_until_complete(asyncio.gather(*tasks))```
#

They said it waits for both to complete and assign the results to a list.

#

The problem is, does the functions run at the same time.

#

Will anybody who uses python test this?

#

I'm on mobile so.

sour saddle
#

You can link pastebin or something

#

I can run it for you

floral stone
#

The code is on the url and the example I provided above is a snippet they used. I don't have an editor on my phone to paste things

#

@sour saddle

sour saddle
#

Ok, I'll do it a bit later as I'm a bit busy right now

floral stone
#

Alright.

sour saddle
#

I've ran it

#

It works

#

Both functions work at the same time

floral stone
#

Thanks

radiant ridge
#

Does your bot need to re-approved after you edit it?

floral stone
#

no

fluid basin
#

Nope it doesnt need to be

gilded thunder
#

idk what's wrong with this . Discord.py async and requests.

# fox command
@bot.command(pass_context=True)
async def fox(ctx):
    url = 'https://randomfox.ca/floof/'
    response = requests.get(url)
    embed=discord.Embed(title="Yip!", color=0x176cd5)
    embed.set_image(url=url[image])
    await bot.say(embed=embed)```
floral stone
#

Don't use requests, it's blocking, Use aiohttp

gilded thunder
#

ughhhhh

#

BUT IM USED TO REQUESTS ree

floral stone
#

url isn't json

#

it's w string

#

so it doesn't have [image]

gilded thunder
#

so I just put images?

floral stone
#

which is a variable that's not defined

gilded thunder
#

*image

floral stone
#

what does variable response return?

gilded thunder
#

{"image":"http:\/\/randomfox.ca\/images\/39.jpg","link":"http:\/\/randomfox.ca\/?i=39"}

floral stone
#

response = response.json()

#

I think

#

then

#

embed.set_image(url=response["image"])

gilded thunder
#

I'll try that now, thanks

knotty steeple
#

js is easier β„’

fluid basin
#

xD

fierce wren
#

XD

#

Lol I don't know why I said xd

#

XD XD XD

fluid basin
earnest phoenix
#

wat deee

#

oh i dont know how can i fix it

west raptor
#

how would i get role is some said !agree set <role>

quasi hearth
#

an invalid token was provided. fix ur token :p @earnest phoenix

knotty steeple
#

or try resetting your token

west raptor
#

he is on glitch

knotty steeple
#

@west raptor get the role id and give it to the author

west raptor
#

yes

#

but

knotty steeple
#

idk how you would give someone a role with discord.js

west raptor
#

i want people to set the role they want to assign

knotty steeple
west raptor
#

ex: member

#

or

#

guest

quasi hearth
#

GuildMember.addRole(role)

west raptor
#

no

#

i mean

#

i can do that but

#

i want the user decide which role will be assigned when they do !agree set <role>

quasi hearth
#

fetch the role that they want, and then add the role to the author... (?)

west raptor
#

oof ok

#

so

earnest phoenix
#

@quasi hearth I've used a new token but still like that

west raptor
#

i mean when a user does !agree they get the role that you specified i want it to be where the user can do !agree set <role> to decide what is assigned when a user does !agree

quasi hearth
#

what is <role> though? an id or a name of the role?

west raptor
#

name

quasi hearth
#

@earnest phoenix weird

earnest phoenix
#

:-|

night imp
#

Break them into args

knotty steeple
#

"name", "role"

night imp
#

Get the third value

#

Splice

#

/cut

west raptor
#

would i need to setup a db for that?

#

for

#

like storing the !agree role

quasi hearth
#

no

gleaming summit
#

Someone here who is good at hardwares?

west raptor
#

but then if the bot restarted it would reset?

quasi hearth
#

roles dont reset

night imp
#

@gleaming summit ask away

gleaming summit
#

Oh thanks

quasi hearth
#

in discord.js, you could so something like this: (?)

/*var role = msg.guild.roles.filterArray(function(item){return item.name == your_args[2]})[0];
var id = msg.author.id;
msg.guild.users.members.get(String(id)).addRole(role);*/ //You saw nothing```
earnest phoenix
#

whether to calculate the GOOGLE_API_KEY token should wait several weeks?

night imp
#

@west raptor are you talking about setting a default for everyone

west raptor
#

you coul;d say that but the user would get the role when they did !agree

knotty steeple
#

@quasi hearth spoonfeed zoomeyes

gleaming summit
#

I want to know which is better to run some web stuff and personal apps

Intel Celeron B815 with RAM 4GB
Raspberry Pi 3b+

gilded blaze
#

his spoonfeed is wrong anyway

night imp
#

@west raptor so like an admin sets it and the users have no other option?

quiet bobcat
#

Please refrain from spoonfeeding.

#

Thanks

night imp
#

@gleaming summit what language are you planning?

#

Imo the Celeron is probably better

knotty steeple
#

yea

gleaming summit
#

PHP 7.2 with some NodeJS

knotty steeple
#

web stuff could go on a pi

gleaming summit
#

Celeron’s performance

knotty steeple
#

right?

gleaming summit
#

I am currently using celeron

night imp
#

@knotty steeple yeah very small web stuff

west raptor
#

the users have to do it if they do not have the specified role @night imp

gleaming summit
#

But it is slow

earnest phoenix
#

is it to use GOOGLE_API_KEY token to wait several weeks before I can use it?

night imp
#

@west raptor so they get to pick what role

gleaming summit
#

But i want to know raspberries are faster

night imp
#

@earnest phoenix are you asking about getting a Google API token?

#

You should be able to get a free one if you put in your credit card

west raptor
#

yes, the admins pick the role what is given when !agree happens

gleaming summit
quasi hearth
#

oh

night imp
#

@west raptor ok you need a db

#

Associating the role with the guild id

knotty steeple
#

to get an api token for like youtube data you just need a google account

night imp
#

And accessing it on command or caching it

gleaming summit
#

@night imp for general, celeron is better?

knotty steeple
#

yes

night imp
#

It has more power

gleaming summit
#

Ah

#

Thank you for help @night imp @knotty steeple

earnest phoenix
#

I've got it, but do I have to wait a few weeks before I can use it?

knotty steeple
#

i dont feel like i really helped but no problem :p

night imp
#

@earnest phoenix you shouldn't?? Is it not working for you?

gleaming summit
#

πŸ˜‰

#

I was seriously thinking about i must buy raspberries

earnest phoenix
#

i think

#

see that

gleaming summit
#

Un invalid token was provided

night imp
#

Go to line 164

quiet bobcat
#

Your token is invalid

night imp
#

Make sure that it is the exact token

#

Or that you have the right kind of token

#

Or that you aren't restricting domains

earnest phoenix
#

token bot?

night imp
#

No

#

API

quiet bobcat
#

Make sure that your bot token is valid

gleaming summit
#

You didn’t input api key or input was invalid

night imp
#

It isn't the bot token @quiet bobcat

earnest phoenix
#

I've been using a new token but still like that

gleaming summit
#

Confirm?

#

Where you queried

quiet bobcat
#

then click on your bot account

#

and get your token from there

gleaming summit
#

@earnest phoenix refresh token

earnest phoenix
#

@gleaming summit @quiet bobcatI've been using a new token but still like that

night imp
#

@quiet bobcat πŸ€¦β€β™‚οΈ

gleaming summit
#

Then try force re install your node modules

night imp
#

@earnest phoenix please send line 164 to us leaving out your token

#

To confirm it is the original problem

earnest phoenix
#

there is nothing dude

night imp
#

Where do you define token

gleaming summit
gleaming summit
#

Please check you various TOKEN

earnest phoenix
#

from file .env

night imp
#

Also, make sure you are using the token under BOT on the discord developer website

#

@earnest phoenix do process.env.TOKEN

gleaming summit
#

process.env.TOKEN

#

Oh

#

Saddy was faster

night imp
#

πŸ‘Œ

gleaming summit
#

πŸ˜›

earnest phoenix
#

i have use that at top

gleaming summit
#

Try without defining

#

Then tell about result

#

Then I can know

earnest phoenix
#

defining?

gleaming summit
#

Remove various TOKEN

#

And try using process.env.TOKEN

#

Then I can know which is invalid

#

Or try console.log(TOKEN) and check result is same

earnest phoenix
#

how

#

dude i m sorry i from malay i really dont understand english

gleaming summit
#

Insert console.log(TOKEN) and check output is same

#

Me too 😦 i am not good at eng too

earnest phoenix
#

were can i insert

quasi hearth
#

put console.log(TOKEN) after (or before) bot.login(TOKEN) la

gleaming summit
#

^

earnest phoenix
#

ok wait

nimble star
#

So, I need help with some code I have. Please note that I'm intending to work with the rewrite version of the library, as well as that I'm an idiot when it comes to the commands module.

from discord.ext import commands

bot = commands.Bot(command_prefix='DDT!')

bot.load_extension("Utility")

with open("DEVTOKEN.txt", "r") as auth:
    bot.run(auth.read())```
This code here is my main file. Not big for now.

```python
from discord.ext import commands

class Utility:

    bot = commands.Bot(command_prefix='DDT!')

    def __init__(self, bot):
        self.bot = bot

    async def say(self, ctx, *, msg):
        await ctx.send(msg)


def setup(bot):
    bot.add_cog(Utility(bot))```
This is my extension, named "Utility.py". Also relatively short.

The command inside of the extension isn't recognized by the bot, as well as is missing from the help command. Any help on how to fix it?
gleaming summit
#

Oooh py

nimble star
#

The magic lands

earnest phoenix
#

like that?

quasi hearth
#

yeh, seems like TOKEN is undefined

gleaming summit
#

Lel

#

Just try using process.env.TOKEN

#

And confirm

earnest phoenix
#

i has use it at top

quasi hearth
#

thats fine

gleaming summit
#

We dont know why that line is not working

quasi hearth
#

try removing the brackets on const {TOKEN}?

knotty steeple
#

dont code on a phone iirc

gleaming summit
#

Or environment variouses didnt defined?

earnest phoenix
#

remove brackets?

gleaming summit
#

const TOKEN

quasi hearth
#

^

earnest phoenix
#

wait

gleaming summit
#

const TOKEN = process.env.TOKEN

earnest phoenix
#

there it go

quasi hearth
#

hmm

earnest phoenix
#

😭

quasi hearth
#

maybe just replace TOKEN with process.env.TOKEN instead in the bot.login

earnest phoenix
#

and error 😒

low rivet
#

@nimble star where's your cog file? is it cogs/utility.py?

nimble star
#

No. It's in the same folder as my main file.

#

...let me guess. That's the mistake?

low rivet
#

no its not

nimble star
#

Phew.

low rivet
#

so whats the file name?

nimble star
#

Utility.py

gleaming summit
#

@quasi hearth

low rivet
#

any errors?

gleaming summit
#

May I have a question

nimble star
#

Nothing.

quasi hearth
#

I don't think process.env.VAR works

nimble star
#

The only error is trying to run the command.

low rivet
#

oh wait what dont define a new bot in the cog

earnest phoenix
#

I want to make a music bot but do not know why it always does not work @quasi hearth

nimble star
#

I got the code from a Python professional from another server.

#

And without it, I would get the error that bot is missing.

gleaming summit
#

@earnest phoenix Dont use upper words and retry

quasi hearth
#

@earnest phoenix I would suggest putting the token in your code instead of using a environment variable

low rivet
#

undefined from which line? @nimble star

gleaming summit
#

@quasi hearth May I have a question about optimization of my bot?

quasi hearth
#

sure

gleaming summit
#

How can I remove these if

nimble star
#

I can't recall now, because I had that error long ago. I think it would hint to the line where the extension is attempted to be loaded.

low rivet
#

try removing it now then

#

show the traceback

nimble star
#

will take a lil while to test, because VS Code is slow in turning my bot off

#
Traceback (most recent call last):
  File "C:\Users\cojo\Documents\Dimmadome-Service-Bot\DevBot.py", line 5, in <module>
    bot.load_extension("Utility")
  File "C:\Users\cojo\AppData\Local\Programs\Python\Python36-32\lib\site-packages\discord\ext\commands\bot.py", line 704, in load_extension
    lib.setup(self)
  File "C:\Users\cojo\Documents\Dimmadome-Service-Bot\Utility.py", line 13, in setup
    bot.add_cog(Utility(bot))
TypeError: object() takes no parameters
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x042476D0>
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x04247A70>```
#

oh wait thats something else

quasi hearth
#

@gleaming summit I don't understand "how can I remove if" What are you asking?

gleaming summit
#

I want to optimize app by removing β€˜if’s

quasi hearth
#

hmm

gleaming summit
#

But I cannot think the best way

low rivet
#

add a py @bot.event async def on_ready(): print('Ready') in bot.py as well so u know when ur bot has started

quasi hearth
gleaming summit
#

Ok

nimble star
#

That's not the thing.

#

I don't have a command that closes my bot.

gleaming summit
#

Are these things probably same with β€˜if’?

quasi hearth
#

sure:

gleaming summit
#

Hmm

low rivet
#

i don't either and i donr see how this plays a part but ok

quasi hearth
#

for example, js const foo = msg.author.bot ? "isBot" : "isNotBot"; //foo would be equal to "isBot" if the message is a bot

nimble star
#

I just need some extra time to turn my bot off.

#

Also, I got from another server a basic example of how cogs work.

gleaming summit
#

Ah

#

@quasi hearth thanks

nimble star
#

I do have to define the bot again.

low rivet
#

it's already defined in your init, self.bot = bot

gleaming summit
#

That can be optimized

nimble star
#

oh you mean the bot = (...)

#

?

sand roost
low rivet
#

some examples because im going to sleep

#

@sand roost are u asking for free code?

#

that you can just copy? GWcfcThonk

sand roost
#

nah

#

modify

#

wouldnt want to reinvent the wheel

low rivet
#

why not try to do it yourself

#

you'd learn new things

sand roost
#

i have an idea how to do it

low rivet
#

ok then goodnight

quasi hearth
#

basically you just listen for reactions and determine whether it is the correct message and what reaction it is

gleaming summit
#

Send message then add reactions and then confirm with user’s reaction

#

I am on mobile

#

So I cannot do some stuffs for you

#

Sorry about that

sand roost
#

i have an idea how to do it

gleaming summit
#

But I am on mobile

sand roost
#

oh

#

ok

gleaming summit
#

I can send you some examples when I am on PC

sand roost
#

i do know how to code one

earnest phoenix
#

dude i got it

gleaming summit
#

Washing : P

earnest phoenix
#

but when i using a command just like that

sand roost
#

coding on mobile

#

xd

gleaming summit
#

xD

#

@earnest phoenix invalid

#

Same

earnest phoenix
#

i think my GOOGLE_API_KEY

#

token

gleaming summit
#

No

#

HTTP 400

earnest phoenix
#

maybe I should wait a few weeks before I can use it

#

what

quasi hearth
#

what link are you requesting ?

gleaming summit
nimble star
#
from discord.ext import commands
import random

class Utility:

    def __init__(self, bot):
        self.bot = bot

    @commands.command(name="say")
    async def say(self, ctx, *, msg):
        """Makes the bot say something!"""
        await ctx.send(msg)

    @commands.command(name="rand")
    async def say(self, ctx, num1, num2):
        """Randomizes 2 numbers!"""
        await ctx.send(f"Your number is {random.randInt(num1, num2)}")


def setup(bot):
    bot.add_cog(Utility(bot))```

I managed to make the commands work, but now when I try to make multiple commands, only the last one gets noticed by the bot. How do I fix *that* now?
sand roost
earnest phoenix
#

nope

gleaming summit
#

What is that

earnest phoenix
#

thats is link youtube

sand roost
quasi hearth
#

console.log your GOOGLE_API_TOKEN and see if it is undefined?

#

@sand roost that is the link hes trying to requrest

slender thistle
#

@earnest phoenix That's not related to #development, isn't it. thanking

uncut slate
sand roost
#

ah

#

k

slender thistle
#

My bad, sorry. eyesLeft

earnest phoenix
#

eef

#

@quasi hearth when i do that its sown me on my token on console

quasi hearth
#

hmm

#

what api are you using to request the link?

earnest phoenix
#

simpel-youtube-api?

sand roost
#

did you get the youtube key the proper way?

earnest phoenix
#

yup

#

i using Google xD

#

youtube api v3 right?

west raptor
#

how could i fix this? (node:5454) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): DiscordAPIError: Privilege is too low...

quasi hearth
#

your bot doesn't have permissions to do the action

quiet bobcat
#

^

west raptor
#

yet it seems it has administrator?

gilded blaze
#

What are you trying to do?

quasi hearth
#

did you give it admin on your server?

west raptor
#

change a nickname

earnest phoenix
#

when i try to request

west raptor
#

@quasi hearth yes, yes i did

#

and

#

when it is invited it get administartor

quiet bobcat
#

you can turn that off

#

you know that right?

west raptor
#

yes... i know

quasi hearth
#

hmm, whose nick are you trying to edit?

west raptor
#

the user that runs the command !afk

quasi hearth
#

what code are you using to edit the nicknames?

#

@west raptor It appears that you cannot edit the nickname of the owner / admins of the guild with bots

#

For example, in my own server, i tried editing my nick, and my other bot's nick (who has admin) and they both had the same error. However, it worked on other members

mental solstice
#

Heirarchy is a thing on discord, im not sure if admin supercedes that, but i know permissions dont

slender thistle
#

Admin permission doesn't bypass the hierarchy.

restive silo
quasi marsh
#

However for bots, they do not automatically take the users hierarchy into account

#

Make sure to factor that in in your code

sand roost
#

how should I sort a map into different categories

#

i have a list of commands and they should be sorted by category

#

like an array with maps of commands

#

sorted by category

quasi hearth
#

Well, just make some arrays with functions in them or something..

gilded blaze
#

How would I know when a new video is posted for a youtube channel?

quasi marsh
#

Would use a webhook service for that

sand roost
#

@gilded blaze would this do it?

#

@gilded blaze a webhook?

gilded blaze
#

Well yes

#

but

#

I want it to be easy to add new channels

maiden geyser
#

how do i add commands to my bot

#

do i have to wait for it to be verified?

#

or...

keen nest
#

So what's with the vote webhook

gaunt terrace
#

why is it when i send my webhook this , it works, but when i press test it doesnt

#

i have given it the correct authorization

#

and it used to work

#

i havent changed anything

quasi marsh
#

You might want to ask in #topgg-api since it's meant for these kinds of things

#

Also currently there seem to be issues with webhooks

gaunt terrace
#

right

#

thought so

buoyant oak
#

@slender thistle you there bro

#

btw

#

anyone have any idea on how to host your bot

#

online

#

like instead of it being hosted on your PC?

native narwhal
#

A VPS?

buoyant oak
#

yep

#

how do they work xD

#

and do they work with databases such as SQL?

#

sqlite3

inner jewel
#

a vps is basically a server

#

you control what runs on it

floral stone
#

it costs money

inner jewel
#

most of them will be linux, which is enough for most programs

floral stone
#

and free vpses isn't worth it

inner jewel
#

but you could find some windows ones if you need, but they tend to be more expensive

buoyant oak
#

oh okay

#

thank you so much

#

they work with databases right

#

like sqlite3

quasi marsh
#

Yeah

#

You can install any DB you wish pretty much

buoyant oak
#

also, is sqlite3 good for like 'big' bots

#

or should I switch

inner jewel
#

depends on usage

neon schooner
#

Yea generally you can install whatever software but you might wanna look at whatever Provider's ToS and see if they have limits.

buoyant oak
#

to like idk MySQL

inner jewel
#

sqlite doesn't scale well

#

for writes

neon schooner
#

relies on postgres a little much

buoyant oak
#

oh okay

#

so should I switch to MySQL?

inner jewel
#

depends on your usage

buoyant oak
#

or is there other better options

floral stone
#

I use mysql

buoyant oak
#

it requires a lot of writing

neon schooner
#

MySQL/MariaDB

buoyant oak
#

@floral stone what are the costs?

neon schooner
#

I'd rather use Maria personally

inner jewel
#

depends on the provider

buoyant oak
#

hmm

floral stone
#

@buoyant oak check the channel pins!?

buoyant oak
#

Maria works with python?

floral stone
#

there was a message

buoyant oak
#

okay

inner jewel
#

but you pay for the server as a whole, then install whatever software you need

floral stone
#

don't use a free one, trust me @buoyant oak

buoyant oak
#

yea I know

#

people on my server

#

said to get a paid one

floral stone
#

you don't need an expensive server either

neon schooner
#

Yea defo don't trust a free one for real stuff >.>

#

Only buy what you need, VPSes scale fairly well and have lots of options.

buoyant oak
#

yea I'm slightly confused tho, pvs, and a MySQL server are too different things tho right

#

oh

#

yea

floral stone
#

I recommend digitalocean which is 5$ a month

#

you a student?

neon schooner
#

DO is a good option, Vultr was good, but I started having trouble

night imp
#

Galaxygate though Thonk

buoyant oak
#

yea I'm in year 11

topaz fjord
#

GalaxyGate is a good vps

floral stone
#

sign up for github students

night imp
#

You get free $50 with GitHub educay

neon schooner
#

If you have a school email you can sign up for GitHub education (probably)

buoyant oak
#

wow the synergy

floral stone
#

you can get a 50$ gift card for digital ocean

buoyant oak
#

okay

night imp
#

Or just a school id

floral stone
#

ah

neon schooner
#

Only if your school qualifies

floral stone
#

ya beat me

buoyant oak
#

idk it has a domain

night imp
#

If it is an official school

neon schooner
#

It's not every schoool πŸ˜›

night imp
#

And you have an id

neon schooner
#

Idk if high schools are counted.

floral stone
#

you'll still need to add a PayPal account or credit card

#

it is

night imp
#

@neon schooner they are

buoyant oak
#

I'll check it out

neon schooner
#

Most High Schools don't have student IDs

quasi marsh
#

High schools are counted for me

neon schooner
#

or emails

quasi marsh
#

Just say something like wanting to follow a CS major or something

neon schooner
#

at least around here

night imp
#

@neon schooner what HighSchool did you go to Thonk

buoyant oak
#

XD

night imp
#

We had school IDs in elementary

neon schooner
#

Cedartown High School πŸ˜›

#

The GA school system didn't have IDs the entire time I was going through it πŸ˜›

night imp
#

Granted no one used them and all were lost but still

buoyant oak
#

wait guys just to clarify, a pvs, and a mysql server are two different things right.

floral stone
#

no

neon schooner
#

You can run mysql on a vps

floral stone
#

well

#

yed

#

ahjjj

neon schooner
#

a vps is a virtual server

buoyant oak
#

oh really?

floral stone
#

I hate mobile

buoyant oak
#

thats cool

topaz fjord
#

a vps is like a computer

neon schooner
#

(It literally stands for virtual private server)

#

It's just a computer that the host set up for you to use (as a vm/container depending on their hosting structure)

buoyant oak
#

yea ik but I thought you had to rent out a MySQL server to run it

neon schooner
#

No

#

You can have a separate server running mysql if you want

#

But you can also run it on the same machine

topaz fjord
#

mysql is public zoomeyes

buoyant oak
#

okay thanks for the clarification

floral stone
#

it's free

topaz fjord
#

why would u need to pay for it

neon schooner
#

It depends on if you're looking into a containerized setup

#

or monolithic

buoyant oak
#

damn, complex language. I like it.

inner jewel
#

some companies charge extra for mysql

buoyant oak
#

right, lemme check em out

inner jewel
#

but it's probably a separate vps

buoyant oak
#

oh#

inner jewel
#

which you might not need

buoyant oak
#

hmm

neon schooner
#

Like I said, just make sure whatever provider you choose doesn't make you pay more

buoyant oak
#

does DigitalOcean charge extra for MySQL then?

inner jewel
#

no

neon schooner
#

No afaik

floral stone
#

no