#development

1 messages Β· Page 1100 of 1

hardy steeple
#

would it be message.embed.timestamp or message.timestamp or wat

viral iris
#

@quartz kindle

slender thistle
#

which library

viral iris
#

u here ?

hardy steeple
#

d.js

quartz kindle
#

i said no, he dms me anyway

solemn latch
#

lol

quartz kindle
#

.>

viral iris
quartz kindle
#

you're not loading the fonts anywhere

hardy steeple
#

ok but when using .timestamp where do you put it

solemn latch
#

on the embed

hardy steeple
#

but where?

viral iris
#

you're not loading the fonts anywhere
@quartz kindle how to do it ?

solemn latch
#

anywhere

hardy steeple
#

like message.timestamp

summer torrent
#

would it be message.embed.timestamp or message.timestamp or wat
@hardy steeple .setTimestamp() in embed constructor

hardy steeple
#

or how

quartz kindle
#

always read docs

solemn latch
#

on the embed, not the message

hardy steeple
#

k

viral iris
#

oh k

hardy steeple
#

im gonna be coming back here and asking a bunch of stupid questions

strange trout
viral iris
#

still + got this

#
registerFont('Burbank Big Condensed Black.ttf', {family: 'Comic Sans'})
#

is it right ?

strange trout
#

That's not a path

solemn latch
#

thats not the path

viral iris
#

../

solemn latch
#

if its at ../

quartz kindle
#

why is it looking for fortnite fonts tho

viral iris
#
registerFont('./assets/fonsts/Burbank Big Condensed Black.ttf', {family: 'Comic Sans'})
strange trout
#
ctx.fillStyle = "white";
ctx.font = "50px Fortnite";
var text = ctx.measureText(name)
var where = 261 - (text.width / 2)
#

You need to set the family to Fortnite

quartz kindle
#

if you want to use the font as "Fortnite", you need to define it as such in the family field

viral iris
#

why i got only 1 ?

honest perch
#

are you generating more than 1

viral iris
#

yes

honest perch
#

code?

quartz kindle
#

you're only saving one

viral iris
quartz kindle
#

you're saving only the last one

viral iris
#

how to make it all ?

quartz kindle
#

dont create a new canvas for each item

viral iris
#
                data.forEach(async (item, i) => {
#

mean this ?

quartz kindle
#

you're creating a new canvas inside the forEach loop

#

so for each item, a new canvas is created

viral iris
#

how

strange trout
#

How what

quartz kindle
#

did you copy and paste this code?

viral iris
#

make all of them

#

idk canvas alot

quartz kindle
#

dont create a new canvas inside the loop

#

create it outside

#

so all items use the same canvas

#

also, you're drawing all images at position 0x0

#

you need to calculate where each image should be based on how big is it

#

you're already doing it with your x and y variables, but you're not using them

sullen salmon
#
Traceback (most recent call last):
  File "discord_bots/invite-used/invite_used.py", line 1, in <module>
    import discord
  File "/home/zander/.local/lib/python3.6/site-packages/discord/__init__.py", line 23, in <module>
    from .client import Client
  File "/home/zander/.local/lib/python3.6/site-packages/discord/client.py", line 34, in <module>
    import aiohttp
  File "/home/zander/.local/lib/python3.6/site-packages/aiohttp/__init__.py", line 6, in <module>
    from .client import BaseConnector as BaseConnector
  File "/home/zander/.local/lib/python3.6/site-packages/aiohttp/client.py", line 30, in <module>
    from yarl import URL
  File "/home/zander/.local/lib/python3.6/site-packages/yarl/__init__.py", line 1, in <module>
    from ._url import URL, cache_clear, cache_configure, cache_info
  File "/home/zander/.local/lib/python3.6/site-packages/yarl/_url.py", line 56, in <module>
    @rewrite_module
  File "/home/zander/.local/lib/python3.6/site-packages/yarl/_url.py", line 132, in URL
    _QUERY_PART_QUOTER = _Quoter(safe="?/:@", qs=True, requote=False)
  File "yarl/_quoting.pyx", line 192, in yarl._quoting._Quoter.__init__
TypeError: __init__() got an unexpected keyword argument 'requote'
#

TypeError: __init__() got an unexpected keyword argument 'requote'

#

What does this mean? Could it be because I'm using python3.6?

#

This occurs on running my bot

quartz kindle
#

most likely it means "requote" is wrong

sullen salmon
#

I have no such thing in my code

marsh surge
#

.

quartz kindle
#

a package called "yarl" is calling a function named "_Quoter"

#

and giving it invalid parameters

sullen salmon
#

File "/home/zander/.local/lib/python3.6/site-packages/discord/__init__.py", line 23, in <module> from .client import Client

quartz kindle
#

there seems to be a SO solution for this

sullen salmon
#

Huh well I upgraded to python3.8 anyway

void vale
#

Who knows mongodb (nodejs)?

digital ibex
#

what do u need?

earnest phoenix
#

how i can send this emoji

#

πŸ‡ΊπŸ‡Έ

digital ibex
#

congrats

#

you've sent it

#

lmao jk

earnest phoenix
#

\πŸ‡ΊπŸ‡Έ

digital ibex
#

its just :us_america:

earnest phoenix
#

this not good

summer torrent
#

type this and copy \:flag_us:

void vale
#
coll.updateOne({'id': 1234}, { $set: { 'settings': {'option1': true}}})

How do I update 'settings' without deleting it?

digital ibex
#

yeah what he said

earnest phoenix
#

wdym ?

summer torrent
#

\πŸ‡ΊπŸ‡Έ

#

wait

earnest phoenix
#

try it in vsc is not working

digital ibex
#

you just need to put in vsc

summer torrent
#

just use :flag_us:

viral iris
#

@quartz kindle

digital ibex
#

:flag_us:

earnest phoenix
#

flat ?

digital ibex
#

typo

lethal pasture
#

Um I think I have broken something... Im using ctrl+c to make my bot go down however its doing nothing for like the past 10 minutes lmao

#

ah nvm 10 minutes later.

#

Also if somebody could send me the docs. Would be nice.

#

oh nvm

lusty quest
#

@void vale i know it. i use mongoose

tight plinth
#

it's me or shoukaku have issues searching some songs? I can't search Thomas the tank engine on youtube

lusty quest
#

maybe the dev of the package got some wired issues with some stuff

viral iris
#

any1 know canvas here ?

#

please?

solemn latch
#

πŸ€”

void vale
#

@lusty quest thx.

coll.updateOne({'id': 1234}, { $set: { 'settings.option1': true}})
rain prairie
#

hey can someone help me make a random cats or dog order etc ... plz in basic plz mp me ^^

solemn latch
#

like randomize an array?

rain prairie
#

Not juste =cats and it displays a random cat image

#

On basic code not handle plz

solemn latch
#

well, what data structure do you have with your cat images?

void vale
rain prairie
#

Okay thx

honest perch
#

so im genning an image

#

and its working

#

but im trying to send my self to it

#

how would i do that

cinder patio
#

send yourself?

honest perch
#

in my browser

cinder patio
#

You need an absolute path

#

${__dirname}/public/img.png should work

earnest phoenix
#
res.end(buffer,'binary')```
honest perch
#

yep just noticed

earnest phoenix
#

try this pepowot

cinder patio
#

I'm not sure how that's related to the error

#

Express should set those automatically

#

and .sendFile already ends the request

earnest phoenix
#

It's working on my API ;/

honest perch
#

@earnest phoenix what does that even do

earnest phoenix
#

try and see

cinder patio
#

He doesn't need to

honest perch
#

where should i put it pepowot

#

a

#

smart

#

thanks

earnest phoenix
cinder patio
#

I mean, sending the binary data is always better, I guess, there's no need to save the image

digital ibex
#

hello

#

does anyone know how i can fix the error vsc is giving me

#

trying to make a post request to my local api

golden condor
#

I think you missed two " but not sure

digital ibex
#

i put cont and it auto filled it and i just had to put the type, lemme try tho

viral iris
solemn latch
#

put down the background image first, the same way you put the other images

viral iris
#
let john = await loadImage(`./assets/images/rarities/${rar}_Border.png`)
ctx.drawImage(john, x, y, 256, 256);
#

@solemn latch

#

like this

solemn latch
#

yeah sure, that image will be at x,y 256x256px

viral iris
#

@solemn latch

#

duh

tulip ledge
#

Hi! I currently have braces and want to develop an app to put on my phone as I'm going on vacation wich will calculate how long I've worn it and my average etc. Now I have an iPhone and I've heard it's hard and costs money to put ur app on the app store now I was wondering if there is a way to put my app directly on my phone without needing to put it on the app store?

sudden geyser
#

I think so with some xcode magic

tulip ledge
#

and is there any certain language required to make an app for iOS?

solemn latch
#

ah the problems with iphone 😦

sudden geyser
#

I don't remember the exact process (and I'm thinking of if you were to develop it with something like Xcode swift), but it had something to do with building a project but instead of running a simulator on your computer, you would run it on your phone instead.

tulip ledge
#

So I would need Xcode swift to develop the app?

crimson vapor
#

you need xcode

#

and you can set your iphone to test that app

restive furnace
#

XCode supports C++ and Obj-C too.

crimson vapor
#

or you could make a site that just does a bit of math and add it to your home screen

#

saves you time and effort

tulip ledge
#

But also when I'm like 100+ kilomitors away form my pc?

earnest phoenix
#
Source is too large 
at Uint16Array.set
#

What could cause this error?

tulip ledge
#

Oh yeah

#

Website would be better actually

#

But

#

Won't I need a domain? To access it from my phone?

crimson vapor
#

you could use something cheap like glitch

#

and then just add it to home screen

tulip ledge
#

oh

#

So I log into glitch?

#

And use it there?

#

Is that what u mean?

crimson vapor
#

idk how to use glitch

tulip ledge
#

Me neither lol

cinder patio
#

glitch is perfect for this

tulip ledge
#

And imma store my stuff in a JSON as I'm the only one who uses it

cold lion
#

@earnest phoenix

tulip ledge
#

Why'd u tag him?

crimson vapor
#

you don't need to store anything in a json tho

earnest phoenix
#

wanted to dm me ig

crimson vapor
#

you can just make a function chat calculates the time difference from that time to now

tulip ledge
#

But i need to store how long I've had it in

#

Yes

#

But I need to calculate an average over the time

crimson vapor
#

Date.now() - (the date when u got them on)

tulip ledge
#

Lets say O have 60 hours in 4 days it needs to calculate these 60 hours over the 4 days

#

I need to store the total hours

#

So

#

if I have it in glitch

#

Can i like view the page and interact with it?

crimson vapor
#

you would have to code that

restive furnace
#

or you can do console.log()

tulip ledge
#

I am going to

earnest phoenix
#
RangeError: Source is too large
  at Uint16Array.set (<anonymous>)
  at OpusScript.encode..

What could cause this error?

tulip ledge
#

I know but I'm not taking my PC with me

#

I need to access it from my phone

restive furnace
#

glitch console i meant.

earnest phoenix
#

i need help ;-;

#

how i can a value in a array

tulip ledge
#

Yeah but I still need a button to say I stopped wearing it, I started wearing it

#

You know

#

Should I use react?

#

To display the stuff

#

Or is that possible in raw HTML?

#

Displaying variables?

earnest phoenix
#

doesn't matter what you use, what matters is that you need to have a backend webserver

#
let arr = ["a", "b"]
#

how i can find the a

crimson vapor
#

im confused

tulip ledge
#

Why a backend webserver toh?

crimson vapor
#

are you not just tracking how long you have them in?

tulip ledge
#

Yes

crimson vapor
#

so why do you need buttons

earnest phoenix
#

because you cannot expose any sensitive data to the frontend

crimson vapor
#

its literally 2 numbers

tulip ledge
#

If I start wearing it I press a button, then when I stop wearing them I press it again

crimson vapor
#

I dont think it matters tbh

tulip ledge
#

And it adds the total hours to the total

crimson vapor
#

wait

#

braces right?

tulip ledge
#

So I can view my average

#

Yeh

crimson vapor
#

are you planning to put them back in?

stable nimbus
#

Does discord bot API not like gif images?

tulip ledge
#

It's not liek the blocks on ur teeth

solemn latch
#

discord doesnt mind gifs

earnest phoenix
#

i need help with the detailed description ;-;

stable nimbus
#

Cause I get a url error when running a command.

tulip ledge
#

I have like a brace to move my bottom jaw forward and I can take them out thats what I want to calculate as I need an average of 14hrs a day at the end

stable nimbus
#

embed.author.icon_url: Not a well formed URL.

tulip ledge
#

And I need to view if I am at my 14 hours

crimson vapor
#

oh

earnest phoenix
#

you need a direct url to the image

#

avatarURL()

#

@stable nimbus ^

#

you cannot just grab a giphy page and expect it to work

digital ibex
#

thats not js

solemn latch
#

djs isnt the only lib

viral iris
earnest phoenix
#

right..

stable nimbus
#

I have it set to message.author.displayAvatarURL()

crimson vapor
#

have what set to that?

digital ibex
#

:thonk:

tulip ledge
#

Can I display variables in raw html?

stable nimbus
#

Where it grabs the author display image where I think I'm getting the bad url error.

tulip ledge
#

Or would I need to use react?

solemn latch
#

you could use ejs

crimson vapor
#

you can just do res.send()

tulip ledge
#

ejs?

digital ibex
#

you dont hvae to use a framework if u dont want to

crimson vapor
#

wait

#

if you want buttons you need html

#

use ejs

tulip ledge
#

I need it to work in my glitch website tho

#

Will ejs work?

digital ibex
#

if its a bot dashboard, you probably would use a framework instead of a template engine (ejs, pug etc), if its a small application. use view, angular actually dont, react

tulip ledge
#

No

solemn latch
#

its not a dashboard

digital ibex
#

then just use ejs, if its something small

tulip ledge
#

It's just a simple website on my glitch page with 1 button and some variables o ndisplay

crimson vapor
#

make 3 files
/ - display's time and 2 buttons for 2 urls
/stop - stops the timer and redirects to /
/start - resumes the timer and redirects to /

digital ibex
#

i'd just use ejs for that then

dry iris
#

Does anti NSFW count as a NSFW feature? πŸ€”

crimson vapor
#

wdym

digital ibex
#

ejs is really simple too

crimson vapor
#

yea

outer perch
#

guys

crimson vapor
#

ye

tulip ledge
#

But I don't have NPM on glitch

outer perch
#
try {
      bot.commands.get(command).execute(bot, message, args, command, db);
    } catch (err) {
      console.error(err);
      message.reply('houve um erro ao tentar executar esse comando!');
    }
#

try isn't sending message inside

digital ibex
#

however you download stuff with glitch, do it the way u normally would

#

"string expected, got table"

crimson vapor
#

what language @minor kelp

#

oh

digital ibex
#

js needs a then keyword 😩

crimson vapor
#

no?

digital ibex
#

nope

#

u could use while do but :shrug:

crimson vapor
#

im so confused

stable nimbus
#

Me too.

tulip ledge
#

Do I put the ejs script tags in head or body?

digital ibex
#

what

solemn latch
#

what

digital ibex
#

theres no ejs script tag

misty sigil
#

what

tulip ledge
#

That

crimson vapor
#

no

#

ejs is a file

#

like html

#

but better

tulip ledge
#

Am confused

crimson vapor
#

here

digital ibex
#

well, i guess, but thats only limiting ejs to js

crimson vapor
#

look at my code

#

see what I use ejs for

#

shit code but it works

digital ibex
tulip ledge
#

oh

#

Do u think ejs works Γ on glitch?

crimson vapor
#

wdym

digital ibex
#

prob shouldn't use it for that but :shrug:

earnest phoenix
#

that's just a templating language lmfao

tulip ledge
#

I'm confused

digital ibex
#

yeah

tulip ledge
#

Does EJS work on glitch?

digital ibex
#

just like

earnest phoenix
#

ejs is a templating language

digital ibex
#

instead of .html, put .ejs

#

lua is cool

earnest phoenix
#

toilet

digital ibex
#

i wanna learn it

earnest phoenix
#

nasty

digital ibex
#

its good

#

im meant to be learning python and go :kek:

#

oh

#

there goes my nitro

#

whelp

crimson vapor
#

lua seems like js + python to me

earnest phoenix
#

you dont

crimson vapor
#

send a nitro emote

earnest phoenix
#

there's a grace period after your nitro expires

#

you get to keep it for a few more days

digital ibex
#

lmfao, my status still shows with the animated emoji

#

my nitro ended 27nd, grace periodova

#

why

crimson vapor
#

3 day grace

#

iirc

#

anyway

tulip ledge
#

When I open the EJS file I just get the code

#

Not the web page

digital ibex
#

have you got an express backend?

tulip ledge
#

And glitch doesn't show it either

crimson vapor
#

app.set('view engine', 'ejs');

#

use that

solemn latch
#

you cant open an ejs file like you can open an html file

tulip ledge
#

in my js?

#

What do i do then D:

#

I'm so confused

crimson vapor
#

can you send me the link to the glitch project?

#

idk lua, sorry

tulip ledge
#

Ur dms are disabled

#

@crimson vapor

crimson vapor
#

add me and then send

digital ibex
#

vue is still installing :/

#

my loss then

earnest phoenix
#
RangeError: Source is too large
  at Uint16Array.set (<anonymous>)
  at OpusScript.encode..

What could cause this error?

digital ibex
#

the source is too large..

#

tbh

earnest phoenix
#

What source?

crimson vapor
#

@tulip ledge when using ejs, you need an index.js for basic stuff iirc

earnest phoenix
#

the music queue

digital ibex
#

javascript errors are SO easy to understand 90% of the time. literally self-explanatory

earnest phoenix
#

the song

#

ok

digital ibex
#

whelp

#

send ur code then

earnest phoenix
#

i dont know what is causing the error

digital ibex
#

whats the error stack?

earnest phoenix
#
RangeError: Source is too large
0|bot    |     at Uint16Array.set (<anonymous>)
0|bot    |     at OpusScript.encode (/root/bot/node_modules/opusscript/index.js:67:16)
0|bot    |     at Encoder._encode (/root/bot/node_modules/prism-media/src/opus/Opus.js:60:25)
0|bot    |     at Encoder._transform (/root/bot/node_modules/prism-media/src/opus/Opus.js:143:30)
0|bot    |     at Encoder.Transform._read (_stream_transform.js:191:10)
0|bot    |     at Encoder.Transform._write (_stream_transform.js:179:12)
0|bot    |     at doWrite (_stream_writable.js:403:12)
0|bot    |     at writeOrBuffer (_stream_writable.js:387:5)
0|bot    |     at Encoder.Writable.write (_stream_writable.js:318:11)
0|bot    |     at VolumeTransformer.ondata (_stream_readable.js:716:22)
0|bot    |     at VolumeTransformer.emit (events.js:315:20)
0|bot    |     at addChunk (_stream_readable.js:295:12)
0|bot    |     at readableAddChunk (_stream_readable.js:271:9)
0|bot    |     at VolumeTransformer.Readable.push (_stream_readable.js:212:10)
0|bot    |     at VolumeTransformer.Transform.push (_stream_transform.js:152:32)
0|bot    |     at VolumeTransformer._transform (/root/bot/node_modules/prism-media/src/core/VolumeTransformer.js:78:10)
solemn latch
#

index.js:67

earnest phoenix
#

he asked for the error

solemn latch
#

line 67 of index.js

earnest phoenix
#

i dont even have an index.js file

#

i dont even have an index.js file

solemn latch
#

of opus script

crimson vapor
#

because its not your index

solemn latch
#

πŸ€”

earnest phoenix
#

he asked for the error

whats the error stack?

digital ibex
#

he said he doesnt know what was causing it

#

so i just asked for the full error

open wren
#

Is there anywhere I can ask for help

crimson vapor
#

for code? here

digital ibex
tulip ledge
#

I dont think it'll work on glitch

#

As you need an index.html file

quartz kindle
#

RangeError: Source is too large

#

file is too big

tulip ledge
#

Tim

#

Do you know a way to host a website that I can access and use EJS on?

digital ibex
tulip ledge
#

Or a way to shows variables in html without need ejs

earnest phoenix
#

the erro is coming from this

#

this.inPCM.set(buffer);

#

what file is too big @quartz kindle

digital ibex
#

use ajax

#

ajax is hard πŸ˜›

tulip ledge
#

So is it impossible to make an app/website like this for free?

digital ibex
#

yeah

solemn latch
#

ejs is pretty basic stuff

tulip ledge
#

But it doesn't work on glitch

solemn latch
#

really?

digital ibex
#

i've not spent anything on any of my projects

#

rip

#

use heroku

tulip ledge
feral heath
#

ajax is much easier in recent updates

halcyon crow
#

It’s possible to get someone to host ur stuff for free

tulip ledge
#

Does heroku do the same?

feral heath
#

fetch() is delightful

halcyon crow
#

But it’s not gonna be good performance

opal plank
#

Firebase has some decent options

quartz kindle
#

@earnest phoenix likely an audio file you're trying to load

digital ibex
#

heroku is a host for websites

opal plank
#

started using it a bit ago

#

seems rather good for websites

halcyon crow
#

My number 1 discord bot hosting solution is Raspberry pi

digital ibex
#

yeah

tulip ledge
#

Its

#

Not

#

A

#

Bot

opal plank
#

i just host it on my server ASakashrug

#

it has to be 24/7 already, might aswell

halcyon crow
#

Ik not related to you @tulip ledge

digital ibex
#

afailk, its only for websites

earnest phoenix
#

i have never had that error before

quartz kindle
#

@tulip ledge what are you trying to do

opal plank
#

check FireBase Chicken

earnest phoenix
#

can it be caused by a youtube song that is like 24h

quartz kindle
#

possibly yes

#

make a test

earnest phoenix
#

yes imma do that tomorrow

#

ty

tulip ledge
#

Can I DM u Tim

#

It's easier

sand crown
earnest phoenix
#

Do anyone knows what can I do so when I turn off my PC the bot wont come offline?

tulip ledge
#

I know how vps's work...

earnest phoenix
misty sigil
#

VPS hosting

sand crown
#

@earnest phoenix ^

tranquil patrol
#

vps

#

yeah

earnest phoenix
#

Wdym?

misty sigil
sand crown
#

Check this link.

earnest phoenix
#

I must give money to keep my bot online when I turn off my MAC?

#

Ok

opal plank
#

or ask someone to do it

tranquil patrol
#

yes because then that server hosts your bot

misty sigil
opal plank
#

which is unlikely

tranquil patrol
#

or that πŸ˜‚

earnest phoenix
#

@misty sigil @sand crown you have VPS?

ionic tinsel
#

Try AWS for hosting it’s free for the first year

misty sigil
#

yes

#

we have vps

tranquil patrol
#

every decent bot has a vps

sand crown
#

I have a vps.

opal plank
misty sigil
#

every decent bot has a vps
@tranquil patrol no.

#

some have dedi

tranquil patrol
#

k

#

oh dedi

#

yeah my bad

opal plank
#

i run my bots on my server

#

Β―_(ツ)_/Β―

misty sigil
#

how about

opal plank
#

no vps

misty sigil
#

every decent bot has server

sand crown
opal plank
#

i got a 9TB storage server that i leave running 24/7, since it doesnt use space nor much internet, might aswell leave it running there

#

i did had a wii running one of the bots, but i moved it now

misty sigil
#

wii?

#

tf

opal plank
#

yup

#

running linux

misty sigil
#

y'all really do just host on anything

earnest phoenix
#

How much does it cost?

misty sigil
#

Β£3.59 a month

opal plank
#

was a fun test for a couple weeks, but its annoying to keep it on

earnest phoenix
#

Thnx

misty sigil
#

it depends

#

on what plan you get

#

if you can afford nitro you can afford a vpsℒ️

opaque eagle
tranquil patrol
#

and the problem is

opaque eagle
earnest phoenix
#

My nitro was gifted 2 times and I won a giveaway to the other

#

ok

#

I didnt buy anything

misty sigil
#

watch as noob forgets about gifting

earnest phoenix
#

Congrats!

opaque eagle
#

I console.log()-ed board and somehow the entire column the user chooses becomes that, not just the bottom-most one

tranquil patrol
#

o

opaque eagle
#

board is a 2d array containing all the spots

earnest phoenix
#

Also, can someone send me the code for the welcome message?

#

If yes pls DM me

misty sigil
#

no

#

do you even read the rules?

tranquil patrol
#
const i = Number.parseInt(choice, 10) - 1;
board[colLevels[i]][i] = sign;
colLevels[i]--;
#

just looking

opaque eagle
#

yeah that's the part that I think might be wrong

#

if it works right, just that "cell" should be set to sign

earnest phoenix
#

I am trying to make a server but I dont want to have any other bots and I want mine

opaque eagle
misty sigil
#

what lib @earnest phoenix

opaque eagle
#

for board

#

that's what I meant by the entire "column" of the 2d array being set to sign

misty sigil
#

@earnest phoenix i can point you in the right direction if you tell me what library

opaque eagle
#

lmao his status is the most cringeworthy thing I've seen here

misty sigil
#

lmao

solemn latch
tulip ledge
#

Why is tyhis not triggerting?

client.on("messageReactionAdd", (messageReaction, user) => {
  console.log(1)
  console.log(messageReaction)
  console.log(user)
})
#

Nothing's happening when I add a reaction to a message

solemn latch
#

is it a message sent before the bot started?

tulip ledge
#

Yes

solemn latch
#

the message needs to be cached

tulip ledge
#

Is there a way to check for older messages?

solemn latch
#

fetch the messages you want to check

tulip ledge
#

And then

solemn latch
#

then it should be cached

tulip ledge
#

Wait what

#

Am confused

solemn latch
tulip ledge
#

I can just do: client.channels.cache.get().fetchMeessages(ID)

#

And then it will work?

#

Wut

solemn latch
#

messageReactionAdd only works with cached messages

#

as per the docs

#

fetch will cache fetched messages

tulip ledge
#
client.channels.cache.get("734541084314828840").fetch("738020027034501240")
                                               ^

TypeError: Cannot read property 'fetch' of undefined
blazing portal
#

It will work with uncached messages if you subscribe to the partial event(s)
https://discord.js.org/#/docs/main/stable/topics/partials

tulip ledge
#

Why does it say that client.channels.cache.get("734541084314828840") is undefined?

opal plank
#

or check if its there first

tulip ledge
#

But it is there

opal plank
#

if !cache.has(id) => fetch

tulip ledge
#

It is there

solemn latch
#

get only gets it if its cached

opal plank
#

then why the fetch?

tulip ledge
#

Cuz I need to fetch for the message to cache it

#

Is what woo set

opal plank
#

ah i see

#

its the channel that isnt cached btw

#

message.channel => go from here

blazing portal
#

you are trying to fetch the channel, but all guild channels are cached by default

tulip ledge
#

There is no message object

opal plank
#

well, thats an assumption at least, im not sure what you are doing

#

then get channel too

blazing portal
#

by default, all guild channels are cached as per the discord.js docs...

opal plank
#

fetch channel , then fetch message

#

though you can just fetch message straight on

tulip ledge
#

I first tried to make a glitch web page to calculate this now I tried a discord bot and that doesn't work either I'm just gonna give up ffs

opal plank
#

Β―_(ツ)_/Β―

#

depending on how often you need them you can request manually

#

as long as you have that channel id, you should be good

tulip ledge
#

I need to cache them

#

I need to cache the message

solemn latch
#

just
textChannel.messages.fetch(messageId)

opal plank
#

that what i was assuming

clever garnet
#

if your bot got verified then it got kicked from almost all the servers to the amount where it couldnt be applied for verification would it remove the verify mark

opal plank
#

prob not

#

PROBABLY*

solemn latch
#

verification is just a process to verify you, i dont see why they would remove it

opal plank
#

they are already slow at verifying, i doubt they keep track

solemn latch
#

it just makes more work for them if your bot grows again

quartz kindle
#

@tulip ledge use partials

tulip ledge
#

I don't knoww what partials are D:

blazing portal
#

I already linked it to you. meh

quartz kindle
#
new Discord.Client({
  partials:["MESSAGE","REACTION"]
})
viral iris
#

@quartz kindle

restive lily
#

so i made a severs command, whats the variable so it displays the guilds id? i have tried guild_id and guild.id idk what to put in

@commands.command(helpinfo='Info about servers Corotoz is in', aliases=['server', 'num', 'count'], hidden=True)
    async def servers(self, ctx):
        await ctx.message.delete()
        if ctx.author.id in shut_cmd:
            servers = self.bot.guilds
            servers.sort(key=lambda x: x.member_count, reverse=True)
            await ctx.send(':white_check_mark: ***Top servers with Corotoz:***')
            for x in servers[:100]:
                await ctx.send('**{}**, **{}** Members, {} region, Owned by <@{}>, Created at {}\n{}'.format(x.name, x.member_count, x.region, x.owner_id, x.created_at, x.guild.id. x.icon_url_as(format='png',size=32)))
            y = 0
            for x in self.bot.guilds:
                y += x.member_count
            await ctx.send('**Total number of Corotoz users:** **{}**!\n**Number of servers:** **{}**!'.format(y, len(self.bot.guilds)))
slender thistle
dry iris
#

Can I mention "Anti NSFW" in my description and not have it removed for mentioning NSFW features and functions?

opaque eagle
#

yes

dry iris
#

Okay thank you

opaque eagle
#

i think

slender thistle
#

Correct

tulip ledge
#
client.channels.cache.get("738495925739192452").messages.fetch("738500060605841509")
                                               ^

TypeError: Cannot read property 'messages' of undefined

I am using partials

restive lily
#

@slender thistle it didnt work

@commands.command(helpinfo='Info about servers Corotoz is in', aliases=['server', 'num', 'count'], hidden=True)
    async def servers(self, ctx):
        await ctx.message.delete()
        if ctx.author.id in shut_cmd:
            servers = self.bot.guilds
            servers.sort(key=lambda x: x.member_count, reverse=True)
            await ctx.send(':white_check_mark: ***Top servers with Corotoz:***')
            for x in servers[:100]:
                await ctx.send('**{}**, **{}** Members, {} region, Owned by <@{}>, Created at {}\n{}'.format(x.name, x.member_count, x.region, x.owner_id, x.created_at, x.id. x.icon_url_as(format='png',size=32)))
            y = 0
            for x in self.bot.guilds:
                y += x.member_count
            await ctx.send('**Total number of Corotoz users:** **{}**!\n**Number of servers:** **{}**!'.format(y, len(self.bot.guilds)))```
#

oh wait nvm sorry i put in a .

quartz kindle
#

partials doesnt mean the message is automatically cached

#

you dont get the message

tulip ledge
#

But its a channel

#

the channel is undefined

quartz kindle
#

then the channel is wrong

opaque eagle
#

why do python bots always look kinda messy

slender thistle
#

also

tulip ledge
#

Nope

#

It isn't

slender thistle
#

use f-strings

tulip ledge
#

I checked like 3 times

quartz kindle
#

where are you using this code?

tulip ledge
#
const Discord = require("discord.js");
const client = new Discord.Client({ partials: ['MESSAGE', 'CHANNEL', 'REACTION'] });
const fs = require("fs")
const data = require("./data.json")

client.channels.cache.get("738495925739192452").messages.fetch("738500060605841509")
client.on("messageReactionAdd", (messageReaction, user) => {
    console.log(messageReaction)
})
quartz kindle
#

well the bot is not even on there

#

its not connected, therefore no channels

tulip ledge
#

Wdym

#

I have a client.login

quartz kindle
#

you're not waiting for the login

#

you need to wait for the ready event

pure lion
#

*inhales*

tulip ledge
#

So o nready event I cache it?

pure lion
quartz kindle
#

if thats what you want, yes

#

but partials are made so you receive events on uncached things

#

so if you use partials, depending on what you're doing, you dont need to fetch it

tulip ledge
#

Oh

#

Ok

slender thistle
#

HTML
How exactly do you make a dropdown with an image right beside the arrow inside one big container and make it (the container itself) clickable?

pure lion
#

add a listener to the container?

digital ibex
#

use the a tag

pure lion
#

also in js is there a way to to define a statement like return as something other than return? (e.g x = return; if (1 > 0) x)

digital ibex
#

and in each navbar item thing, set the image to whatever, if thats what you're saying?

#

no u cant dice

pure lion
#

:(

#

now i have to build my own compiler

amber fractal
#

return is a reserved keyword

digital ibex
#

ree vue

pure lion
#

wait what the fuck

digital ibex
#

ik

#

it took like

#

25 minutes

honest perch
#

Can you change the bots pfp using the api?

valid frigate
#

vue is massive

digital ibex
#

yeah

#

usually takes like

#

most of time time, 5 minutes

pale vessel
#

@honest perch using what api

digital ibex
honest perch
#

discords

digital ibex
#

yeah

honest perch
#

pog

digital ibex
#

u mean like do it ursrlf?

#

or code it

pale vessel
#

how else would a library do it

#

if not api

digital ibex
#

????

honest perch
#

code it, for example run a command !pfp something and it would change

digital ibex
#

you cant change the bots pfp

pale vessel
#

why not use a method

#

you can

slender thistle
#

I think mixing Bootstrap Studio with dynamic socket.io website was kind of a bad idea

digital ibex
#

i've been scrolling the discord docs

#

cant find it anywhere

#

why?

pale vessel
#

o let me make sure

honest perch
#

ive seen someone do it with a music bot

#

by changing to most trending

slender thistle
#

I'll need plenty of placeholders for this thing if I want to understand what I want...

digital ibex
#

oh im prety sure then u'd just do

pale vessel
#

you can look at the source on how they did it

digital ibex
#

/api/users/@me

honest perch
#

oh sick

topaz fjord
#

@slender thistle react.lazy to the rescue

pale vessel
#

or unless you don't need to use the api directly

#

just use your library

slender thistle
#

I prefer to stay away from using frontend frameworks directly because I'm bad at JS

digital ibex
#

i prefer to stay away from frontend

slender thistle
#

well I have to go full-stack in my case so /shrug

digital ibex
#

oof

valid frigate
#

front end is a good reason to use js

#

but thats really about it

slender thistle
#

I want to start from the very bottom and get hang of it before doing anything significant tbh

slender gulch
#

is it against any terms of service for a bot to have a command that makes randomized letters/numbers in a nitro code, so basically a generator

slender thistle
#

is it really a generator or just a pure guesser

slender gulch
#

guesser

#

lol

#

how would i get real codes 😏

slender thistle
#

m a g i c

slender gulch
#

but is it against any tos

slender gulch
#

lol

frank terrace
#

why is this happening

slender gulch
#

no it wasnt

#

carl has custom message u can send

frank terrace
#

do i need to disable it?

slender gulch
#

its not hacked

#

no

#

u don't need to

#

wait this is a webhook

#

AAA

#

someone is sending through webhook

slender thistle
#

Someone sending those messages through a webhook

slender gulch
#

carl-bot logging is webhook

#

yeah

slender thistle
#

just delete the webhook

slender gulch
#

and @slender thistle

#

so

#

is it against tos or not

#

guessing of codes

slender thistle
#

I'd suggest going through Discord ToS for that :^)

slender gulch
#

discord tos is shit

#

cuz fancy language

#

STUPID

#

and its WAY too long

#

i'm only halfway through it

#

lol

digital ibex
#

i find it interesting

slender thistle
#

I'd not do it if you are questioning it tbh

frank terrace
#

i did thank you

pure lion
#

Sup how do I write a compiler oh nobody responded okay bye

pale vessel
#

what the fuck why

pure lion
#

hode hh.

amber fractal
#

wasnt carl bot hacked before?

#

imagine that

pure lion
#

Idk but I want to make hode.hh so jakskdhwidne

summer torrent
#

@amber fractal no

wooden ember
#

how would I get the id of a user that was mentioned

sudden geyser
#

what library

misty sigil
#

in d.js v12: message.mentions.users.first().id

wooden ember
#

ah ok thx

sudden geyser
#

You could parse the message content for the message (e.g. using regex) or if the library you're using has some helper to get mentions in a message

#

or what jeremy said yeah

opal plank
#

i think message payload has mentions in it

misty sigil
#

yes

wooden ember
#

also how would I detect weather a mentioned user was a bot

digital ibex
#

if (mentionedUser.bot) { do something }

wooden ember
#

ah ok thank you

digital ibex
#

np

opal plank
#

yeah message has mentions payload by itself

#

so any lib should have it

wooden ember
#

its gonna be something dumb I can feel it

digital ibex
#

console.log(message.mentions.users.first())

wooden ember
hardy steeple
#

wait

#

y know how people have profile commands that can give you the profile of people

#

and the argument is the name of the persons profile youd like

#

how do i set that up

earnest phoenix
#

with code

#

🧠

hardy steeple
#

thank you for enlightening me

wooden ember
#

lol

earnest phoenix
#

your question is way too abstract

hardy steeple
#

i use discord.js and when you use message.author.username it will give you the username of the person who called the message

#

but how would you make it send someone else, like someone specified in an argument

wooden ember
#

mm I need the id tho

solemn latch
#

you can get the first mention with
message.mentions.users.first()
or message.author

hardy steeple
#

ok

#

so if you were to do that it would give you the person that was last mentioned?

earnest phoenix
solemn latch
#

not really a problem if your args are not ordered

earnest phoenix
#

you should account for wrongly ordered arguments

#

if you don't, well you're a trash bot developer

solemn latch
#

so letting users do
!command mention arg
or !command arg mention is bad development?

#

πŸ€”

earnest phoenix
#

yes

solemn latch
#

99% of my commands with 2+ args can be ordered in any order intentionally

#

its more complex code but you dont need to remember the order of args

#

i can
!transfer @earnest phoenix 100
or
!transfer 100 @earnest phoenix

i spent awhile making it work like that

earnest phoenix
#

lets say we have a ban command and the user forgets to mention whoever they want to ban and go ahead and provide the reasoning only and they mention another user in the reason. a shitty bot would use mentions.first() and ban the user that was mentioned in the reason

solemn latch
#

sure, commands that require text descriptions you shouldnt mentions.first

halcyon crow
#

when someone says im a trash bot developer

always have been 😎 πŸ”«

earnest phoenix
#

see you actually take into account wrongly ordered args and parse them accordingly

solemn latch
#

but commands with structured arguments can have multiple acceptable orders

earnest phoenix
#

you handled that well

#

chances are other people won't

halcyon crow
#

if the command is 1 argument but split in processing then what

#

for example I have a !play [move] for a game im working on

#

move is letter followed by number

#

e.g. !play T19

halcyon crow
#

Yeah it's what I do

amber fractal
#

regex out all numbers mmLol

halcyon crow
#

but thats because I can guarantee the first char will be a letter

#

Cry was saying how you should be able to order arguments anyway

south solstice
#

So I'm trying to use C or some form of programming that has C speeds to do some math?, I tried Cython only to learn that's it's not supported, any ideas on other things I could use instead of Cython (trying to avoid CPython) (this is just to do math calulation faster then python is currently doing)

halcyon crow
#

c++ is pretty gnarly

steel oracle
#

I’m Ned code partnet

earnest phoenix
#

the argument order is important in multi arg commands @halcyon crow

#

for single arg commands you don't have to worry about that since you know what the value should be

halcyon crow
#

I guess its multi arg just inputted as one though

solemn latch
#

right now your command is structured.
I take the opposite approach to cry, i find too much unnecessary structure annoying

#

wouldnt it be nice if your command understood
!command T19
!command T 19
!command 19 T
no user would need to remember how to do a command

halcyon crow
#

yeah perhaps

#

Is there an efficient way to do it though?

#

args = message.contents.split()

#

coords = ''.join(args[1:])

#

then process somehow

opal plank
#

@solemn latch you could do something similar to what i do with my reminder command

#

check endsWith for the identifier or startsWith, then check if whatever in between is a number

hardy steeple
#

wait

#

so if you were to do message.mentions.users.first()

#

itf would give you the person that was last mentioned?

earnest phoenix
#

how does that even make sense

hardy steeple
#

man idk im stupid

earnest phoenix
#

f i r s t()

hardy steeple
#

okay, so the first person that was mentioned?

earnest phoenix
#

yes

hardy steeple
#

like ever?

#

server wide?

sudden geyser
#

think oop: message is the message the user sent

#

.mentions is all the mentions in the message

#

.users is all mentioned users

#

.first() is the first mentioned user in the message

#

of course the docs can explain it better

hardy steeple
#

thank you

earnest phoenix
#

brain exercises!

hardy steeple
#

from there if you wanted to get the username of that user would you add .username to the end or no?

#

or would you set it as a var and then use it afterwards

#

as in var LastMention = message.mention.users.first()

#

message.channel.send(LastMention.username)

solemn latch
#

why would the var be called last mention

#

πŸ€”

hardy steeple
#

i mean

#

well i suppose it you mentioned two people in the same message it would be

#

*wouldnt

#

imma play terraria with my friend because im tired of coding

solemn latch
#

it would get the username of it yes

hardy steeple
#

(also terraria is better than minecraft 🍡 )

wooden ember
#

why does this happen?

solemn latch
#

there may not be any mentioned users in a message

wooden ember
#

there was tho

earnest phoenix
#

are you sure the error is coming from there

wooden ember
#

well thats what is on the line that the error comes from

earnest phoenix
#

hm

#

what's your lib ver

wooden ember
#

v12

#

?

#

I seem to have stumped the entire discord

solemn latch
#

message.mentions.users.first() from what i understand returns undefined only in messages with no mentions

wooden ember
#

no only the .id part returns undefined

solemn latch
#

your using .id on undefined

wooden ember
#

?

solemn latch
#

its saying you cant do .id on undefined

wooden ember
#

ah well I mentioned a user and if I console log it it shows an id so idk what is happening

quartz kindle
#

you need a bit of validation, check if the mention exists first

#

before getting its id

wooden ember
#

Im using a command handler so the message has been sent before the id is needed

quartz kindle
#

wat

wooden ember
#

do you whant me so send the code?

quartz kindle
#

sure...

wooden ember
#
const Discord = require('discord.js');
const responses = [" won't be missed", "'s time ran out", " probably won't respawn", " was wasting oxygen anyways", " probably deserves our respect, but I don't think any of us will give it to them", "got ended by a holy hand grenade"];
const selfResponses = ["still alive", "can't kill the machine", "skynet will rule", "heroes never die", "I know where you live", "can you do *anything* properly?","you tryed to kill a fellow crusader what is thei heresy?", "you can't kill me cease your faggetory"];


module.exports = {name: 'shoot',description: 'kills the mentioned user', async execute(bot, msg, args) {

    let User = msg.mentions.members.first()
    let botID = 694986563179773995

  if(User.id != msg.author.id){
    msg.channel.send("<@" + msg.author.id + "> ***shot*** <@" + userID + ">", {files: ["gunshot.gif"]})
    .then(function(){
    if(User.id == botID)
    msg.channel.send("<@" + msg.author.id + "> " + selfResponses[Math.floor(Math.random() * (selfResponses.length))]).catch(error => console.log("Send Error - " + error));
    else
    msg.channel.send("<@" + userID + ">" + responses[Math.floor(Math.random() * (responses.length))]).catch(error => console.log("Send Error - " + error));
        })        
        }
        else {
    msg.channel.send("<@" + msg.author.id + "> ***committed suicide***")
    }    
  }    
};
digital ibex
#

henlo

#

im having another frontend issue :/

quartz kindle
#

and what is the line of the error? this one? if(User.id != msg.author.id){

digital ibex
#

does anyone know how i can move 'Lost' the the middle kinda bit of the screenshot?

wooden ember
#

its on let User = msg.mentions.members.first().id

quartz kindle
#

you dont have that

solemn latch
#

this one?
let User = msg.mentions.members.first()

wooden ember
#

yeah I changed it later so user has the .id at the end but it made no difrence

quartz kindle
#

you need to check if it exists

wooden ember
#

?

#

what exists

quartz kindle
#

or add before if(!User) return

#

or whatever

wooden ember
#

ah ok

quartz kindle
#

@digital ibex some context is required

misty cedar
#

Hi

digital ibex
#

i tried margin-top but that moves the whole container :/

quartz kindle
#

what is Lost?

#

which element is it?

#

gild-name?

digital ibex
#

gild-name

#

yeah

quartz kindle
#

and you want to move it down, but not move the container?

digital ibex
#

the css is' i've got for that is: css .gild-name { font-family: 'Cabin', sans-serif; font-weight: bolder; font-size: large; display: center; min-height: 10px; }

#

yeah

#

the min-height isnt doing anything btw, i just put it there to see what wuld happen

quartz kindle
#

did you move the container down already?

#

is there something else moving it down?

digital ibex
#

like

quartz kindle
#

im assuming you dont want gild-name to be inside the container

digital ibex
quartz kindle
#

by container you mean b-container right?

#

so move gild-name down, you can use margin or padding or whatever

#

and bring the container up

digital ibex
#

yeah

#

how would i bring the container up?

quartz kindle
#

whats the css for the container?

digital ibex
#
   .b-container {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      grid-auto-rows: 100px;
      grid-gap: 5%;
      margin-top: 9%;
      margin-left: 6vh;
      margin-right: 6vh;
   }```
quartz kindle
#

margin-top

digital ibex
#

ohok

#

o nice

#

i got it working

#

thank

lavish skiff
#
d:\bordel\Dev\discord-application-bot\index.js:21
    userToSubmitApplicationsTo.send(`${data.user.username} has submitted a form.\n${answers}`);
                               ^

TypeError: Cannot read property 'send' of null
    at applicationFormCompleted (d:\bordel\Dev\discord-application-bot\index.js:21:29)
    at Client.<anonymous> (d:\bordel\Dev\discord-application-bot\index.js:175:7)
    at Client.emit (events.js:315:20)
    at MessageCreateHandler.handle (d:\bordel\Dev\discord-application-bot\node_modules\discord.js\src\client\websocket\packets\handlers\MessageCreate.js:9:34)
    at WebSocketPacketManager.handle (d:\bordel\Dev\discord-application-bot\node_modules\discord.js\src\client\websocket\packets\WebSocketPacketManager.js:105:65)
    at WebSocketConnection.onPacket (d:\bordel\Dev\discord-application-bot\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:333:35)
    at WebSocketConnection.onMessage (d:\bordel\Dev\discord-application-bot\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:296:17)
    at WebSocket.onMessage (d:\bordel\Dev\discord-application-bot\node_modules\ws\lib\event-target.js:120:16)
    at WebSocket.emit (events.js:315:20)
    at Receiver.receiverOnMessage (d:\bordel\Dev\discord-application-bot\node_modules\ws\lib\websocket.js:789:20)
Process exited with code 1```
#

help me pls

solemn latch
#

What is userToSubmitApplicationsTo and how did you get it

lavish skiff
earnest phoenix
#

You can't send a message to null

#

You have to define that as a channel or a user

lavish skiff
#

How?

earnest phoenix
#

So is that message supposed to be sent to a channel?

lavish skiff
#

yes

earnest phoenix
#

Then replace

let userToSubmitApplicationTo = null;``` with
```js
let userToSubmitApplicationTo = <client>.channels.cache.get(<That channel's id>);```
lavish skiff
#

TypeError: Cannot read property 'send' of undefined
at applicationFormCompleted (d:\bordel\Dev\discord-application-bot\index.js:20:29)

earnest phoenix
#

Can i see how you did

lavish skiff
earnest phoenix
#

You on v11?

lavish skiff
#

yes

earnest phoenix
#

Well the Channel id is incorrect

lavish skiff
#

no the id of channel is correct

bright dove
#

you told him to do client.channels.cache.get(id) and he did client.channels.get(id)

#

so try it with the .cache added

lavish skiff
#

no i'm in v11

earnest phoenix
#

@bright dove cache does not exist on v11

bright dove
#

oh

#

nvm then

earnest phoenix
#

I recommend to update to v12 because v11 will not be maintained and shutdown in October 7th of 2020

sonic lodge
#

you need to place your code that gets the text channel in your bot's ready event

#

once this happens, all channels will have been cached

lavish skiff
#

it's good I found it alone but thank you

sonic lodge
#

ah, nice

sudden oracle
earnest phoenix
#

Any idea what this error means?


(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: 2)

(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.```
sonic lodge
#

a promise rejected, but there was no .catch() to handle it

indigo oriole
#

(node:30068) UnhandledPromiseRejectionWarning: Error [TOKEN_INVALID]: An invalid token was provided.
at WebSocketManager.connect (C:\Users\15862\Desktop\coding\node_modules\discord.js\src\client\websocket\WebSocketManager.js:135:26)
at Client.login (C:\Users\15862\Desktop\coding\node_modules\discord.js\src\client\Client.js:221:21)
(node:30068) 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:30068) [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.
PS C:\Users\15862\Desktop\coding>

#

what does that mean

#

pls help

#

'hi'

#

help pls

sonic lodge
#

read the error

indigo oriole
#

i did but i dont get it

sonic lodge
#

Error [TOKEN_INVALID]: An invalid token was provided.

#

your token is invalid

indigo oriole
#

ok

#

then how do i make it valid

#

const Discord = require('discord.js');
const bot = new Discord.Client();

const token = 'you not gonna control my bot';

bot.on('ready', () =>{
console.log('this bot is online!');
})

bot.login(token);

#

thats the script

#

it dont work y?

#

@sonic lodge

sonic lodge
#

like i said, your token is invalid

modest dagger
#

Hey is there a host which provides both node an web?

indigo oriole
#

ill just regenerate it

#

still invalid

sonic lodge
#

where are you getting your token

indigo oriole
faint prism
indigo oriole
#

under the bots name in the bot category

#

i dont get it

#

@everyone help pls

#

(node:12612) UnhandledPromiseRejectionWarning: Error [TOKEN_INVALID]: An invalid token was provided.
at WebSocketManager.connect (C:\Users\15862\Desktop\coding\node_modules\discord.js\src\client\websocket\WebSocketManager.js:135:26)
at Client.login (C:\Users\15862\Desktop\coding\node_modules\discord.js\src\client\Client.js:221:21)
(node:12612) 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:12612) [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.
PS C:\Users\15862\Desktop\coding>

sonic lodge
#

really?

faint prism
#

Did you just mention everyone?

#

fr?

indigo oriole
#

no

sonic lodge
#

it didn't ping everyone, it's fine

indigo oriole
#

its a fake thing

#

got it off google

#

@here

#

lol

#

(node:12612) UnhandledPromiseRejectionWarning: Error [TOKEN_INVALID]: An invalid token was provided.
at WebSocketManager.connect (C:\Users\15862\Desktop\coding\node_modules\discord.js\src\client\websocket\WebSocketManager.js:135:26)
at Client.login (C:\Users\15862\Desktop\coding\node_modules\discord.js\src\client\Client.js:221:21)
(node:12612) 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:12612) [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.
PS C:\Users\15862\Desktop\coding>

can someone please help

faint prism
#

pls don't spam the same message. I still see it up there

indigo oriole
#

i need help

sonic lodge
#

are you saving the file

faint prism
#

It sounds like your token is bad

sonic lodge
#

or pasting the token completely

indigo oriole
#

i have a valid token but it says invalid

faint prism
#

Print it out to console before your script uses it to make sure

digital ibex
#

can u like

#

not copy code

indigo oriole
#

im pressing copy then pasting it

digital ibex
#

dont

sonic lodge
#

did you save the file

indigo oriole
#

?

digital ibex
#

dont copy and paste code

indigo oriole
#

why

digital ibex
#

you're gonna be here forever trying to fix it

#

bruh

#

cuz its not ur code

indigo oriole
#

i made my own code

digital ibex
#

then use that code

indigo oriole
#

im talking about tokens

digital ibex
#

not code you found from google

indigo oriole
#

ik

bright dove
#

pretty sure this dude is a troll lol

indigo oriole
#

finnaly

#

i got it online

#

yaaassss

faint prism
#

Glad it works

indigo oriole
#

but now for the commands 😐

bright dove
#

well my thing got lost already lol so I'ma delete and resend