#development

1 messages · Page 1296 of 1

carmine summit
#

SyntaxError: "docs" is confusing.

slender thistle
#

yup flaze

thin turret
#
burger.bite().then(brg => {
   brg.isGood ? brg.keepEating() : puke()
})
#

If JS

pale vessel
#

ternary :)

thin turret
#

fine

pale vessel
#

brackets 😳

thin turret
#

?

pale vessel
#

never mind

#

nice

undone carbon
#

I got an info that bots not using intents will be affected, idk what is going to affect and literally have no idea. Anyone have any knowledge about this?

carmine summit
#

So I just went to read the docs of the canvas

pale vessel
#

you won't be able to connect if you don't specify intents

carmine summit
#

once I read the basic info, I thought to myself "nah, im not gon do this"

pale vessel
#

thought the same but i got to do some cool things with canvas, you should try your best

#

if a retard like me could do it, so can you

carmine summit
#

nah, maybe after a ear or two

slender thistle
#

Take it slow, yeah KEKW

carmine summit
#

i only have 7 weeks of experience of coding!!!

fiery cave
#

!rank

drifting wedge
#

how would i make html/css with python backend talk to mongo?

#

like for example

#

i make a box, and the person types the prefix and it updates in mongo

#

first tho, how do i make it so the "dashboard" knows the server id from the oath identify guilds thingy?

slender thistle
#

Backend sends the list of guilds either in an array and the data is processed with frontend JS
or
Backend modifies the end HTML via a template language like Jinja, and the frontend then utilizes the IDs of the guilds (possibly via the id attribute)

carmine summit
#

is client.guilds.cache.get().members.get().setNickname a thing?

earnest phoenix
#

check up with the docs

blissful coral
#

@carmine summit you want to get all members?

#

And change nicks?

carmine summit
#

no

#

only one

blissful coral
#

Ok

carmine summit
#

is dat correct??

blissful coral
#

client.guilds.cache.get().member.get().setNickname()

carmine summit
#

why no s?

blissful coral
#

It is members

#

Type

#

Typo*

ivory perch
#

can smbody give time for collaboration for my music bot
need to improve lyrics command and add spotify

earnest phoenix
#

if you pay me

vague jay
#

does anybody code c sharp for unity3d

ivory perch
#

i cant pay sorry:(

vague jay
#

uh

#

does anybody code c sharp for unity3d

carmine summit
#

client.guilds.cache.get('').members.cache.get('')

#

there has to be cache

#

at both

blissful coral
#

Yes

earnest phoenix
#

if you can't pay for people taking their time to develop for you then don't expect anyone willing to help you lol

blissful coral
#

Correct

vague jay
#

does anybody code c sharp for unity3d

blissful coral
#

Cry, take this to DMs with him plz thx

#

@vague jay just ask your question if someone does they will help

faint prism
#

@faint prism Can you help me in getting inside my bot from android nothing else?
@earnest phoenix
#development message

vague jay
#

i cant dm cry

#

extreme i cant dm cry

feral aspen
#

This keeps erroring out

#
    .setColor(colors.cyan)
    .setTitle(`Welcome ${member.user.username}`)
    .setDescription(`Welcome to **${message.guild.username}**, ${member.user.username}.`)

    bot.channels.cache.get(channel.id).send(embed)```
#

cannot read property 'user' of undefined.

blissful coral
#

What is “member” defined as

cosmic forum
#

Anyone here able to help me?

I have a ticket bot written in Nodejs, and it has a transcript command. How do I make it so that for every user mention in the channel, it replaces <@userid> with the user's username?

Here's an example of my current transcript: https://tixy.js.org/t/761703550707040288.html

vague jay
#

extreme i cant dm cry

feral aspen
#

Im doing a guildMemberAdd Event

blissful coral
#

extreme i cant dm cry
@vague jay 2 messages the one about cry wasn’t for you

#

@feral aspen what is member defined as though?

#

Console.log it

#

@cosmic forum check for a user being mentioned then do <user>.username

feral aspen
#

It consoled nothing]

#

I am using a command handler for the Events

blissful coral
#

Ah

feral aspen
#
const colors = require("../../colors.json")
const welcomeChannel = require("../../welcomeChannel.json");

module.exports = async (bot, message, member) => {
    const channel = welcomeChannel[message.guild.id].channel

    if(channel === null) return;
    if(!channel) return;

    console.log(member)

    const embed = new Discord.MessageEmbed()
    .setColor(colors.cyan)
    .setTitle(`Welcome ${member.user.username}`)
    .setDescription(`Welcome to **${message.guild.username}**, ${member.user.username}.`)

    bot.channels.cache.get(channel.id).send(embed)
}```
#

That is the code for it.

blissful coral
#

do client.on(“error”, console.log(error))

nova moat
#

im new to this sever

blissful coral
#

@feral aspen how would you get “message” from a guildMemberAdd event?

pale vessel
#

client.on("error", console.log)

blissful coral
#

There is no message?

#

^ that’s correct sorry

#

@nova moat welcome

cosmic forum
#

@cosmic forum check for a user being mentioned then do <user>.username
@blissful coral Ok, but how would I check for mentions across multiple messages? I only know how to do so for one.

feral aspen
#

what should I async()???

nova moat
#

what are doing @blissful coral

blissful coral
#

@cosmic forum message.mentions.members.first()

#

If you want first mentioned

cosmic forum
#

If you want first mentioned
@blissful coral How would I get all mentions?

pale vessel
#

message.mentions.members

nova moat
#

making bots

blissful coral
#

@nova moat helping people with there bots, if you would like to chat go to #general

#

message.mentions.members

nova moat
#

i wan to maake a bot to

cosmic forum
#

message.mentions.members
@pale vessel But wouldn't that only be for the message that was used to run the command?

blissful coral
#

Yes.

feral aspen
#

@blissful coral what can i do to fix the problem?

nova moat
#

how to make a bot

cosmic forum
#

So how would you do it for other messages as well?

pale vessel
#

@pale vessel But wouldn't that only be for the message that was used to run the command?
@cosmic forum yes

#

other messages?

blissful coral
#

Filter

cosmic forum
#

Yes

pale vessel
#

do you have an array or a collection of them?

cosmic forum
olive raft
#

Bro can anyone help me to run a kayron movies bot?

nova moat
#

i want to a bot like dank memer

cosmic forum
#

do you have an array or a collection of them?
@pale vessel Yes

pale vessel
#

you can map them. messages.map(x => x.mentions.members)

cosmic forum
#

Ok

#

Thanks

pale vessel
#

that would be a collection of mentions across all the messages

cosmic forum
#

I think I know what to do now

nova moat
#

help me male a bot

#

how to make bot

olive raft
#

Bro can anyone help me to run a kayron movies bot?

sage bobcat
#

One message removed from a suspended account.

pale vessel
#

a kayron movies bot

olive raft
#

a what bot
@sage bobcat Kayron Movies Bot

sage bobcat
#

One message removed from a suspended account.

olive raft
#

that bot is movies bot

#

can anyone suggest a other movies bot?

silent cloud
#

Yooo

#

Guys, how i can delete messages with image?

pale vessel
#

check the attachments

silent cloud
#

If i try message.delete it have an error

earnest phoenix
#

i broke my crystal ball so i can't look into your mind to see the error :(

faint prism
#

i want to a bot like dank memer
It's almost copy pasta at this point lol

boreal iron
blissful coral
#

It’s open source

#

Lol

faint prism
#

Even worse then lmao

feral aspen
#
const colors = require("../../colors.json")
const welcomeChannel = require("../../welcomeChannel.json");

module.exports = async (bot, message, member) => {
    const channel = welcomeChannel[message.guild.id].channel

    if(channel === null) return;
    if(!channel) return;

    console.log(member)

    const embed = new Discord.MessageEmbed()
    .setColor(colors.cyan)
    .setTitle(`Welcome ${member.user.username}`)
    .setDescription(`Welcome to **${message.guild.username}**, ${member.user.username}.`)

    bot.channels.cache.get(channel.id).send(embed)
}```

@feral aspen Any help please regarding this?

#

Im using a command handler for the events, and user is not defined.

#

What seems to be wrong with it?

earnest phoenix
#

you just told us

#

user isnt defined

feral aspen
#

What can I do..

earnest phoenix
#

hmmm well

#

you could theoretically

#

define user

#

what's the exact error

pale vessel
#

what event is this?

edgy hemlock
#

umm where is bot commands

feral aspen
#

guildMemberAdd

pale vessel
#

message in guildMemberAdd..?

feral aspen
#

do I remove it?

pale vessel
#

message would be a member in this context

#

yes

feral aspen
#

so bot, member

#

then what.

pale vessel
#

use member.guild.name for something like guild name

#

that's it

#

bot and member

feral aspen
#

Ill see if it works

#

bruh

#

I just noticed I need message

feral aspen
#

I did

#

Bro

pale vessel
feral aspen
#

Bro

#

that is something else

#

if it wasnt embed, it would have worked

pale vessel
#

hm?

#

nani

#

what do you mean?

feral aspen
#

If I send like,Welcome to server

#

it will work

#

but if I put like member.whatver.whatever

#

it wouldnt work

pale vessel
#

show your new code

feral aspen
#
const colors = require("../../colors.json")
const welcomeChannel = require("../../welcomeChannel.json");

module.exports = async (bot, message, member) => {
    const channel = welcomeChannel[message.guild.id].channel

    if(channel === null) return;
    if(!channel) return;

    console.log(message)

    const embed = new Discord.MessageEmbed()
    .setColor(colors.cyan)
    .setTitle(`Welcome ${member.user.username}`)
    .setDescription(`Welcome to **${message.guild.name}**, ${member.user.username}.`)

    bot.channels.cache.get(channel.id).send(embed)
}```
#

user undefined

#

like that.

pale vessel
#

first of all

#

replace message with member

#

remove message from the function

feral aspen
#

Bro

#

I need message for the .send

#

BRO

pale vessel
#

the guildMemberAdd event does not provide message

#

what would message be?

#

a member just joined

feral aspen
#

I use a commahd handler

pale vessel
#

that has NOTHING to do with a message

feral aspen
#

If I remove message, message undefined

pale vessel
#

yes, use member instead to access guild

#

what

feral aspen
#

(node:5836) UnhandledPromiseRejectionWarning: ReferenceError: message is not defined

faint prism
#

advert

sudden cape
#

Spam?

blissful coral
#

@slender thistle

feral aspen
#

@slender thistle

pale vessel
#

cool

faint prism
#

@grizzled summit plz don't advert here

pale vessel
#

double ping 😎

faint prism
#

he is goto mod tbh

pale vessel
#

true

#

even on mobile he's fast af, best mod

feral aspen
#

flazepe

#

(node:5836) UnhandledPromiseRejectionWarning: ReferenceError: message is not defined

pale vessel
#

yes

#

you're not supposed to use message

slender thistle
#

ping some other mod to handle it properly, I deleted it

pale vessel
#

please read the documentation

faint prism
#

I got this

#

@modern sable heya we got an advert

pale vessel
#

<@&304313580025544704> help‫me ‫

#

ez

feral aspen
#

@pale vessel then?

silent cloud
#

I dont understand

pale vessel
compact oriole
#

idot

#

you pinged mods for help

silent cloud
#

Why you ping

#

Ye

pale vessel
#

you don't need message; the event doesn't provide a message

#

why would it

faint prism
#

you pinged mods for help
@compact oriole (edited)

feral aspen
#

.setTitle() the user in the set title is undefined.

compact oriole
#

still dumb

faint prism
#

Doesn't ping tho

pale vessel
#

check your handler

compact oriole
#

still dumb

pale vessel
#

how does your handler work?

#

i'm assuming it provides client and all args the event gave

silent cloud
#

I dont understand how i can delete image by msg.delete()? How i need do it in a code

tight plinth
#

what age the low iq questions here today

pale vessel
#

what do you mean

feral aspen
#

what age the low iq questions here today
@tight plinth No one really asked for your opinion, actually! so shh.

tight plinth
#

smh

pale vessel
#

brain aneurysms as callum would say

compact oriole
#

@tight plinth No one really asked for your opinion, actually! so shh.
tbh same goes for you. "No one really asked for your opinion" is the shittiest response to anything

pale vessel
feral aspen
#

👏

silent cloud
pale vessel
#

love this chat

slender thistle
#

P.s. cut it out everyone

hollow scarab
#

hello
i have been setup dbl webhook and i can post server count but i can't receive a meesage to the webhook when someone voting

sudden cape
#

I dont understand how i can delete image by msg.delete()? How i need do it in a code
@silent cloud What launguade do you use?

slender thistle
#

If you don't want to help, don't say anything

silent cloud
#

NodeJS

pale vessel
#

looks like js

feral aspen
#

So asking a question is violent to you? Good job to your logic

slender thistle
#

P.s. cut it out everyone

#

Thank you

sonic lodge
#

just delete the message as you would a message without an image?

silent cloud
pale vessel
#

nani

hollow scarab
silent cloud
#

just delete the message as you would a message without an image?
@sonic lodge if i try msg.delete() i have error (Unknown message)

pale vessel
#

a message with an image is still a message

silent cloud
#

Nope

pale vessel
#

that message must have already been deleted then

hollow scarab
#

anyone can help?

i have been setup dbl webhook and i can post server count but i can't receive a meesage to the webhook when someone voting

silent cloud
#

that message must have already been deleted then
@pale vessel bot

pale vessel
silent cloud
#

It deletes other text, but it cant delete gif

hollow scarab
#

ok

pale vessel
#

it should be able to

#

it's still a message

silent cloud
#

Bro

#

I too think about that

#

But it writes Unknown message

pale vessel
#

can you show your code?

silent cloud
#

Only part

#
       msg.channel.send(videoattachment)
       backup.create(msg.guild, {
            jsonSave: true,
            jsonBeautify: true
        })
        msg.delete({timeout: 10000})
       .then((backupData) => {
    
       msg.author.send("The backup was created! To upload a backup, enter this command on the server: `"+prefix+"backupload "+backupData.id+"`!");
            msg.channel.send("✅ The backup was successfully created! The backup ID was sent to you in private messages!");
        
        });
        
}
pale vessel
#

you're deleting the author's message right?

silent cloud
#

Not

#

I need to delete bot message

pale vessel
#

ah

#

that could be the reason

silent cloud
#

Hmmm rly?

#

Hmmm

#

Maybe ye

#

But how i can fix it

pale vessel
#

you can do something like msg.channel.send(videoattachment).then(sent => sent.delete({ timeout: 10000 })); to delete the bot's message after 10 seconds

#

am i understanding this wrong

#

i'm not sure lul

silent cloud
#

It should working

#

?

pale vessel
#

msg.delete({timeout: 10000}) would try to delete the author's message

#

is that what you want?

silent cloud
#

I want to delete bot message

#

Not author

pale vessel
#

the image is what you have to replace

#

.then(sent => ) where sent is the message the bot sent

#

which is the attachment

#

followed by sent.delete({ timeout: 10000 }) to delete it after 10 seconds

silent cloud
#

Ty, i need to try it

sudden cape
silent cloud
#

Yep, it working ty @pale vessel

thick gull
hollow scarab
#

srry

#

i mean

sudden cape
#

Im getting this error Cannot connect to host discord.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1124)')](plus alot more) over and over again and have tried almost everything on google but it won't fix. I get it when I use client.run(token)

pale vessel
earnest phoenix
#

update windows

pliant leaf
#

hey im kinda new to coding ig, is there a wait command? so like i do !lol and then can i make it wait 5 seconds then reply? [discord.js]

earnest phoenix
#

a root cert expired a while back, a fix for it was pushed out in an update

pale vessel
#

sounds like setTimeout()

pliant leaf
#

ok

pale vessel
#

you can wrap it in a promise so that you can make something like await sleep(10000);

pliant leaf
#

ok ill try those

sudden cape
sudden cape
#

Doing it now

pliant leaf
#

i couldnt get the timer to work

violet mesa
#

@slender thistle the thing u gave me dont work ;-;

dark kestrel
#
for(i = 0;i < parseInt(collected.content);i++){
                            message.channel.send(`Please tell me the rule number ${i} (__Only the rule's content !__)`);
                            let collected = await message.channel.awaitMessages(filter, { max: 1, time: 60000, errors: ['time'] })
                            collected = collected.first();
                            return rules.push(collected.content);
                        }

Why this not looping ?

#

oh

#

im dumb

tight plinth
#

check if collected.content exists

inner wharf
#

Anyone aware of a way to stream audio from youtube-dl instead of downloading it to a computer?

dark kestrel
#

@tight plinth it is exist

tight plinth
#

hm

dark kestrel
#
                    collected = collected.first();
#

not thast

#

but collected exist

#
                    message.channel.send("Please supply how many rules you will need");
                    const filter = m => m.author.id == message.author.id;
                    let collected = await message.channel.awaitMessages(filter, { max: 1, time: 60000, errors: ['time'] })
                    collected = collected.first();
                    if (collected.content.toString().toLowerCase() == "cancel") return message.channel.send("Canceled");
                    if(isNaN(collected.content) == true ) return message.channel.send("Invalid number");
                    else if(isNaN(collected.content) == false){
                        for(i = 1;i < parseInt(collected.content);i++){
                            message.channel.send(`Please tell me the rule number ${i} (__Only the rule's content !__)`);
                            let collected = await message.channel.awaitMessages(filter, { max: 1, time: 60000, errors: ['time'] })
                            collected = collected.first();
                            return rules.push(collected.content);
                        }
                    }

This is the full code

earnest phoenix
#

GOD I'VE WENT THROUGH THREE CHROME CRASHES NOW

WHY IS MY COMPUTER SO FUCKING TERRIBLE

dark kestrel
#

smh

earnest phoenix
#

development allows technology stuff

violet mesa
#

iojo

dark kestrel
#

but not yelling that ur pc rip

violet mesa
#

woops

earnest phoenix
#

ok

dark kestrel
#

it is develpemnt

#

not bot

#

not only

earnest phoenix
#

well it's technically allowed to ask for help with fixing chrome

earnest phoenix
#

@earnest phoenix @dark kestrel you can CHAT about bot development only but you can ask for help wirh anything programming related

#

OH BOI CHROME FIXED bye guys

dark kestrel
#

(bot) is a example

#

smh

#

this is for development

pale vessel
#

bot is primary topic but other development topic can still be discussed here xd

#

idk about chrome crashes tho 😳

earnest phoenix
#

whitenames know less than greennames

#

uhh yeah

#

also wtf is this website

dark kestrel
earnest phoenix
#

flashing images

#

be careful not to look at your browser

slender thistle
#

That fucking hurts

#

and I want to ask you one question

#

why

earnest phoenix
pale vessel
dark kestrel
#
                        let i = 1;
                        async function loop(){
                            console.log(i);
                            message.channel.send(`Please tell me the rule number ${i} (__Only the rule's content !__)`);
                            let collected = await message.channel.awaitMessages(filter, { max: 1, time: 60000, errors: ['time'] })
                            collected = collected.first();
                            i++;
                            rules.push(collected.content);
                            if(i == parseInt(collected.content)) return;
                            loop();
                        }       
                        loop();

Aahahah i don't need help anymore

earnest phoenix
#

@earnest phoenix weak

dark kestrel
#

this is the real loop

sudden cape
#

It's still not working

boreal iron
#

Lemme thank god for NoScript

dark kestrel
#

@sudden cape it works

sudden cape
#

My code

#

Is not working

#

Still getting the same error on client.run(token)

faint prism
#

Still getting the same error on client.run(token)
@sudden cape is it undefined?

sudden cape
#

client = discord.Client()

load_dotenv()
token = os.getenv("DISCORD_BOT_SECRET")
client.run(token)

#

Then I have the token in an environ

earnest phoenix
#

lol

#

what does this bot do

sudden cape
#

Also I have checked and it is working

earnest phoenix
#

what does this bot do
@earnest phoenix it does bot stuff?

sudden cape
#

Also that was parts of the code

earnest phoenix
#

oh wow

sudden cape
slender thistle
#

is it the SSL error

sudden cape
#

1.5.0

earnest phoenix
#
Error: Failed to authenticate, have you run firebase login?

ahh don't you tell me i have to login WITH INTERNET EXPLORER AGAIN with the URL then copy the redirect, goto my botum and do c.eval phin("https://myrepl.code913.repl.co/"); with the URL queries as after the /

slender thistle
#

Tried asking in the dpy server yet?

sudden cape
#

Havent joined that server

slender thistle
earnest phoenix
#

did you know my google is fucked so brave and cryptotab browsers both cause fucking errors whenever i try to login so i have to goto internet explorer to login then copy the redirect and come back to brave and open it?

carmine summit
#

is client.messages.cache.get() a thing?

earnest phoenix
#

yes

open rune
#

yes

#

to call an id

earnest phoenix
#

MessageManager is a thing

carmine summit
#

yeah yeah

#

suree

#

thanks

faint prism
#

.get(<id>)

carmine summit
#

i know how to use it catsmack

earnest phoenix
#

i know how to use it :catsmack:
@carmine summit explain how

carmine summit
#

just wondering if its a thing

faint prism
#

You know how to use the thing you are asking if exists?

carmine summit
#

idk

#

my brain works that way

barren valve
carmine summit
#

is that even

#

alright

#

im out

earnest phoenix
#

@barren valve node.js preview or just node?

barren valve
#

Node.js

earnest phoenix
#

pretty sure you can't

#

i think

barren valve
#

It was working 5 months ago lol

earnest phoenix
#

last time i checked on my PC VSC only allows node.js preview

faint prism
#

its "type": "node" btw

#

@barren valve

barren valve
#

I put node

#

And tried rerun

faint prism
#

Looks good

barren valve
#

and get this

faint prism
#

Yeah, that's normal?

barren valve
#

But it isn't online

faint prism
#

Do you have a breakpoint?

barren valve
#

Idk 🙂

faint prism
#

lol

barren valve
#

Bruh

earnest phoenix
#

Does have websites for command development of bots?

faint prism
#

Well I recommend looking up how to debug js in VSC. It's a pretty powerful tool since you can see variable values in memory and set breakpoints

earnest phoenix
#
✔  Success! Logged in as mdaatifalam2018@gmail.com

remote logging in to firebase on repl.it succeeded WhiteYay

barren valve
#

Okay

earnest phoenix
#

Well, have websites for bots dev, ex: botghost.

faint prism
#

um

open rune
#

tf

#

xd

faint prism
#

It is very hard to understand what you are asking.

earnest phoenix
#

Oh.

#
Before we get started, keep in mind:
  * You are initializing in an existing Firebase project directory

well how do i make it initialize a whole new project

faint prism
#

start from another folder ig

earnest phoenix
#

delete already existing firebase files?

#

that should work

#

it works

#

thanks for listening to me ask a question then figure it out on my own then go yayayay in chat

blissful coral
carmine summit
#

The satisfaction of making a command run with no errors on first try

earnest phoenix
#

The satisfaction of making a command run with no errors on first try
@carmine summit congrats on learning common sense

carmine summit
#

I'm graduate yehey

earnest phoenix
#

can you make it so instead of redirecting to a different page <form> tag executes a function with the parameters as the input?

#

MDN GET IN MAH BRAIN

blissful coral
#

Mdn comin up

#

Haha

slender thistle
#

onclick be like hi

#

or just redirect to #

blissful coral
earnest phoenix
#

How do I read URL queries in browser javascript?

compact echo
#

Does anyone know how to use sentry with typescript? I've been searching but couldn't find anything

earnest phoenix
#

nope

#

i dont

#

@compact echo If you just straight ask the question instead of waiting for someone to say they're good at TypeScript it will save us a lot of time and will be a lot better

#

(this is not minimodding this is common sense)

compact echo
#

@compact echo If you just straight ask the question instead of waiting for someone to say they're good at TypeScript it will save us a lot of time and will be a lot better
@earnest phoenix ? I never said you have to be good at typescript.

slender thistle
#

Are you actually asking "how"

#

and not just "is there anyone who's good at it"

earnest phoenix
#

read the website we sent

slender thistle
#

errr where's Erwin...

earnest phoenix
#

||(saying we so i don't get beaned for minimodding smh)||

slender thistle
#

ah he's offline, rip

compact echo
#

Oh

earnest phoenix
#

typescript is a superset of js, you use it like you would in js thonkang

dark kestrel
#

Anyone know how i can get the message link ?

earnest phoenix
#

How do I read URL queries in browser javascript?
I tried doing window.URL.searchParams and window.URLSearchParams but both return undefined

compact echo
earnest phoenix
#

or you can enable developer mode in discord then right-click message then click copy ID

#

thonk

#

they were asking for the message url

dark kestrel
#

"Anyone know how i can get the message link ?"

earnest phoenix
#

it's a button on the client

#

i just sent it

#

read the chat

#

lol

autumn aspen
#

guys how can I screenrecord on my screen?

dark kestrel
#

alt + f4

autumn aspen
#

alt + f4
@dark kestrel stfu

dark kestrel
#

:))

autumn aspen
#

:))
@dark kestrel do Ctrl + L

dark kestrel
#

no

earnest phoenix
dark kestrel
#

window + L

autumn aspen
#

exactly

dark kestrel
#

not ctrl

autumn aspen
#

lmao

open rune
#

screenshot screen?

#

by pressing printscreen button :\

autumn aspen
#

screenshot screen?
@open rune dude thats in windows

#

nor fkn google

#

lmao

dark kestrel
#

prt sc by me

#

print screen

earnest phoenix
#

@compact echo sentry literally has docs on how to use it with typescript??? first result of google

open rune
#

lol

#

I thought u were asking about prt screen

autumn aspen
#

@drowsy sentinel how can I screenrecord with a tool in windows?

dark kestrel
#

use Paint

#

it is good

autumn aspen
#

tf is that

dark kestrel
#

video recorder

#

this one

earnest phoenix
dark kestrel
#

it is verry good

blissful coral
#

Valder stop giving out false info

dark kestrel
#

it record on 4k

blissful coral
#

You are not helping

dark kestrel
#

:))

blissful coral
#

@slender thistle

dark kestrel
#

dude pls

slender thistle
#

@dark kestrel stop trolling, this is a channel for actual help

dark kestrel
#

ok

mild flower
#

why am i getting Nan ms?

autumn aspen
#

why am i getting Nan ms?
@mild flower chill I will help u

mild flower
#

yeah how am i to tranport that same client over to that command?

compact echo
#

@mild flower ```js
<Client>.ws.ping

blissful coral
#

^^

mild flower
#

@compact echo that makes no difference than bot

earnest phoenix
#

@mild flower bruh

compact echo
#

I changed it

mild flower
#

oh

autumn aspen
#
Bot Latency: \`${ping}\`, API Latency: \`${Math.round(client.ws.ping)}\`   |   :ping_pong:`}})

@mild flower

earnest phoenix
#

Are you creating a new client on every new command :D?

autumn aspen
#

Are you creating a new client on every new command :D?
@earnest phoenix lmao sure he has no command handler

mild flower
#

how am i to transfer that same client on a command handler?

autumn aspen
#

whyyyyyyyyyy

earnest phoenix
autumn aspen
#

oh lol

earnest phoenix
#

through arguments

blissful coral
#

Args

autumn aspen
#

how am i to transfer that same client on a command handler?
@mild flower dude u dont need client on on a command handler

wintry sun
#

Hello my fellow devs

#

😄

autumn aspen
#

hiiiiiiiiiiiiiiiiiiii

#

sus

blissful coral
wintry sun
#

📑 in source code all day

earnest phoenix
#

@autumn aspen they don't, but if they want to use the client then they need to pass the client through the arguments of the command handler

or anything that references the client for that matter

wintry sun
#

Lol

#

So u want to learn node.js ?

#

It's pretty easy

faint prism
#

Sounds like an incoming advert

wintry sun
#

my bots name is FUN++

mild flower
autumn aspen
#

@autumn aspen they don't, but if they want to use the client then they need to pass the client through the arguments of the command handler

or anything that references the client for that matter
@earnest phoenix exactly as I did.

#

lol

faint prism
#

my bots name is FUN++
@wintry sun oh yeah? Show source code

autumn aspen
#

@mild flower I can literally give u a free command handler in chat but N O lol

wintry sun
#

Ok

#

@wintry sun oh yeah? Show source code
@faint prism
Come dm

mild flower
#

ok den

faint prism
#

why dm tho

autumn aspen
#

:GWvertiPeepoSadMan:
@mild flower bc I cant give u mine it was a joke

#

''who asked endph''

#

^^

earnest phoenix
#

-bots

gilded plankBOT
blissful coral
faint prism
earnest phoenix
#
{
search: "?text=e"
}

what's the best way to convert URL queries like this to objects where the properties have there values from the URL

blissful coral
slender thistle
autumn aspen
#

#commands
@faint prism tf is that pfp u when u are angry lol?

earnest phoenix
#

k sry

blissful coral
#

Not the place @autumn aspen

slender thistle
#

Cut the fucking chatter

#

Use appropriate channels please

autumn aspen
#

Not the place @autumn aspen
@blissful coral tf who are u?

blissful coral
#

Stop.

autumn aspen
#

glizzy

slender thistle
#

Endph move to #general, you were told multiple times and another warning is a mute

mild flower
#

how am i supposed to transfer the client through args

autumn aspen
#

Endph move to #general, you were told multiple times and another warning is a mute
@slender thistle yo wait a min hol up, ok but pls moderate good

#

Im going to gen

blissful coral
#

@mild flower read what I sent on command handlers

#

The link

mild flower
#

i read it

#

maybe im brain dead

wintry sun
#

Hello

autumn aspen
#

maybe im brain dead
@mild flower just dm for one

#

Im Greg the atch man form

blissful coral
#

And this it relevant to this channel how?

digital ibex
#
{
search: "?text=e"
}

what's the best way to convert URL queries like this to objects where the properties have there values from the URL
@earnest phoenix what language and more context

charred geyser
blissful coral
#

I was asking a question to the user waitWhat

charred geyser
#

why? they have already been told to move

blissful coral
#

It was after the fact. #general if you have a question abt it

earnest phoenix
#

> And this it relevant to this channel how? is just an indication to move to another channel lol

sick pelican
#

how can i create a role where my bot goes in a server and a person tries to play on my bot?

earnest phoenix
#

in which library

#

also

#

"play"?

#

bots don't get "played" they're not games lol

sick pelican
#

just asking

charred geyser
#

asking what?

sick pelican
#

as a reference

charred geyser
#

rephrase it, it doesnt really make sense

sick pelican
#

i mean when my bot will go to a server he will give a role to the user who uses the bot so how to do that

earnest phoenix
#

i asked you already in which library

charred geyser
#

like the user gets a role when they use the bots command?

sick pelican
#

ye

charred geyser
#

what lib

sick pelican
#

umm js?

earnest phoenix
#

that's a language

charred geyser
#

discord.js?

sick pelican
#

yes?

charred geyser
#

just have the bot check if the user has the role

#

when the message event happens

blissful coral
#

I think he is asking to give a role in a guild

sick pelican
#

no it will add the role when the command is being executed

blissful coral
#

To the person sending it

charred geyser
#

yeah

sick pelican
#

yeah

blissful coral
#

message.member.roles.add(“role id”)

#

If v12^

charred geyser
#

when the command event happens

sick pelican
#

it will work without the role existing on the server?

#

in message

charred geyser
#

well you would have to make it check if it exists

blissful coral
#

message.member

charred geyser
#

and if not

blissful coral
#

Is a guild member

charred geyser
#

create it

blissful coral
#

Yeah^

#

If the role doesn’t exist either return or add the role your choice at that point

sick pelican
#
client.on('message' , message => {
let prefix = '!'
if (message.content === '${prefix}hello' ){
// the user will get a role
message.reply("hello")
}
})
``` ?
#

yeah i want to add the role

blissful coral
#

message.member.roles.add(“role id”)
@blissful coral

sick pelican
#

ok thx!

#

and what abt adding the role to the server ?

earnest phoenix
#

have your prefix outside of the handler, otherwise you're creating it every time you get a message

#

also for string interpolation you need ` not '

sick pelican
#

i mean i could do it but i have some json file writings so i could not configure that part

earnest phoenix
#

how is that relevant

sick pelican
#

on nvm i am stupid

#

i will try

#

you mean prefix + "hello" right?

earnest phoenix
#

you could do that

pale vessel
#

you can use the way you did, just change ' to `

earnest phoenix
#

but a nicer way is just to interpolate with ` this

sick pelican
#

hmmk

#

message.member.roles.add(“role id”)
will this add the new role to the server or only the use? @blissful coral

pale vessel
#

the member

#

for server, use guild.roles.create()

sick pelican
#

so what will i do for the server?

#

oh ok

#

you mean this right?
guild.roles.create({
data: {
name: 'Super Cool People',
color: 'BLUE',
},
reason: 'we needed a role for Super Cool People',
})
.then(console.log)
.catch(console.error);

charred geyser
#

dont make it create one every time though

sick pelican
#

yeah ik

sick pelican
#

ok got it!

charred geyser
#

have it check for a role in the server

#

if !role

#

create

#

if role

sick pelican
#

@charred geyser it will only add when a thing is purchased from the shop

charred geyser
#

give to user

sick pelican
#

ok

charred geyser
#

sure

#

time to make a fucking website :((

sick pelican
#

nice

charred geyser
#

no

sick pelican
#

@pale vessel can i do the 'color : 0x....' or it cant be done?

#

i mean hex colors?

charred geyser
#

yeah you can set the color of a role

sick pelican
#

ok

#

actually i am very new to this coding and stuff i just came from 3 moths of expirience

charred geyser
#

its something like

#
guild.roles.create({ data: { name: 'NAME', permissions: ['EXAMPLE', 'EXAMPLE2'], color: 'HEX' } });
#

i think

sick pelican
#

okie

#

is it mandetory to give perms?

pale vessel
#

no

sick pelican
#

ok

charred geyser
#

i dont think anything is required

#

if you dont specify a name it will default to "New Role"

gentle lynx
charred geyser
#

i think

gentle lynx
#

How is it not a function

pale vessel
#

because it isn't a function

charred geyser
#

what are you even trying to do?

gentle lynx
charred geyser
#

what are you actually trying to do?

#

edit a message?

gentle lynx
#

Replace all of the [user]'s to a mention

#

Not just one

charred geyser
#

whats the context?

gentle lynx
#

Is that important

charred geyser
#

kind of

gentle lynx
#

A welcome message

drifting wedge
#

to those of you whos bot has a dashboard

#

how many lines in total is it?

#

and how long did it take to make it?

charred geyser
#

so far mine is only like 1k lines

drifting wedge
#

ping plez

#

alr

charred geyser
#

@drifting wedge

#

and

#

it took like

drifting wedge
#

can i like see what it looks like?

charred geyser
#

a couple weeks

#

its not even up rn

#

lol

drifting wedge
#

ah ok

charred geyser
#

you are a python guy right?

drifting wedge
#

well yes

#

but the dashboard will be a mix python and js

#

also i use mongo

charred geyser
#

nice

drifting wedge
#

and... im fucking screwed lol

#

never used js b4

charred geyser
#

nah

drifting wedge
#

so im dead!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

charred geyser
#

its not too hard

drifting wedge
#

im doing this

charred geyser
#

nice

drifting wedge
#

like following this

charred geyser
#

good luck

drifting wedge
#

but the thing is the guy here uses mongo local

#

and i use mongo atlas

#

so ill see lol

#

ty

earnest phoenix
#

@drifting wedge outdated yt tutorials

charred geyser
#

theres like no difference

drifting wedge
#

@drifting wedge outdated yt tutorials
@earnest phoenix its june 2020

earnest phoenix
#

mongo atlas and mongo local are the same thing just the server that stores stuff is different

drifting wedge
#

honestly @earnest phoenix you like never help.... ever

charred geyser
#

mongo atlas and mongo local are the same thing just the server that stores stuff is different
@earnest phoenix yeah

earnest phoenix
#

honestly @earnest phoenix you like never help.... ever
@drifting wedge literally no fucking guy's job here to help

drifting wedge
#

like when i say pls ping me: ur like! @drifting wedge @drifting wedge @drifting wedge @drifting wedge @drifting wedge @drifting wedge

earnest phoenix
#

because

#

you didn't say what to ping for

charred geyser
#

ping me

drifting wedge
#

fair ig

slender thistle
#

Let's be more helpful, cut the chatter, and stop being smartasses

charred geyser
#

lol

earnest phoenix
#

ok

#

i love when somebody uses lines as a measurement of complexity

slender thistle
#

One example of less-lines-more-complex is working with 2D lists in list comprehensions in Python

#

Barely fucking readable as well, I regret ever doing it

earnest phoenix
#

@slender thistle well handling HTTP stuff in browser javascript is weirder tbh

pale vessel
#

xhr troll

earnest phoenix
#

like wtf is a worker and stuff

#

try unsafe snowflake generator in c#

#

oh my god i went insane

slender thistle
pale vessel
#

@gentle lynx did you figure it out

charred geyser
#

is react js a decent thing to use for creating a ui for my dashboard or can anyone suggest something better?

earnest phoenix
#

yes

#

also

#

shiv i found the beauty

#

this method took me 3 hours to debug properly because i kept messing up the pointers

charred geyser
#

nice

#

c# scares me

faint prism
#

I smell C#

slender thistle
#

Oh God

faint prism
#

oh no
pointers :spooked:

charred geyser
earnest phoenix
#

i think i can optimize that even more

#

but im lazy

#

the generator is fast enough for my uses already

stiff walrus
#

i cant get online my bot
i write 'node pkmn.js'
but this happens

#

what can i do?

gentle lynx
#

@pale vessel no

stiff walrus
#

someone help?

pale vessel
#

what's msMsg

gentle lynx
#

A string

drifting wedge
#

The system cannot find the file specified.

pale vessel
drifting wedge
#

im getting this error with js

pale vessel
#

not supported in node

drifting wedge
#

anyone know why?

pale vessel
#

use string.replace() instead

gentle lynx
#

It replaces one string though

#

One find*

pale vessel
#

you can use the g flag

gentle lynx
#

Global?

pale vessel
#

yes

drifting wedge
#

The system cannot find the file specified.
@drifting wedge i keep getting this eror

#

anyonw know why?

#

only with js

signal vortex
#

@stiff walrus when requiring npm packages, they must be wrapped in quotes. e.g. ("discord.js")

stiff walrus
#

oh k

signal vortex
#

What you tried do is access the js property of the variable discord. Which won't work because you've tried access it in the initialization of the discord

stiff walrus
#

still same

#

actualy

#

i write node pkmn.js

#

but still same error

signal vortex
#

Show code now

drifting wedge
#

me?

signal vortex
#

@drifting wedge what's your problem?

stiff walrus
drifting wedge
#

The system cannot find the file specified.

#

error

stiff walrus
#

oh mb

#

wait

quartz kindle
#

quotes

stiff walrus
quartz kindle
#

yes now its correct

stiff walrus
#

how do i start the bot?

#

i eman its offline

#

mean*

quartz kindle
#

you did it before

stiff walrus
#

i want it be online

quartz kindle
#

node yourfile.js

stiff walrus
#

still same

#

pkmn.js

quartz kindle
#

then you didnt save the file

drifting wedge
#

someone plez help lol

stiff walrus
#

ohhhh

dark kestrel
#

How i can get a message id with bot

stiff walrus
#

thank you so much sir

dark kestrel
#

and then delete it

earnest phoenix
#

Message#id

dark kestrel
#

and how i can delete it ?

quartz kindle
#

@drifting wedge show full error

earnest phoenix
#

in which library

dark kestrel
#

djs

#

ofcourse

earnest phoenix
#

Message#delete

#

delete is a method

dark kestrel
#

how i can find the message ?

earnest phoenix
#

i don't know

dark kestrel
#

to delete

earnest phoenix
#

what are you doing

signal vortex
#

<@ 332238950351634436> when requiring npm packages, they must be wrapped in quotes. e.g. ("discord.js")
@signal vortex ASfacepalm

dark kestrel
#

._.

earnest phoenix
dark kestrel
#

fetchMessage ?

#

idk

quartz kindle
#

you want to delete a message with its id?

dark kestrel
#

yes

quartz kindle
#

you need to fetch it from the correct channel

dark kestrel
#

._.

#

sad

#

oh

#

ok

quartz kindle
#

await client.channels.cache.get(channel id).messages.fetch(message id)

stiff walrus
#

how do i restart my bot

quartz kindle
#

from cmd or from discord?

stiff walrus
#

discord

quartz kindle
#

you can shut it down with process.exit()

#

so you can make a command then does process.exit() when you use it

#

but that will only shut it down, you need something else to restart it

dark kestrel
#
let msg = await client.channels.cache.get(channel id).messages.fetch(message id);
msg.delete()

???

quartz kindle
#

yes

dark kestrel
#

ok

drifting wedge
#

bruh

#

im getting this error

#

The system cannot find the file specified.

quartz kindle
#

show full error

drifting wedge
#

when running anything in js

#

thats it

quartz kindle
#

show a picture of your cmd

#

including the command you ran

dark kestrel
#
channel.send(embed);

How i can get ID from this ?

quartz kindle
#

a = await channel.send()
a.id

dark kestrel
#

ok

#
guild.rules.rulesArr.find(a => a.ruleNum == args[0])

@quartz kindle how i can delete this value

#

ruleArr = array

#
rules = {"channelId":" ", "messageId": " " ,"rulesArr":[]}
#

oh i see how

sudden geyser
#

If you want to remove a certain element in an array, you could use <Array>.splice

drifting wedge
#

wtf

#

i cant even run anything

#
The system cannot find the file specified.```
#

thats the error im getting in js

sudden geyser
#

You need to give us more context.

#

What are you doing which is resulting in that message.

drifting wedge
#

i use atom

#

im not good with js

#

send me like print hello world

#

in js

quartz kindle
#

what exactly are you running

#

and where from

drifting wedge
#

just so u can see

quartz kindle
#

are you using cmd?

#

or powershell?

drifting wedge
#

atom

quartz kindle
#

and what exactly do you press or type that makes it show that error?

drifting wedge
#

the run command

#

like run code

quartz kindle
#

is atom configured to run node.js in the first place?

drifting wedge
#

i think so

quartz kindle
#

did you install a package to run code?

drifting wedge
#

yea

quartz kindle
#

atom doesnt come with anything like that built in, from what i've seen

drifting wedge
#

i can run python

quartz kindle
#

never used it

#

python and node.js are different, if its configured to run python then it wont work

#

do you have the atom-runner package installed?

drifting wedge
#

ill see

#

i have aonother one

#

im getting atom-runner

#

im super confused

earnest phoenix
#

@drifting wedge how da hell would atom run javascript if you configured it to run python

drifting wedge
#

im confused

#

rn im trying vscode

quartz kindle
#

what are you confused about

#

atom and vscode are code editors, they are like microsoft word, but for code

#

they are not made to run the code, just to write it

#

they either dont have the required tools to run code built in, or they rely on plugins to do it

#

traditionally, running the actual code was always done with cmd or powershell

#

in a separate window

dark kestrel
#
                    const message = client.channels.cache.get(guild.rules.channelId).messages.fetch(guild.rules.messageId);
                    await message.edit(embed);

This is not editing

#

in console does show anything

#

@quartz kindle 😦

quartz kindle
#

you need to await the fetch

dark kestrel
#

oh nvm

earnest phoenix
#

woah
awaiting message.edit but not an actual fetch

prisma oriole
#

1000 iq right there

#

who doesnt love awaiting synchronous code

dark kestrel
#
const msg = await message.guild.channels.cache.get(guild.rules.channelId).messages.fetch(guild.rules.messageId);
await msg.edit(embed);

Still not working

earnest phoenix
#

@dark kestrel wtf is guild.rules.messageId

dark kestrel
#

the message's id

prisma oriole
#

thats awaiting the cache.get

#

you have put parenthesis lemme check

earnest phoenix
#

yep

dark kestrel
#

parenthesis = ?

earnest phoenix
#

parenthesis = ?
@dark kestrel that means brackets

#

()

dark kestrel
#

where ?

#

no u don't have to

#

just await

#

not await()

#

@quartz kindle u there ?

charred geyser
#

what is guild.rules.messageId

dark kestrel
#

message id

charred geyser
#

of what?

dark kestrel
#

of a message

#

._.

charred geyser
#

what message lol

#

what is guild.rules ?

dark kestrel
#

smh

quartz kindle
#

the code is correct

#

any error in the console?

dark kestrel
#

nope

quartz kindle
#

can you console.log(msg) before editing?

dark kestrel
#

it is not editing

#

ok

prisma oriole
#

it doesnt matter what guildroles is as long as hes supplying a valid message id

earnest phoenix
#

he's doing RULES

charred geyser
#

yeah

earnest phoenix
#

NOT ROLES

dark kestrel
#

OMG

#

i was doing in wrong FILE

#

OMG

charred geyser
#

it doesnt matter what guildroles is as long as hes supplying a valid message id
@prisma oriole i know but i assumed that the issue was that it wasn't a valid message id

earnest phoenix
#

he's doing RULS
NOT RLES
@earnest phoenix and I'm doing typos apparently

charred geyser
#

lol

prisma oriole
#

ah ok

earnest phoenix
#

How can I create an embed page using addField?

let description = `Hello 1`
    let embed = new Discord.MessageEmbed()
      .addField(`${description}`)
    let msg = await message.channel.send(embed);

    await msg.react("◀️");
    await msg.react("▶️");

    let collector = msg.createReactionCollector(
      (reaction, user) => user.id === message.author.id);

    collector.on("collect", async (reaction, user) => {
      if (reaction._emoji.name === "◀️") {
        description = `Hello 1`
        embed
          .addField(`Hello 1`,`${description}`)
        msg.edit(embed);
      }
      if (reaction._emoji.name === "▶️") {
        description = `Hello 2`
        embed
          .addField(`Hello 2`,`${description}`)
        msg.edit(embed);
      }
    })

it adds a new addField every time I change a page. How can I avoid this? a single addField will be edited.

dark kestrel
#

YEY it works

stiff walrus
#

how do i embed message?

earnest phoenix
#
const embed = new Discord.MessageEmbed()
.setColor('BLUE')
.setDescription('hi')
message.channel.send(embed)
sudden geyser
#

What library are you using

fervent goblet
#

is there a way to make a functions file where i can call it anywhere without having to always a define it? like a client variable?

gentle lynx
stiff walrus
#

thank youu

gentle lynx
#

why is this showing up?

earnest phoenix
#

only bot development

#

bro.

thick gull
#

im p sure its general development

sudden geyser
#

And yeah it's general development

#

Bot development is just the main focus

gentle lynx
#

do you want me to send you that?

#

the error log

sudden geyser
#

I want to see if the logs explain what went wrong and if you're able to fix it from there.

gentle lynx
sudden geyser
fervent goblet
#

how do i make functions available like

client.toolbox.FunctionName()
earnest phoenix
sudden geyser
#

@gentle lynx are there any logs which show that an error clearly occurred

#

@fervent goblet you add a property to client (e.g. client.toolbox = ...)

#

You could do it via assignment after initialization or using a class and setting the property in the constructor, which I recommend if you want to do more than just that.

gentle lynx
#

here's the full log

sudden geyser
#

Hm, so it's sort of doing the same thing multiple times.

gentle lynx
#

should i restart my laptop

faint prism
#

Probably wouldn't hurt

earnest phoenix
#

do you think 1k servers is too early to shard