#development

1 messages · Page 1125 of 1

pure lion
#

self taught in js, C, HTML and CSS

earnest phoenix
#

and my skool computer classes suk anyways

quartz kindle
#

being a computer science major doesnt make you a good programmer btw :^)

pure lion
#

This^

earnest phoenix
#

self taught in js, C, HTML and CSS
me too, without the C

normal ether
#

That’s why I studied

#

In college

#

Java script

#

Java

split hazel
#

schools usually teach you basic python but thats about it

normal ether
#

Etc

pale vessel
#

do schools actually just teach you how to print

quartz kindle
#

then go ahead and code your bot

earnest phoenix
#

schools usually teach you basic python but thats about it
what if they teach you friking qbasic

normal ether
#

It’s way more you can do with java script

#

But im a done

#

Now

earnest phoenix
#

so

pale vessel
#

im a done

normal ether
#

So I’m must leave

pure lion
#

The extent of py my school teaches:
T u r t l e g r a p h i c s

earnest phoenix
#

lol

#

me too

#

MSW LOGO

slender thistle
#

True, though. I applied for Comp Sci in college and we learn simple stuff like Pascal, VERY basic C#, JS, HTML, and CSS.
I self-learned Python and don't regret learning it to this day tbh

split hazel
#

imagine schools start telling people to make a discord bot instead of turtle

quartz kindle
#

rip dbl

pure lion
#

Yo that'd actually be a dream come true

#

rip dbl
This too

split hazel
#

yeah approval times would be 6 months

radiant kraken
#

@pure lion but DBL will be flooded by students

quartz kindle
#

just hire more mods

#

and actually pay them

pure lion
#

Just harass plexidev

radiant kraken
#

that says "please approve my bot or i will get bad grades"

pale vessel
#

then so be it

pure lion
#

Also we gotta build a website....
lmao jokes on literally everyone else in my class

earnest phoenix
#

True, though. I applied for Comp Sci in college and we learn simple stuff like Pascal, VERY basic C#, JS, HTML, and CSS.
I self-learned Python and don't regret learning it to this day tbh
i self learned 25%, grasshopper by google teached me 50% and talking here taught me 25% ||for that last one : i also learned how to talk to people||

slender thistle
#

In which living hell's name did I think socketio.Client is a server to connect to

pure lion
#

The what

earnest phoenix
#

living hell's name

pure lion
#

Anyway I'm going to go steal Boeings websocket.ts file because I can

earnest phoenix
#

imma go use dank memer API

slender thistle
#

I was apparently too tired to understand that I needed a socketio.AsyncServer, not an async client 🤔

earnest phoenix
#

LMAO

#

lol

#

me uses expresssssssssss

#

sux a lot tho

#

takes up 99% of my cpu

pure lion
#

I could probably make my own lib from scratch how hard could it be :/

slender thistle
#

@quartz kindle are assets files required from an HTML file supposed to return a 304 status code?

earnest phoenix
#

rumours that tim has more pings than the mod role

pure lion
#

Tim has 3k pings last time I checked

earnest phoenix
#

hey vsauce (are typing...)

royal laurel
#

yes

quartz kindle
#

i have 0 pings

pure lion
#

Fuck I almost have 1k lmao

royal laurel
#

how do i check

quartz kindle
#

@slender thistle i mean, you can make your webserver return 304 regardless of its content

slender thistle
mild flower
earnest phoenix
#

bruh

#

parseint

#

just do mathjs

pure lion
#

No

earnest phoenix
#

Shards won't launch (node:24) UnhandledPromiseRejectionWarning: Error [SHARDING_READY_DIED]: Shard 0's process exited before its Client became ready.

const { ShardingManager } = require('discord.js');
const config = require("./config.js");
const token = config.token.replace('7',"")
const manager = new ShardingManager('./bot.js', {
    totalShards: 'auto', 

    token: token
});

manager.spawn();
manager.on('shardCreate', (shard) => console.log(`Shard ${shard.id} launched`));```
pure lion
#

Use isNaN

mild flower
#

already used that

#

um

#

wait wut

earnest phoenix
#

bruh

tight plinth
#

@earnest phoenix theres an error in your code, and its not here

earnest phoenix
#

do you even know what you're doing

slender thistle
#

oh, it seems that... my page isn't requesting my .css files at all?

pure lion
#

Oh no

mild flower
#

if(mathaction === '+') return message.channel.send(parseInt(math1 + math2))

earnest phoenix
#

@earnest phoenix theres an error in your code, and its not here
@tight plinth wdym?

#

bro

quartz kindle
#

check the page source in the browser

earnest phoenix
#

don't

#

use math.js

tight plinth
#

check the whole error

pure lion
#

Me when the f12

tight plinth
#

there should be smth else

#

also

#

const token = config.token.replace('7',"")

#

no

earnest phoenix
#
at Shard.onDeath (/home/container/node_modules/discord.js/src/sharding/Shard.js:155:16)
at Object.onceWrapper (events.js:422:26)
at Shard.emit (events.js:315:20)
at Shard._handleExit (/home/container/node_modules/discord.js/src/sharding/Shard.js:371:10)
at ChildProcess.emit (events.js:315:20)
at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
(node:24) 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:24) [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.```
slender thistle
#

Yeah, none of my .css files are loaded

pure lion
#

Dafuk

earnest phoenix
#

@mild flower that's the worst way to make a math command

tight plinth
#

there should be smth above that

slender thistle
#

Do you think it could be related to Sanic somehow not loading them?

earnest phoenix
#

imma dm you

#

nope

tight plinth
#

r u sure

earnest phoenix
#

above that is ```Shard 0 launched

tight plinth
#

thats it?

#

nothing else?

earnest phoenix
#

yep

tight plinth
#

interesting

quartz kindle
slender thistle
#

Actually, I think I'm just not loading static files properly thinkW

#

😂

tight plinth
#

sanic logic

slender thistle
#

well that brightened my mood

earnest phoenix
#

interesting
@tight plinth ikr

slender thistle
#

but nah, a bootleg remake with style similar to Flask

#

Yeah my bets are on me not loading static files properly

quartz kindle
#

@earnest phoenix if the process exited before the client became ready, that means the shard is crashing for some reason, you'll need to check your shard file

earnest phoenix
#

thats the shard file...

quartz kindle
#

no thats the sharding manager

#

the shard file would be bot.js

earnest phoenix
#

i didnt add anything extra in bot.js

#

do i need to?

quartz kindle
#

if you run node bot.js does it work?

earnest phoenix
#

yes

#

yep
maybe there is some problem with the shard. do you have enough ram for 100 shards

#

how much?

#

idk

#

how big is your bot

#

54 servers

#

why the hell

quartz kindle
#

do you get Shard 0 launched in your console?

pure lion
#

Why are you sharding

earnest phoenix
#

are you using shards then

#

lol late

#

BIG respond times like 15s

#

do you get Shard 0 launched in your console?
@quartz kindle yes

quartz kindle
#

response times are not solved with sharding

earnest phoenix
#

oh

#

ok

quartz kindle
#

anyway try listening to shard events

earnest phoenix
#

im still gonna make one

quartz kindle
#

like this

earnest phoenix
#

im still gonna make one
then you're friking your own RAM and CPU

#

trust me

#

ok...

#

don't make an ExpressJS server and a bot in the same computer with terrible RAM

#

and CPU

pure lion
#

Yeah it's gonna double the thing

earnest phoenix
#

ExpressJS takes a FRIKING lot of CPU

quartz kindle
#
manager.on("shardCreate", shard => {
  shard.on("error",console.log)
  shard.on("death",console.log)
})
``` or something like that
earnest phoenix
#

umm

#

there is nothing to log

#

...

#

do u know djs

#

its going to log the error

#

does console.log without any params just log errors

#

do u know djs
i know relatively a lot but me still an amaeteur

pure lion
#

Yeah it does

quartz kindle
#

console.log is a function

pure lion
#

Console.log with no params logs promise stuff

quartz kindle
#

events expect functions

#

so when you do bla.on("event", function)

#

the event does function(event args)

#

like a sort of callback

#

for example

earnest phoenix
#
_events: [Object: null prototype] {
internalMessage: [Function],
message: [Function: bound _handleMessage],
exit: [Function: bound _handleExit]
},
_eventsCount: 3,
_maxListeners: undefined,
_closesNeeded: 2,
_closesGot: 1,
connected: false,
signalCode: null,
exitCode: 0,
killed: false,
spawnfile: '/usr/local/bin/node',
_handle: null,
spawnargs: [ '/usr/local/bin/node', '/home/container/bot.js' ],
pid: 36,
stdin: null,
stdout: null,
stderr: null,
stdio: [ null, null, null, null ],
channel: null,
_channel: [Getter/Setter],
_handleQueue: null,
_pendingMessage: null,
send: [Function],
_send: [Function],
disconnect: [Function],
_disconnect: [Function],
[Symbol(kCapture)]: false
(node:25) UnhandledPromiseRejectionWarning: Error [SHARDING_READY_DIED]: Shard 0's process exited before its Client became ready.
at Shard.onDeath (/home/container/node_modules/discord.js/src/sharding/Shard.js:155:16)
at Object.onceWrapper (events.js:422:26)
at Shard.emit (events.js:327:22)
at Shard._handleExit (/home/container/node_modules/discord.js/src/sharding/Shard.js:371:10)
at ChildProcess.emit (events.js:315:20)
at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
(node:25) 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:25) [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.```
quartz kindle
#
bla.on("event", a => console.log(a))
bla.on("event", function(a) { console.log(a) })

function f(a) { console.log(a) }
bla.on("event",f)
``` all do the same thing
earnest phoenix
#

Tim, I got somethin

#

Gg

pure lion
#

Well actually

#

@earnest phoenix try just console.log while still passing in => a

cinder patio
#

I need to get a new VPS, any recommendations? It doesn't need to have very good specs

pure lion
#

Oxide.host is what I use

#

It's cheap and pretty good imo

quartz kindle
#

its the same thing, passing in a function without calling it, ie console.log instead of console.log() will make the event call it with whatever arguments it has

pure lion
#

Oh ty tim

earnest phoenix
#

yep

quartz kindle
#

@earnest phoenix can i see your bot.js file?

earnest phoenix
#

srry for the .txt

pure lion
#

Bin it

#

aa!bin

#

To the file

earnest phoenix
#

can u tell me how it copys the file content?

cinder patio
#

What would 2 GO RAM mean? DO they mean gigabytes?

quartz kindle
#

yes, GO = GigaOctets

pure lion
#

@earnest phoenix makes a request to the file

quartz kindle
#

octet = byte

#

@earnest phoenix add a catch to your login call

earnest phoenix
#

ok

quartz kindle
#

client.login(client.token).catch(console.log)

cinder patio
#

Oh huh you learn something new everyday

quartz kindle
#

french people use octets instead of bytes

pure lion
#

F e n c h ?

quartz kindle
#

oui oui baguette

pure lion
#

Honhonhon baguette

earnest phoenix
#

I tried hard, but I changing status failed

#

someone got a tutorial?

restive furnace
#

array -> setInterval -> set status

restive pebble
#
embed:{
 thumnail:'some random url'
}
```it dosent work
pure lion
#

Is that the actual name?

quartz kindle
#

thumnail?

restive pebble
#

oh

still merlin
#

Can I have some help please, My test website isnt working, My rickroll I embeded to my site as a test didnt show up and nor did my cheese question >:(

<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <iframe width="560" height="315" src="https://www.youtube.com/embed/dQw4w9WgXcQ" frameborder="0"
        allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

    <p> id="CheeseTypeAnswer"</p>
</body>

</html>```
```js
console.log('Welcome to my website!')
alert('You are visting my website!')

var CheeseType = promt('What is the best type of cheese from your point of view')
document.getElementById('CheeseTypeAnswer').innerHTML = 'The best type of cheese from your view is,' + CheeseType```
pure lion
#

LmAo

restive pebble
#

thx

restive furnace
#

{ embed: { /**/ }}

restive pebble
#

i didnt saw rip

radiant kraken
#

what is promt()

restive furnace
#

@still merlin its prompt

quartz kindle
#

@still merlin <p id="CheeseTypeAnswer"></p> not <p> id="CheeseTypeAnswer"</p>

still merlin
#

Oh thanks, Sorry. I've just started learning js today

pure lion
#

Welcome to the club

cinder patio
#

Is hosting a bot on a raspberry pi a good idea?

restive pebble
#

kek

pure lion
#

It depends

quartz kindle
#

depends how good your internet is

pure lion
#

I say no but my internet is 🥴 🥴 🥴 🥴

cinder patio
#

I'd say it's pretty good

earnest phoenix
#

@pure lion like request(message.attachments.first().proxyURL)

pure lion
#

No

restive pebble
#

what are some nice packages for functions for example(lodash) which does not have its own .d.ts

pure lion
#

I fetched the first key thingy of the message (attachments are stored in arrays)

earnest phoenix
#

i think thats proxy

pure lion
#

Then went to it with node fetch and got the body and put it to hastebin

earnest phoenix
#

ok

pure lion
#

I'll check wait

slender thistle
#

Is <script> tag supposed to be used in <head> or <body>?

feral aspen
#

java.lang.UnsupportedClassVersionError: lavalink/server/info/AppInfo has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

queen moss
#

I normally put it in the bottom of the body @slender thistle

feral aspen
#

What is wrong with this?

slender thistle
#

Well, my .js files are being loaded but not .css 🤔

feral aspen
#

Please tag me if you know.

queen moss
#

Wait how are you loading in your css file

restive furnace
#

java.lang.UnsupportedClassVersionError: lavalink/server/info/AppInfo has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
@feral aspen update java jdk

feral aspen
#

Where can I do that

restive furnace
#

depends on your system

#

or then get older lavalink jar

pure lion
#

@queen moss ever heard of defer?

queen moss
#

There's a lot of possible meanings for that word be more specific

pure lion
#

<script defer>

queen moss
#

Oh yeah

slender thistle
#

Wait how are you loading in your css file
@queen moss <link rel="stylesheet" href="/assets/css/main.css">
path is correct, since it's what my js files use as well

#

for reference, <script src="https://cdn.socket.io/socket.io-1.2.0.js"></script>

#

no, wait

#

<script src="/assets/js/cards.js"></script>

queen moss
#

Hm

earnest phoenix
#

it would be better if its above </body>

slender thistle
#

it is

pure lion
#

I put my script in head

#

But defer

slender thistle
#
        <script src="/assets/js/max.min.js"></script>
        <script src="/assets/js/theme.js"></script>
        <script src="/assets/js/cards.js"></script>
    </body>
inland apex
#

Have a brazilian coder here?

marble juniper
#

no don't think so

faint prism
#

@feral aspen update java jdk
@restive furnace It says to update JRE. The app was compiled with a later version of JDK

queen moss
#

OH

#

That may be why. Specify text/javascript @slender thistle

restive furnace
#

@restive furnace It says to update JRE. The app was compiled with a later version of JDK
sorry, my bad, havent used java and i dont know what is what

slender thistle
#

js is loading fine, css isn't

queen moss
#

Oh

gilded plankBOT
#

@inland apex

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.

pure lion
#

Whats the default header?

slender thistle
inland apex
#

I just asked (sorry my english is very bad) if have a brazil developer

pure lion
#

Thats weird

earnest phoenix
#

Hi

#

DICE

pure lion
#

THEBEASTARDUDHFUEHFIENFJE

earnest phoenix
#

WAT

pure lion
#

What do you want

slender thistle
#

Should I try asking in Python server, since I'm using Sanic?

earnest phoenix
#

u left me alone...

pure lion
#

Probably

#

@earnest phoenix sorry

#

Send code again

earnest phoenix
#

nah

#

wait sanic

pure lion
#

Here

queen moss
#

Yeah I don't see why it would load js in with the same path but not css

earnest phoenix
#
const hastebin = require("hastebin-gen");
const Discord = require('discord.js');
const fetch = require("node-fetch");
module.exports = {
    name: "haste",
    description: "Puts something in haste bin for you!",
    aliases: [],
    usage:"<code or text>",
    display: true,
    type: "general",
    execute: async function(client, message, args, prefix) { 
        console.log(message.attachments.first().proxyURL)

    var text = args.slice(1).join(' ') || fetch(message.attachments.first().proxyURL)
    message.delete()
    const haste = await hastebin(text);
    message.channel.send(new Discord.MessageEmbed().setDescription(`Sucess! Here's your hastebin link: ${haste}`).setColor('RANDOM'))
    }
}```
#

so the way of importing css would be different shivaco

#

i forgot that

pure lion
#

@earnest phoenix first().attachment

slender thistle
#

I'll be off to the Python server then

#

Thanks for trying, Kirb KEKW

earnest phoenix
#

wbt?

#

@earnest phoenix first().attachment
@pure lion what about it?

pure lion
#

Change that

#

x)

drifting wedge
#

hey, whats good as a music bot? im using heroku and python

pure lion
#

Don't use heroku for music bot

earnest phoenix
drifting wedge
#

its not just a music bot

pure lion
#

Just don't

quartz kindle
#

who tf came up with that name

drifting wedge
#

what is good?

pure lion
#

S a n i c

quartz kindle
#

fucking sanic lmao

#

"build fast. run fast."

pure lion
#

Fuck it

#

I'm making a lib called

#

Hmmmm

#

Shit I forgot

slender thistle
pure lion
#

Oh my god

hoary crown
#

.

slender thistle
#

@earnest phoenix Doesn't help, that issue is related to 304s and CSS rules being overwritten

#

whereas my issue is .css files not loading at all

cerulean venture
#

Where would I put a function that I wanna call every hour (has to use message) ?

hoary crown
#

What is a good bot scripting

slender thistle
#

-dotpost @hoary crown

gilded plankBOT
#

@hoary crown

Please do not post dots to clear your messages/get attention. It adds absolutely nothing to the conversation and just causes spam.
If you need to get attention, then say hello everyone. If you need to clear your messages, then press the Esc key. If you do not follow these instructions you will be muted.

hoary crown
#

?

pure lion
#

Omg

hoary crown
#

o

#

lmao

earnest phoenix
#

oh

#

my bad

feral aspen
#

Btw, how can I use an older version of lavalink.

earnest phoenix
#

still obect promises

feral aspen
#

???

pure lion
#

@earnest phoenix b r o

feral aspen
#

Any help please?

pure lion
#

Are you getting the res/body?

feral aspen
#

I updated java for this.

#

now I need to use old lavalink

#

how can I do that.

pure lion
#

I don't java

#

Sorry

feral aspen
#

Ahhhhhhh

cerulean venture
#

npm install <package>@<version>

pure lion
#

That's nodeJS

cerulean venture
#

oh he was talking about java

#

my bad

pure lion
#

mpn install X)

cerulean venture
#

sorry, heat is killing my brain

pure lion
#

It's fine

earnest phoenix
#

Are you getting the res/body?
@pure lion its not letting me

pure lion
#

Wym?

earnest phoenix
#

keeps saying absolute urls are supported

pure lion
#

let res = await fetch (first().attachment)
let body = await res.json()

feral aspen
#

No

#

The npm doesnt work

#

I am using java

pure lion
#

B r o

feral aspen
#

and when i start, it says need to use old version of lavalink

#

idk how

pure lion
#

What's the java package manager?

#

mpn?

feral aspen
#

wdym and how do i check

pure lion
#

How u install pacc

feral aspen
#

pacc???

#

I downloaded the lavalink file then add application.yml and add its code

#

java.lang.UnsupportedClassVersionError: lavalink/server/info/AppInfo has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

#

and in console

#

this error keeps occuring

#
      throw er; // Unhandled 'error' event
      ^

Error: getaddrinfo ENOTFOUND sftp
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:64:26)
Emitted 'error' event on WebSocket instance at:
    at ClientRequest.<anonymous> (C:\Users\hajji\OneDrive\Desktop\Attitude Future\node_modules\ws\lib\websocket.js:554:15)
    at ClientRequest.emit (events.js:310:20)
    at Socket.socketErrorListener (_http_client.js:426:9)
    at Socket.emit (events.js:310:20)
    at emitErrorNT (internal/streams/destroy.js:92:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  errno: 'ENOTFOUND',
  code: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: 'sftp'
}```
#

so I need to use old version of lavalink

#

😐

pale vessel
#

hostname: 'sftp'
bruh

faint prism
#

throw er; That line means, "Throw an error" (intentionally)

earnest phoenix
#

Hello, I still try to make my bot change status, but its not really working

lethal pine
#

how to make clear command in python like if i type .clear all the msgs is cleared but my msg is not deleting please help

earnest phoenix
#

message.delete();

#

is the fix

faint prism
#

Hello, I still try to make my bot change status, but its not really working
@earnest phoenix Look in the docs for something like: client.SetGameAsync("Some status")

how to make clear command in python like if i type .clear all the msgs is cleared but my msg is not deleting please help
@lethal pine Deleting messages is it's own api call, not clearing console

earnest phoenix
#

I know

#

but I want it change

#

after some time

#

like 10 seconds

faint prism
#

Then set it on a timer?

earnest phoenix
#

Yes but how do I even let it change

#

i tried random stuff

#

based on what i thought

#

and the docs aswell

faint prism
#

Look for the OnReady event, and make a loop with a sleep command for 10 seconds that setsStatus

earnest phoenix
#

thats difficult

#

do you know a tutorial

#

So i can learn

faint prism
cerulean venture
#

@faint prism uhm I finally did it lmao now I just gotta figure out some other stuff (the birthday thing)

faint prism
#

Was that the post about regex and using new Date?

#

@cerulean venture

cerulean venture
#

yeah

#

I did it differently tho

#

``select bdUser from birthday where DAY(bdDate) = DAY(CURDATE()) and MONTH(bdDate) = MONTH(CURDATE());` <- was easier

faint prism
#

Oh you're using sql?

cerulean venture
#

mysql, yea

faint prism
#

Gotcha, yeah I could imagine that being easier to do

#

What's the performance on that query?

cerulean venture
#

good question

#

😂

faint prism
#

I know using functions in SQL queries can slow it down a bit, so I was jw

cerulean venture
#

ah well no idea tbh, since it's only getting called once per day (or at least that's the plan)

faint prism
#

Oh, does it load the bdays into memory?

opaque seal
#

I have a commands folder which has subfolders in it, how can I adapt this code to work in subfolders?

delete require.cache[require.resolve(`./${command.name}.js`)];

        try {
            const newCommand = require(`./${command.name}.js`);
            message.client.commands.set(newCommand.name, newCommand);
            message.channel.send(`Command \`${command.name}\` was reloaded!`);
        }```
cerulean venture
#

Oh, does it load the bdays into memory?
@faint prism yes

#

I just can't figure out why my cronjob won't work

faint prism
#

What is it?

cerulean venture
#

I have no clue, I'm not even getting any errors

#

it just refuses to work

faint prism
#

No, what's the cronjob

cerulean venture
#

oh

#

to read from db and then send it to a channel

#

at 00:00

opaque seal
#

try node-schedule

cerulean venture
#

well I mean it is kinda working but like in a weird way

#

I can't call anything related to finding a channel or something

#

it just posts it in general lmao then it works

#

or well I can use id's in that term but no names

#

even tho I'm using the cron in my on Message

earnest phoenix
#

do you need a yt api key for lavalink ?

cerulean venture
#
                bdGreet.send('**THIS IS A TEST**' + 'Happy birthday to ' + '<@'+results[i].bdUser+'>' + ' Take a shot!' + '**THIS IS A TEST**')```

And I don't see anything wrong with that code 🤔
opaque seal
#

what is bot.guild

cerulean venture
#

client.guild

opaque seal
#

discord.js . version?

cerulean venture
#

11

opaque seal
#

ah

earnest phoenix
#

bot doesnt have a guild property does it

cerulean venture
#

yeh I really gotta update

opaque seal
#

can't help you then

earnest phoenix
#

only guilds right

opaque seal
#

bot doesnt have a guild property does it
@earnest phoenix idk probably not

earnest phoenix
#

why dont u use <client>.guilds.find( "compare id" ).send( message )

cerulean venture
#

because I don't want to use id's

opaque seal
#

I have a commands folder which has subfolders in it, how can I adapt this code to work in subfolders?

delete require.cache[require.resolve(`./${command.name}.js`)];

        try {
            const newCommand = require(`./${command.name}.js`);
            message.client.commands.set(newCommand.name, newCommand);
            message.channel.send(`Command \`${command.name}\` was reloaded!`);
        }```

btw can anyone help me with that?

cerulean venture
#

just update it to v12
@earnest phoenix
It will probably break some stuff I guess, right?

earnest phoenix
#

no that much

#

better do it now that never

cerulean venture
#

yeah obviously

#

yeh I guess

earnest phoenix
#

you can look the changes up

cerulean venture
#

ah ty

earnest phoenix
#

do you need a yt api key for lavalink ?

cerulean venture
#

ohh that's way more chill to work with that

earnest phoenix
#

np

#

just ctrl f the code that errors after you updated to v12

#

and you should be fine

cerulean venture
#

huh I'm confused, why wont it update to v12 lmao

#

ah there we go

golden condor
#

do you need a yt api key for lavalink ?
@earnest phoenix no it relies on scraping

faint prism
#

Ah scraping. Easier than some APIs

golden condor
#

But against yt's tos

faint prism
#

What, getting the first video result in a search, and extracting the video link?

golden condor
#

Scraping in general

wanton anvil
#

can anybody say me how can I use asyncio Timeouts for timed messages in dpy

delicate shore
#
if (msg.author.roles.highest.position < member.roles.highest.position) { return }
#

is this

#

even valid code?

tawny lava
#

no

#

roles doesn't exist on msg.author cuz it's a user

delicate shore
#

ok

#

so

#

roles doesn't exist on msg.author cuz it's a user
@tawny lava then how

#

can i do it

earnest phoenix
#

get the member property

tawny lava
#

u'll need to get the member object not the user

earnest phoenix
#

msg.member

delicate shore
#

msg.mmbebr

#

ok

#

thnx

earnest phoenix
#

AAAAA

#

Who tf uses msg instead of message

#

for some reason that makes me go reee

delicate shore
#
if (msg.member.roles.highest.position <= member.roles.highest.position) return msg.reply(`Person has a higher or same role as you so... Later Boomer`)```
#

is <= something ?

#

or is it =<

#

but it doesn't make sense

#

it must be <= right ?

left lake
#

later boomer

#

im gonna go digest the most potent bleach i can find now

earnest phoenix
#

No

static trench
#

There should be more proof you own the bot when you add a new bot. I could add @wild tree (my bot) and I could add @thorn flower or whatever with just the ID

earnest phoenix
#

It shpuld be =>

#

Because that's the sign for arrow functions

#

Oh wait

delicate shore
#

wha

#

wtf

earnest phoenix
#

It should be >=

delicate shore
#

why ?

earnest phoenix
#

Since you're comparing

delicate shore
#

but

#

i wanna see

earnest phoenix
#

Don't use <= it won't work

delicate shore
#

;-;

#

i want to see

#

if person has lower role

#

higher*

#

then it returns

earnest phoenix
#

if person has lower role
@delicate shore bruh

delicate shore
#

LALDLfep]2nqfokf

#

=<

#

<=

#

is this correct

left lake
#

try it

#

alot of coding is trial and error, if you dont try something out once in awhile then you'll never know what you can and cannot do

delicate shore
#

pl

cerulean venture
#

soo what would be the equivalent of message.member.voiceChannel.join in v12?

#

either I'm dumb or just blind

amber fractal
#

member.voice.channel.join()

cerulean venture
#

oof okay thanks

amber fractal
delicate shore
#

:bruh:

cerulean venture
#

okay finally updated everything to v12, thought it would've been way more to fix lol

earnest phoenix
#
(async () => {

    await client.login(process.env.DISCORD_TOKEN);
    client.music = new ErelaClient(client, [
        {
            host: process.env.HOST,
            port: process.env.PORT,
            password: process.env.PASSWORD,
        }
    ]);

    client.music.on('nodeConnect', node => console.log(node))

})();
#

->

#
^

TypeError: client.on(...) is not a function
lethal pine
solemn latch
#

Best database depends

lethal pine
#

like

delicate shore
#

can someone suggest me

#

some good website

#

for cool bg's

solemn latch
inland apex
#
    at Function.resolve (C:\Users\thury\Desktop\Bot Do Rick\node_modules\discord.js\src\util\BitField.js:150:11) 
    at Permissions.has (C:\Users\thury\Desktop\Bot Do Rick\node_modules\discord.js\src\util\BitField.js:45:28)   
    at Permissions.has (C:\Users\thury\Desktop\Bot Do Rick\node_modules\discord.js\src\util\Permissions.js:45:85)
    at C:\Users\thury\Desktop\Bot Do Rick\node_modules\discord.js\src\structures\GuildMember.js:268:53
    at Map.some (C:\Users\thury\Desktop\Bot Do Rick\node_modules\@discordjs\collection\dist\index.js:235:17)
    at GuildMember.hasPermission (C:\Users\thury\Desktop\Bot Do Rick\node_modules\discord.js\src\structures\GuildMember.js:268:29)
    at Object.exports.run (C:\Users\thury\Desktop\Bot Do Rick\commands\anuncio.js:4:24)
    at Client.<anonymous> (C:\Users\thury\Desktop\Bot Do Rick\index.js:46:26)
    at Client.emit (events.js:315:20)
    at MessageCreateAction.handle (C:\Users\thury\Desktop\Bot Do Rick\node_modules\discord.js\src\client\actions\MessageCreate.js:31:14)
(node:10184) 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)
(node:10184) [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.```
misty sigil
#

ok

#

code?

inland apex
#

This is an aerror

#

i will send the code

#

exports.run = async (client, message, args) => {
    if(!message.member.hasPermission("Anunciar Mensagem")) return message.channel.send({
        embed:{
            title: ':x: Erro',
            color: '#2F3136',
            description: `
            Você não tem permissão.`
        }
    })
    if (!args[0]) return message.channel.send({
        embed:{
            title: ':x: Erro',
            color: '#2F3136',
            description: `
            Utilize: /anunciar <anuncio>`
        }
    })
    let canal = message.guild.channels.cache.get('739901247087444070')
    let anun = args.slice(0).join(' ');
    let author = message.member.displayName;
    let embed = new Discord.MessageEmbed()
    .setTitle(":bell: | **YT - ANUNCIO**")
    .setColor("#2F3136")
    .addField("Anuncio:", `${anun}`)
    .addField("Autor:", `${author}`)
    .setTimestamp()
    canal.send(embed).then(icon => {
        icon.react(":white_check_mark:")
    })}```
misty sigil
#

AUGH

inland apex
#

Its a announce system

misty sigil
#

USE ```

inland apex
#

sorry

#

Done.

misty sigil
#

Anunciar Mensagem isn't a bitfield/flag

#

docs.

inland apex
#

Thanks

earnest phoenix
#

Is there any real way I can use the Discord API without a wrapper like d.js

#

It will be HARD AS FRIK

#

ik

#

but

#

just curious

split hazel
#

websockets and http requests

solemn latch
#

Of course

wanton anvil
solemn latch
#

You know we will just google it

#

Same amount of work for us to find it, as you

earnest phoenix
#

LMFAO

#

But y'all explain me some stuff so I also learn

wanton anvil
#

ok

earnest phoenix
#

Else I just copy paste

#

I love this channel and I love y'all

split hazel
#

I wouldnt recommend using the discord api without a wrapper as a starter

earnest phoenix
#

Yup

#

Jyst curious

solemn latch
#

Pretty sure even discord doesn't recommend not using a lib for bot stuff

#

For learning 100% do it

#

For an actual bot, use a lib

delicate shore
#

i wanna lock my bot to one VC

#

otherwise it breaks when someone uses command

#

in another VC

earnest phoenix
#

Then

wanton anvil
#

didn't get the channel in disboard

earnest phoenix
#

Check if it is already in one

delicate shore
#

;-;

wanton anvil
#

;-;

earnest phoenix
#

;-;
@delicate shore you asked for help we helped you don't expect us to always go shenanigans for you or anyone tbh

#

this is how you check:

delicate shore
#

-;-;-;-;;-;-;-;-;-;---------

solemn latch
split hazel
#

if you know the basics of http requests and websocket connections you should be fine as long as you have some experience with your chosen language

solemn latch
#

Yes, I just googled it

wanton anvil
#

thanks @solemn latch

split hazel
#

Also this isn't shitpost, this is development

faint prism
#

How are you guys running your bots? Mine is via a system service

solemn latch
#

Pm2

earnest phoenix
#
if (message.member.voice.channel != bot.member.voice.channel){
 message.reply("no boi i can't stay in more than two vcs");
}
#

@delicate shore hope it works

delicate shore
#

op

earnest phoenix
#

Someone please say I was correct

delicate shore
#

op

#

i think

#

yes

earnest phoenix
#

op
@delicate shore so you literally wanted sspoonfeeding

delicate shore
#

no

#

u pinged me

#

i came back

#

otheriwse

#

i was reading docs

#

myself

#

:smh:

earnest phoenix
#

Node error: connect ECONNREFUSED 127.0.0.1:7000

#

When I'm trying to connect to ErelaClient

split hazel
#

what is erelaclient

tight plinth
#

erelaclient is lavalink for js

#

@earnest phoenix it can't find the lavalink node

earnest phoenix
#

i think i found it

#

it has something to do with erela v2

#

but ty 😄

tight plinth
#

lol

delicate shore
#

eestop

bitter badger
#

So a server using my bot has 2Factor enabled, so now the bot can't use the message.delete() command. How am I supposed to fix that? Can't easily find much explaining 2Factor with bots

faint prism
#

Pm2
@solemn latch Damn that terminal UI looks clean

solemn latch
#

Also about as simple as it gets

#

Takes 15 seconds to get pm2 up and running on a new vps

faint prism
#

Does it restart the bot if the server reboots?

solemn latch
#

Yeah

#

And if the program crashes

earnest phoenix
bitter badger
#

I use pm2 as well

delicate shore
#

but @earnest phoenix problem is

#

i use

#

distube

#

so

#

RIP

#

um

#

discord is lagging or is it only me ?

solemn latch
#

So many music libs

delicate shore
#

wait what

faint prism
#

Well, so far I've managed to avoid using nodejs

delicate shore
#

i will ask in distube only

#

if they don't repsond

earnest phoenix
#

@earnest phoenix i don't think it is has anything to do with v2 but sure

delicate shore
#

i have a backup code

#

my previous one

#

i will use that

#

in which i use ytdl core

faint prism
#

use git

delicate shore
earnest phoenix
#

??

solemn latch
#

So does distube not let you use djs methods or something?

earnest phoenix
#

it legit says

faint prism
#

git-scm is pretty good

delicate shore
#

So does distube not let you use djs methods or something?
@solemn latch yeh

earnest phoenix
#

that you need to change it to Manager

solemn latch
#

What

#

Hows that even work

earnest phoenix
#

but i keep gettting the error that it is not a constructor

#

wolfy it's a node error which means it couldn't connect to Lavalink and also v2 isn't out it's in beta

delicate shore
#

oh

#

wtf

earnest phoenix
#

but i keep gettting the error that it is not a constructor
you've used it wrong

delicate shore
#

i am mad

#

lemme try it

earnest phoenix
#

ok i changed it back

#

but why cant it connect to lavalink

#

how can i find that out

solemn latch
#

Looking at the distube docs, you still have full acess to your guild member object.
Theres zero reason checking this wouldnt work

delicate shore
#

@solemn latch js if (msg.member.voiceChannel != bot.member.voiceChannel){ msg.reply("no boi i can't stay in more than two vcs"); }

earnest phoenix
#

but why cant it connect to lavalink
@earnest phoenix it's probably your nodes

solemn latch
#

Bot.member makes no sense

earnest phoenix
#

join this server

#

they will help

delicate shore
#

does it make sense

earnest phoenix
#

they have a lavalink channel

delicate shore
#

discord laged

solemn latch
#

Yeah

delicate shore
#

ok

earnest phoenix
#

thanks ill try there auric

#

np

solemn latch
#

You probably will need to check if your bot is even in a channel aswell

earnest phoenix
#

<guild>.me.voice.channelID

#

compare that with the voice channelID of the member

delicate shore
#
if (msg.member.voiceChannel !== msg.guild.me.voiceChannel){
 return msg.reply("no boi i can't stay in more than two vcs");
}```
#

You probably will need to check if your bot is even in a channel aswell
@solemn latch i already do that

#

and this is not working

#

no repsonse

earnest phoenix
#

are you dumb

delicate shore
#

no error

#

:nou:

solemn latch
#

I am. Thats forsure

delicate shore
#

I am. Thats forsure
@solemn latch why

#

what did i do wrong

#

:(

earnest phoenix
#

read the docs

delicate shore
#

but nothing is incorrect

#

i checked the code

#

with a bot

#

it said it's correct

faint prism
#

I didn't read the docs yday, and my commit wiped my db ;P

sudden geyser
#

did you check the docs

quartz kindle
#

always compare ids

#

never objects

delicate shore
#

but

#

of vc as well?

faint prism
#

IDs

delicate shore
#

ok

quartz kindle
delicate shore
#

lemme try

still merlin
#

Er my website is a bit broken, I was trying to learn Javascript and I have 2 issues, My rickroll test thing dosen't show

<body>
    <iframe width="560" height="315" src="https://www.youtube.com/embed/dQw4w9WgXcQ" frameborder="0"
        allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
    <p id="CheeseTypeAnswer"></p>
</body>``` and my alert and prompt aren't working
```js
console.log('Welcome to my website!')
alert('You are visting my website!')

var CheeseType = prompt('What is the best type of cheese from your point of view')
document.getElementById('CheeseTypeAnswer').innerHTML = 'The best type of cheese from your view is,' + CheeseType```
delicate shore
#

OP

#

🧀

#
if (msg.member.voiceChannel.id !== msg.guild.me.voiceChannel.id){
 return msg.reply("no boi i can't stay in more than two vcs");
}````
#

so tim like this ?

faint prism
#

@quartz kindle That comparison works for a simple object, but more complex ones may differ slightly

#

so tim like this ?
@delicate shore A better bet

delicate shore
#

ok

#

im lazy to try

quartz kindle
#

yes, but its a best practice precisely because of that

delicate shore
#

i will see it later

#

gtg

#

bye and thanks

quartz kindle
#

you never know how complex objects are gonna get cast

earnest phoenix
#

also heyo development

quartz kindle
#

chrome's dev tools

earnest phoenix
#

NIGHT MODE FTW

#

Who pinged meeeeeee

mortal dagger
#

idk

earnest phoenix
#

@mortal dagger I use an API for inverting colors

mortal dagger
#

nooo

#

i dont need that

earnest phoenix
#

They have an inverting API

#

@earnest phoenix just go to some site and press f12

mortal dagger
#

i need like an site

#

to do

earnest phoenix
#

or ctrl + schift + i

mortal dagger
#

i dont wanna implement on a bot

earnest phoenix
#

i need like an site
bruh then you just get the image anyways

#

it literally just takes a URL and returns an image

#

not limited to bots only

mortal dagger
#

I DONT NEED THAT FAM

#

i dont need thattt

misty sigil
#

bruh are you like

earnest phoenix
#

i have no other way of converting images

#

demanding

mortal dagger
#

k lol

#

lmaoooooo

#

anyVays

earnest phoenix
#

jeremy clarkson the best

pale vessel
#

nice telk's api

earnest phoenix
#

yep

#

huh

#

she left

#

oh wait

#

discord glitched

pale vessel
#

what

solemn latch
#

Discord is absolutely perfectly flawless, it couldn't have glitched. You glitched

earnest phoenix
#

no

#

i typed @ then Telk and it only showed kirby not telk's face

solemn latch
#

Thats just discord loading users

earnest phoenix
#

oh ok

#

also

#

what is hex

solemn latch
#

Base 16 number system

earnest phoenix
#

Anyone know a way to go around overlapping text in canvas?

solemn latch
#

Like to prevent it from happening?

earnest phoenix
#

Base 16 number system
that uses A to F letters too?

#

yeah kinda

solemn latch
#

Yeah
1 to F

#

1 2 3 4 5 6 7 8 9 A B C D E F

earnest phoenix
#

1 to F
waitWhat
0 1 2 3 4 5 6 7 8 9 A B C D E F
🆗

solemn latch
#

Theres ways to scale text to fit within an area

earnest phoenix
#

also

#

is there a 0 in hex

solemn latch
#

Of course there's 0

earnest phoenix
#

because what you typed counts to 15 characters

#

1 2 3 4 5 6 7 8 9 A B C D E F

#

Theres ways to scale text to fit within an area
is there any docs on it?

#

yep

#

just search on their websie

#

not even the mdn docs site but ok

#

then

#

n0t an Ip gra<bber

#

lol

solemn latch
earnest phoenix
#

umm

solemn latch
#

You wouldn't do canvas width, but the width you want

earnest phoenix
#

use word-wrap

#

oh you don't get what i mean

#

set the text box to the size of the canvas

#

finally it works

#

i've already use the measureText method

#

then do word-wrap

#

@earnest phoenix ty

#

np

#

eventhough those people didnt help me

#

o rip

#

but i appreciate you tryna help me 😄 😄

solemn latch
#

So what's overlapping?

#

Or, have an example?

earnest phoenix
#

soz just gotta write over some stuff

#

but see you i used measureText on the user's tag

#

but it overlaps the welcome text

solemn latch
#

Wouldn't you just set a max size

#

Iirc, your starting font is the max size

earnest phoenix
#

the size differs between how big the user's name is

#

it's hard to explain from my point of view

solemn latch
#

Right.
as the username is longer, it gets smaller.
If the name is too short, it gets to big. So you need a max size

earnest phoenix
#

yeah i got u

pale vessel
#

why not use the text height

#

it's the font size

earnest phoenix
#

huh?

#

is that website

#

the text height is font size

#

html ?

#

css ?

#

of course

#

:0

#

html and css work together

#

i am not good in designing

#

html is the website and css makes it look fancy

#

: /

#

you can't have CSS without HTML

#

it will do nothing

#

ik

#

dude i am not dumb

#

is that website

html ?

css ?

#

you're literally asking if it just html or just css

#

let's end this
period

#

._. why u make everything importain

#

@solemn latch yeah ill just set a max size

#

when it is just a small problem in syntax

#

if my bot uses sharding how do i get the server count?

#

ahm

#

when it is just a small problem in syntax
tf are you saying you never showed any code to me

#

period

#
client.guilds.size
pale vessel
#

so text height + text font * 2

#

never mind

earnest phoenix
#
client.guilds.size

bro sharding makes it impossible

#

:0

#

then idk

pale vessel
#

use broadcasteval and reduce

earnest phoenix
#

😮

#

use broadcasteval and reduce
???

pale vessel
#

i bet you don't even need to shard

earnest phoenix
pale vessel
#

just use that way for now

earnest phoenix
#

yep

#

ye

#

just go here

pale vessel
#

don't

earnest phoenix
#

i ask a lot of stuff for curiosity

misty sigil
#

just broadcastEval lmao

earnest phoenix
#

what i put process.exit in it

pale vessel
#

you don't need to shard for now

earnest phoenix
#

and stop every single sahrd

#

¯_(ツ)_/¯

#

you don't need to shard for now

i ask a lot of stuff for curiosity

pale vessel
#

ok

earnest phoenix
#

broadcastEval goes over every single thing in an array and does smth to it?

#

u should shard when u have 100 servers +

pale vessel
#

no

solemn latch
#

1000+

arctic cape
earnest phoenix
#

wut

#

u should shard when u have 100 servers +
dude shut up tbh

#

@arctic cape LMAO

#

ur bot is so fast

#

anybody with the idea why ping is -ve
because your bot is literaly too fast

#

ltieraly

#

no joke

#

less then ms

arctic cape
#

lmao

earnest phoenix
#

that happens to me too

arctic cape
#

any idea why it say -ve no. though?

lusty quest
#

its a bug. i have this usually when i run it on my PC

earnest phoenix
#

i never changed the ping command

arctic cape
#

my ping command has gif 😍

earnest phoenix
#

i dont have ping command

lusty quest
#

(i guess difference in system time in ms)

earnest phoenix
#

its a bug. i have this usually when i run it on my PC
oh ok

#

i add it into Bot info command

arctic cape
#

@lusty quest its hosted online

#

😓

lusty quest
#

maybe your system time is not 100% there

arctic cape
#

any idea how to do wildcard?

solemn latch
#

If you measure ping by sending messages and getting the diffrence in time between the sent message and when it was processed by discord this can happen

lusty quest
#

since for calculating the delay you use the hosts system time

arctic cape
#

nope its online 24x7 and updating stuff

solemn latch
#

The typical proper way is to use websocket ping

arctic cape
#

it handles server stats as well

#

so its constently listening to events

#

anybody knows how to use wildcard?

#

in command if statement?

lusty quest
#

in what context?

earnest phoenix
#

yeah

#

in command if statement?

arctic cape
#

like i want to search user's msgs for a specific string

earnest phoenix
#

wtf is a wildcard

#

oh

#

idk

#

you do

#

message.content.includes("stuff");

arctic cape
#

word anywhere in the msg

#

thnks

earnest phoenix
#

yep

lusty quest
#

i guess this can become a pain in the ass if you want to search in older messages

arctic cape
#

nah new things

earnest phoenix
#

yep

#

who tf runs stuff on old messages

arctic cape
#

i got my bot upto V0.9 till now

lusty quest
#

regex also works

arctic cape
#

@earnest phoenix where are you from 🤔

earnest phoenix
#

INdia

#

his mother

arctic cape
#

noice

earnest phoenix
arctic cape
#

which state bro?

finite nimbus
#
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/donenv - Not found
npm ERR! 404
npm ERR! 404  'donenv@8.2.0' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\filip\AppData\Roaming\npm-cache\_logs\2020-08-07T15_15_53_270Z-debug.log
``` helpp
arctic cape
#

yea come there

pure lion
#

How does first() work? Would it also work in arrays or na

earnest phoenix
#

donenv?

lusty quest
#

try dotenv

misty sigil
#

its collections

arctic cape
#

use dotenv

earnest phoenix
#
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/donenv - Not found
npm ERR! 404
npm ERR! 404  'donenv@8.2.0' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\filip\AppData\Roaming\npm-cache\_logs\2020-08-07T15_15_53_270Z-debug.log
``` helpp

@finite nimbus bruh you put a package that doesn't exist

finite nimbus
#

ohh FacePalm

earnest phoenix
#

type the name correctly

finite nimbus
#

XD

earnest phoenix
#

npm i <name without type>

arctic cape
#

not donenv xd

earnest phoenix
#

you typed donenv KEKW

pure lion
#

oendotven

earnest phoenix
#

let's forget that me also made a typo

arctic cape
#

wth's that?

earnest phoenix
#

.env files are awesome

arctic cape
#

yea

earnest phoenix
#

you can store stuff without anyone peeking

arctic cape
#

but i have a pvt bot so no worries

#

😅

earnest phoenix
#

then

#

why are you on DBL if you don't have a public bot

arctic cape
#

chilling

earnest phoenix
#

🤔

#

oh ok

arctic cape
#

and asking some doubts

earnest phoenix
#

also

arctic cape
#

if i ever want to make bot public

earnest phoenix
#

what does <canvas> in HTML do

arctic cape
#

embeds

#

in discord

#

are cavas in html i think

earnest phoenix
#

wtf???

arctic cape
#

i read it i think

#

wait

pure lion
#

Canvas is canvas

earnest phoenix
#

bro

pure lion
#

It's node canvas but native

earnest phoenix
#

but me asking for HTML

#

not JS

solemn latch
#

A lot of web animations are canvas

pure lion
#

Is canvas written in js btw?

arctic cape
#

The canvas element is part of HTML5 and allows for dynamic, scriptable rendering of 2D shapes and bitmap images. It is a low level, procedural model that updates a bitmap and does not have a built-in scene graph, but through WebGL it allows 3D shapes and images to be displayed.

earnest phoenix
arctic cape
#

nope

#

thats not canvas

#

that is css

earnest phoenix
#

smh

#

SMH

arctic cape
#

mdr

lusty quest
#

this is made with canvas

arctic cape
#

its still loading

#

or wait is it loading?

#

is loading the thing

pure lion
#

It's just a blank PNG lmao

arctic cape
#

yea exactly

lusty quest
#

lol no

#

are you on mobile?

solemn latch
#

Yes

pure lion
#

Yep

earnest phoenix
#

Nope

lusty quest
#

nice to know that Chartjs hates mobile users

arctic cape
#

nope

misty sigil
#

discord cdn dying

arctic cape
#

pc

misty sigil
#

lmfao

solemn latch
#

Lol

lusty quest
#

so a non discord cdn image

earnest phoenix
#

gtg add reddit API

#

someone link me the docs

#

in five secnods

#

🤣

lusty quest
#

make sure to filter out NSFW stuff

#

idk if there are even docs

earnest phoenix
#

yep

#

bruh

#

APIs always have docs

lusty quest
#

since its litterally adding .json at the end of the page url

mild flower
#

How can i add an error report to the mathjs?
I dont want it to crash everytime i enter ;math lmao

lusty quest
#

some APIs are hidden

mild flower
#

how can i send an error message everytime the bot cant solve the question

#

using mathjs

solemn latch
#

Even discords api has a lot of undocumented stuff

earnest phoenix
#

oh

misty sigil
#
try{
math shit
}catch(err){
error shit 
}```
earnest phoenix
#

but they still have docs atleast

#

how can i send an error message everytime the bot cant solve the question
you do :

#
try {
//code
} catch (err){
//run smth on error
}
#

try catches are really useful

misty sigil
#

^ yes they are