#development

1 messages · Page 922 of 1

lyric mountain
#

Extremely bad

#

Tags can change all the time

#

Ids doesn't

#

Ids are unique for every user, you can't get another

abstract crow
#

Oh yeah always use IDs. They never change

lyric mountain
#

Tags are meant only for data visualization

#

As is username/nickname

lapis ocean
#

Ok

#

So can you explain to me what this does? "guildMember.roles.set(['391156570408615936'])"

#

Is that string a User ID?

lyric mountain
#

That's a role id

lapis ocean
#

Ah ok

#

I need to find that

lyric mountain
#

All objects in discord have ids

lapis ocean
#

Role being the Role name on my Server?

remote yacht
#

why is my bot muted?

lyric mountain
#

Being the role object

abstract crow
lyric mountain
#

@remote yacht common prefix

abstract crow
#

Or that

#

I left right after they put that common role thing in place haha

lapis ocean
#

How do I fetch that ?

#

That's what's confusing me is how to catch all these things even though I know their names

lyric mountain
#

Are you going to make it unique for your server?

earnest phoenix
#

Where that can ask people?

lyric mountain
#

Or are you planning on having that feature on N servers?

lapis ocean
#

@lyric mountain Well, I wanted to repurposed it for others, but I am afraid it will be complicated to make it easily repurposable

#

But maybe I should make it repurposable from now

lyric mountain
#

If you want to make it publicly available you will need to use a webserver

#

With webhooks your bot will be ratelimited

lapis ocean
#

For reading webhooks?

lyric mountain
#

But if you want to make it only for your server, you can just hardcode the ID

lapis ocean
#

It doesn't send webhooks

abstract crow
#

Well if you want to make a bot useable for different servers I'd recommend some type of DB to store the roles. The ID is going to change for each server. As @lyric mountain said, if it is only your server, just hardcode that

#

If you are new I would recommend not touching DBs too much or any of that until you get the gist of the d.js basics(but that is just me)

lyric mountain
#

Not only a db, if he's willing to make an external integration on his bot he'll definitely need an api server

lapis ocean
#

I want to repurpose the bot, but not necessarily make it public or have to worry about such limits

abstract crow
#

Yeah

#

Personally, I would make the bot just for your server. Get the hang of how it all works

#

That's what I did

lyric mountain
#

It's easier to worry about those limits now than later

lapis ocean
#

Ok, I will hardcode stuff, maybe use variables as much as possible to make it easy to repurpose

#

Sounds like a plan to me

#

I guess if I set variables where needed it will be easy to repurpose

lyric mountain
#

About the id stuff, you'll need to learn how to manipulate arrays and objects

#

It's kinda different from website engineering where you have everything at hand

earnest phoenix
#

How i can replace text?

lyric mountain
#

You gotta think in an abstract yet tangible way

abstract crow
#

@earnest phoenix wdym by replace?

lapis ocean
#

Sounding like some voodoo stuff haha

lyric mountain
#

@earnest phoenix string.replace(yourtext)

lapis ocean
#

Can you give me some help to get my hands dirty?

earnest phoenix
#

Like {memberCount}

lyric mountain
#

@lapis ocean just think as if everything around you are objects with their own properties

#

Then you just need to get those properties

lapis ocean
#

Is this the so called object oriented programming?

lyric mountain
#

Yep

astral yoke
#

sorry for that

lapis ocean
#

This is very high level

astral yoke
#

but if i have

lapis ocean
#

I don't have much of a problem understanding the high levels concepts.

astral yoke
#

let prefix = bot.db.fetch(`prefix_${message.guild.id}`)

lapis ocean
#

I='ve never made a bot, and I almost finished mine in 1 day

astral yoke
#

Why dosent it work when I add let prefix = bot.db.fetch(`prefix_${message.guild.id}`) ? prefix: "db!"

lapis ocean
#

Just missing this one part

astral yoke
#

it says prefix is not defined

lyric mountain
#

What you're trying to do is not something a beginner would be able to

lapis ocean
#

I miss mostly the low level stuff

lyric mountain
#

Errr

#

Low level is actually harder

astral yoke
#

the thing is is that it works with this let status = bot.db.fetch(`status`) ? status: "none"

lyric mountain
#

Low level means that you're closer to the hardware

astral yoke
#

but not this let prefix = bot.db.fetch(`prefix_${message.guild.id}`) ? prefix: "db!"

lapis ocean
#

Yes, hence why i can't do it

#

Or at least have a problem with

#

At least right now, because I need to get myself lost in documentation again

lyric mountain
#

Just focus on other features for your bot, and try to always use new things

#

This way you'll grow with your bot

lapis ocean
#

I really need this, it's the onlyu reason I got into building a bot

abstract crow
#

Honestly I would watch some TheSourceCode tutorials on D.JS. Both old or new are pretty good. It'll give you the basics of everything

lapis ocean
#

I didn't want a bot for my server really.

#

I mean, I didn't bother with at least.

abstract crow
#

I mean either did I when I started, but that's how I learned

lapis ocean
#

But I needed this feature, because I didn't find a better way to onboard members

lyric mountain
#

Always start with the classic hello world

#

Then go to 8ball

#

Then to choose

abstract crow
#

With all do respect, no one is gonna invite a bot that barely has any decent features. You gotta learn the basics first, then you can get to the advanced stuff where people will invite the bot

lyric mountain
#

Then start using some kind of db

abstract crow
#

^^

lyric mountain
#

And make servers configurable

abstract crow
#

Yeah. You just gotta start small

lapis ocean
#

I don't really want people to invite the bot.

abstract crow
#

Then how is it gonna be on other's servers?

lapis ocean
#

I can make it open source if people want to use my solution

abstract crow
#

Private invite?

lyric mountain
#

Then start making some complex code, like slots game, prune command, etc

astral yoke
#

im sorry but am i in the right chat

#

yes

#

so i need help

#

how come this works

#

let status = bot.db.fetch(`status`) ? status: "none"

#

but this dosent

#

let prefix = bot.db.fetch(`prefix_${message.guild.id}`) ? prefix: "db!"

#

saying (node:19033) UnhandledPromiseRejectionWarning: ReferenceError: prefix is not defined

lapis ocean
#

Ok, just help me get the logic for this then

lyric mountain
#

Because that's wrong

#

Like, really wrong

lapis ocean
#

guildMember.roles.set(['391156570408615936']) I need to get the ROle ID

#

I got that part

lapis ocean
#

And then where does the UserID fit into the syntax?

lyric mountain
#

@astral yoke you're giving the prefix value to prefix itself

#

You can't do that

#

You can't prefix = prefix

astral yoke
#

so what should i do?

abstract crow
#

@lapis ocean You would probably do something like .get(userID)

lyric mountain
#

Idk, you haven't given us enough code

astral yoke
#

let prefix = bot.db.fetch(`prefix_${message.guild.id}`) ? prefix: "db!" let status = bot.db.fetch(`status`) ? status: "none" message.channel.send(`Howdy there. The prefix here is \`${prefix}\` \n \n Owners note is \`${status}n\`. *If null then no note.*`)

bleak agate
#

heya, i'm new here but would someone be able to help me with a kinda extraneous issue i've been bugfixing for a few hours now?

lyric mountain
#

Oh my

astral yoke
#

thats what im doing it for

abstract crow
#

condition ? exprIfTrue : exprIfFalse

lapis ocean
#

Maybe I will scratch my whole bot if Oauth can redirect to a link with query strings

#

I mean, the whole part where it generates the link

lyric mountain
#

@lapis ocean message.guild.members.cache.get(userid).roles.add...

#

Iirc

abstract crow
#

Hey quick question Kuu. Does if (!message.member && message.guild) message.member = await message.guild.fetchMember(message); account for caching or nah?

#

It was in a tut since I'm starting to switch over to v12

lyric mountain
#

I don't think so

#

There's a cache layer now between guild and get

lapis ocean
#

So .add would be better than .set I guess @lyric mountain

#

Because set would remove the other non mentioned roles

lyric mountain
#

Probably, see if djs has an add

lapis ocean
#

As far as I can interpret from the syntax and the documentation

#

Ah, you don't know!

#

So you use Python right?

lyric mountain
#

No, I'm a java dev

abstract crow
#

Ahh java boi

lyric mountain
#

That happens to code in js

lapis ocean
#

Ah.

abstract crow
#

.add does work 🙂

#

That tells you everything about it. .add(roleID). ID otherwise known as a snowflake iirc

lyric mountain
#

Yrp

#

Snowflake, aka unique object

lapis ocean
#

Thank you for the link @abstract crow

bleak agate
#

is it possible to run a discord bot app inside of an existing node process? i've been trying to run a discord bot inside of my existing js web game's server but it provides an error every time

abstract crow
#

Np! The docs are pretty nice actually

#

Like compared to other's I like it

sudden geyser
#

what is the error

bleak agate
#

but it functions fine if i run it on its own

#

sec

lyric mountain
#

@bleak agate you can, but I'd recommend doing the other way around

bleak agate
#
/root/server/node_modules/discord.js/src/util/Util.js:32
    );
    ^
SyntaxError: Unexpected token )
    at Object.exports.runInThisContext (vm.js:78:16)
    at Module._compile (module.js:543:28)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/root/server/node_modules/discord.js/src/index.js:3:14)
    at Module._compile (module.js:571:32)
lyric mountain
#

Ah

sudden geyser
#

what's your nodejs version

bleak agate
#

14

#

er

#

12.16.3*

abstract crow
#

No he put an extra ) somewhere

bleak agate
#

this isn't my code

lyric mountain
#

What IDE do you use?

lapis ocean
#

@abstract crow The only reason I am using DJS is because I was told the documentation is superior to Py, so I came here, Python is way easier for me

lyric mountain
#

@bleak agate wait

abstract crow
#

Mistake 1 - Use your own code

lyric mountain
#

Wasn't it your game

lapis ocean
#

Not even a developer at all here though

bleak agate
#

like, it's reporting this error inside the discord.js module util.js

abstract crow
#

@lapis ocean Yep. Python docs are absolute shit imo for discord

lyric mountain
#

It's not @bleak agate

abstract crow
#

D.JS is waaaaaay better in terms of the documentation. In terms of functionality I have no comment, but the docs are better here

sudden geyser
#

I mean if you go to the file you find this: js props = Object.assign( ...Object.keys(obj) .filter(k => !k.startsWith('_')) .map(k => ({ [k]: true })), ...props, );

#

and that looks fine but it's not

lyric mountain
#

If you're good with python go with python

abstract crow
#

That too. Depends on how good you are

lyric mountain
#

JDA has absolutely NO documentation

#

Yet ctrl + space teaches almost everything you need

#

Python is a compiled lang

distant plank
#

Someone to help me, I'm really confused

if(actual >= ammount && user_cache.missions && !user_cache.missions.includes(key))                

I'm doing a mission system, and I need that when 'actual' is equal to or greater than 'ammount' and 'user_cache.missions' doesn't have the mission name, accept the mission, but I need to put 'user_cache.missions' before so that I don't make a mistake with the includes when it's empty, but I don't know how to put it to accept the mission :c
I don't know how to explain xd

bleak agate
#

@sudden geyser it isn't fine?

#

what's wrong about it

sudden geyser
#

JDA has no documentation?

lyric mountain
#

Nope

#

It does have javadocs

#

But those can't be considered documentation

#

Since they are unreadable on their own

sudden geyser
#

I mean sort of counts OhISatania

lyric mountain
#

Not at all if you compare do djs

#

@distant plank that's very confuse

distant plank
#

@lyric mountain i know

lyric mountain
#

Sorry but I must ask

#

Is that code yours?

abstract crow
#

If it is, I'm sure we all have copied before. I'll be the first to admit I have. But it's a bad habit

#

Snippets are completely fine, but copying lot's of code is just a no no

lyric mountain
#

But about the question, just do user_cache.missions.push(mission)

#

Push will add the mission to the array

#

If it's an array

#

Else use .assign(someid, mission)

distant plank
#

If i put
user_cache.missions
if the user has not made any mission, take the false statement
If i put
!user_cache.missions
It passes to the next one that would be "user_cache.missions.includes(key)", but if user_cache.missions is empty, it returns an error, undefined

lyric mountain
#

Yep

#

That's cuz user_cache can be undefined

distant plank
#

@lyric mountain Mission is only added when completed

lyric mountain
#

What's the issue?

distant plank
#

I can't push nothing if is not completed

lyric mountain
#

So just create it then

distant plank
#

What?

#

:c

lyric mountain
#

I still don't get the issue

#

Just check if it isn't completed

#

if (completed)

distant plank
#

If(completed)
It would be the same as
if(actual >= ammount)

midnight blaze
#

^^

abstract crow
#

So then what is the issue

distant plank
#

But I need to verify that the mission is not in the array so that it does not duplicate

lyric mountain
#

Ahhh, now we have a real issue

#

You could've said it earlier

abstract crow
#

^^^^

lyric mountain
#

Just cascade two ifs

distant plank
#

To verify that, i have
user_cache.missions.includes(key)

#

but

#

if user_cache.missions is empty. Return error

#

For undefined

lyric mountain
#

That bit of code you've shown us will work

distant plank
#

And... For it i have
user_cache.missions
Before
But.........
If user_cache.missions is empty, I take the statement as false

lyric mountain
#

If (actual >= amount && (user_cache.missions && ! user_cache.missions.includes(key)) do stuff

distant plank
#

I will try xd

lyric mountain
#

That's your own code

#

I just put the latter check inside parentheses

distant plank
#

I added the missing ")"

lyric mountain
#

That code will only run if:
Mission is complete AND
missions doesn't include the mission

#

Your logic is right

#

Gotta sleep now, I'll leave the rest for u @abstract crow

distant plank
#

:)

#

I will try

#

xD

#

For second time

#

@lyric mountain doesn't work 😭😭😭

#

I have the same problem

#

client_cache.missions
If missions is empty, makes the statement false

lofty urchin
#

How can I bring users badges

earnest phoenix
#

message.author.flags.toArray() maybe

#

Whats your djs version?

lofty urchin
#

11.6.4

distant plank
#

@lyric mountain suddenly my mind cleared and I got a very simple solution xd

if (actual >= ammount && (!user_cache.missions || !user_cache.missions.includes(key)))
#

@lyric mountain thanks for help me

lofty urchin
#

msg.author.flags.serialize();
do you think it will work

#

@earnest phoenix

earnest phoenix
#

¯\_(ツ)_/¯

#

message.author.flags.toArray() maybe
its worked?

lofty urchin
#

im testing

astral yoke
#

how come this dosent work

#

.addField("> Status", member.game ? member.game.name : "None")

earnest phoenix
astral yoke
#

it dosent error but it dosent get my status

#

it shows it as none even though one, it's on google chrome, and two my status is coding

lofty urchin
#

can you send me an eval code?

astral yoke
#

him?

#

who?

lofty urchin
#

bae

earnest phoenix
#

message.author.flags.toArray() maybe
Just this ^

#

You need the update

#

To 12

lofty urchin
#

hmm

#

There are nearly 300 codes

#

🙂

earnest phoenix
#

¯\_(ツ)_/¯

astral yoke
#

bae

#

can you help me

earnest phoenix
#

No

#

Sorry bye

astral yoke
#

oh ok

#

bye lmao

earnest phoenix
#

(╯°□°)╯︵ ┻━┻

lofty urchin
#

what you wanna do

#

scltxn

astral yoke
#

im trying to make it show the members status

#

so if i have the status of coding

#

which i do

#

it would show it

pale vessel
#

are you on v11

astral yoke
#

mhm

lofty urchin
astral yoke
#

ik ik

#

its v 11 i get it

pale vessel
astral yoke
#

im not bout to spend a few hours at 9 switching it though ill do it tomorrow or sum

#

ty

violet nimbus
#

How can i customise background of my bot page? Can i have an example?

clear island
bleak agate
#
/root/server/node_modules/discord.js/src/util/Util.js:32
    );
    ^
SyntaxError: Unexpected token )
    at Object.exports.runInThisContext (vm.js:78:16)
    at Module._compile (module.js:543:28)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/root/server/node_modules/discord.js/src/index.js:3:14)
    at Module._compile (module.js:571:32)
#

has anyone had an error like this before

violet nimbus
#

@bleak agate i think yiu have an extra ");"

bleak agate
#

this isn't my code, this is in discord js's modules

violet nimbus
#

Ohh?

#

How can i customise background of my bot page? Can i have an example?

#

@earnest phoenix pls help

#

I thought its nothing

earnest phoenix
#

Hi there

#

can anyone help me with a problem

violet nimbus
#

What problem?

earnest phoenix
#

i did npm init but it shows error in visual studio

#
operable program. Check the spelling of the name, or if a path was included, verify that the 
path is correct and try again.
At line:1 char:1
+ npm init
+ ~~~
    + CategoryInfo          : ObjectNotFound: (npm:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
#

@violet nimbus help your indian brother xD

violet nimbus
earnest phoenix
#

should i download lts

#

or current

wheat jolt
#

lts

#

why not lts

earnest phoenix
#

alexander

#

i did lts

wheat jolt
#

me

earnest phoenix
#

now npm init worked but

#

it asks for name

#

and description and all

#

and in the video, that guy got that automatically

#

how

lofty urchin
#

@earnest phoenix

#

tx bro

hazy sparrow
#

when i try t add my bot to my server its showing this

lofty urchin
#

i update v11 to v12

hazy sparrow
lofty urchin
#

pls add your site

hazy sparrow
#

in the redirect option?

earnest phoenix
#

Np @lofty urchin

lofty urchin
#

or

#

disable this

#

bow pro

earnest phoenix
#

hi

#

can someone help me after index.js thing

hazy sparrow
#

thanks

earnest phoenix
#

in video it said

#

put

#

const Discord = require(discord.js):

const client = new client(disableEveryone): true

#

but its not working or i am doing wrong

#

oh dont watch videos about coding in discordjs

#

oh

#

then what to do

#

these are outdated on most occasions

#

oh shit

#

can you help me

#

hey can anyone tell me nekos life hug,kiss and pat endpoints are considered as nsfw?

#

hug and pat is sfw

#

@earnest phoenix because they can deliver nsfw images of minors, which is against tos

#

Hope do you know?

#

Okay

#

i am stuck here

#

@earnest phoenix i actually have never really worked on discorjs myself, i always stood with java and javacord instead of javascript

#

should i learn that instead?

#

cause its my first day

#

i can change early

#

its up to you what you want to learn

#

how can i decide

#

Use a language that is beginner friendly

#

i dont know any of these

#

bruh

#

see

#

its not useful

#

its actually more useful than i am, and thats a fact

#

hmm

#

cant i hire someone to teach me?

#

fiverr?

#

yeah you can hire people on freelancer and fiverr ofc

#

what should i search

#

why r these so cheap lol

#

^

#

so you expect someone to pay 797$ to learn coding just for discord bot?

#

inst that very costly

lofty urchin
#

help pls

earnest phoenix
#

theres people who would actually do that, learning javascript could be useful in a job career

#

@lofty urchin read the first line

#

show us your code

lofty urchin
#

here is line

earnest phoenix
#

what's your node version?

lofty urchin
#

v12

earnest phoenix
#

and Discord.js v12 right?

lofty urchin
#

yep

earnest phoenix
#

that was an issue back then with d.js v12 and node below v12

lofty urchin
#

I just updated from v11

earnest phoenix
#

no idea why it doesn't work for you, updating nodejs should do the trick

#

that's your d.js version, not your node version @lofty urchin

#

d.js v12 requires node v12+

#

^

lofty urchin
#

hmm

distant plank
#

How can I make an xp system by message, without raising the ping for calling mysql so many times

earnest phoenix
#

yep time to update node

#

make it so your users can gain xp every n amount of minutes/seconds after sending the message

copper fog
#

Anyone know what's wrong?

			channel = bot.get_channel(709368750230601752)
			role = await message.guild.create_role(name="{}'s Table Key Access".format(message.author.name))
			await message.author.add_roles(role)
			permissions = {role: discord.PermissionOverwrite(read_messages=True), message.guild.default_role: discord.PermissionOverwrite(read_messages=False)}
			table = await channel.create_text_channel(message.author.name + "-table", overwrite=permissions)
			await message.delete()

Things work properly, The message got deleted and create a new text channel, the everyone got overwrited to the text channel, but not the newly created role, why does this happen?

#

I'm also in python if you can't tell.

lofty urchin
median agate
#

see?????

earnest phoenix
#

?

#

What are you trying to do @median agate

#

@craggy pine can you delete this?

craggy pine
#

Its handled already.

#

Ah didnt see the link mb

earnest phoenix
#

thanks GWnekomakiPats

copper fog
#

I need help sijdifhdkghidfh .v,ngMItsp

pale vessel
#

then say what you need help with

#

sd;ofjodfdfd;fldfljkdf

earnest phoenix
#

you gotta wait for someone who uses python too

#

is it possible to make my bot edit an embedded message

#

again you could use javascript

#

what would that even be used for

#

Well once you actually get to use JavaScript on your bot page, you can do anything

#

I don't exactly know howy but you could

#

Only for certified developers though

#

does anyone know how I edit an embed

cinder patio
#

in which library

earnest phoenix
#

Just edit the message like you would normally do, though using the embed like you would in sending a message

#

If you're talking abou js

cinder patio
#

You would get the embed from the message (message.embeds[0]) and then copy it (new MessageEmbed(embed)) then make your changes and then edit it (message.edit(theNewMessageEmbed))

violet nimbus
#

How can i change background of my bot page? can someone give example?

#

Huh?

earnest phoenix
#

yep and

#

@violet nimbus Inspect element is your friend

distant plank
#

@violet nimbus Which one do you mean xD

earnest phoenix
#

@burnt pecan show us whats wrong

burnt pecan
#

hero.moveRight()
hero.moveDown()
hero.attack("Weak Door")
hero.attack("Weak Door")

Defeat the guard, named "Two".

hero.moveRight(2)
hero.moveDown(1)

hero.moveDown()
hero.moveRight()

hero.attack("Two")
hero.attack("Two")
hero.attack("Two")
hero.attack("Two")
hero.attack("Two")

Get the gem.

hero.moveDown()

#

it says it wont work

earnest phoenix
#

what does the error say?

burnt pecan
#

it says

#

no error

#

it just like

#

wont work

earnest phoenix
#

can you show us the whole code?

#

or is that the whole code?

tight forum
#

uh

#

what is that weirdsip

burnt pecan
#

that is

earnest phoenix
#

someone learning python

#

it should show some kind of error though

burnt pecan
#

it only says

#

heros must survive

cinder patio
#

maybe your hero dies

burnt pecan
#

like

#

it does but ive done all the code like correctly

cinder patio
#

The code itself may be correct, but the logic isn't

earnest phoenix
#

your hero is attacking a too strong enemy, you should try to avoid these enemies with your code

#

with so called if statements

#

for example this is on their docs as an example

#
if enemy.type == "munchkin":
    hero.attack(enemy)
elif enemy.type == "burl":
    hero.say("I don't think it's a good idea")
burnt pecan
#

ok i did it

nimble hazel
#

I created a Multi-Page Help Command, it works fine apart from the fact that you need to remove your reaction manually before reacting again to change the page. Heres the code:https://pastebin.com/Use1dTJc.

earnest phoenix
#

oh god

#

oh that's nasty

nimble hazel
#

what

earnest phoenix
#

oh god definitely

#

the pages

#

you definitely gotta clean that up

#

static help commands are disgusting

nimble hazel
#

yea, i havent got to that part yet

earnest phoenix
#

make that dynamic

nimble hazel
#

okay

midnight blaze
#

@earnest phoenix u know codecombat as well?

#

O:

#

nice

earnest phoenix
#

i dont

#

i'm just able to understand documentations quite fast

midnight blaze
#

ok, u are good^^ didnt even think u would spend time to read the documenation$

earnest phoenix
#

give me any random programming language docs and i should be able to understand it on a smaller basic level

nimble hazel
#

@earnest phoenix How can I start with making a Dynamic help command? Is that by using arguments?

earnest phoenix
#

i dont code in js, i code in java GWowoHehe

nimble hazel
#

okay

earnest phoenix
#

you gotta ask someone who codes d.js bots

nimble hazel
#

kk

midnight blaze
#

the last thing I was doing

#

sadly it is in es5 :>

#

oh damn, picture is really small

hardy bough
#

es5 boomer

midnight blaze
#

nostalgia

#

not sure if picture is still small$

#

but yeah

tight plinth
#

this error only happens with loop enabled

hardy bough
#

Which framework/language

tight plinth
#

eris

#

ytdl

#

here is my loop code (0=no loop,1=loop current song,2=loop queue)

burnt pecan
#

this code sucks

carmine echo
#

does anyone know why this doesn't match? lookarounds have never worked for me, idk what im doing wrong

burnt pecan
#

hero.moveUp()
while True:
hero.attack(¨Door¨)

#

whats wrong with it

tight plinth
#

@carmine echo it doesnt coz of the !

#

@burnt pecan whats this

burnt pecan
#

a code

midnight blaze
#

codecombat code^^

burnt pecan
#

yeah

midnight blaze
#

look, it isnt wrong, but u have to include the error

marble juniper
#

@tight plinth its le python

carmine echo
#

@tight plinth wym because of the !

tight plinth
#

<#!

#

@marble juniper o

carmine echo
#

but there's a question mark after it

#

meaning 0 or 1

#

Here. i moved it to the right, but the IDs are still not matched

hardy bough
#

What does ?= do

burnt pecan
carmine echo
#

It's a positive lookahead

midnight blaze
#

@burnt pecan just make a complete screenshot, then I could tell you

#

it depends what kind of map it is

carmine echo
#

wait it only works when it's after

#

what a scam

#

apparently js doesn't support lookbehinds

burnt pecan
midnight blaze
#

try to delete the first line

burnt pecan
#

ok

carmine echo
#

i think the indentation is somehow bad. is it 4 spaces or is it a tab?

#

because that's what the linter highlights

#

you should try hovering your mouse cursor over the exclamation mark

#

it may tell you something useful

violet nimbus
#

How to change background color of bot page kn top.gg? My css isn't working? And it shows in description

earnest phoenix
#

Dont use "

#

@violet nimbus show us your long description

#

or send me the bot page really quick

#

nvm got it myself

violet nimbus
#

Hmm

earnest phoenix
#

can you send a screenshot of your description?

violet nimbus
#

Wait

midnight blaze
#

I can not see if he is using " " or

violet nimbus
#

And how to change main bg colot?

burnt pecan
#

it dosnt

midnight blaze
#

can u link me the level?

#

I have an account, i can see it

earnest phoenix
#

@violet nimbus you obviously gotta put something in there

#

dont use the "

violet nimbus
#

But how to chante whole?

midnight blaze
#

he has to, door is a string

earnest phoenix
#

@violet nimbus use inspect element to find the correct classes

midnight blaze
#

like munchkin

violet nimbus
#

I did

#

So i have ti put whole css in style tag right?

earnest phoenix
#

yeah

violet nimbus
#

to*

#

Ok

#

Ty

burnt pecan
#

uhm idk how to link the levels

midnight blaze
#

yeah,like that for example

#

@burnt pecan copy the url

#

and give it to me

burnt pecan
#

im going to lose my mind

#

@midnight blaze in ur dms

earnest phoenix
#

you can send it in here, its alright

tight plinth
earnest phoenix
#

i wanna check it too

burnt pecan
earnest phoenix
#

lol even i am lost

#

it wants me to attack the door but theres no attack method

midnight blaze
#

yeah,beacuse

#

your hero doesnt have that function yet

#

u need to make all the levels

earnest phoenix
#

ohhhhhhh

midnight blaze
#
# Attack the door!
# It will take many hits, so use a "while-true" loop.


while True:
    hero.attack("Door")
    
tight plinth
#

is there any way to prevent the Error: input stream: Error parsing config: Unexpected token ; in JSON at position XXXXX with ytdl?

midnight blaze
#

that is the working code

tight plinth
#

and I guess my eris skip command is just js //code serverQueue.connection.emit('end') //code?

cinder patio
#

you can try...catch it

burnt pecan
#

ok ima end it there for tonight on the codeing game

midnight blaze
#

hey, but u learned a lot already^^

#

but I wouldnt learn python

burnt pecan
#

Yes yes i did

midnight blaze
#

javascript is better

burnt pecan
#

oh

#

i think python is easier

midnight blaze
#

I would start from zero because u are at the start

earnest phoenix
#

again, its up to the developer and what they're more comfortable with

tight plinth
burnt pecan
#

uhm

#

loop?

earnest phoenix
#

Im too stupid for Eris GWeniSadNeko

tight plinth
#

loop yea

burnt pecan
#

delete loop

tight plinth
#

works one time or two and then fucks itself

#

it works

#

on discord.js

burnt pecan
#

´´delete loop´´

tight plinth
#

also happens without

burnt pecan
#

delete loop

#

now

abstract crow
#

What does everyone use when they make a website bot dashboard? Not really everyone but to the people that do make dashboards I guess

burnt pecan
#

dashboards?

abstract crow
#

Yeah like mee6, dyno

midnight blaze
#

on top.gg or you mean a different webpage?

abstract crow
#

I’ve used react before

cinder patio
#

I use express usually

midnight blaze
#

I use express as well

cinder patio
#

and react client-side

midnight blaze
#

very easy

abstract crow
#

Ah gotcha. Yeah I was trying react a while ago and it just got tricky with everything

cinder patio
#

idk my code gets messy

#

with react

abstract crow
#

Yep

#

That’s why I kinda stopped using it because it just got way to messy

burnt pecan
#

...

#

me bot

midnight blaze
#

you bot

burnt pecan
#

yes

cinder patio
#

I mean, doing things without react would still be way messier

burnt pecan
#

i am

cinder patio
#

but I feel like I am not doing some things the way they should be done

abstract crow
#

Gotcha. I’ll have to look into it more then

burnt pecan
midnight blaze
#

yeah, that is an online idle/ programming editor-

#

I showd that to u^^ I think it is quite nice for a beginner to work with it

burnt pecan
#

yes it very much is

#

also what are some things to use for a discord bot like commands

midnight blaze
#

most people use discord.js . that is why it would be good for you if u play the game a little bit more and learn some basic javascript syntax

#

then u can start with the discord bot guide on discord.js

#

to create a bot

tight plinth
#

not solved

mossy vine
#

@midnight blaze creating a bot as your first programming project is a horrible idea

midnight blaze
#

I dont say it is a good idea, but that person wants to do it

burnt pecan
#

yeah

midnight blaze
#

I am just telling him that he should at least learn some javascript before starting, but yeah

burnt pecan
#

i like alot of python

midnight blaze
#

creating bots without programming knowlegde is not a good idea

burnt pecan
#

it seems easier

tight plinth
#

should I switch to lavalink

burnt pecan
#

python

midnight blaze
#

@burnt pecan trust me it is not, you will regret it

hasty eagle
#

.

midnight blaze
#

@burnt pecan this is the javascript version of your level

#

does it really look soo much harder?

burnt pecan
#

yes

midnight blaze
burnt pecan
midnight blaze
#

well, have fun with python, but one day u will regrett it :>

burnt pecan
#

ive already tried java

midnight blaze
#

java has nothing to do with javascript

#

java and javascript are completly different

burnt pecan
#

i say java as in javascript

midnight blaze
#

ok ok 🙂 good luck!

cinder patio
#

That's like just saying script

sullen night
#

guys, is it possible to update only a single file in heroku?

#

without updating the whole directory?

#

I have json libraries on the host server. I dont wanna change the jason files

indigo pond
#

How can I get developer

#

?

burnt pecan
#

idk

#

fiverr

mossy vine
#

@indigo pond what

indigo pond
#

Oh shoot

mossy vine
#

do you want someone to make a bot for you?

indigo pond
#

Yeah

#

Invite manager

#

Hah

mossy vine
#

do you want to use the invite manager bot?

indigo pond
#

Yes

#

And?

#

And one more question

mossy vine
indigo pond
#

How can I get discord nitro?

#

Thanks

mossy vine
#

you buy it

sullen night
#

Can I update my bot codes on heroku without destroying my json libraries?

burnt pecan
#

idk

indigo pond
#

For free

#

?

mossy vine
#

no

indigo pond
#

Maybe

mossy vine
#

you cant get nitro for free

indigo pond
#

Giveaways

#

?

#

No?

mossy vine
#

if you know giveaways exist why are you asking

indigo pond
#

Ты русский?

mossy vine
#

what

indigo pond
#

Nothing

sullen night
#

Ты русский?
@indigo pond I'm not russian

indigo pond
#

ᴀᴀᴀᴀᴀᴀ

sullen night
#

I need help guys

indigo pond
#

Translator

mossy vine
#

they werent talking to you lul

indigo pond
#

Haha haha

earnest phoenix
#

@sullen night dont ask2ask

sullen night
#

i asked several times actually

indigo pond
#

Cyber

sullen night
#

i want to update only the bot.py file in heroku

modest maple
sullen night
#

without destroying the existing json libraries there

indigo pond
#

@mossy vine

#

I can't add it to the server

sullen night
#

I need help 🥺🥺

#

anybody?

#

@earnest phoenix

queen needle
#
if (message.content.startsWith(prefix + "test")) {
   let a = 11;
    let card = [2, 3, 4, 5, 6, 7, 8, 9, 10, a];
    let playerCard = card[Math.floor(Math.random() * card.length)];
    let botCard = card[Math.floor(Math.random() * card.length)];

    const filter = (reaction, user) => {
        return ['👍', '👎'].includes(reaction.emoji.name) && user.id === message.author.id;
    };

    //reacting
    message.channel.send(`Your cards: ${playerCard}\n Bot's cards: ${botCard}`).then(msg => {
        msg.react('👍').then(() => msg.react('👎')).then(() => msg.awaitReactions(filter, { max: 1, time: 60000, errors: ['time'] })
            .then(collected => {
                const reaction = collected.first();

                if (reaction.emoji.name === '👍') {
                    playerCard += playerCard
                    if (playerCard > 21) return message.channel.send(`Your cards: ${playerCard}\nBot cards: ${botCard}\n **You lost**`);
                    msg.edit(`Your cards: ${playerCard}\nBot cards: ${botCard}`)
                } else {
                    botCard += botCard
                    if (botCard > 21) return message.channel.send(`Your cards: ${playerCard}\nBot cards: ${botCard}\n **You win**`);
                    message.channel.send(`You decided to stay\nYour cards: ${playerCard}\nBot's cards: ${botCard}`)
                }
            })
            .catch(collected => {
                message.reply('you reacted with neither a thumbs up, nor a thumbs down.');
            }))

    })
  }```
#

when i hit it edits but if i hit again it doesnt

earnest phoenix
#

@indigo pond by buying it lol

earnest phoenix
#

error

Unexpected string in JSON at position 1168

code:

let db = JSON.parse(fs.readFileSync("./database.json", "utf8"));
mossy vine
#

congrats you fucked up your db

earnest phoenix
#

how?

#

i didn't do anything

cinder patio
#

json db 🤡

mossy vine
#

you dont need to do anything to fuck it up

#

thats why you shouldnt use it

earnest phoenix
#

And how can i solve it ?

mossy vine
#

you cant

#

unless you can figure out what went wrong in position 1168

cinder patio
#

you can by using a proper database

quartz kindle
#

what do you want to convert?

#

you dont need a converter for that

fading flicker
#

i want help

honest perch
#

dont ask to ask

#

just ask the question

fading flicker
#

k

#

im not good in english so i want add bot in top.gg

honest perch
earnest phoenix
#

ye

fading flicker
#

i know

#

but

earnest phoenix
#

then put it in

fading flicker
#

I do not understand the questions

still merlin
marble juniper
#

not really

tight plinth
#

no

#

why should it be

#

but for a kick command it's better sending one error message instead of two

earnest phoenix
#

it's bad practice

#

yeah

#

send one message

#

or merge the two errors into one message

tight plinth
#

make sure you put a return before each message.channel.send

earnest phoenix
#
bot.on("guildMemberRemove", member => {
  
  const db = require("quick.db")
  let chx = db.get(`leavechhannel_${member.guild.id}`); 
     let leavechannel = member.guild.channels.get(chx);
    console.log(chx, leavechannel)
  
  if(chx === null) { 
    return;
  }

    const defaultmsg = new Discord.RichEmbed()
  .setThumbnail(member.user.displayAvatarURL)
  .setAuthor(`${member.user.username}`, member.user.displayAvatarURL)
  .setColor("#800080")
  .setTitle("**_Un membru tocmai a parasit serverul!_**", member.user.displayAvatarURL)
  .setDescription(`:wave: -> ${member.user.username} a parasit serverul **_${member.guild.name}_**!\n:wave: -> Speram ca se va intoarce!`)
  .addField("User ID", `${member.id}`, true)
  .addField("User Name",`${member.user.username}`, true)
  .addField("Total Users", `${member.guild.memberCount}`, true)
  .setFooter(`${member.guild.name}`, member.guild.iconURL);
    
    leavechannel.send(defaultmsg);  
  
})

any idea why my leavemessage doesn;t work ?

#

debug your code

#

try catch for exceptions

#

inspect your variables

hardy bough
#

No RichEmbed in v12

#

Use MessageEmbed instead

slender thistle
#

How would Console.ReadLine return null in C#? thinkW

#

Oh, ^Z returns null

nocturne grove
signal acorn
#

hey can someone tell me how can i link my bot to my Game's server?

earnest phoenix
#

either establish a ws connection between your bot's process and your game's servers or integrate your bot in the game servers themselves

signal acorn
#

ws?

#

connection/

earnest phoenix
#

websocket

signal acorn
#

ty 🙂

earnest phoenix
#

obviously you'd need to secure it with an api key and a wss connection

viscid goblet
storm bluff
#

how can i get user avatar ejs
<%= user.avatarURL()%>

earnest phoenix
#

how i can get admin perm like true or false?

tight plinth
#

?

pale vessel
#

what library

#

read docs

earnest phoenix
#

js

#

11v

pale vessel
#

11 volts?

#

try upping it to 12v

tight plinth
#

how i can get admin perm like true or false?
@earnest phoenix I dont understand

pale vessel
#

administrator permission Boolean thingy

earnest phoenix
#

yes

tight plinth
#

ah

pale vessel
#

basically permissions#has

earnest phoenix
#

oh :v

#

ty

tight plinth
#

(he'll literally try to run permissions#has)

#

(im sure)

pale vessel
#

wouldn't be surprising since he has 11 volts of library

tight plinth
#

lol

earnest phoenix
#
oldRole.hasPermission("ADMINISTRATOR");

this is ok?

tight plinth
pale vessel
#

won't really work lmao

#

idk actually

#

let me check

#

it works

earnest phoenix
#

dont work

pale vessel
#

lol

tight plinth
#

what is oldrole

earnest phoenix
#

wait me

pale vessel
#

probably an event

earnest phoenix
#

wait

#

work xd

#

i put oldRole not newRole

#

thx :v

rich coral
#

What are the websites to learn coding again?

earnest phoenix
#
newRole.hasPermission('VIEW_AUDIT_LOG') 

dont work ;c

copper cradle
#
#

read the docs

earnest phoenix
#

me?

copper cradle
#

and what do you mean it doesn't work

#

show your code

#

yes

lyric mountain
#

no, noah

earnest phoenix
#

code : ```js
module.exports.run = async(client, message, args) => {
if(message.member.hasPermission("ADMINISTRATOR")) {
let target = message.mentions.users.first()
if(!target) {
const userembed = new Discord.RichEmbed()
.setDescription(":no_entry_sign: Specifica o persoana!")
}

let fetched = db.fetch(`blacklist_${message.guild.id}_${target.id}`)


error :

```Cannot read property 'id' of undefined```
forest mirage
earnest phoenix
#
 if (newRole.hasPermission('VIEW_AUDIT_LOG') !== oldRole.hasPermission('VIEW_AUDIT_LOG')) {embed.addField("Registro de auditoria", newRole.hasPermission("VIEW_AUDIT_LOG"))}; 

with the perm ADMINISTRATOR work

copper cradle
#

omfg

#

what are you even trying to do

#

like

earnest phoenix
#

roleUpdate perms xd

lyric mountain
#

wouldn't that be MANAGE_ROLES perm?

copper cradle
#

first

lyric mountain
#

like, 99.999999% of server owners will NOT give admin perm to anyone

copper cradle
#

what do you mean by it doesn't work

#

what happens and what doesn't happen

#

not 99.99999% of them

earnest phoenix
#

wait a second

copper cradle
#

just the smart ones

earnest phoenix
copper cradle
#

oh and

#

the if statement is wrong

earnest phoenix
#

mmm

copper cradle
#

if (newRole.hasPermission('VIEW_AUDIT_LOG') && oldRole.hasPermission('VIEW_AUDIT_LOG'))

earnest phoenix
#

&& what?

#

why &&?

copper cradle
#

bc if oldRole has the perm it'll be true and if nesRole also has it then it should be true and you're checking if they're not equal so you're basically doing: if (true !== true)

#

which is false

lyric mountain
#

HOW TO ASK FOR HELP TEMPLATE

+ BUG: Simon falls off his horse
+ LIBRARY: Simon.js v13
-------------------
+ STEPS TO REPRODUCE:
1 - Run "Simons stays on his horse" code
2 - Use "s!rideonhorse" command
3 - Simon falls off his horse
-------------------
+ EXPECTED RESULT: Simon rides on his horse
- ACTUAL RESULT: Simon falls off his horse
-------------------
+ CURRENT CODE:
if (isSimonOnHorse) {
  Simon.fallOffHorse();
  Simon.rideHorse();
}
copper cradle
#

&& is the and operator

earnest phoenix
#

i know

copper cradle
#

if this is true && (and) this is also true

lyric mountain
#

a mod could pin that

copper cradle
#

but negate the right side of the &&

#

add a ! before the statement on the right of the &&

earnest phoenix
#

dont work

#

work with !==

#

How can i only block discord blue links?

pale vessel
#

wdym

earnest phoenix
#

Like
How can i find if a valid link was sent

#

A blue one

lyric mountain
#

regex

earnest phoenix
#

idk what the regex for it is

pale vessel
#

match

#

/https?:\/\/(.+)/ Idk

lyric mountain
#

omg no lol

pale vessel
#

idk

#

Lmaooo

earnest phoenix
#

Same

#

Idk regex too much
Only 0-9 lmao

pale vessel
#

i was typing without thinking

earnest phoenix
#

Ik

lyric mountain
#

this is how I check for urls on my bot:

public static boolean findURL(String text) {
        final Pattern urlPattern = Pattern.compile(
                ".*?(?:^|[\\W])((ht|f)tp(s?)://|www\\.)(([\\w\\-]+\\.)+?([\\w\\-.~]+/?)*[\\p{Alnum}.,%_=?&#\\-+()\\[\\]*$~@!:/{};']*?)",
                Pattern.CASE_INSENSITIVE | Pattern.MULTILINE | Pattern.DOTALL);
        text = StringUtils.deleteWhitespace(text);
        text = (Extensions.checkExtension(text) ? "http://" : "") + text;
        text = text.replace("1", "i").replace("!", "i");
        text = text.replace("3", "e");
        text = text.replace("4", "a");
        text = text.replace("5", "s");
        text = text.replace("7", "t");
        text = text.replace("0", "o");
        text = text.replace("#", ".").replace("%", ".").replace("$", ".").replace("@", ".").replace("*", ".").replace("#", ".").replace("&", ".");

        final Matcher msg = urlPattern.matcher(text.toLowerCase());
        return msg.matches();
    }
#

although I must admit

royal laurel
#

what

lyric mountain
#

that's complex af

royal laurel
#

the

#

fuck

#

is

earnest phoenix
#

Wtf

royal laurel
#

that

earnest phoenix
#

Bro 😂

royal laurel
#

bruh

#

hey dude

#

umm

earnest phoenix
#

xdddddddddddddd

#

code : ```js
module.exports.run = async(client, message, args) => {
if(message.member.hasPermission("ADMINISTRATOR")) {
let target = message.mentions.users.first()
if(!target) {
const userembed = new Discord.RichEmbed()
.setDescription(":no_entry_sign: Specifica o persoana!")
}

let fetched = db.fetch(`blacklist_${message.guild.id}_${target.id}`)


error :

```Cannot read property 'id' of undefined```

Help ?
lyric mountain
#

@earnest phoenix just copy the regex part

royal laurel
#

maybe cool down on the coding

lyric mountain
#

.*?(?:^|[\\W])((ht|f)tp(s?)://|www\\.)(([\\w\\-]+\\.)+?([\\w\\-.~]+/?)*[\\p{Alnum}.,%_=?&#\\-+()\\[\\]*$~@!:/{};']*?)

royal laurel
#

AHHHHHHHHHHHHHHHHHHHHHHH

#

anyways

earnest phoenix
#

wtf

royal laurel
#

if we gloss over that

#

you can see my role command not woring

#

which is why i came here

#

can anyone help me?

earnest phoenix
#

thanks ill try that

#

and ill go learn regex myself too

robust moth
#

Give some docs for commands permission level check

pale vessel
#

what line Michael

#

show it in the codeblock

royal laurel
#
if(!args[1] == message.mentions.members.first()){message.channel.send("There must be a second argument to run this command")}
            if(args[2] == "admin")
            {
                if(member.roles.cache.has(ownerRole) || (member.roles.cache.has(adminBotRole)))
                {
                    message.mentions.members.first().roles.add(adminRole)
                }
            }
            if(args[2] == "moderator")
            {    if(member.roles.cache.has(ownerRole) || (member.roles.cache.has(adminRole) || (member.roles.cache.has(adminBotRole))))
                    {
                        message.mentions.members.first().roles.add(moderatorRole)
                    }
            }
            if(args[2] == "trial")
            {
                if(member.roles.cache.has(ownerRole) || (member.roles.cache.has(adminRole) || (member.roles.cache.has(adminBotRole) || (member.roles.cache.has.add(moderatorRole)))))
                {
                    message.mentions.members.first().roles.add(trialModRole)
                }

            }
            if(args[2] == "tester")
            {
                if(member.roles.cache.has(ownerRole) || (member.roles.cache.has(adminRole) || (member.roles.cache.has(adminBotRole) || (member.roles.cache.has.apply(moderatorRole) || (member.roles.cache.has(trialModRole))))))
                {
                    message.mentions.members.first().roles.add(testerRole)
                }
            }
#

can anyone help me?

#

lol

maiden mauve
#

yes

#

use a switch case

#

😄

royal laurel
#

i have been

lyric mountain
maiden mauve
#

There are so many of the same variable

lyric mountain
#

skip to 1:37

maiden mauve
#

there has to be a simpler solution

royal laurel
#

should i try putting all the vars in a array

#

and make a comment above it showing which are which?

maiden mauve
#

I don't even know what your trying to do but

#

gimme 1 sec

earnest phoenix
#

i tried using your regex

#
if(/[.*?(?:^|[\\W])((ht|f)tp(s?)://|www\\.)(([\\w\\-]+\\.)+?([\\w\\-.~]+/?)*[\\p{Alnum}.,%_=?&#\\-+()\\[\\]*$~@!:/{};']*?)]/)```
#

but it errors

#

Unmatched

pale vessel
#

welp

lyric mountain
#

that's because that's not how it works

pale vessel
#

no hope

earnest phoenix
#

wdym

#

thats how i used regex

royal laurel
#

im trying to make a command where if your a role for an example, moderator you can give people trial mod, member and other roles like mute @maiden mauve

lyric mountain
#

you gotta use inside a String.match() method

earnest phoenix
#

thanks

royal laurel
#

whats itay trying to do lol

pale vessel
#

language lol

lyric mountain
#

then put my regex inside /regex/g

earnest phoenix
#

what is the numbers of perms in discord?

#

then put my regex inside /regex/g
?

lyric mountain
#

so it'd be //[.*?(?:^|[\\W])((ht|f)tp(s?)://|www\\.)(([\\w\\-]+\\.)+?([\\w\\-.~]+/?)*[\\p{Alnum}.,%_=?&#\\-+()\\[\\]*$~@!:/{};']*?)]//g

earnest phoenix
#

oh

royal laurel
#

@earnest phoenix do @a role you want

lyric mountain
#

because js requires those terminations

royal laurel
#

wait

pale vessel
#

that's doesn't look like it would work

maiden mauve
#

could you assign each role a numeric value in order of its moderation power?

royal laurel
#

fuck

earnest phoenix
#

@royal laurel what? xd

pale vessel
#

// ???

lyric mountain
royal laurel
#

it didnt show up my backslash

lyric mountain
#

put that regex here

#

test it yourself

royal laurel
#

basically just put a backslash before the at symbol @earnest phoenix

#

not a forward slash

#

a backslash

earnest phoenix
#

is say like

#

23 perms

#

15 perms

#

what is the numbers of perms?

royal laurel
#

@maiden mauve wdym buy add numeric value?

earnest phoenix
#

not administrator(8)

maiden mauve
#

instead of hunting for all the roles they have

lyric mountain
#

you mean bitewise values

maiden mauve
#

just find the one that matters

royal laurel
#

yeah but like

#

i have mod roless and stuff

maiden mauve
#

I've never messed with roles/moderation code

#

but looking at that there has to be a better way

lyric mountain
#

there is

royal laurel
#

ik

#

the problem is tho

#

i dont get any feedback

#

theres no erros

#

wait

#

fuck i havent tried .catch

maiden mauve
#

if theres no errors then its doing what the code does

royal laurel
#

k

maiden mauve
#

errors will report to cmd even without a .catch

royal laurel
#

k

#

so your saying

maiden mauve
#

if the code isn't performing console log the roles functions to make sure they are the correct variables you want

royal laurel
#

i fucking drank coke and made all of that code for nothign?

maiden mauve
#

then double check djs documentation to see if your functions are what you actually want

royal laurel
#

i checked rolemanagers on the docs

lyric mountain
#

@royal laurel btw

#

don't use ==

burnt pecan
#

guys

lyric mountain
#

use ===

royal laurel
#

why

burnt pecan
#

would u call someone who had their bot premade but u went in and fixed everything to you liking not a bot?

maiden mauve
#

strict vs non strict

lyric mountain
#

because if you do "123" == 123 it'll return true

burnt pecan
#

your*

maiden mauve
#

== will let garbage go through as an equality

lyric mountain
#

for example

maiden mauve
#

yes his example was good

lyric mountain
#

== checks only for value

maiden mauve
#

=== forces type definition

lyric mountain
#

=== checks for both value and type

royal laurel
#

k

#

ohhhhh

#

thats what that is

#

i see people using it

#

but never knew why

maiden mauve
#

=== is more like C style equivalence

royal laurel
#

k

maiden mauve
#

the only time you should use == is if your sniffing for undefined variables

royal laurel
#

how do i do that epic shortcut where it will highlight all the == things and change it?