#development

1 messages Β· Page 1035 of 1

astral yoke
#

im still getting it Error: The module '/home/container/node_modules/rex.db/node_modules/better-sqlite3/build/Release/better_sqlite3.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 64. This version of Node.js requires NODE_MODULE_VERSION 72. Please try re-compiling or re-installing the module (for instance, using `npm rebuild` or `npm install`).
and i have this

  "name": "dogbot",
  "main": "src/index.js",
  "scripts": {
    "test": "node src/error.js",
    "start": "node src/index.js"
  },
  "engines": {
    "node": "^12.x"
  },
  "dependencies": {
bunch of stuff, with a few more stuff
  }
}
deft condor
#

Anyone know how to fix

#

(node:15263) UnhandledPromiseRejectionWarning: #<Response>
3:23 PM
(node:15263) 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(). (rejection id: 1)
3:23 PM
(node:15263) [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.

restive pebble
#

U have any idea what was ur previous node version?

astral yoke
#

nope

#

if its possible to check in visual studio code terminal i could?

restive pebble
#

u cannot use console then

astral yoke
#

v12.18.2

#

node -v

restive pebble
#

Yea

#

It will give current

deft condor
#

Anyone know how to fix
@deft condor i cant even find where is coming from

astral yoke
#

its the same god damn error

#

no matter what i put in engines

#

i put ^12.18.2 and that still didnt do it

split hazel
#

Then you have to rebuild, do you have access to the console?

restive pebble
#

U need to get exact same version

#

Or speedy said what u can do

#

Can I know ur host?

astral yoke
#

the thing is on vsc it-

#

yeah

#

danbot

restive pebble
#

Hmmm

astral yoke
#

DanBot Hosting

restive pebble
#

Kk

#

So u cannot access console?

astral yoke
#

i mean i can but if i type in it it dosent do nun

restive pebble
#

Okk

astral yoke
#

it just types then like you press enter and it yk vanishes but not into terminal

split hazel
#

Pterodactyl is made to be very simple, so they don't support that

#

My experiences with pterodactyl would be to either delete the node_modules folder (if you can see it) or contact them and ask for ssh access if they have any

restive pebble
#

rehost ur bot in some other workdspace

astral yoke
#

i have acess to node modules

#

but i dont think that would do anything?

restive pebble
#

Yess

astral yoke
#

just delete it and start it up re installing packages?

split hazel
#

Delete it and restart the bot

restive pebble
#

Try delete

split hazel
#

Deleting and installing has the same effect as rebuilding

astral yoke
#

deleted and retrying right now

restive pebble
#

Keep 12

astral yoke
#

installing all the packages right now

restive pebble
#

Is better

astral yoke
#

lets see

restive pebble
#

Yeah

#

Will work

astral yoke
#

im scared

#

its scaring me

restive pebble
#

It works in 80 percent cases

astral yoke
#

its installing the million packages i dont need

restive pebble
#

Or 90 for me

astral yoke
#

nope

#

didnt work

#
was compiled against a different Node.js version using
NODE_MODULE_VERSION 64. This version of Node.js requires
NODE_MODULE_VERSION 72. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
at Object.Module._extensions..node (internal/modules/cjs/loader.js:1206:18)```
restive pebble
#

Those are dev dependencies

#

Bettersqlite

#

Okk

astral yoke
#

yeah

restive pebble
#

U have any sqlite file?

astral yoke
#

json.sqlite

restive pebble
#

Yea

split hazel
#

Quick db

restive pebble
#

Ofc

astral yoke
#

quick db and quick eco

restive pebble
#

Lol

astral yoke
#

but yeah

#

quick db

#

:/

#

dont make fun

#

but what do i do

#

or should i do

#

or try

#

or

split hazel
#

It should work unless you didn't delete it properly or something

astral yoke
#

should i delete the json.sqlite and node modules then try again or sum?

#

nah

#

that wouldnt do anything

unique shore
#

speedy db

astral yoke
#

its with The module '/home/container/node_modules/rex.db/node_modules/better-sqlite3/build/Release/better_sqlite3.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 64. This version of Node.js requires NODE_MODULE_VERSION 72. Please try re-compiling or re-installing the module (for instance, using `npm rebuild` or `npm install`). at Object.Module._extensions..node (internal/modules/cjs/loader.js:1206:18) stoopid

restive pebble
#

Rex.db

split hazel
#

Can you switch back to v12, delete node modules and start again?

restive pebble
#

Snowflake

#

I asked u to keep v12

astral yoke
#

frick you snowflake

restive pebble
#

I don't thinl version 12 is latest lol

split hazel
#

I'm pretty sure better sqlite 3 has troubles with building on some versions of node

restive pebble
#

Ya

#

On 10

astral yoke
#

like v12.18.2?

restive pebble
#

12.x only

astral yoke
#

what should i do right now

restive pebble
#

12.x as node

#

Engine

astral yoke
#

put 12.x?

restive pebble
#

Don't worry about that x thing

astral yoke
#

then delete node modules and try again

restive pebble
#

It works

#

Yes

#

Try

#

12.x will select latest available v12 for ur host

astral yoke
#

alright im trying now

split hazel
#

Pterodactyl should be made illegal for hosting discord bots

restive pebble
#

Why tho

#

Lol

astral yoke
#

i dont even know what a pterodactyl is

restive pebble
#

Same

#

But why lol

split hazel
#

It's made for Minecraft servers, you get barely any control

restive pebble
#

Woah

astral yoke
#

same

#

god

#

damn

#

error

restive pebble
#

Imagine hosting in that

#

Lol

#

Oof

split hazel
#

You can't even send commands to the console

astral yoke
#

am i able todo xx.x @restive pebble

restive pebble
#

Run node -v

astral yoke
#

lol

#

yeah

#

already did tghat

#

v12.18.2

restive pebble
#

Ok that's latest then

#

Can I edit ur package.json?

astral yoke
#

and do whattt

restive pebble
#

U*

earnest phoenix
#

i want to make a kick command but if it type case again it tells me there is a error what to do??

split hazel
#

If nothing else works I'd recommend contacting the hosting company and asking to delete it for you since something funky might be happening

restive pebble
#

Remove betterSqlite3

astral yoke
#

from like

restive pebble
#

Lol

astral yoke
#

node modules

restive pebble
#

Oh it comes with quick.db

#

No luck

astral yoke
#

Oh OkAy

restive pebble
#

Guess hwat

astral yoke
#

que

restive pebble
#

One last thing u can try

#

Copy ur sqlite file

earnest phoenix
#

i cant make more commands cause if i type case it shows me a error can some help me pls??

restive pebble
#

And delete from host

split hazel
#

These hosting companies appear, sell for a couple months then go without a trace

restive pebble
#

Hmmmm

earnest phoenix
#

can someone help me??

astral yoke
#

no

#

xd

#

@earnest phoenix what even is the error

#

give us more description

#

not

earnest phoenix
#

ok

astral yoke
#

theres an error help

earnest phoenix
#

when i type case again

#

@astral yoke

astral yoke
#

quick question

restive pebble
#

Bruh

astral yoke
#

how new are you too this

restive pebble
#

U have to type it

astral yoke
#

is that a youtube tutorial bot?

restive pebble
#

case is missing

astral yoke
#

what kinda tutorials did you watch for this?

restive pebble
#

@earnest phoenix write ur whole case

#

And then see if error happens

earnest phoenix
#

my friend told me this

#

And then see if error happens
@restive pebble ok

astral yoke
#

you think if i put xx.x it would fix engines lmao @restive pebble

#

like

#

"engines": {
"node": "^xx.x"
},

restive pebble
#

No lol

astral yoke
#

lmao

restive pebble
#

And u need to break case

#

Why won't it show error lol

opal plank
#

not necessary to sue break

restive pebble
#

But he didn't add :

opal plank
#

its the fact that there isnt a case on it

restive pebble
#

But he didn't add :
@restive pebble

opal plank
#

case (something):
code

lusty spade
#

im trying to make a lock command and im wondering how can i overwrite permissions for a specific category

restive pebble
#

Channel overwrite

#

Permission

astral yoke
#

docs

restive pebble
#

Read docs

astral yoke
lusty spade
#

i know how to use the channeloverwrite but i dont know how to filter out a specific caterogy

earnest phoenix
#

how do i create a channel upon joining a server and save its ID?

#

I'm making a bot where people can advertise their server

fast glen
#

Look at your library docs

pure lion
#

@earnest phoenix .on('guildCreate'

slender thistle
#

this is a channel for help with coding

#

not chatting

wheat valve
#

how do you get permission overwrites to allow the role permission "ADMINISTRATOR" to view the channel? i am using discord.js

slender thistle
#

The admin permission can already view all channels

wheat valve
#

that was a stupid question, thanks

earnest phoenix
#

Is there a help/guide about making Discord bot? I need help in making one that I think will be very popular

slender thistle
#

-faq 3

gilded plankBOT
earnest phoenix
#

Time to start learning coding then...

#

Thanks Shivaco

#

btw, Is it illegal to get public information from another webpage?

slender thistle
#

What kind of public information?

earnest phoenix
#

Like web scraping? ohhhh

#

It's not illegal until you find a way to scrap the web pages that doesn't allow scraping

#

If it allows you to scrap it nothing is illegal about it... Unless the scraped info is about something illegal

#

Like... making a twitter stat bot

#

The bot will take information like, the profile of someone with it's caption, date of creation of the twitter page, etc

opal plank
#

that'd prob be under legal advice, idk if anyone here can give any on weather its legal or not

fast glen
#

use twitter API

opal plank
#

though if its public, it may be fine

frail ocean
#

Yeah I swear twitter has an API for that.

earnest phoenix
#

It's not exactly about twitter tho

#

Call me paranoid. But I'm kinda afraid of getting my idea stolen

opal plank
#

figured that was only an example

earnest phoenix
slender thistle
#

Using an API is usually a better option as the company decides what's public information

frail ocean
#

Yeah,

opal plank
#

^^

earnest phoenix
#

What's "API"?

slender thistle
#

Reading their privacy policy and Terms of Service might also help

spare mirage
#

is the twitter API made by twitter

fast glen
#

Application Programming Interface

opal plank
#

im not even sure crawlers are legal per se

frail ocean
#

Most people probably have done what you want before. When starting, don't think you are the first, but look around - what problems do people typically have, is there packages/code already written that you can adapt and reuse (ie apis).

spare mirage
#

@earnest phoenix make a bot in discord.js

earnest phoenix
fast glen
#

Stuff which can make discord bots live

spare mirage
#

@earnest phoenix message.content

earnest phoenix
#

ok

spare mirage
#

.startsWith

earnest phoenix
#

I searched around because I needed a bot like I wanted for my server but it doesn't seem to exist

fast glen
#

Then create one

earnest phoenix
#

@earnest phoenix message.content
@spare mirage where should i add this

spare mirage
#

instead of message.includes

earnest phoenix
#

instead of message.includes
@spare mirage ok

#

Knowledge = 0

opal plank
#

@earnest phoenix without saying what you want to do precisely, any better example of what type of info you are trying to fetch?

frail ocean
#

Maybe a specific bot doesn't exist, which is why custom bots exist, but I'm sure someone has done for example twitter statistic stuff that you can re-use the code for (if its public ofc).

cinder patio
#

Night, do you see the code that is greyed out? That code never executes because of the break

opal plank
#

i think the twitter was just a dummy example

earnest phoenix
#

Like, Game stats

opal plank
#

doesnt look like he's actually going to be using it

#

wrappers should be fine if the info is public beforehand

earnest phoenix
#

KDA's

#

that stuff

opal plank
#

if it requires authentication, it usually is bound to stuff only that user should access

spare mirage
#

for what games @earnest phoenix

opal plank
#

say, my dm's shouldnt be accessible to you, unless you are part it, that makes is so you shouldnt share it with people who dont have acces to it

#

if what i said makes sense

earnest phoenix
#

@spare mirage i made it message.content but still doesnt work

opal plank
#

basically if its to public, it SHOULD be fine, im no lawyer

spare mirage
#

message.content.startsWith

earnest phoenix
#

message.content.startsWith
@spare mirage ok

restive pebble
#

split

earnest phoenix
#

That's the "stolen idea" part @spare mirage lul

spare mirage
earnest phoenix
#

@spare mirage still no

spare mirage
#

code

opal plank
#

im guessing its a shooter game, you are trying to fetch game stats for that

#

since i dont think theres sensitive info on it, prob should be fine

frail ocean
#

Froggy, not being funny, but I doubt people here would "steal" your idea - if you are really paranoid try and search around until you get to more specific areas.

opal plank
#

usually games dont display anything other than public username and some other stats

#

nothing personal, usually

spare mirage
#

people here have their own discord bots with their own ideas

Froggy, not being funny, but I doubt people here would "steal" your idea - if you are really paranoid try and search around until you get to more specific areas.

earnest phoenix
#

I'm just kinda paranoid because some of my ideas got stolen in college and it f'ed me up :c

spare mirage
#

ouch

opal plank
#

we are here to help you code, if you can provide a similar example that allows us to help you, its fine

#

tbh no one here cares about the ideas thrown in here

fast glen
#

We cant help you if you will say just that its about games

frail ocean
#

I'm with you, I usually don't talk about my projects I'm working on, but we do need to know a bit of information - even if its specific or vague to point you in the correct direction, although we're amazing we aren't mind readers πŸ˜‚.

earnest phoenix
spare mirage
#

else if

slender thistle
#

Night, do you see the code that is greyed out? That code never executes because of the break
@cinder patio

frail ocean
#

@earnest phoenix Your greyed out code won't run since the break; will just break (kill) the code there. Elseif is what you want.

opal plank
#

wheres that switch case nested @earnest phoenix ?

frail ocean
spare mirage
#

xD

earnest phoenix
#

how shall i fix it

frail ocean
#

eh wanted to flex my writing skills with the mouse πŸ˜‚

fast glen
#

:DDDD

spare mirage
#

looks good

frail ocean
#

Your greyed out code won't run since the break; will just break (kill) the code there. Elseif is what you want.

earnest phoenix
#

ok

#

Like, an Overwatch tracker

spare mirage
opal plank
spare mirage
#

OOF

opal plank
#

a quick 5 sec search showed one

fast glen
#

πŸ˜„

earnest phoenix
opal plank
#

its like we said, theres prob tons done out there

fast glen
#

Bad indentation

#

I think

opal plank
#

show whats nested

spare mirage
#

whats the error @earnest phoenix

fast glen
#

Oh not

#

I am used to python sorry xd

earnest phoenix
#

whats the error @earnest phoenix
@spare mirage see the word else

frail ocean
#

} else if (if statement) { @earnest phoenix

#

You need to do an } before the else if

earnest phoenix
#

You need to do an } before the else if
@frail ocean ok

frail ocean
#

Same as down here

#

That was correct - ensure you do the same everywhere else

earnest phoenix
#

Same as down here
@frail ocean ok

spare mirage
#

@frail ocean how do you know all those links xD

frail ocean
#

Quick typing with my 2nd monitor πŸ˜‚

opal plank
#

having multiple monitor is a blessing

fast glen
#

Just google: js if else

#

πŸ˜„

spare mirage
#

I just have a very bad laptop

#

im jealous

frail ocean
#

But for more specific info (not giving help to others etc) I use grepper as 99% it'll have a solution, I use that for basic js docs as well anyway

#

Aka:

earnest phoenix
#

ok

spare mirage
#

wow that google has those thing

#

s

lusty quest
#

its a browser extension i think

opal plank
#

its devastating what a bottle of whisky and 3 slices of pizza can do to a bot code....

frail ocean
#

Yeah browser extension - Grepper

spare mirage
#

Grepper seems good

frail ocean
#

very useful tbh, especially as basic js docs when you need a quick answer

spare mirage
#

I get ads

#

lol

#

after I started searching for discordjsguide

opal plank
#

w3 or mozilla are my gotos

spare mirage
#

:/ I got js help/learning ads

fast glen
#

thats how internet works

spare mirage
#

Imma blok my mic and cam

#

lol

lusty quest
#

this is google ads to you

earnest phoenix
#

Yeah but Overwatch isn't the game

opal plank
#

huh?

lusty spade
#

im trying to make a lock command and im wondering how can i overwrite permissions for a specific category this is my current code:

        const channels = message.guild.channel.parent;
        const verifiedRole = db.fetch(`verifiedrole_${message.guild.id}`);
        if (args[0] === 'on') {
            channels.updateOverwrite(verifiedRole, {
                    SEND_MESSAGES: false,
                }).then(() => {
                    channels.setName(channels.name += ':lock:');
                });
            return message.channel.send(':vSuccess: Successfully locked all channels');```
fast glen
#

You mean like cs overwatch? πŸ˜„

frail ocean
#

Yeah:

myself - grepper solutions (or if I wanna confirm before I say like you do } not , or whatever - fake info btw just made that up)
others for reference to give info to - w3 or mozilla.

earnest phoenix
#

So, I can maybe replicate what that Overwatch tracker does

opal plank
#

i usually just eval

#

snippets are rather quick to run and my bot is in most of my servers, a quick evaluation is as quick as throwing it on google

lusty quest
#

i use d.js docs and ancient stackoverflow posts

spare mirage
#

what the heck is eval

#

lol

opal plank
#

it runs code

spare mirage
#

a command

#

sounds cool

opal plank
#

can be a command yeah

#

its usually evaluate expression

spare mirage
#

are eval commmands hard to make

opal plank
#

read this

spare mirage
#

ok

lusty quest
#

it can have a bad side if you dont protect the command (only usable by the bot owner / dont run it everywhere)

spare mirage
#

ok

frail ocean
#

ancient stackoverflow posts
My favourite too πŸ˜‚ usually for stuff that isn't obvious/more specific.

spare mirage
#

thats not that hard

opal plank
#

its a rather dangerous command btw

lusty quest
#

since eval can expose your bot token

opal plank
#

make sure to whitelist it

spare mirage
#

wait really

fast glen
#

Ancient stackoverflow is better than any docs

earnest phoenix
opal plank
#

eval runs any code

#

i could do eval client.token and get your token

spare mirage
#

ahh I see

opal plank
#

hence why you whitelist who can use it

frail ocean
fast glen
#

πŸ˜„

earnest phoenix
#

ok

frail ocean
#

} else if (if statement) {
like I said a min ago.

earnest phoenix
#

thx

spare mirage
#

Just make it

if (!message.author === 'ID') {
return message.channel.send("hahano")
}```
opal plank
#

works but please fix it

#

if(this) that
not
if(this) {
that
}

#

that tilts me hard

spare mirage
#

I always like to use if ()

#

not

#

if()

slender thistle
#

Anyone ever worked with Delphi here before?

spare mirage
#

wos dat

opal plank
#

not me

#

also justii

#

im referring to {}

#

not ()

#

its a single statement

#

{} is for multiple lines

#

there isnt any harm, its just tilting

#

same case we were saying earlier from pascal and camel case

earnest phoenix
opal plank
#

doesnt change anyhing, its just good pratice(dont trigger ocd)

spare mirage
#

if (x === 2) {
print("Hello Imma trigger u")
}

earnest phoenix
#

uh

#

i didnt get you

fast glen
#

look at the image

#

focus on the image

opal plank
#

dude

#

just paste the code

earnest phoenix
#

what should i change??

#

ok

opal plank
#

use hastebin

spare mirage
opal plank
#

please dont post a 60 line code here

earnest phoenix
#

ok

frail ocean
#

lmao! my friend just found a way to purge more than 100 messages
@spare mirage that's a known method, but can be considered API abuse if it gets ratelimited etc.

earnest phoenix
spare mirage
#

@frail ocean lol! I didnt knwo

opal plank
#

the whole thing dude

earnest phoenix
#

ok

opal plank
#

remove token if there

earnest phoenix
#

ok

frail ocean
#

} else if (message.content.startsWith(PREFIX + 'rps')) {

like I said many times.

#

As well as removing what I crossed out:

earnest phoenix
#

ok

#

ok

opal plank
#

sorry, i know spoonfeeding but this was getting on my nerves

#
if (message.content.startsWith(PREFIX + 'rps')) {
} else if (!args[1]) return message.channel.send('Please include your choice.');

let choices = ['rock', 'paper', 'scissors'];
if (choices.includes(args[1].toLowerCase())) {
  let number = Math.floor(Math.random() * 3);
  if (number == 1) return message.channel.send('it was a tie.');

  if (number == 2) return message.channel.send('I won!');

  if (number == 0) return message.channel.send('You won!');
} else
  return message.channel.send(
    'Please include either: rock, paper or scissors.'
  );```
earnest phoenix
#

thx

opal plank
#

dont use {} when its a single line

#

please

earnest phoenix
#

ok

frail ocean
#

@opal plank Needs to be else if on top line - else it's in the break line and wouldn't run still.

opal plank
#

if (this) do that
not

do that
}```
slender thistle
#

preferences tbh

opal plank
#

indeed, though triggering

spare mirage
#

I forgot what !== did

frail ocean
opal plank
#

thats why i asked for the whole code, idk what is nested before that

frail ocean
spare mirage
#

ah ok

#

thanks

slender thistle
#

stricter inequality that does not perform any type coercion on the operands, compared to != , which does perform type coercion.

frail ocean
#

Aka where x = 5 this is the results:

raw ravine
#

how to host java discord bot on heroku? 😒

opal plank
#

you dont

#

heroku isnt for hosting bots, bad alternative

#

also i just saw the pic @frail ocean , needs to end that switch case if he wants to run the code afetrwards

fast glen
#

many YT tutorials will tell you but please dont

weak rain
#

@raw ravine hi

opal plank
rotund belfry
#

@raw ravine You can actually. Heroku supports docker

opal plank
#

you shouldnt, heroku is for websites, not bots

rotund belfry
#

Its free

opal plank
#

and they aggresively go against bots

fast glen
#

But dont do that

opal plank
#

you want free options?

rotund belfry
#

Didn't know that.

opal plank
#

aws

#

f1 micro

#

google computing

#

danhosting

spare mirage
#

wait

opal plank
#

theres quite a few free options out there for proper bot hosting

fast glen
#

buy some cheap VPS for few dollars a month. Dont use heroku

spare mirage
#

who said eval commands were dangerous for grabbing tokens

opal plank
#

me

frail ocean
#

I didn't but it is πŸ™‚

spare mirage
#

if (args.join("").toLowerCase().includes("token"))

#

hmm

opal plank
#

i can bypass that in 3 seconds

#

toab()

spare mirage
#

how does that work

opal plank
#

actualy

#

toba()

spare mirage
#

ok

#

fck

opal plank
#

wait

#

no

#

btoa()

#

there we go

spare mirage
#

ok

#

lol

opal plank
#

i knew i was going the wrong method

restive willow
#

how can i get the amount of users on a shard with discord.py

tight plinth
#

If you want to know if a eval output returns your bot toke, just check if evaled includes your client.token lol

autumn aspen
#

lol

earnest phoenix
#

.repLace(CliEnT.toKEn,"No !1!")

slender thistle
#

How many messages does https://discordapp.com/api/v6/guilds/:guildID/messages/search?channel_:channelID return at once?

opal plank
#

i thought bots couldnt use search

slender thistle
#

yes

#

fun, 25 at once accepting offset query param thinkW

spare mirage
tight plinth
#

do you know how to use try/catch?

spare mirage
#

yes

#

this normally works

tight plinth
#

man

#

no

#

try {CODE} catch (e) {CODE}

#

you're doing

#

try {CODE} CODE catch (e) {CODE}

spare mirage
#

whats the CODE after {CODE}

tight plinth
#

replace CODE with actual code

hasty sparrow
#

Missing { after args.join...includes('token')

#

Second line

spare mirage
hasty sparrow
#

That also works

tight plinth
#

yeah

spare mirage
tight plinth
#

i mean, it works

spare mirage
#

well I dont get an good output

tight plinth
#

why "kinda"

#

thats ur problem

spare mirage
#

its just discord

#

lol

quartz kindle
#

you mean the [object Promise]?

hazy sparrow
#

Hi tim

earnest phoenix
pure lion
#

Ctrl + f

earnest phoenix
#

oh it actually tells you

#

in the help.js

#

ik

#

in the helpEmbed

pure lion
#

Uwjsjajs

earnest phoenix
#

i'm there

#

yeah

#

haven't changed anything!?

pure lion
#

If we could see the line

earnest phoenix
#

the whole function

#

not a tiny screenshot

pure lion
#

No it's okay I got my magic crystal ball

earnest phoenix
pure lion
#

That's not how embed works

earnest phoenix
#

Forgot bottom

#

shoot

pure lion
#

Where is owners defined

earnest phoenix
#

top

#

what is category defined as

#

help.js

#

oh nvm

pure lion
#

You need to define owner as a hooman

earnest phoenix
#
<html>
  
  <h1>
Welcome!  </h1>
  <div class='username'>
             My Username is: <%= user.username %>
    <img class='avatar' src='https://cdn.discordapp.com/avatars/<%= user.id %>/<%= user.avatar%>.png'
  </div>
  <a href='\logout'>Click me to logout</a>
</html>
  <style>
    .avatar{
      border-radius:50%;
      height: 30px;
      width: 30px;
      
    }
  </style>
#

@pure lion uhm

#

how can i get the image on the other side of the text

pure lion
#

Lay3rz

#

I don't know frontend sorry

pale vessel
#

use float

#

float: right;

earnest phoenix
pale vessel
#

where do you want the image to be

earnest phoenix
#

so

#

ahh

#

yh you're trying to filter the owner id incorrectly

#

in front of

#

My username is

pale vessel
#

then put the image code all over to the left then

earnest phoenix
#

anyone know the issue behind mine or like ahh

#

i totally didnt try that

#

yh you're trying to filter the owner id incorrectly

#

ohh

pure lion
#

Omg so we're not only not reading the error, but we're not reading the help too?

#

We live in a society

earnest phoenix
#

legit changed nothing and then today this..

hazy sparrow
#

discord.js

digital ibex
#

read the docs

hazy sparrow
#

ty

earnest phoenix
#

anyway you can have it auto restart if it crtashes

digital ibex
#

make what auto restart?

earnest phoenix
#

.js

digital ibex
#

if ur talking about ur bot, it does rest- ......

#

well using vanilla js, you can't do that

hazy sparrow
#

why is it undefined

digital ibex
#

read pins, please

wicked pivot
#
function Login(){
    config.initialize()
    if(LangTools.language === "fr") var language = require('./config/lang/fr')
    else if(LangTools.language === "en") var language = require('./config/lang/en')
    term.red(language.login.messages)('\n\n>')
    term.inputField(async function(error, input){
        Bot.login(input).catch(async(err) => {
            term.red('\n' + language.login.error)
            term.inputField(async function(error, input){
                config.close()
            })
        })
    })
}
function blabla(){
    Login()
 >   console.log('ok')
}``` how to wait for the login from the front before running the suite
earnest phoenix
#

listen to the ready event

#

you're not... logging in with your bot from frontend, are you?

hasty lotus
#

hey, making a little web interface using express, i've made ejs pages, and i've got this error :

SyntaxError: /home/bot-v1/raccoonz/web/public/dashboard.ejs:1
 >> 1| <%- include('blocks/header', {bot, user, path}) %>

    2| <h1 class="display-3">Dashboard</h1>

    3| <ul class="list-unstyled">

    4|   <% user.guilds.forEach(guild => { 


Unexpected token '>' in /home/bot-v1/raccoonz/web/public/blocks/header.ejs while compiling ejs```Does anyone know why, and how i can fix it ?
earnest phoenix
#

you have a syntax error

cobalt spruce
#

Yo

#

does any one have a tutorial for database in discordjs

#

cuz i want to make world wide bot

earnest phoenix
#

My bot has a levels but how do I get a level message

#

Wait nvm

cobalt spruce
#

ok

#

@earnest phoenix go to line 15 in indexjs

earnest phoenix
#

ye

cobalt spruce
#

show

#

bro

earnest phoenix
cobalt spruce
#

let me see script

#

did u install fs

#

?

#

npm install fs

earnest phoenix
#

ye

cobalt spruce
#

@earnest phoenix Oo

#

do npm install enmap

earnest phoenix
cobalt spruce
#

npm install better-sqlite3

#

@earnest phoenix u need to install thoes modules

earnest phoenix
cobalt spruce
#

go to line 19 in ur script

earnest phoenix
cobalt spruce
#

idk

#

man

#

this never came to me

earnest phoenix
#

@pure lion can you help?

fast yacht
#

@earnest phoenix I guess you've already tried this, but could you remove your node_modules folder and do a new npm i

earnest phoenix
#

I did now it once better-sqlite3 again

tight plinth
#

ok wtf is happening here

#

guys copy pasting code?

earnest phoenix
#

No this happens legit every 3 days the second I do one change.

tight plinth
#

what change

earnest phoenix
#

and sort of change

#

so i restarted

#

removed everything and coded it again

#

and

#

now

#

this

#

error

slender thistle
#

Don't type like that please

tight plinth
#

are you sure you know how to use fs?

earnest phoenix
#

Sorry

#

Mhm

tight plinth
#

and are you sure the commands folder even exists?

earnest phoenix
spare mirage
#

how can I add 2 people to be able to do eval

quartz kindle
#

you installed better-sqlite3 and it gave you a bunch of errors, therefore it was not installed lol

fast yacht
#

@spare mirage let's see that hentai.js !

spare mirage
#

ok dm me lol

lusty quest
#

better-sqlite3 can be a pain in the ass to install on windows

#

had some issues the first time i tryed to install it

earnest phoenix
quartz kindle
#

you just need to install windows-build-tools

earnest phoenix
#

command?

quartz kindle
#

@earnest phoenix one of your commands has no "help" property

spare mirage
#

How can I give more then 1 member permission to do b!eval

earnest phoenix
lusty quest
#

check if the userid of the autor is yours or the one of the other user

spare mirage
#

yes I tried

#

if (!message.author.id === "632266069146468384" || "668408729821118487") {
return message.channel.send("WOW! HAHA U CANT DO THIS FOOL!");
}

lusty quest
#

code?

spare mirage
#

in my head this should work

lusty quest
#
if (!message.author.id === "632266069146468384" ||!message.author.id === "668408729821118487") {
spare mirage
#

ahhh tanks

hasty sparrow
#

Use !==

tight plinth
#

even better

lusty quest
#

had the same thing too

quartz kindle
#

@earnest phoenix one of your commands, besides that one

lusty quest
#

also what duke said

spare mirage
#

ok thanks

tight plinth
#

let ownerID = ["63...","66..."]
if (!ownerID.includes(msg.author.id)) ...

earnest phoenix
#

you probably want to store that array somewhere

lusty quest
#

many ways end in Rome

earnest phoenix
#

it hurts my soul when i see people creating unnecessary arrays

hasty sparrow
#

Yours wouldn't work @lusty quest

hasty lotus
#

you have a syntax error
well, yes i do, but where ?

quartz kindle
#

@earnest phoenix keep searching

hasty sparrow
#

Because you negate the id before checking equality

hasty lotus
#

the line is juste <%- include('blocks/header', {bot, user, path}) %>

earnest phoenix
quartz kindle
#

@earnest phoenix one of your commands is missing the "help" property

#

you have to find which command

pure lion
#

Whopingedme

#

.com

earnest phoenix
spare mirage
#

it hurts my soul when i see people creating unnecessary arrays
@earnest phoenix LOL same

quartz kindle
#

@earnest phoenix do you see that all your commands have module.exports.help = { ?

#

one of them is missing that

tight plinth
#

@earnest phoenix do you even know what you're searching

earnest phoenix
#

@quartz kindle no

#

idk

restive willow
tight plinth
#

at the end

earnest phoenix
#

i'm just stress it was fine and now its just shit

quartz kindle
#

sigh... then do this: add a console.log(file) line, right before your const props = require(..)

#

in your main file

restive willow
#

anybody know off the top of their head how to make a bot mentoin somebody in discord.py? prob quicker to get an answer here than to google

tight plinth
restive willow
#

to the docs we go

quartz kindle
#

idk about a function/method for that, but you can simply send the <@id> string

spare mirage
#

just send the userID in <@!>

quartz kindle
#

its universal across all discord libs

#

since its discord itself that does it

restive willow
#

ty ty

earnest phoenix
#

@tight plinth everything does..

tight plinth
#

r u sure?

quartz kindle
#

@earnest phoenix do the console.log thing i said

tight plinth
#

^

quartz kindle
spare mirage
#

where do I find apis?

quartz kindle
#

google?

hasty lotus
#

nah

#

not google

#

use wtartpage

spare mirage
#

oklol

hasty lotus
#

quant

spare mirage
#

bing

hasty lotus
#

duck duck go

#

everything

#

but not google

quartz kindle
#

wtartpage

#

@earnest phoenix i showed you the pic a few messages above ^

earnest phoenix
#

I should be adding that where?

#

@quartz kindle

quartz kindle
#

i just showed you

#

add console.log(file) right there where the arrow points

#

in between those lines

earnest phoenix
quartz kindle
#

what

#

what part of the image dont you understand

earnest phoenix
#

oops wrong ss

#

Past it there

quartz kindle
#

in between those lines

#

like i showed you in the pic

earnest phoenix
#

and remove commands?

quartz kindle
#

no

#

...

#

IN BETWEEN

#

add a new line

#

press enter

earnest phoenix
#

mhm

quartz kindle
#

and write console.log(file)

earnest phoenix
quartz kindle
#

what the fuck

#

i said

#

in between the lines

#
blablabla
console.log(file)
blablabla
blablabla
slender thistle
#
const props = ...;
console.log(file);
client.commands.set(...);
...```
earnest phoenix
quartz kindle
#

yes

pure lion
#

*casually cries*

earnest phoenix
#

olo

#

lol

#

done

pure lion
#

I wish I didn't scroll up

quartz kindle
#

now it will show you which files its loading when it starts

#

the last file it loaded before the error is the problem

earnest phoenix
quartz kindle
#

message.js

#

thats where the problem is

earnest phoenix
#

that's the message.js folder

pure lion
#

Entire file?

quartz kindle
#

you see, this file doesnt have a module.exports.help part like all other commands have

#

thats why its causing the error

pure lion
#

bloblul πŸ‘

quartz kindle
#

because your code is expecting ALL files to have the module.exports.help part, no exceptions

earnest phoenix
#

So put module.exports.help where abouts?

quartz kindle
#

do the same thing as all your other commands have

pure lion
#

Under or over, your choice

quartz kindle
#

and by the way

#

that file is not even supposed to be there in the first place

#

it looks like an event file

#

not a command

earnest phoenix
#
    name: "help",
    aliases: [],
    disabled: false,
    ownerOnly: false,
    adminOnly: false,
    modOnly: false,
    category: "Information"
};``` this is what all others have
quartz kindle
#

do you have an events folder?

earnest phoenix
#

ye

#

moved it

#
    name: "eval",
    aliases: ["evaluate", "e"],
    disabled: true,
    ownerOnly: true,
    adminOnly: false,
    modOnly: false,
    category: "Owner-only Commands"
  };``` and this
quartz kindle
#

does the events folder have a message.js file?

earnest phoenix
#

does nw

#

now

quartz kindle
#

so you moved message.js to events, and removed it from commands, right?

earnest phoenix
#

yes sir

quartz kindle
#

then try again now

earnest phoenix
quartz kindle
#

ok, no more errors

earnest phoenix
hasty lotus
#

guys do you know how to fis this error :

 >> 1| <% include('blocks/header', {bot, user, path}); %>```

the code is that (in the ejs file) :
```<% include('blocks/header', {bot, user, path}); %>```
#

it's in an express server

earnest phoenix
quartz kindle
#

thats because you have fetchAllMembers: true

#

its just a warning, not an error

#

you can ignore it

earnest phoenix
#

also it's not doing this anymore

restive pebble
#

Imagine killing ram like that

pure lion
#

Ramramram

earnest phoenix
#

no reply cries

spare mirage
#

sad ram noises

earnest phoenix
#

what section should help,js and eval.js be?

pure lion
#

The recycle bin

spare mirage
#

commands

earnest phoenix
#

LOL

restive pebble
#

General and developer respectively

spare mirage
#

eval should be admin

#

and help should be info

earnest phoenix
#

and index.

restive pebble
#

Oh my god

pure lion
#

Ptfff why even use the index file jajajajajajaja

restive pebble
#

His name

pure lion
#

I'll change it in an hour

restive pebble
#

@earnest phoenix send ur event handeler code

slender thistle
#

Is there any tutorial/guide on how to create own library for Discord?

restive pebble
#

No

earnest phoenix
#

nope

restive pebble
#

Probably no

earnest phoenix
#

tried looking

restive pebble
#

Why will someone make lol

slender thistle
#

Makes sense

earnest phoenix
slender thistle
#

Explanation of the overall logic to write own libraries which could allow more customization

earnest phoenix
restive pebble
#

It means ur not executing

#

It

#

Send the code where u required it or event handeler

earnest phoenix
#

no clue how to ignore bad english

restive pebble
#

Send the code

#

Of event handeler

#

Only

earnest phoenix
#

what this? const { Client } = require("discord.js"); module.exports = client => { console.log('Up and Running'); client.user.setPresence({ activity: { name: `${client.users.cache.size} members` , type: 'WATCHING'}, status: 'online' }) };

tight plinth
#

remove it i guess

restive pebble
#

No it's ready.js

tight plinth
#

just kidding

earnest phoenix
#

lol

restive pebble
#

Where are u requiring it?

tight plinth
#

this is your ready event

restive pebble
#

Or executing

tight plinth
#

also remove first line

restive pebble
#

Yea it's not needed tho

#

I think u are not executing it

#

Or requiring it

earnest phoenix
restive pebble
#

U cannot run it like that

tight plinth
#

put ready.js in events folder

restive pebble
#

U have to require it

tight plinth
#

and ping.js in commands folder

restive pebble
#

Using a event handeler

tight plinth
#

and then retry

earnest phoenix
restive pebble
#

Yes

tight plinth
#

show your message.js

earnest phoenix
tight plinth
#

hm

restive pebble
#

Do event.run instead of bind

#

Or if u are doing bind even

#

U need a bind function

tight plinth
#

do you even know what you're doing?

earnest phoenix
#

hard bad english so

#

lol

tight plinth
#

apparently no

#

so

#

the best way to code a discord bot with discord.js is to NOT copy-paste code

earnest phoenix
#

nooooo so i fked it before so i've had to make a new project it's my code

tight plinth
#

are you sure

earnest phoenix
#

yes

tight plinth
#

if it's your code you should kow how to use it

#

and apparenty you dont

restive pebble
#

U are copying from yt

tight plinth
#

^

distant bramble
#

do i need to use a event handler

tight plinth
#

or from a turorial

distant bramble
#

in djs

restive pebble
#

ur choice

distant bramble
#

ok

tight plinth
#

@distant bramble no

restive pebble
#

Using handler still good

tight plinth
#

its good but its more laggy than everything else

restive pebble
#

@earnest phoenix events.bind means u need to make a either a async or normal function inside ur events

distant bramble
#

yeha i creted a good bot but dont waanna siwtch ad have a event handlern

earnest phoenix
#

or change it to event.run?

tight plinth
#

doing a command handler is good, but a event handler is unnecessary af

distant bramble
#

omg my grammar

#

i have a command handler

restive pebble
#

.run will also need a run function

tight plinth
#

@earnest phoenix delete your bot's file and write YOUR OWN CODE please

earnest phoenix
#

ugh

tight plinth
#

and learn js

earnest phoenix
#

smh.

distant bramble
#

dont follow yt

restive pebble
#

async run(message) {}

distant bramble
#

ever

restive pebble
#

Like this

tight plinth
#

dont try to fix code that you dont understand

pure lion
#

Aka learn js and shit

distant bramble
#

if u want use a guide like discord.js guide and start yt vid creators use there own way

tight plinth
#

^

restive pebble
#

js should be learnt first

#

Then package usage

distant bramble
#

whic is not the correct way

pure lion
#

started with an API<

restive pebble
#

Lol

pure lion
#

I'm not okay

distant bramble
#

for example source code he created like 100 files of commands nnede ha

restive pebble
#

Idiots guide good

distant bramble
#

idiots is goo

restive pebble
#

Ye

pure lion
#

First code project ever was API, is this good or bad thing? :///////

distant bramble
#

but i followed discord.js guide

restive pebble
#

Idk

#

Smart peoples can figure out themselves

#

Like u shitdev

pure lion
#

I'm not smart

#

I just apply myself and never give up

distant bramble
#

hmm chatbot is a good idea

#

but i hve no idea how to make it

restive pebble
#

Chatbot

distant bramble
#

time to gooogle

pure lion
#

Gooooooogle

restive pebble
quartz kindle
#

@slender thistle you want to write a lib?

distant bramble
#

google is our friend

restive pebble
#

Use it

pure lion
#

Im gonna write a lib in scratchX

slender thistle
#

Been thinking about writing one from scratch in free time

quartz kindle
#

for py?

slender thistle
#

Just a custom one for fun, mhm

distant bramble
#

i have a ai but it take about 1 sec to 1 min to answe

quartz kindle
#

cool

distant bramble
#

ill check out brainshop

slender thistle
#

I found one for TS but that doesn't apply to my case

restive pebble
#

@distant bramble brainshop ai is really a nice chatbot comapany my bot uses their chat bot and is easy to set up with some http get packages

#

json the result

#

And ur done

quartz kindle
#

idk anything about how py handles compression or websockets

distant bramble
#

ok

#

ill start with it

dire stag
#

Hello

restive pebble
#

Hi

distant bramble
#

the one i curently use is trash

slender thistle
#

I thought maybe some sort of a general explanation could be good

restive pebble
#

It can also retain things

#

Like age

#

Name

#

Etc

dire stag
#

I’m planning to code a sign in sign out bot

quartz kindle
#

well, referring to the discord api docs should provide enough info no?

pure lion
#

@dire stag a what

slender thistle
#

Will take a look

#

thanks

restive pebble
#

Woah

dire stag
#

Sign in sign out bot

restive pebble
#

Ik

#

U want stay login?

quartz kindle
#

if you need help with the discord api, feel free to hmu

dire stag
#

So let’s say a staff member signs in, any moderation actions taken whilst they were signed on will be logged

slender thistle
pure lion
#

let h = true
while (h = true) {
client.destroy().then((c) => c.login(token))
}

restive pebble
#

Wrong

#

U are assigning h to true in the while loop

pure lion
#

Wait shit

tight plinth
#

while (h == true)

restive pebble
#

NULL MOMENT

pure lion
#

NULL

restive pebble
#

while(h) is enough

pure lion
#

Never a null moment with ShitDev

restive pebble
#

Hmmm

pure lion
#

Hmmmmmmmmmmmmmmm

earnest phoenix
#

so fixed it now it's just the fking status and online not working

#

wait

#

fixed it

#

lol

distant bramble
#

dude

restive pebble
#

I told u

distant bramble
#

in brainshop what is domain\

restive pebble
#

u need to make a bind function

earnest phoenix
#

mhm

#

ty

restive pebble
distant bramble
#

is it the normal

#

owhen u sign up it request a domain

restive pebble
#

hmmmm

#

Wait I will get better link

distant bramble
restive pebble
#

Yea

#

Wait

spare mirage
#

lol

#

I just made the easiest meme command

autumn aspen
#

lol

restive pebble
#

@distant bramble enter any domain name lol

autumn aspen
#

Guys can I create a kick.js and put the kick command there?

distant bramble
#

whats ur doamin?

#

okay

#

i mean u suggest

restive pebble