#development

1 messages Β· Page 700 of 1

amber fractal
#

probably more

#

lol

modern elm
#

return isNaN(integer);

#

would return false

#

:)

amber fractal
#

just in an if

#

obviously

tacit stag
#

any idea how to fix my issue? Basically trying to use the data from inside the code block and use a RichEmbed to display the javascript output

lusty dew
#

Wait how is that true?

amber fractal
#

isNaN

valid frigate
#

how would i use the nodejs cluster module to cluster a discord bot via ShardingManager, or am i required to use my own sharding manager?

amber fractal
#

is Not a Number

#

asd is not a number

modern elm
#

@tacit stag explain more?

lusty dew
#

Oh bruh

modern elm
#

wait nvm

lusty dew
#

I forgot what NaN meant

#

LOL

modern elm
#

ur the guy from farther up

#

NaN=not a number lol

tacit stag
#

yeah, twoost recommended a try catch, which in theory makes sense, just don't understand how to implement.

modern elm
#

cool

#

try{
//code
}
catch (error) {
message .channel.send(error)
}

#

like that if im not wrong πŸ€”

#

replace is a promise so it would go inside the try i think

tacit stag
#

yes thats what I did, but it doesn't work. when i cut the data down to the pure code, and run it through try, it won't output

#

let me try that

modern elm
#

ok

#

im on mobile so i cant do much lmao

dusky marsh
#

@valid frigate I think kurasuta uses Cluster for it's sharding, maybe look at that?

tacit stag
#

@modern elm no, inserting the replace's into the try doesn't do anything

modern elm
#

ok

valid frigate
#

yeah that's good

modern elm
#

i would help more but im not in pc

tacit stag
#

wait, arg is a string

#

how do I run that then

#

JSON.parse?

eternal mesa
#

im back

amber fractal
#

replace cant error.

#

Unlessssssss

modern elm
#

do args need to be an int

tacit stag
#

@pure crateroost, I mentioned you up a bit, the try catch doesnt output, but I think its because arg is a string

amber fractal
#

you call it on not a string

eternal mesa
#

@tacit stag you need to extract the code you want to test

#

as a string

modern elm
#

@tacit stag ur not pinging twoost

eternal mesa
#

for example -code console.log('hello world')

modern elm
#

ur pinging tw

tacit stag
#

I saw

eternal mesa
#

you would extract "console.log('hello world')"

#

and then you would do

#
try {
    new Function (stringExtracted)
}
catch {
    <THE CODE HAD SYNTAX ERRORS HERE>
}```
amber fractal
#

I always forget new Function() is a thing

eternal mesa
#

yis

amber fractal
#

the funny thing is I think I use that in eval

#

but I've had the same eval command for 10 months

broken shale
#

lol

eternal mesa
#

btw all that does is check if the code extracted is well-formed

#

and nothing else

tacit stag
#

ah okay, i thought i had an error but i typed function with a lowercase 'f' in habit

#

still doesn't seem to output to terminal

eternal mesa
#

ok, reiterate what you want to do full

broken shale
#

btw isn't it js try { } catch (e) { } // was missing the actual error above

eternal mesa
#

my understanding is that you wanted to check a string to see if it was valid js

#

and @broken shale the error is not neccesary but yes that is correct too

tacit stag
#

Pretty much. I want to extract the code between a code block, then display the javascript output (in a RichEmbed)

eternal mesa
#

oh

#

what language and library

amber fractal
#

if you're trying to extract between a code block

#

you can easily get between the 3 backticks

tacit stag
#

javascript atm, so that console.log("hello world") would output "hello world", on the embed and console.log(4 + 5) outputs 9 on the embed.

#

@amber fractal yes i got the string out of the code blocks already

#

running it is the other issue

eternal mesa
#

that returns the result

tacit stag
#

let me test

amber fractal
#

I wouldnt eval

eternal mesa
#

is this a owner restricted command

tacit stag
#

eval did work

amber fractal
#

but is it restricted

broken shale
#

no my eval command is public

amber fractal
#

this isnt an eval command

eternal mesa
#

i assumed this would be a private command

amber fractal
#

it's a js validator

broken shale
#

except for the fact that you can make an eval command by not connecting to the web

amber fractal
#

I built a working prototype of your command

tacit stag
#

strange, my text editor said that new Function(arg) was an eval function, and that didn't work. Actually, it is public, but I am trying to take the eval() output and pasting the output into a RichEmbed

amber fractal
#

Never have an open eval

eternal mesa
#

a) if the command is public it will not be listed here

#

b) if its public people can do malicious things

tacit stag
#

hmm how to do this then?

broken shale
#

Wipes whole computer with eval

modern elm
#

wait why not just use substring

broken shale
#

^

modern elm
#

to remove the backticks

amber fractal
#

dont run that btw

#

if you're on linux

#

it will literally delete every file

modern elm
#

lolll

amber fractal
#

Why

eternal mesa
#

lets just remove that

amber fractal
#

why would you delete that

eternal mesa
#

because some people may just run it

#

just better not to have

amber fractal
#

I told him the problems of having an open eval and the cautions

tacit stag
#

I wont (because I am on linux). Is there a way to say let output = eval(arg); message.channel.send(output);

broken shale
#

Though like @fair hare you can make a fail proof eval

modern elm
#

lol its a good thing i copied

#

:D

eternal mesa
#

i mean it isnt hard to find

#

would prefer it not to be here however

tacit stag
#

but I guess that running console.log('hello world')
would not output the string "hello world " in an eval. How do do both this, and something like ``` console.log(4 + 4) //Output 8

amber fractal
#

you'd have to return

#

because it wont gather data from console

tacit stag
#

return eval?

#

oh

amber fractal
#

no

#

console.log() would just return undefined in an eval

tacit stag
#

so just: ```try {
return arg;
}
catch(err) {
console.log("[Error]");
}

amber fractal
#

uh

#

you'd still have to run it some way

tacit stag
#

ur right thats just a string

amber fractal
#

Im just saying if they do a console.log() and you want it to output what the console outputs

tacit stag
#

can you explain

eternal mesa
#

i think at this point you need to think about the problem and how eval works

tacit stag
#

okay, ill do a little work. I just havent worked with eval a whole lot, so trying to figure it out

eternal mesa
#

read the docs and see what the return value of eval is

tacit stag
#

okay im gonna test some things.

tacit stag
#

I guess the issue is that I want to check the code for syntax errors, but also run the code as javascript until I reach console.log(). I see that eval(console.log()) can be harmful, so is there a way to take the eval output and instead of returning it to the console, I want to use that data to send the member the output

ember atlas
#

Anyone else had the issue where you tried to clone a github repo via vsc to push changes from there directly to git and it say repo doesnt exist yet it does?

tacit stag
#

wait i mightve figured something out

modern elm
#

just check to see if they run console.log

#

and change it to msg.chanell.send

tacit stag
#

yep that works flawlessly. You know that feeling when you go out of your way for something really simple? Me right now.

#

Now Im just gonna find a way to pass that value through a RichEmbed, but thats a lot easier. let you know how it goes

#

easy peasy

earnest phoenix
#

πŸ‘

tacit stag
modern elm
#

no problem :) i tried my best anyway lol

lusty dew
#

Two outputs what

#

Wouldn’t it be input and output?

tacit stag
#

I actually created a variable earlier in the code, and used replace(β€œconsole.log”, β€œ[myVar] =β€œ). Then i could pass it thru to an embed. I guess it was safely using eval so it didnt output to console was my issue. Thanks though πŸ™‚

#

I just used a default rich embed

#

I could name one input and pass the input in

#

which i probably will do

#

At least it shows the output. Thanks πŸ™‚

#

Sorry for rambling, all of you helped so much

earnest phoenix
#

πŸ‘

sick cloud
#

alright so what's the idea behind how voting streaks work

timid cloud
#

Possibly dumb question. Using Python, is there anyway to make this not case sensitive?

#

The '.Hello" part exactly

#

I should probably just make it lowercase anyway.

lament meteor
#

message.content.lower().startsWith() .lower() turns it to lower case

#

check the docs if u use the () cause iirc u do

earnest phoenix
#

y(e)s

rain oak
#

I keep on getting this error message, can someone help me out?
if(!message.guild.voiceConnection) message.member.voiceChannel.join().then(function(connection){
^

TypeError: Cannot read property 'join' of undefined

pliant needle
#

Discord.js, tryna set up an if channel id is this, do this statement

#

How does one go about verifying which channel the message is in?

mossy vine
#

@pliant needle wdym "verifying which channel the message is in" couldnt you do that with ids?

pliant needle
#

Basically my question is how do I call upon verifying if the command was run in CHANNEL_ID?

copper cradle
#

@pliant needle an if statement...

pliant needle
#

well duh

#

but it's not grabbing it correctly

#

idk i'll figure it out tomorrow

copper cradle
#

bruh

earnest phoenix
#

how do you set if(message.content == <anything>)

slender thistle
#

???

#

a string?

hollow prawn
#

@pliant needle from the message you access the channel so -> message.channel and once you have the channel you access its ID message.channel.id doing a simple console.log(message) will output you big info in ur console, from there u can see how its structurized

#

@earnest phoenix you pretty much nailed it, just that <anything> should be in quotes any of the 3 quoting option will work or ' or "`

#

If you previously define that anything with for example let text = '123'; then you don't put quotes around that anything but just its defining text

glacial mango
#

How do I let my bot send a message when someone voted?

lament meteor
#

u can use the webhook

vivid spruce
#

Hello, ive seen people have self assign bots in a message with emotes. Ive been trying to do that but i cant figure it out.

lament meteor
#

what do you mean?

earnest phoenix
#

roles?

vivid spruce
#

Yes

earnest phoenix
#

and do you mean reactions?

vivid spruce
#

Yes sorry

earnest phoenix
#

reaction added event -> get the emoji -> add the corresponding role to the emoji to the user who reacted

vivid spruce
#

Thank you

mossy vine
#

cool

sullen yacht
#

Do you need to use a webhook to use py @commands.Cog.listener() async def on_dbl_vote(self, data): logger.info('Received an upvote') print(data)?

slender thistle
#

Yes, dblpy webhook system uses the on_dbl_x events

sullen yacht
#

ah ok thanks

#

sorry i've not used webhooks n stuff like this before that's why i asked

dusky mist
#
message.guild.channels.forEach(async (channel, id) => {
        await channel.overwritePermissions(muterole, {
          SEND_MESSAGES: false,
          ADD_REACTIONS: false
        })
      })

Wht it doesnt overwrite the permissions?

warm marsh
#

Djs?

#

@dusky mist

#

If so, DJS uses an Array for denying permissions like js channel.overwritePermissions({ permissionOverwrites: [ id: muterole.id, deny: ["SEND_MESSAGES", "ADD_REACTIONS"] ], reason: "Mute Role" });

quartz kindle
#

on master, yes, not on stable

warm marsh
#

Would be helpful if they sent language and version.

earnest phoenix
#

is there anyway to optimize replies and msg reading/ parsing ?

#

i'm trying to make a bot reply to another bot's message as quickly as possible

quartz kindle
#

you cant get any faster than the network delay

#

reading/parsing is usually done in less than 1 millisecond, while the network round trip can go over 100 milliseconds

earnest phoenix
#

btw does anyone know a js library that compiles c code ?

#

could be fun to have a discord bot compile c code for you

quartz kindle
#

well, you can always run a compiler from the command line

#

with node's exec

earnest phoenix
#

not sure i follow

quartz kindle
#

there's also node-gyp, which is what node uses to compile and statically link C code

mossy vine
#

@earnest phoenix never let anyone but yourself use it tho

quartz kindle
#

@earnest phoenix if you're using node.js, you have access to child_process, which lets node fire and execute external processes and commands

sick cloud
#

the rule of thumb is to never trust user input, no matter how filtered and checked it is. code just makes it worse

earnest phoenix
#

would it help if it's hosted externally and not my pc xd ?

#

can someone help me with discord.js on making the commands folder and making the commands still work because it breaks when i try

sick cloud
#

what error(s) do you get

quartz kindle
#

@earnest phoenix it doesnt matter, everything can be achieved

earnest phoenix
#

the command just doesnt work

#

idk how to do it anymore

sick cloud
#

are the commands actually being loaded or not

earnest phoenix
#

no

sick cloud
#

put some sort of debugging upstream then, ie. in your command loader, try to work out if it's finishing or where it gets up to

earnest phoenix
#

i mean like

#

it doesnt work at all

#

i cant get it to work so i just have to have all my commands stuffed in index.js

quartz kindle
#

then you did it wrong

sick cloud
#

then do what i said, "doesnt work at all" doesn't help at all

#

see where it breaks

quartz kindle
#

or show us your code

earnest phoenix
#

how do i make a commands folder
mine never works when i link it up

sudden geyser
#

what lang

earnest phoenix
#

JavaScript

sudden geyser
#

Use the fs module to read the directory, require your files and work from there

#

You can likely find an example on an idiots guide

earnest phoenix
#

is message.mentions.users.last() a thing?

slim heart
#

Yes and next time look at docs please

earnest phoenix
#

i did

#

but it turns out to be undefined

#

when i tried to get the displayAvatarURL

sudden geyser
#

did the message contain a user mention

earnest phoenix
#

nvm its fixed

#

Hey, anyone knows why it says "not well formed url" when i put a tenor url in?

#

it worked before

#

nvm im stupid sorry

#

how do i check new message inside a for loop ?

#

do i need to call another " client.on "message" " inside the loop ?

mossy vine
#

what do you want to do

earnest phoenix
#

i want to stop a loop when a specific msg is written in chat

#

If you just want to collect a message inside a command use a message collector

#

docs

#

and if you collect a message just check if it is this one and then just return

#
bot.on('message', message => {})```
#

i need help

#

message.mentions.users.first()
message.mentions.users.last() is the same thing

#

so basicially

#

message.mentions.users.first() is the first user mention if you have multiple

#

there's only one mention in the message

#

if you use mesage.mentions.users.last() it searches for the last one in the message if you have multiple

#

if you have only one mention both are the same

#

@earnest phoenix

#

i had 2 mentions

#

Then ur d.js is broken bc it should work ._.

#

lemme try it

#

wait

#

here's the code i tried to use

module.exports.run = async (client, message, args) => {
  const canvas = Canvas.createCanvas(768, 574)
  const ctx = canvas.getContext('2d')
  
  const user = message.mentions.users.first()
  const user1 = message.mentions.users.last()
  
  
  
  const background = await Canvas.loadImage('https://www.verywellmind.com/thmb/ww8drf5Q9efuk0I8uUSUBMQpONk=/768x0/filters:no_upscale():max_bytes(150000):strip_icc()/GettyImages-471932267-58bc89565f9b58af5ca9d09d.jpg')
  ctx.drawImage(background, 0, 0, canvas.width, canvas.height);
  
  const avatar = await Canvas.loadImage(user.displayAvatarURL);
    ctx.drawImage(avatar, 350, 25, 150, 150);
  
   const avatar1 = await Canvas.loadImage(user1.displayAvatarURL);
    ctx.drawImage(avatar, 200, 25, 150, 150);
  
 const attachment = new Discord.Attachment(canvas.toBuffer(), 'welcome-image.png');
  message.channel.send(attachment)
}
#

@earnest phoenix

quartz kindle
#

@earnest phoenix no you cant, unless you wanna destroy your bot lol

earnest phoenix
#

^

#

the message listener is active until end

#

so

#

it wont stop

#

< im having trouble understanding how to set the msg collector up

#

wtf

quartz kindle
#

@earnest phoenix what are you trying to do?

#

we might be able to help if you post your code

earnest phoenix
#

i even tried reinstalling discord.js it's still like that

#

thats awesome tho

#

uhm, how to explain this

#

we have this bot ish challenge game on a server

quartz kindle
earnest phoenix
#

there is a bot that writes a msg and our bots have to reply

#

sometimes the reply "fails"

#

and our bot has to reply again

#

Oh lol

#

ty

#

basically keep trying till the bot announces someone has succeeded

quartz kindle
#

you dont need a for loop

earnest phoenix
#

oops

#

wait i have two swing++

quartz kindle
#
await message.channel.send();
await channel.awaitMessages(filter,options)```
earnest phoenix
#

can my bot still send messages and await at the same time ?

quartz kindle
#

yes

earnest phoenix
#

it wont halt

#

ah okay

quartz kindle
#

it will halt inside that context only

earnest phoenix
#

wait

#
await message.channel.send() ?
glacial mango
#

Could someone help me making an event which sends a message when someone voted?

earnest phoenix
#

api documentation

glacial mango
#

I did but I don't really understand it, if someone would like to help me?

earnest phoenix
#

did you see the example code ?

earnest phoenix
#

u just need to insert ur own apikey

stray garnet
#

how to get the category and Voice channel Size?

glacial mango
earnest phoenix
#

not discord dev portal

glacial mango
#

oki

#

but where does it send the message to?

earnest phoenix
#

it doesnt auto send a msg

stray garnet
#

@glacial mango to Console

glacial mango
#

So I can change console.log() to msg.channel.send() ?

earnest phoenix
#

oh wait you

#

pasted the example code

#

unless you want to deal with webhooks, you shouldnt use the webhook example code

glacial mango
#

?

quartz kindle
#

he does need webhooks to receive vote events

#

and no, you cant simply replace console.log with message.channel.send

#

you dont have any message to reply to in that context

#

you need to specify which channel it should be sent to

earnest phoenix
#

can someone give me a command handler that i can use, all of mine are outdated / dont work

glacial mango
#

But it is possible to send the message to a channel instead of console?

earnest phoenix
#

oh right, if you want to send the msg instantly after some1 votes, i guess

#

yes @glacial mango

#

but u also need to setup a server to catch webhooks from dbl, if i remember correctly

#

How to write with the bot

#

a message ?

#

i just use hasVoted because you can get that directly

quartz kindle
#

dbl sets up the server for you, but you need to configure your server's address in your dbl bot settings in the website

#

@earnest phoenix you asked about await, do you know what a promise is?

earnest phoenix
#

yeah kinda, not an expert though @quartz kindle

quartz kindle
#

you can handle promises in two ways, async/await or .then().catch()

#

sending messages returns promises, as does any operation that requires connecting to the api

#

so if you await sending a message, you ensure the rest of the code only runs after the message is successfully sent

#

channel.awaitMessages is a message collector in promise form, so you can also await it

opaque eagle
#

Hmm... how can I get JavaScript to recognize those two values as equal? 9.999999999999999e-19 1e-18

earnest phoenix
#

please can someone help me with a command handler?

devout chasm
#

what lang

earnest phoenix
#

javascript

devout chasm
#

what lib

earnest phoenix
#

wdym

devout chasm
#

what library

#

djs, eris, klasa

earnest phoenix
#

djs (if that means discord.js)

devout chasm
#

yes

#

whats the problem

earnest phoenix
#

i cant get any working through videos because they're all outdated

devout chasm
#

i see

#

so there are two very good examples

#

the one is maintained

#

the other was just for like playing around

#

gimme a sec

#

the bottom one is not maintained

#

but that's like how you could go over making a command handler

earnest phoenix
#

thanks

devout chasm
#

no problemo

earnest phoenix
#

i dont get that at all ill just search up a YT that works but thx anyway

#

Wait do you use commando or normal d.js?

#

normal

opaque eagle
devout chasm
#

maybe check out evies videos?

#

or that guide yes

opaque eagle
#

Didn't he just say he didn't want outdated videos lol

devout chasm
#

isn't she doin vids still

earnest phoenix
#

i still dont get that because its different code for me and my brain is like a pea

#

;-;

twilit rapids
#

What version of Discord.js are you using?

earnest phoenix
#

latest

opaque eagle
#

As a rule of thumb, stay away from video tutorials

stray garnet
#

The Server Icon is a Gif, how can i display it in an Embed?

slender thistle
#

Just like you would display a static image

opaque eagle
#

Discordjs.guide is always kept up-to-date

devout chasm
#

that rule of thumb does make sense, but you mostly get into a topic by watching em

stray garnet
#

@slender thistle message.guild.iconURL?

slender thistle
#

Yeah

stray garnet
opaque eagle
#

Also stay away from anidiots.guide too

#

just stick to discordjs.guide

stray garnet
#

Why stay away from idiotsguide?

opaque eagle
slender thistle
#

Details

opaque eagle
#

Plus they just offer large-ass codeblocks that ppl just copy-paste and expect to work, without reading the explanation underneath the codeblock

amber fractal
opaque eagle
#

LOL

#

Also Happy Birthday my guy

amber fractal
#

πŸ‘Œ

opaque eagle
#

Huh they do Day-Month-Year

#

I thought Evie was from Canada... Canada does Year-Month-Day

amber fractal
#

it isnt maintained by her anymore

opaque eagle
#

oh

amber fractal
#

at least this leads me to believe that

opaque eagle
#

who is me

amber fractal
#

idk

#

that's the issue

opaque eagle
#

none im just bored

amber fractal
#

this?

opaque eagle
#

oh

earnest phoenix
#

can someone just tell me how to make command handlers

#

i dont get it whatsoever

opaque eagle
#

discordjs.guide

#

Read the guide

#

When you get far enough you'll understand it actually does show you how to write a command handler

#

(don't go to that page and copy-paste... actually read the guide from page 1.... it's the only tutorial you need)

#

If you follow some rando YT tutorial, hours later you'll come back asking really dumb questions that if you had been given a solid foundation (which is what the guide does), you wouldn't have asked

earnest phoenix
#

my brain doesnt rlly work like that

devout chasm
#

erm what

earnest phoenix
#

im dumb.

opaque eagle
#

If you follow a YouTube bot tutorial, you'll be asking questions such as
hey guys how do i fix this error Can't find x of undefined or Unexpected token }

earnest phoenix
#

yea but i dont get just reading it

opaque eagle
#

Nah don't just read it

#

Do the exercises as you read it

#

guide on one side, code editor on the other

earnest phoenix
#

it still makes no sense because i cant rlly translate things because i used bot. and they used client.

opaque eagle
#

change bot to client

#

it's not that big of a deal

earnest phoenix
#

yeah but still its all different plus i have way more code in mine so i get confused af

opaque eagle
#

lemme guess... you have lots of code from some outdated youtube tutorial...

earnest phoenix
#

the code works but pyea

#

yea

opaque eagle
#

can i see what u have so far

#

It's just best to start from the basics and follow that guide...

earnest phoenix
#

all in index.js?

#

if so

opaque eagle
#

(it picks up roughly where you left off in the videos)

earnest phoenix
#

idk i might just give up

opaque eagle
#

idk, you do you man

broken shale
#

axios > node-fetch?

opaque eagle
#

I like node-fetch

#

idk why ppl use axios and the others

#

like request / superagent

broken shale
#

I liked it for like 6 hours until I noticed it can't return a page's html

opaque eagle
#

yes it can

#

lol

broken shale
#

I switched to axios bc request felt deprecated

#

wait lemme see

#

don't see it

opaque eagle
#
import fetch from 'node-fetch';

fetch('url-here')
   .then(res => res.text())
   .then(console.log)```
broken shale
#

res.text πŸ€”

#

works

#

but now I'm really loving axios/node-fetch over request and snekfetch (deprecated so had to upgrade deps yesterday)

opaque eagle
#

Idk what's the appealing part about axios and request

#

I prefer node-fetch since it's exactly like window.fetch

#

And I don't like committing unwanted things into memory... why know two things (window.fetch and axios/request) when you can just know one syntax

broken shale
#

well axios you don't need to chain, saves a bit of time and the nuance

opaque eagle
#

oh

broken shale
#

is request even still maintained

quartz kindle
#

i just use http/https.request

sudden geyser
#

node-fetch ChiakiHeart

devout chasm
#

urgh

#

centra

stray garnet
#

How to check if users are Online, dnd, idle or offline?

tulip tundra
#

<user>.presence.status

knotty steeple
#

request is fucking

#

bulky

#

@broken shale

broken shale
#

axios > node-fetch > snekfetch (deprecated, me sad) > request @knotty steeple

knotty steeple
#

request is 4mb

mossy vine
#

lmfao

#

how

knotty steeple
#

node-fetch is a couple kb

#

idk lul

mossy vine
#

how do you make an http lib 4 mb

broken shale
#

kek

#

snekfetch was good

mossy vine
#

the lib itself doesnt appear to be near a megabyte wtf

graceful granite
#

whats going on e.e

knotty steeple
#

read error

graceful granite
#

i dont understand

knotty steeple
#

also send code with ur error

graceful granite
#

so many have one tho

mossy vine
#

are you using a guide or tutorial

graceful granite
#

guide

pallid zinc
#

Send your code with err

mossy vine
#

which one

knotty steeple
#

o h n o

graceful granite
#

its just from github

#

i know some js not much

mossy vine
#

so you are copying and pasting code without understanding what it does?

knotty steeple
#

well its outdated

graceful granite
#

yup

knotty steeple
#

dont do that

#

actually try to learn

#

from guides

graceful granite
#

i dont have time to learn rn so im testing stuff out

pallid zinc
#

id

knotty steeple
#

????

#

no

#

make time to learn

#

lmao

graceful granite
#

ok

#

so is it outdates tho

mossy vine
#

well, the result of your search ends up as undefined

knotty steeple
#

the way he is trying to find is depreciated

graceful granite
#

?

mossy vine
#

yes, that way of using find is deprecated too

graceful granite
#

wdym by that

knotty steeple
#

its basically outdated

#

"thing", thingeeee should be something like a => a.thing === "thingeeee"

broken shale
#

you need to use a function now

graceful granite
#

AH

#

oops didnt mean caps

valid frigate
#

how can i get the shard of the current client in eris

#

sounds pretty retarded but yeah idk how mmulu

knotty steeple
#

shard of current client

valid frigate
#

does that exist

#

ss answer me please fatGlasses

knotty steeple
#

i dont get it

#

you wanna like

valid frigate
#

i mean

knotty steeple
#

get a shard

valid frigate
#

im coming from djs so

tribal shadow
#

can someone tell me how to host my bot in dms

valid frigate
#

so basically what i'm doing is updating all clients' activities every 120 seconds

#

one of the messages is shard (x) where x is the current shard id

#

and i have no idea if that's necessary

knotty steeple
#

so you wanna get a shard

valid frigate
#

omg yes mmulu

#

i know that there's like

knotty steeple
#

<Client>.shards.get()

#

E

valid frigate
#

e

#

well then another question

#

does having the shard id for each client even matter at all since it looks like eris handles it

peak quail
#
     const role = message.guild.roles.get("583431602970034177")
        role.permissions.toArray().join(" β€’ ")

ERR => role.permissions.toArray
i want to list all permissions from this role

knotty steeple
#

what is the

#

error

#

is toArray even a function

#

ive never seen that

peak quail
#

hmm

amber fractal
#

it exists

#

which means that the role isn't being gotten

#

wait

earnest phoenix
#

what's the error in the first place

sudden geyser
#

Are you sure the role exists

amber fractal
#

That would have to be the error, it works for me

west mango
#

Hey guys. My VPS provider just got shut down. Are there any affordable VPS hosts you can recommend?

mossy vine
#

check pins

broken shale
#

DO, GG

mossy vine
#

also what provider was it?

slender thistle
broken shale
#

I regret DO now though

#

my server keeps rebooting daily

west mango
#

They are still quite expensive

#

But thanks anyway

earnest phoenix
#

i'm trying to make my bot reply with a list of the servers it's in

#

but i suspect the list surpass discord's char limit

amber fractal
#

That's not allowed

#

unless it's an owner only or opt in command

earnest phoenix
#

what ? why

amber fractal
#

because that's a privacy violation

#

it has to be restricted to owner or opt in by guild

#

with it defaulted to opting out

earnest phoenix
#

why would it be included in the api

amber fractal
#

That's not the point

#

It's a privacy violation of you to give out your users' information

#

the when you create an application on discord you're legally bound by the terms

earnest phoenix
#

can u refer me to part you're talking about

#

or section

amber fractal
#

2.4 and 2.5

broken shale
#

I'm actually getting fucking strained writing about the history of computers than actually coding

#

Fuck this APCSP class

unique nimbus
#

If you make an agreement which they have to sign before to use your bot that your name, guild will be recorded then it should be fine

#

however idk

amber fractal
#

if you have their permission it's fine

#

but you have to get their permission, you can't imply it

earnest phoenix
#

even just guild name ?

amber fractal
#

yes

earnest phoenix
#

can't i parse message content either without perms ?

amber fractal
#

A user using a command is them giving you permission

#

otherwise they wouldnt use the command

earnest phoenix
#

what is this conversation even

#

but in order to know a message contains a cmd i have to parse it

#

from what i'm seeing they're only providing a list of guilds the bot is in

#

which is entirely fine

#

if they started sharing data about who the owner is, it would be slight violation but no one would really care

#

also sec 2.4 refers to the SDK not the API

#

oh okay

#

so it's fine ?

#

and yeah as cry said, im just making my bot reply with a list of guilds it's in

broken shale
#

according to dbl it's not

earnest phoenix
#

dbl is making up their own rules - which is probably because they don't go over discord's TOS properly

broken shale
#

Just use at own risk ig Β―_(ツ)_/Β―

earnest phoenix
#

wait, it's okay if it's only me that can use it ?

#

it's okay even if everyone else can use it

#

it's not private data

#

if they started sharing data about permissions, roles, other members in the guild then it would be violation

broken shale
#

Either ways idk why members would need to know what servers it was in

earnest phoenix
#

true, unnecessary command other than for the owner

#

though the owner also generally wouldn't care which guilds it is in, rather the amount of it

broken shale
#

I usually just use it to quickly grab server id then view info about the guild in the db if the user has server configuration problems

earnest phoenix
#

Anyway

#

What about my question t.t

#

doesn't discord.js have something to automatically split the message if it goes over the char limit

mossy vine
#

yeah

#

theres a function

lusty dew
#

How can I make a variable set to args[0] be optional?

#

Like they don’t have to provide anything just use a tag like -users

#

And the variable set to args[0] is looking for a number btw

#

That’s why I want it to be optional

signal basalt
#

Not sure if its the right channel to ask, but how come the widget for amount of servers shows "undefined" for my bot? Or rather, how do I get it not to be undefined?

mossy vine
#

post your stats to the dbl api

signal basalt
#

ah

mossy vine
#

@lusty dew check if its undefined with an if satetemn

lusty dew
#

Hm

earnest phoenix
#

What's the name of the function?

lusty dew
#

And what do I do if it is?

#

@mossy vine that won’t work though?

mossy vine
#

if they didnt provide an argument, it will be undefined

lusty dew
#

Cause the variable will always get something

#

No

#

My command is sensing that when I don’t provide a number for args it takes the tag as a number and then the command errors

#
-bpurge 100 -users //This won’t error

-bpurge -users //This will because it thinks I want -users to be args[0]
mossy vine
#

parseInt args[0] then

lusty dew
#

And since -users is not a valid number it errors

#

It still errors

mossy vine
#

thats why you have to validate that its a number

#

with parseInt

lusty dew
#

It still errors

#

            let num = args[0];
            if(!num){
                num = 1
            }
            const parse = Number.isNaN(parseInt(num))
earnest phoenix
#

How do I automatically split a message if it's over char limit ?

#

second parameter of send takes in MessageOptions

#

set split to true

#

Oh, very cool

#

Had no idea

#

So send(msg,split)?

#

no

#

MessageOptions is an object with declarative properties

lusty dew
#

Isn’t it an object?

earnest phoenix
#

is there anywhere to view examples ?

#

on how to configure it

quartz kindle
#

.send(message,{option1:value1,option2:value2})

earnest phoenix
#

.send(msg,{split:true}) ?

quartz kindle
#

yes, you can use true, or you can give it another object to further configure it

earnest phoenix
#

oh yeah, took a look and default options looks fine

#

oof, how do i make my bot leave all the racist servers ?

#

How can a bot become certified GWinfxThink

quartz kindle
#

guild.leave()

amber fractal
earnest phoenix
#

Thanks

#

so i guess i need the guild id for that ?

west spoke
#

Just the guild object

tacit stag
#

Way to check number of servers the bot is on (discord.js)?

hollow prawn
#

<your bot instance>.guilds.size

#

your bot instance is w/e you defined your bot with, if its by the books of d.js it should be client

tacit stag
#

ah okay. I see that guild is for one server guilds is for multiple

#

thanks

hollow prawn
#

if you're on d.js master, then idk, stable its that

earnest phoenix
#

where do i see all the properties connect to i.e. guilds.map ?

#

not sure where in d.js doc i have to look

#

Selam

#

nvm

#
analog vessel
#

What is this..

earnest phoenix
#

TR

** if (!message.content.startsWith(ayarlar.prefix)) return;** Bunu KullanΔ±yorum . Bunu
**if (!message.content.startsWith(ayarlar.prefix) || !message.content.startsWith(client.user.username) return; ** Yaptım . İşe Yaramıyor .

Eng

** if (!message.content.startsWith(ayarlar.prefix)) return;** I Use This . **if (!message.content.startsWith(ayarlar.prefix) || !message.content.startsWith(client.user.username) return; ** It Does Not Work .

tacit stag
#

what is your name, and what do you mean

analog vessel
#

Its Wolfy.. And i mean what is this place. Is this like to point out bugs or something? Cause i have a problem with adding bots to my server

tacit stag
#

@earnest phoenix you should use code blocks (three back ticks before and after code)

#

Where we ask questions

earnest phoenix
#

what are you trying to do

analog vessel
#

im trying to invite a bot to my server. But it says i have no servers to add it to

earnest phoenix
#

this channel is for getting help/helping ppl develop bots

#

@analog vessel do you have admin or server manager perm

analog vessel
#

im the owner of the server

tacit stag
#

in the developer page, did you set the scope to bot? not sure if thats the issue but Im pretty sure its needed

earnest phoenix
#

what link do you click

#

when you try to add a bot

analog vessel
#

the link that i get sent when i do the bot command invite

quartz kindle
#

@analog vessel that happens when you're not logged in correctly

analog vessel
#

how.. Do i log in correctly?

quartz kindle
#

when you invite a bot, you do it through a web browser, not through the discord application

#

the web browser account is not always the same

tacit stag
earnest phoenix
quartz kindle
#

go to the discord website and logout from whatever account you have there

#

and login properly, in the website

#

then try again

analog vessel
#

How do i log in if it automatically puts in the wrong account

earnest phoenix
#

log out

quartz kindle
#

you have to login in the website

#

before you click the bot invite link

analog vessel
#

okay

quartz kindle
#

like if you wanted to use the web version

#

instead of the desktop app

tacit stag
#

Do you need help setting up the rest of the bot too?

analog vessel
#

Im on my phone

tacit stag
#

kinda hard to develop a bot on a phone

analog vessel
#

and i trying to log on with this account but it keeps loging in as my other accout i dont use

earnest phoenix
#

try using another browser i.e. edge

analog vessel
#

uhh..

earnest phoenix
#

ur on mobile `?

dapper glade
#

How would you make a vote only command in JavaScript?

analog vessel
#

Yes

quartz kindle
#

the same way you would do it in any other language

#

check if the user has voted using the dbl api

earnest phoenix
#

dbl.hasVoted

quartz kindle
#

thats not java

earnest phoenix
#

script

#

xd

dapper glade
#

Alright!

earnest phoenix
#

they're the same right lel

dapper glade
#

Thanks!

quartz kindle
#

they are not the same

analog vessel
#

Im just gonna add my other account and try it that way ._.

quartz kindle
#

java and javascript are completely different things

dapper glade
#

JavaScript

#

Is best

quartz kindle
#

its not best lol

dapper glade
#

In my opinion it is

earnest phoenix
#

why are u using java if you think javascript is better

quartz kindle
#

apparently hes not

#

he edited the message lol

earnest phoenix
#

why would they name it the same if they have nothing in common angeryBOYE

quartz kindle
#

technically they are not named the same

#

javascript's technical name is ECMAScript

#

they labeled it javascript because java was popular at the time and they wanted to bandwagon it

#

kinda

earnest phoenix
#

lol wtf

quartz kindle
#

theres is a better explanation in its wikipedia page

earnest phoenix
#

any1 wanna learn bitcoinGoogleAppleScript

quartz kindle
#

basically ecmascript is the standard

#

and javascript is the implementation of it

earnest phoenix
#

WAIT HOLD UP

#

does the ES in ES6

#

stand for ecmascript ?

quartz kindle
#

The 6th edition, initially known as ECMAScript 6 (ES6) then and later renamed to ECMAScript 2015

#

you can just read it on wikipedia lol

#

ECMAScript (or ES)
is a scripting-language specification standardized by Ecma International in ECMA-262 and ISO/IEC 16262. It was created to standardize JavaScript, so as to foster multiple independent implementations. JavaScript has remained the best-known implementation of...

earnest phoenix
#

there is a ES10 o.o

#

very cool πŸ‘Œ

quartz kindle
#

it was largely abandoned for so long, then they suddenly decided to give it new updates every year

earnest phoenix
#

glad most ppl call it javascript

#

ecma sounds like a skin condition

quartz kindle
#

acmescript

#

acnescript

earnest phoenix
#

stdscript

#

hivscript

#

hiv++

#

lol

#

eczemascript

tacit stag
#

perfection.

past pagoda
#

Question

amber fractal
#

Answer

#

Daily double

past pagoda
#

I'm trying to make a ticket Command for my bot but I dont know how to set it up to make it open a whole ticket channel for a ticket can someone help me?

valid frigate
#

what lib

past pagoda
#

Like the other ticket bots opens a new ticket but I cant get mine to do that

modern elm
#

explain?

past pagoda
#

I just did above

modern elm
#

you mean like create a new channel?

hollow saddle
#

What library

earnest phoenix
#

you'll need a database to store which channel is linked to which user, whether the ticket is resolved etc

valid frigate
#

what you want is really vague

earnest phoenix
#

they want a ticket system you see in bots like Tickety

past pagoda
#

How do I do that @earnest phoenix

earnest phoenix
#

with magic

valid frigate
#

buuuuut yeah there's your summary

earnest phoenix
#

do your research

modern elm
#

lmfao ily cry

hollow prawn
#

I've got a struggle, on my bot I'm saving the prefix for each server in a database, however that's to lower case as i've set it up, when I fetch the prefix from the database, I can't seem to make it to lower case and it ends up being case sensitive, I want it to be to lower case whenever it reads it up how do I proceed with that? lib is discord.js, here's code around the prefix

bot.db.query(`SELECT prefix FROM serverInfo WHERE serverID = ${message.guild.id}`, (err, rows) => {
    if (err) throw err;
    let prefix = rows[0].prefix;
    if(!message.content.startsWith(prefix)) return;
    let args = message.content.slice(prefix.length).split(/ +/);
    let cmdName = args.shift().toLowerCase();
    let option = message.content.slice(prefix.length+cmdName.length).split(/-+/);
    if(!commands.has(cmdName)) return;
    let cmd = commands.get(cmdName);
    });```
earnest phoenix
#

ily2

modern elm
#

i was bouta clap his cheeks

#

but u did it first

past pagoda
#

My bad for trying to get help 😭😭😞

earnest phoenix
#

you need to learn the line between asking for help and asking for line by line instructions on how to do something

valid frigate
#

you need to make it lowercase when you're saving it to the db

quartz kindle
#

@hollow prawn just make it lower case?

valid frigate
#

yeah lmao

hollow prawn
#

I am, however when you do FL. instead of fl.

past pagoda
#

@earnest phoenix I was just asking how to start it that way I didnt mess it up

hollow prawn
#

it doesnt recognize it as the prefix

valid frigate
#

then you need to make that lowercase too

hollow prawn
#

when I'm saving it to the db, it is to lower case

#

that's the issue, idk where to i do it

#

first time dealing with this thing

quartz kindle
#

@hollow prawn prefix.toLowerCase()

#

.>

earnest phoenix
#

i told you how, then you more than likely wanted me to tell you how to do everything instead of you using your brain, by the time you whined here you could've already searched for "<my language> how to interact with a database"

#

learn πŸ‘ how πŸ‘ to πŸ‘ do πŸ‘ research πŸ‘ for πŸ‘ yourself πŸ‘

hollow prawn
#

I've tried prefix.toLowerCase() at let prefix = rows[0].prefix; and at if(!message.content.startsWith(prefix)) return;

quartz kindle
#

make the message content lower case too

#

if you dont need any upper case commands or arguments

hollow prawn
#

yeah I stay away from those, you right, the content, so message.content.toLowerCase().startsWith(prefix) ?
yeha, that's the one

quartz kindle
#

starts with lower case prefix as well

hollow prawn
#

just tried it out, it works

#

without lowercase for prefix, because when changing the prefix I already make it to lower case, even if you tried to set it to upper case

#

so I think i'd end up being pointless to have to lower case on prefix in starts with

quartz kindle
#

as long as you're sure its already lower case, thats fine

hollow prawn
#

yeah, tested setting the prefix to upper case, didn't do it, it set it to lower case

past pagoda
#

I'm trying to add my bot to discord for other people to use and I use the characters after the discord .gg part and its saying invalid server input do I half to put the full link or did I not input it rifht?

#

Right*^

earnest phoenix
#

you can't use them for bots

past pagoda
#

Idk what to do for that after I put the client I'd in @earnest phoenix

#

I hit the link and it said unknown error

#

Is there anyone I can send these screenshots too in dms?

abstract crow
#

Who here makes games and uses Unity? If so where do you guys recommend I get started off with

west raptor
#

like starting off with games?

#

A simple ping pong game could be a cool starter project

hollow prawn
#

@abstract crow depending what game you wanna make, I did yt tutorials for a bit, on a simple clicker game just to experiment, might be bad idea but tbh I usually just start with yt tutorials

amber fractal
#

Nothing beats scratch clicker games

abstract crow
#

@hollow prawn ok. Because I want to do unity and game development I just didn’t really know where to start. I tried some brackets tutorials but imo they weren’t really good so I’ll try some others. Thanks!

tacit stag
#

lol. trying to get into unity too so imma listen in

abstract crow
#

Lol

cursive dagger
#

@abstract crow brackeys yt channel series is gud

abstract crow
hollow saddle
#

Yeah brackeys does very good tutorials

abstract crow
#

But is the one I linked outdated?

hollow saddle
#

Not really, it still has very useful information

#

Not much has changed in unity since that vid

abstract crow
#

Ok. I'll give it another shot. Thanks πŸ™‚

abstract crow
#

I am assuming in C# you can't do this? public float leftRightSpeed = 500f; leftRightSpeed = leftRightSpeed * Time.deltaTime;

inner jewel
#

no

#

you can't just have code anywhere

abstract crow
#

No I mean I have it in my class and stuff

#

I just took that snippet out of my code

#
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerMovement : MonoBehaviour
{
    public Rigidbody rb;
    public float forwardSpeed = 2000f;
    public float leftRightSpeed = 500f;
    leftRightSpeed = leftRightSpeed * Time.deltaTime;
    void FixedUpdate()
    {
        rb.AddForce(0, 0, forwardSpeed * Time.deltaTime);

        if(Input.GetKey("d"))
        {
            rb.AddForce(leftRightSpeed, 0, 0);
        }
        if(Input.GetKey("a"))
        {
            rb.AddForce(-leftRightSpeed, 0, 0);
        }
    }
}

inner jewel
#

code belongs inside methods

abstract crow
#

Oh so I need to do this in the void Start() method

ember atlas
#
(node:18912) UnhandledPromiseRejectionWarning: RangeError: Invalid permission string or number.
    at Function.resolve (C:\Users\Aidyj418\Desktop\boss-bot\boss-bot-v2\node_modules\discord.js\src\util\Permissions.js:195:65)
    at Permissions.has (C:\Users\Aidyj418\Desktop\boss-bot\boss-bot-v2\node_modules\discord.js\src\util\Permissions.js:62:35)
    at Role.hasPermission (C:\Users\Aidyj418\Desktop\boss-bot\boss-bot-v2\node_modules\discord.js\src\structures\Role.js:171:46)
    at roles.some.r (C:\Users\Aidyj418\Desktop\boss-bot\boss-bot-v2\node_modules\discord.js\src\structures\GuildMember.js:321:35)
    at Map.some (C:\Users\Aidyj418\Desktop\boss-bot\boss-bot-v2\node_modules\discord.js\src\util\Collection.js:357:11)
    at GuildMember.hasPermission (C:\Users\Aidyj418\Desktop\boss-bot\boss-bot-v2\node_modules\discord.js\src\structures\GuildMember.js:321:23)
    at checkUserPermission (C:\Users\Aidyj418\Desktop\boss-bot\boss-bot-v2\commands\info\whois.js:19:24)
    at Object.run (C:\Users\Aidyj418\Desktop\boss-bot\boss-bot-v2\commands\info\whois.js:102:13)
    at Client.client.on (C:\Users\Aidyj418\Desktop\boss-bot\boss-bot-v2\index.js:49:17)
    at Client.emit (events.js:193:13)
(node:18912) 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)
(node:18912) [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.

Why am I getting this? (Code: https://hatebin.com/djryjqfrps)

#

It worked when I run it on myself, but this error occurs when I run it on another user.

abstract crow
#

if (member.hasPermission('MANAGE_MESSAGES')) { arrayOfPerms.push('Manage Messages') Correct?

ember atlas
#

Hm?

abstract crow
hollow prawn
#

@abstract crow seems promising, i didnt invest much into games tho

abstract crow
#

lol ok. I am doing it rn

ember atlas
#

I had hasPermissions, and the console said it was deprecated

abstract crow
#

Yes

#

Because it is

#

hasPermission and hasPermission are now both deprecated

ember atlas
#

Oh damn

#

What else can I use?

broken shale
#

hasPermissions is deprecated while hasPermission is not

ember atlas
#

Yes.

#

I am using hasPermission

lusty dew
#

You can use an array in hasPermission can’t you

ember atlas
#

I mean it half works.

#

Not understanding why when I run it on another user it does that, but on myself it works fine

lusty dew
#

What are you trying to do

broken shale
#

It takes an array or permission resolvable

lusty dew
#

Yea

#

Honestly why did hasPermissions get deprecated

ember atlas
#

@lusty dew A whois command.

lusty dew
#

Oh

ember atlas
#

!whois, or !whois @ember atlas

lusty dew
#

And why do you need permissions for this?

#

Seems like a command that would be open to everyone imo

ember atlas
#

You dont need permissions for it.

lusty dew
#

Then what are you checking permissions for?

ember atlas
#

For a section of the whois called Key Permissions

lusty dew
#

Oh

#

Ah I see okay

ember atlas
#

And the command only works for me

#

Which is why im confused as hell

lusty dew
#

Show code?

abstract crow
#

Has permissions is deprecated

ember atlas
lusty dew
#

We know

#

Lol

ember atlas
#

Vinnie I dont use hasPermissions

abstract crow
#

And so is has permission

#

I sent a picture from before

broken shale
#

Vinnie is slow GWcorbinTopKek

ember atlas
#

But yet that doesnt show on the docs

abstract crow
#

No I was just afk

#

Wdym

#

I was just on the docs

ember atlas
abstract crow
#

Wtf

broken shale
#

hasPermission is NOT deprecated

abstract crow
#

It said it was for me

#

Sorry then guys

#

Wtf

broken shale
#

Lol

ember atlas
#

No wait

#

Im being dumb

abstract crow
ember atlas
#

Oh no wait

lusty dew
#

Lol

broken shale
#

what version is that

ember atlas
#

ya the one you are on checks if a user has that perm

lusty dew
#

That says .hasPermission

abstract crow
#

Ooh

ember atlas
#

the one im using checks if the members role has that permission

#

not the user itself

broken shale
lusty dew
#

Lol

ember atlas
#

Still doesnt explain why this command only works for me

#
  aPerms = void 0;
        if (member.hasPermission('MANAGE_MESSAGES')) { 
            aPerms = 'Server Moderator'
``` Is this using the deprecated one?
knotty steeple
#

never seen void in js Thonk

ember atlas
#

Ya ok, so anyone running whois on me works, it works when I run it, but doesn't when other people run it unless its on me

#

What the hell

#
(node:18912) UnhandledPromiseRejectionWarning: RangeError: Invalid permission string or number.
#

But what invalid permission string or number

broken shale
#

code?

knotty steeple
#

MANAGE_MESSAGE

broken shale
#

add S

#

MANAGE_MESSAGES is correct

#

@knotty steeple

knotty steeple
#

o k

#

there already is s

ember atlas
#

Semper

broken shale
#

you can just do member.permissions.toArray()

ember atlas
#

For which line?

broken shale
#

you don't need the whole array

#

and pushing the permissions one by one

ember atlas
#

Well that will list of all their permissions, no?

broken shale
#

member.permissions.toArray() will return the user's permissions in array form already

ember atlas
#

But won't that use all of their permissions they have?

#

Like even create instant invite, etc

broken shale
#

yes

ember atlas
#

Not what I want

#

Key Permissions

#

Hence why I use the array

broken shale
#

Sorry I gtg I feel really sick today

ember atlas
#

its fine this just annoys me

#

@broken shale @abstract crow Thanks for the help. I had a few permissions wrong, I had Administrator instead of ADMINISTRATOR, and VIEW_AUDIT_LOGS instead of VIEW_AUDIT_LOG

valid frigate
#

how do i get the amount of guilds/users one shard can see in eris

hollow prawn
#

@ember atlas console.log(member.permissions.toArray())
do that and you will see which permissions it returns so you can confirm it for yourself, its up to u how u wanna have it tho
hasPermissions that is deprecated could still work, might have errors/issues tho
what I use is member.permissions.has

amber fractal
#

that's om master tho isnt it

#

Oh hasPermission mmulu

ember atlas
amber fractal
#

But still a permission array is a permissionresolvable too

valid frigate
#

stripIndents is a function/method id assume, you're missing a parentheses?

ember atlas
#

thats not why its not kicking

#

it sends everything just doesnt do the kick action

valid frigate
#

you have a return statement before your bot actually kicks the user

ember atlas
#

oh

valid frigate
#

lmao

#

yeah that's your issue

ember atlas
#

where would i need to put that lol

valid frigate
#

in your case

#

it's returning before it can kick the client*

ember atlas
#

oh

valid frigate
#

so before the return block

ember atlas
#

lmao

valid frigate
#

statement*

hollow prawn
#

change return from the message to member.kick

#

and it should work

valid frigate
#

also use await member.kick()

#

there would be no point in making the function async without an await statement

hollow prawn
#

you normally don't wanna return at the beginning of a if statement thinkLul

#

ye u can do await member.kick() and afterwards return <ur message stuff>

eternal mesa
#

oi @vital lark

#

are you the eris and typescript guy

abstract crow
#

Fuck I can't keep using Visual Studio. Too many oh install this DLL oh and can you install that one too? While we are at it, lets not fucking give you intellisense like you are supposed to. Rider it is!

vital lark
#

@eternal mesa yea why?

stray garnet
#

why does the emojys in embebs dont work for me?

lusty dew
#

Because

#

Not how that works

stray garnet
#

ik what u think.... I used it like this: :dbllmfao:

lusty dew
#

That is exactly how you should use it in the pic

stray garnet
#

But i dont works...

lusty dew
#

Okay give me a sec

stray garnet
#

k

sly parcel
#

f

stray garnet
#

one sec

earnest phoenix
#

How did i get unblocled

cobalt mesa
#

Hello i have a question

can you tell me that it methods with nodejs (more precisely discord.js) you use to know the ram used and the total ram that the bot uses please ??

Please mention me if you have the response

drowsy sentinel
#

`${(...heapUsed / 1024 / 1024).toFixed(2)} MB`
#

For total freeram, you'll need to access the os require('os'), and follow the similar concept.

cobalt mesa
#

Thanks and does it work on glitch

drowsy sentinel
#

That's for you to find out brother.