#Coding

1 messages · Page 1 of 1 (latest)

astral harness
#

Which is your favourite coding style? Or just talk coding.

#

@drowsy herald @rapid lintel Hai

drowsy herald
#

prayge Ty Grindy

#

@summer trail

rapid lintel
#

omg thankyou

summer trail
#

YOOOOOOOOOOOOOOOOO

rapid lintel
summer trail
#

finna dump my lua scripts frrrrrrr

drowsy herald
#

I had to bribe Grindy ssunkappa

summer trail
#

/j

astral harness
#

I get to learn coding KokoroLmao

summer trail
#

yall can see my unoptimized modcharts frrrrr

drowsy herald
#

I can show you all my bot commands and stuff I developed over the years sku

rapid lintel
#

im literally only at len for python

#

LMAOOO

drowsy herald
#

Wow send screenshots!!

#

I don’t like opening script files over the internet

summer trail
#

lmfao

#

use pc and look at part of it

#

simple

summer trail
#

and now I shall lurk

drowsy herald
#

One moment gotta get back to my MacBook sku

#

@summer trail ever tried databases sku

summer trail
#

naw

drowsy herald
#

That’s like my favorite thing to do

summer trail
#

only thing i know is beep boop bap

karmic gate
#

Any type is good

drowsy herald
#

This is one of my commands

#

That I developed

#

It involved buttons, modals and select menus, and embeds on the UI. Then all the other work is on the backend

#

The buttons for the action, user information, and messages are really neat. Because I was able to store the user IDs locally inside the custom ID of the buttons. So it involved no database.

astral harness
drowsy herald
#

This was all in JavaScript

astral harness
#

Would the system flag if duplicates make their way in somehow?

#

@flint bison A new place for ya too.

flint bison
#

i been having to deal with my imaging project recently

#

To get that running on my Hospital's servers I had to chart it entirely from scratch

drowsy herald
astral harness
drowsy herald
#

Right now it’s all going to a main core channel. Which makes it impossible to get specific user reports.

drowsy herald
#

My objective is to allow that to happen with threads. Then I can track who creates a report then stop them from making a second duplicate report.

#

@crude kernel hello fellow coder duder

#

I would ping fluxpuck

#

however sku

flint bison
#

You will get eaten alive

drowsy herald
#

Yes

flint bison
#

Oh well

#

Not my department

#

Wait

#

I’m an Assistant Manager now. It is my department

serene gate
#

only coding I did was html if that even counts for something

astral harness
#

Of course it does!

#

I remember small bits and pieces of html & css.

serene gate
#

did a whole course on code academy

astral harness
#

Interesting. I never did that. Instead, I studied someone else’s coding, and tried to mimic it. This was years ago though.

drowsy herald
#

Much YouTube and much reading lol

#

I self taught myself that stuff

serene gate
#

crazy

drowsy herald
serene gate
steady harness
#

im learning python in school

#

lmao

rapid lintel
#

same

steady harness
#

w3schools website

#

its a W website for coding

steady harness
#

like not all

#

but motly all or the most common ones

#

html, css, js, java, python, sql, php, C, C++, C$

crude kernel
#

Interesting thread, gonna be great to ask about stuff I'm learning and sharing what I've made so far

rapid lintel
#

learning loops rn n its confusing

serene gate
#

rip

steady harness
#

Hf

drowsy herald
steady harness
#

not everyone is like you

#

lmao

crude kernel
#

How is it confusing

#

Or like what's confusing you?

rapid lintel
#

like the for and while loops

#

idk what im doing LOL

steady harness
#

yeah

steady harness
rapid lintel
summer trail
#

Only loop stuff I know is while true do

#

and that’s all I know from Haxe coding for FNF source code

#

:p

crude kernel
steady harness
#

lmao

alpine crow
#

Python & JS main here

#

Also web dev

#

Meaning html + css

#

And tailwind

alpine crow
#

XD

alpine crow
#

XD

steady harness
#

oo

#

icic

alpine crow
# steady harness icic

They'll prob crash your terminals and possibly your pc if you're running them internally

#

So they do be bad,

#

Any infinite loop left alone running is bad

#

Sometimes people sneak those in their codes to prank people

steady harness
#

damn

#

understood

drowsy herald
alpine crow
drowsy herald
#

You code discord bots hhmmm

alpine crow
drowsy herald
#

I used to professionally

#

Stepped off for previous reasons

#

Mostly because their API blows

alpine crow
#

Hmm

drowsy herald
#

Or did back then

crude kernel
#

Js fellows 🤝

alpine crow
#

I used to run on Google cloud cluster

drowsy herald
#

They change one little thing

#

And then your whole project won’t work

#

hahaha bs

alpine crow
#

Mhm

#

@drowsy herald and I logged all the error on discord too but I got like 50 error per minute

#

They update a package used in the bot and the entire bot stops working

#

Gosh the nightmares finding every file to fix, when you have like over 100 of them

crude kernel
#

Do they just straight up change function names or the way they work?

alpine crow
#

Both I suppose most of the time

crude kernel
#

Lmao wth

alpine crow
# crude kernel Lmao wth

Yes so the process will most like go like this > go and read the updates on the package creators page or if the js itself got updated then go check that then check all the commands that got updated then come back to your project and find where you've used all those cmnds ( that usually means hundreds of different places) then update/change them accordingly

#

Thankfully it's not too frequent

crude kernel
#

Sounds like such a pain

alpine crow
#

And chaos everywhere and in everything in all bots across the globes

crude kernel
#

😂

astral harness
crude kernel
#

They also didn't really give a headsup to any bot devs about the fact that tags where dissapearing and that they should change that

alpine crow
#

IKR

#

TRUU

crude kernel
#

cause I saw mee6 just getting confuzed so long 😂

alpine crow
#

its vexing

crude kernel
#

I'm learning discordJS currently, don't know where to start exactly with what to learn but I do have JS basics

alpine crow
#

Until they find out discord did something

alpine crow
crude kernel
alpine crow
#

After you're done with basics learn about nodejs and packages and outer source codes that you include in your works

#

It helps alot since you don't have build everything from scratch coz that'll take wayy too long

crude kernel
#

I've kinda worked with NodeJS with building websites for school (even thought they kinda set the nodejs up for us) and I'm pretty familiar with slicing, loops and such but tagging sounds new

alpine crow
#

Its like creating a recipe for everything you use commonly and whenever you need it you don't need to make the recipe again just tag the function and get the results @crude kernel

#

Its more for the personal use

crude kernel
#

Ooh I see

alpine crow
#

Kinds like adding auto functions

#

And you won't have to code again

#

Just tag it whenever

#

Pretty neet

crude kernel
#

Yeah sounds usefull

alpine crow
#

It is

crude kernel
#

Might come in handy for next year college too

alpine crow
#

Tell me if I'm wrong

crude kernel
#

Yeah true 😂

drowsy herald
#

Well not all of its lazy

#

There’s a semi decent creative aspect towards it hhmmm

alpine crow
#

That's where the lazy part comes in

#

Make a giant source code and just tag it

#

Ez

quasi verge
#

Awooga

drowsy herald
#

I know with my bots I develop normally in teams of 2. User experience is like our main priority 99.5% of the time. We strive for that. So we take user surveys every other month to see what users think currently about the bot in general or just a certain feature. Then if we find a major agreeable response. Like “oh I don’t like these modals” we change them.

#

My goal is to have a fully customizable bot per guild by the end of year hhmmm

#

Which makes me lazy 😂 because I don’t have to code as much. But it’s more creative

crude kernel
#

😂

alpine crow
#

You get what I'm saying?

#

Like the function would probably just look something like this > Connect()

#

With variables

#

And you're done

#

Doesn't it sound convenient?

drowsy herald
#

It does

alpine crow
# drowsy herald It does

Mhm and you would never have to type that 20 lines or more ever again for any bot in the future (and this was just an example with the initial stage you can do this with most of the things and just invoke functions whenever needed)

#

Just accept being lazy 😂

#

Coz I bet you have to make at least 10 js files per discord bot isn't it?

#

You can't jam every function in one file

crude kernel
#

Watch me Try and fail

drowsy herald
#

Strange for some reason this thread disappeared for me KokoroLmao

steady harness
#

it did for me too

#

it does that for everyone

#

xd

tepid star
#

what kinda bots do yall make

drowsy herald
#

Automod, custom commands, moderation, that type stuff

tepid star
#

ic

#

never made a bot before think I'll try it out

quasi verge
#

i cant even code

steady harness
#

lmao

tepid star
#

js devs when they forget to npm install

tepid star
#

F

#

I'm gonna start making a bot this weekend

#

Gonna do the FCC tutorial

tepid star
#

Lul it's v12

crude kernel
#

Guys look

#

I did it I took the first steps :D

astral harness
#

GGs Zaka!

crude kernel
#

Tyty

dapper peak
#

Java is big garbage yet all uni classes use the language for some reason

dapper peak
crude kernel
dapper peak
#

Sweet!

dapper peak
#

Over the next couple weeks I hope to look into making web applications

tepid star
#

yea kinda weird unis use java

#

some classes i had allowed C

#

for my algos class we could use whatever language we wanted so i used JS

dapper peak
# tepid star yea kinda weird unis use java

I think it is to show how the different data types interact with the computer but it is so freaking annoying how rigid switching between data types is compared to most other languages

dapper peak
tepid star
#

it is also designed with OOP in mind so maybe that's a factor

dapper peak
#

Yeah that's true

tepid star
#

i used Java for my oop class

#

java was like the first language i was introduced to

#

i guess it was helpful for learning about polymorphism and inheritance

#

but its a pain to set up

#

and eclipse is garbage

dapper peak
#

Funny part is I used inheritence and extending objects for the couple of projects that they used to introduce the concept, totally forgot about it, and haven't really used that ever since

tepid star
#

yeah like the beginning java classes i've totally forgotten what i did there

#

i just had my oop class last sem so i kinda remember what happened

#

also probably due to the fact that 3/4 of the group i was in was useless so i did like 90% of the logic

#

and coding

dapper peak
#

Still sounds like fun

tepid star
#

yeah it was cool to see it all coming together

#

the group project was about designing some kind of schedule program for uni students

#

we did it all through the terminal

#

oh lel

dapper peak
#

Wait that is actually so sick! Is there a way I could see that code?

tepid star
#

so basically I just coded everything without testing it until the end

#

since no one was doing anything

tepid star
#

its a huge mess

#

lmao

dapper peak
#

Wait, how many thousand lines of code did you write before testing? XD

tepid star
#

it was like literally all of the logic

#

because the people behind doing the display was so slow

#

it was a very meticiulous process of writing out pseudo code first and then putting it into code

dapper peak
#

👀

tepid star
#

then i ended up coding the terminal menu too lel

#

i'll send u the repo

dapper peak
#

Oh my gosh! Assuming your pseudo code is good, you should only spend a fraction of the time coding it out and then debugging

tepid star
#

yea man i was not in a good state of mind

#

it was like just me coding the logic and there was so much to do

#

didn't want to get bogged down in testing just yet

#

i had like two weeks to do everything

dapper peak
#

That's fair and that's the same time period I got to cram out a project but individually instead of in a group

#

Though the whole class worked together on the server when we got stuck

crude kernel
#

Hopefully they've practiced a bit, or atleast gotten into the coder mindset

steady harness
drowsy herald
#

@barren current

#

What’s your issue exactly?

#

And give me your discord.js version please

barren current
#

Im tryimg to code my discord bot to answer when I say ping.
There is no error with my code but my bot isn't answering for some reason.
I'm using repl.it and node.js

my code

index.js

const express = require("express");
const app = express();

const Discord = require("discord.js");
const client = new Discord.Client({intents: ["GUILDS", "GUILD_MESSAGES"]});

app.listen(3000, () => {
console.log("Project is running!");
})

app.get("/", (req, res) => {
res.send("Hello world!");
})

client.on("messageCreate", message => {
if (message.content === "ping") {
message.channel.send("pong")
}
})

client.login(process.env.token);

drowsy herald
#

Are you on v13?

#

Or v14

#

This looks more like a v13 code FluxThink

barren current
#
  1. That’s why it dosnt wirk
#

Work

drowsy herald
#

hmmmm

barren current
#

Someone told me to add MessageContent. To [“GUILDS”, GUILD_MESSAGE]

drowsy herald
#

Do you have the correct intents enabled on the Developer dashboard?

barren current
#

Yes

drowsy herald
#

No, don’t do that.

barren current
#

Ok

drowsy herald
#

Alright Hmm

#

Put inside the messageCreate event console.log(message.content). The code should look like client.on(“messageCreate”, async(message) => { console.log(message.content) }

barren current
#

Ok

drowsy herald
#

Then run it, and type in the chat where the bot has access to view the channel and read message history

barren current
#

(Message) that going to be ping?

drowsy herald
#

No, it should just log whatever you typed in that chat

barren current
#

Okay

barren current
#

Where do I put (“ping”)

drowsy herald
#

Just leave ping out for now, we need to determine if the bot is logging messages.

barren current
#

Oh okay

#

Smart

drowsy herald
#

I’ve done this a few times before jajajahaha

barren current
#

Okay code is running

drowsy herald
#

Alright type in any channel where the bot has access in

barren current
#

Okay

drowsy herald
#

It should log that message that you send

barren current
#

Umm

#

He’s not stopping

drowsy herald
#

Ahaha at least it’s responding. We just need to filter that out let me grab my pc real quick 💀

#

Kill that code

barren current
#

I did Lmao

#

He was freaking out when I said seven is god

drowsy herald
#

Your code should look something like this

#

As the result

#

And it should respond properly

barren current
#

Okay

drowsy herald
#

And make sure you kill any existing terminals, that’s how you get spam like that.

barren current
#

So the problem was that he wasn’t able to read messages?

drowsy herald
#

well it looks like he read them then, since it acknowledged you sent one.

barren current
#

Yea

drowsy herald
#

That code should give you the result you're looking for. keyword should

barren current
#

Um wait

#

Problem with client.login

drowsy herald
#

fix the token

barren current
#

Unexpected end of input

#

client.login(process.env.token);

#

I took ; off and still

drowsy herald
#

you dont have an env file.

#

pass the token in as a string

barren current
#

I used a secret

drowsy herald
#

Let me get back to you, it's 2am lol.

#

OOooh i see

#

@barren current you're missing a } bracket

barren current
#

Huh

drowsy herald
#

below the ending of the if statement

barren current
#

Oh your right

drowsy herald
#

if(message.content.includes("ping")) { return message.reply("Pong!") } })

barren current
#

Okay tysm

#

nooo

#

Still

drowsy herald
#

let me see the code

barren current
drowsy herald
#

yep add a ) after that bracket } on line 19

barren current
#

Ok

#

Huh

#

I had a glitch were it was writing on wrong line

#

Oh

#

I think it worked

drowsy herald
barren current
#

:(

#

Bot is not answering

drowsy herald
#

my brain. 🧠

barren current
#

It’s so weird

drowsy herald
#

i gotta sleep, i'll see if i can help you tomorrow. :/

#

unfortuantely i think im the only one in this thread with experience in DJS

barren current
#

Gn

#

I’ll be on at 1

drowsy herald
#

alr

barren current
#

@drowsy herald

drowsy herald
#

I’ll get back to you

barren current
#

Ok

barren current
#

Are you back home?

#

I found this btw

#

Oh can’t send links

drowsy herald
barren current
#

Okay

barren current
#

Ok im ready I got Replit open.

barren current
#

@drowsy herald

barren current
tepid star
#

you're probably better off reading the docs or looking up some v14 tutorial

barren current
#

Everything works but when I say ping he doesn't answer.

crude kernel
#

So that it can actually read the messages

barren current
#

It gives me an error. Someone told me that since it has been updated It’s no longer MESSAGE_CONTENT.

barren current
#

GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent,

#

i think the new update requires you to write it like this.

barren current
#

am i right?

drowsy herald
#

Yes

barren current
barren current
barren current
#

omg

#

i found out why

#

this was not activatedssuncri

#

sorry for that. i feel dumb lol

barren current
#

Any suggestions for next thing to code for my bot?

tepid star
#

nuke

crude kernel
#

Lmao good work

#

It happens Kek

#

Something you could do which is related to the ping, is to make a latency meter, if you make it as a slash command you can even get the badge if you want it

#

And if you feel like getting more advanced, you could try to make a bot remember something so you can scale off of that like give users xp per message and total that. BIG step up from basic things (probably) but could keep it in mind

drowsy herald
barren current
drowsy herald
#

Databasing is not easy

drowsy herald
barren current
#

okay ty

drowsy herald
#

And then you get a DM

#

Or something like that I don’t remember I got mine ages ago

crude kernel
drowsy herald
#

Ah I figured

crude kernel
#

You can request it around 24 hrs after registering and excecuting the first command at the dev portal

drowsy herald
#

And then you have to run them once every so often to maintain the eligibility requirement

crude kernel
#

Yep!

crude kernel
#

But a good goal to work towards

drowsy herald
#

Yes

#

If you’re looking for a good DB PostgreSQL is a marvelous one

#

Stay away from that piece of crap 💩 MySQL 💩

crude kernel
#

Stoopid college still stuck with that garbo

drowsy herald
#

It’s sooo bad

crude kernel
#

I think their trying to move to mongodb

#

but

#

idk

drowsy herald
#

Unreliable 💀

crude kernel
#

IKR

drowsy herald
#

MongoDB is decent

drowsy herald
#

I just prefer postgre over mongo

drowsy herald
crude kernel
crude kernel
#

or around the same place

barren current
#

okay

drowsy herald
#

When I realized “hey! Wait a second, PostgreSQL is like so much better”

#

💀

crude kernel
drowsy herald
#

I pretty much rely on postgre for all of my projects now

barren current
#

if i verify my bot i could get another badge?

drowsy herald
#

Verification gives the bot a badge

#

And not you a badge

#

But you need 75 servers

crude kernel
#

Yep

#

Flux happens to be an early dev tho

#

so he did get a badge

drowsy herald
#

Yeah

#

Pretty much stopped after like 2018 or something

barren current
#

Flux has a verified bot badge

drowsy herald
#

Yeah flux is very lucky

crude kernel
#

Yes the early bird

drowsy herald
#

I think he almost ended up not getting it

#

💀

crude kernel
#

Yeah hahahaha

barren current
#

okay ima go work on / commands

drowsy herald
#

verified bots are really hard to obtain nowadays

#

good luck!

barren current
#

Thank you

crude kernel
#

Yeah gl!

crude kernel
drowsy herald
#

If you have questions let us know

crude kernel
#

Wait nvm

#

it is

#

Was looking for badges LMAO

drowsy herald
#

LMAO

#

Generally speaking, it’s hard to verify. Because someone sure enough has already scripted what you have scripted

barren current
drowsy herald
#

So it’s almost impossible to have a better feature 💀

barren current
crude kernel
#

You need a unique feature to get verified?

drowsy herald
#

Nahhh

#

You almost can’t add your bot to servers to get verified

#

Because a bot is probably already there that has that feature

crude kernel
#

Ooooh

#

Like that

drowsy herald
#

If that makes sense

crude kernel
#

Yeah gotcha

drowsy herald
#

I had one with 36 servers

#

And around 20,000 users

#

💀

crude kernel
#

Daam

drowsy herald
#

Yeah

barren current
#

should i make latency meter first or / command

drowsy herald
#

Ended up deprecating it because my development team got tied up with school

crude kernel
drowsy herald
crude kernel
drowsy herald
#

Also be careful with message commands, and make sure you have a good use case. Because you will need to apply to use that intent when your bot gets 75 servers.

barren current
drowsy herald
barren current
#

okay.

drowsy herald
#

It was without warning

crude kernel
#

Not surprising lmao

drowsy herald
#

It was like “ok so today we’re gonna change to slash commands, it’s your problem now! Have a good day” 💀

#

The dank Memer developers were so flustered

barren current
#

it dosent identify SlashCommandBuilder

#

@crude kernel

crude kernel
#

Lets see

#

Lookinmg at the slash command builder docs it looks like you need to require("discordjs/builders")

barren current
#

okay

#

double quotes?

crude kernel
#

Oh wait it needs an @ before discordjs part

#

Doesnt matter, as long as it's a string

barren current
#

("@discord.js/builders")

#

thats how you write it

drowsy herald
#

Yes

#

Like that

barren current
#

okay thank you

crude kernel
#

(maybe the . needs to be removed not sure but if it doesnt work try that)

#

I personally make the name and discription myself

drowsy herald
#

Yes remove the .

#

So require(“@discordjs/builders”)

drowsy herald
crude kernel
#

Hey I can still change my ways lol

barren current
#

yeah i had to remove the dote

crude kernel
#

That's just how I learnt it so far

drowsy herald
#

I don’t like the Builder

#

But it’s good for beginners like Steve here

crude kernel
#

yep yep

barren current
#

it didnt work

drowsy herald
#

Yeah. I figured.

#

Make sure to you’re loading all of your commands into a Array and then pushing them to the REST

#

let me see if I have an example of this brb

barren current
#

like this()

#

?

drowsy herald
#

I can video call with you later @barren current and walk it through with you piece by piece

#

I can’t speak but I’ll try and help

#

Just this one time

#

I can’t spoonfeed you all the time lol. Because then it’s not fun

barren current
#

okay

drowsy herald
#

Sweet. How many more hours will you be online?

barren current
#

idk but ill be on probably till 5:40

drowsy herald
#

You EST?

barren current
#

yep

drowsy herald
#

Ahhh nice I’m the same

barren current
#

nice

drowsy herald
#

I’ll tell you what

barren current
#

will you be online around that time

drowsy herald
#

I’ll just screenshot how to load them onto the API and how to respond.

#

I won’t be im at work

drowsy herald
#

I thoroughly enjoy coding so it’s a little therapy for me haha!

barren current
#

yeah haha

crude kernel
#

Tryna get away from that tho

#

slowly but surely

drowsy herald
#

@barren current

#

1 time thing

barren current
#

Tysm

barren current
#

Unexpected token {

tepid star
#

U may be doxxing urself lol

drowsy herald
#

Yep get rid of the {

#

On line 25

tepid star
#

Ur name in the link

barren current
tepid star
#

Also are you doing this on ur phone lol

barren current
#

ssunkappa No

#

Mabye

tepid star
#

U might want to remove the screenshot since ur name in it

#

Unless that's someone else

drowsy herald
#

This too ^

barren current
#

Ya i just saw that lol

drowsy herald
#

Be vigilant about that next time

barren current
#

Yup

#

Unexpected string

#

I tried putting d cap didn’t work

#

taking off s. Putting () around it.

drowsy herald
#

Dependencies

#

Should be the name

barren current
#

Dosent work

#

The error code is error parsing : unexpected string in JSON at position 509

crude kernel
#

Think you forgot a comma after line 24

barren current
#

Now it’s unexpected token

crude kernel
#

The comma is the unexpected token now?

tepid star
#

this is basic json formatting

#

you should look it up, pretty simple to get a handle on

barren current
#

Okay

#

The problem is that I have 2 scripts in my package.json file.
Chat gpt change my scripts into one.
Code:

#

{
"name": "nodejs",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1",
"start": "node .",
"deploy": "node scripts/deploy-commands.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@discordjs/builders": "^1.6.5",
"@types/node": "^18.0.6",
"discord.js": "^13.9.0",
"easy-json-database": "^1.5.1",
"express": "^4.18.2",
"node-fetch": "^3.2.6"
},
"devDependencies": {
"node": "^16.20.1"
},
"description": ""
}

#

I’m getting error codes now.

#

Wich is weird bc I already have the required packages

#

I even tried installing them manually. Npm install @lone tokenjs/rest

#

…. Sorry for the ping lol

crude kernel
#

So line 25

barren current
#

Unexpected token

#

“=“

crude kernel
#

On what line?

barren current
crude kernel
#

Oh lmao I meant the whole thing so the whole variable "rest"

#

and I think // can comment it out so you can just disable a line of code without deleting it

barren current
#

// is for notes I think.

#

What line do I put //.

crude kernel
#

before the const on line 25

barren current
#

Okay

#

Getting the same error code

#

Oh wait forgot to tell you it

#

Once I manually installed discordjs/rest. I got this code

#

And even if I tried installing discordjs/builders. Is till get this

crude kernel
#

ok now try manually installing the discordjs/builder

barren current
#

Dosent work

#

I also saved my old package.JSON script before I took chatgpt’s.

drowsy herald
#

This is not making sense.

#

Do you have any prior reading knowledge/experience with JavaScript @barren current, please be honest.

#

If not, there are plenty of resources out there, YouTube, Documentation, etc.. I would recommend you read up before you proceed with the rest of your development.

barren current
astral harness
#

TT_nekolurk I enjoy reading about what y’all are up to..Even as it goes over my head. KokoroLmao

barren current
barren current
#

Sorry if I wasn’t clear. I’m still trying to learn coding/JavaScript.

steady harness
#

man

#

yall are too smart

#

(i think that cause i dont understand anything)

barren current
#

Same

drowsy herald
#

Im having so much fun

drowsy herald
#

wah

drowsy herald
#

Welcome to hell

#

For coders

#

nest

#

its not hell

#

its heaven

#

coding is love

#

Amen

#

How many of you would be interested in participating in an advent of code where I post a challenge in this thread and you all correct it

#

Reply here pwease

#

Winner will receive $10 nitro

#

me

barren current
#

yikes i guess ill try.

#

hey guys im trying to make a afk bot but cant find any guides. could someone give me the steps what to do and ill figure out the rest please?

#

@drowsy herald Hey could you help me since your the best coderssuncozy

barren current
#

sorry of what

drowsy herald
#

wha

#

u said u need help

#

of

#

somth

barren current
#

im trying to code a afk bot but i cant find any guids for discord.js v14

drowsy herald
#

did u ask chat gpt

barren current
#

no

drowsy herald
#

then do

#

it will help u

#

most of the itm

barren current
#

what ssuncri

#

i asked this

#

how to code a afk bot for discord using nodejs

#

he answered

#

Of course! Starting a resistance training program is a great way to build strength and improve your overall fitness. However, it's essential to ease into it to avoid injury and allow your body to adapt. Here's a 7-day workout plan designed for beginners. This plan focuses on full-body workouts and includes both bodyweight exercises and exercises with dumbbells, which you can modify based on the equipment you have available.

#

then he tells me the workouts

drowsy herald
#

Lol

#

U have no knowledge of how it works

#

?

#

Try watching yt

#

I'll help u tmr

#

In bed rn

barren current
drowsy herald
#

Okay wait

#

Tmr

barren current
#

okay.

drowsy herald
#

An AFK command requires databasing, so keep that in mind.

barren current
#

okay

#

hmm

#

my command works.. but once i type &afk im getting an error

#

repl process died unexpectedly: exit status 1

#

here is my code

#

const BOT_TOKEN = 'YOUR_BOT_TOKEN';

client.on('ready', () => {
console.log("Logged in as ${client.user.tag}");
});

client.on("messageCreate", async(message) => {
if (message.author.bot) return;

if(message.content.includes("&afk")){
    message.member.setAFK(true);
    return message.reply("You are now afk")
}

});

client.login(process.env.token);

#

i asked chat gpt but he didnt help

drowsy herald
#

setAFK is not a function.

#

And it’s not of type GuildMember either.

#

That’s why I said, setting an AFK requires databasing. Because it needs to fetch why the user is AFK, if the user is AFK (Boolean), and when the user returns.

#

I wish it were as simple as .setAFK, but it’s not ItIsHowItIsMnMMan_TV

barren current
#

okay thank you.

#

is database in all languages?

tepid star
tepid star
#

More readable

barren current
#

Okay I’ll try

steady harness
#

im supposed to make something in a python

#

at first i thought of a calculator

#

but the teacher said its gonna be too easy

#

and i wont be able to modify it much in the future once i make it

#

so now im planning to make something like the snake game

#

or snake and ladder

#

idk man

barren current
steady harness
#

ye

crude kernel
#

If you can sure why not

#

Did you get any theme or something

#

Or just code anything you want and gl

crude kernel
#

No one use GPT tho angy

drowsy herald
barren current
#

I added message manager to my bot.

#

is there a way to make it where once i send !delete it deletes it instantly?

drowsy herald
#

you can fetch the messages from the channel.

#

and then filter and delete that message

barren current
#

Okay thank you

barren current
#

help

#

help

#

how do you rewind your last action/back button on replit

#

i did alt shift 1 on mac

#

@drowsy herald

tepid star
#

is it ctrl + z

#

this is why you use version control

barren current
#

Idk. But I got it back. On the bottom of the page there’s a history button.

rapid lintel
#

i gave up on python

#

and coding as a whole

drowsy herald
crude kernel
#

Dam

#

How so?

tepid star
#

damn why

barren current
#

I’m trying to code a welcome message in a channel when someone joins but can’t find any guides.

#

Could someone help me?

astral harness
#

Isn't that more on databases?

drowsy herald
#

It’s the GuildMemberAdd event

#

no it’s an event on discordjs

astral harness
#

Interesting

drowsy herald
#

I’ll be back in a bit, I’m in a vc

barren current
#

I found events section but it was saying that something about the bot will have a lot of information

#

Or smt like that

barren current
drowsy herald
#

client.on("guildMemberAdd", async(guild, member) => {
const channel = client.channels.cache.get("id-of-channel-for-message")

channel.send({ content: `Welcome ${member.user.tag}` }) 

barren current
#

Oh thank you, you didn’t have too send the command.
I could of search it up.

barren current
#

There was missing }) to the command but I added it

#

If I add my bot to another server but don’t want it to send a message on that server. Do i write the id of the channel?

#

In ```js
const channel = client.channels.cache.get("id-of-channel-for-message")

astral harness
#

Depends on the permissions you or the server owner grant your bot.

barren current
#

There both my servers

astral harness
#

Ok. Then, you should still be able to deny posting perms on Discord if you wish to.

barren current
#

Okay thank you

astral harness
#

Also, if you do that, you have to go through each channel you don't want it to have access through.

barren current
#

Someone joined the server but he didn’t send the message

#

And no error message

#

He has the perms to see that and to write in that channel

astral harness
barren current
#

Oh I forgot that one

#

I’m on mobile and can’t find embed perms

#

@astral harness

astral harness
#

Gimme a moment.

astral harness
barren current
#

Tysm

#

It’s not working 😭

#

@astral harness do you know why

drowsy herald
#

Hello nerds

#

Any of you know how to make a CI/CD pipeline? 💀

astral harness
#

Nope

barren current
#

Nope. Did you ask chatGpt

drowsy herald
#

Well of course

#

ChatGPT is very broad

barren current
#

Start by using a version control system like Git to manage your codebase.

Host your code in a repository on your chosen VCS platform.

Set up a build process that compiles your code and runs tests automatically.

Implement automated testing, including unit, integration, and end-to-end tests, to ensure code quality and reliability.

Store build artifacts (compiled code, binaries, etc.) in a repository

#

Automate the deployment of your application to various environments (e.g., development, staging, production) using tools like Kubernetes, Docker, or serverless technologies.

Manage configuration settings separately from your code to ensure consistency across different environments.

Set up monitoring and logging tools (e.g., Prometheus, ELK Stack) to track the performance and health of your applications.

Integrate security scanning tools like SonarQube or OWASP ZAP to identify and mitigate security vulnerabilities.

Use a CI/CD orchestration tool like Jenkins, GitLab CI/CD, or GitHub Actions to define and manage your pipeline stages and workflows.

drowsy herald
#

Bro 💀

barren current
#

:)

drowsy herald
#

I’ve already asked GPT

barren current
#

Mhm

drowsy herald
#

I already solved it

#

lmao

barren current
#

Good

livid spear
#

ayo

livid spear
#

here is my coding experience

#

i made a snake game for yuts

#

for her project

barren current
#

He has the perms in the channel

#

But when someone joins he dosent send the message

steady harness
#

we be doing string manipulation in python in school

#

teacher couldnt answer where i asked her where can these be used

barren current
#

I’ve asked chatgpt but nothing has worked.

#

I’m trying to code a welcome message for my bot but when someone joins the message dosent appear.

#

Is there a way to see if he reads that someone joined?

livid spear
barren current
drowsy herald
#

It’s guildMemberAdd

#

not guildMemberAddIntent ☠️

steady harness
#

im currently planning to make this

livid spear
#

yes that

steady harness
#

oh

#

im gonna make that too

#

in some time

livid spear
#

nice

#

i made it for @rapid lintel

steady harness
#

i got no clue as to how i can make this

livid spear
#

she asked me to do it

steady harness
#

damn

#

i see

#

thats nice

livid spear
steady harness
#

i see

#

GUI library

livid spear
#

hmm

steady harness
#

man, im so used to js, i keep using js things in python 💀

barren current
#

still dosent work

#

idk what to do

drowsy herald
#

Well chatGPT sometimes can be like what something my professor has said before

#

“Trash in, trash out.”

barren current
barren current
#

like what you did with the other code

steady harness
#

im gonna have to study about tkinker and turtle anyways

drowsy herald
#

somomne help me understand this crap

drowsy herald
#

yeah

#

discord.js

#

yes

livid spear
livid spear
steady harness
#

im gonna have to read about turtle too

livid spear
steady harness
#

i only found turtle on google

#

and you told me about tkinker

livid spear
#

tkinker is basically for gui

#

i used it to make calculator

#

the snake game have many ways to make it

drowsy herald
#

i would suggest use pygame for all those stuff

livid spear
#

i used freegames pip

crude kernel
#

I've used turtle and pygame before

#

Didn't do much with it though

barren current
#

idk whats happening. i opened my code and when it runs i get this error:

#

/home/runner/my-bot-project-2/node_modules/discord.js/src/rest/RequestHandler.js:201
throw new HTTPError(error.message, error.constructor.name, error.status, request);
^

HTTPError [FetchError]: request to https:_//discord.com/api/v9/gateway/bot failed, reason: certificate has expired
at RequestHandler.execute (/home/runner/my-bot-project-

#

2/node_modules/discord.js/src/rest/RequestHandler.js:201:15)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async RequestHandler.push (/home/runner/my-bot-project-2/node_modules/discord.js/src/rest/RequestHandler.js:51:14)
at async WebSocketManager.connect (/home/runner/my-bot-project-2/node_modules/discord.js/src/client/websocket/WebSocketManager.js:134:9) {
code: 500,
method: 'get',
path: '/gateway/bot',
requestData: { json: undefined, files: [] }
}
repl process died unexpectedly: exit status 1

drowsy herald
#

@vivid quiver

#

welcome to hell pwease

vivid quiver
#

Teach me how to code

#

now

drowsy herald
#

This is how I code but

drowsy herald
vivid quiver
#

I got ghosted

drowsy herald
#

A slash command builder and posting them to the API

crude kernel
#

But do you understand what you see

vivid quiver
#

hence I asked

#

💀

crude kernel
hot stump
#

@barren current

#

What’s up

barren current
#

Okay so

#

I cant leave

#

I joined using my pc

#

But I can’t have acces do my pc rn

hot stump
#

do you want me to disconnect you?

barren current
#

Yes please

hot stump
#

alr

#

i love coding btw

barren current
#

Same sometimes it doesn’t make any sense

lunar hemlock
#

Holyyy speedy you really are speedy

hot stump
#

frrr

hot stump
#

anywyas back to chat

lunar hemlock
#

Bro it took you like 1/4 of a second

crude kernel
#

Am I tripping or is someone sending and deleting things in here cause it keeps showing up as unread and then there is nothing 😭

livid spear
#

😭

tepid star
#

what did you send

barren current
crude kernel
#

Aha xD

tepid star
#

it happened again

astral harness
barren current
#

I’m writing to keep the channel pinned

crude kernel
#

Good good

crude kernel
#

I love the AHA moments I get while learning

#

Just figured out what the assignment is supposed to do that we got

#

warningJargon incomingwarning

#

So we're learning about the Lists collection in our java classes and last week (or 2 weeks ago) we got a class that explained these, back then I didn't really get what was going on and I wanted to do the excercise but I couldn't cause I didn't understand

#

I watched the recording back a few times and then I got decided to move on to the next assignment which I could kind of do, it's about trains and wagons

#

I have to still finish that assignment but I decided to try the other excercise again and I could start a bit

#

And just now I realized the Train assignment is supposed to be a representation/visualization of the lists and help us understand it

#

So that was my Aha moment :D

#

CheckJargon overCheck

astral harness
#

So happy for you Zaka!3HC_clap

tepid star
#

nice

#

arraylists are pog

steady harness
#

@livid spear

#

actually ykw

#

ill ask later

tepid star
#

understandable have a nice day

livid spear
steady harness
#

@livid spear ok yes

livid spear
steady harness
#

so im using turtle to make my project

livid spear
#

alr

steady harness
#

i have yet to see how to make the turtle move when keys are pressed

#

but ill figure that out later

#

what i wanted to know about, was uh spirit

#

uh

#

spirit as in

#

image.

livid spear
#

what

#

i am confoosed

#

i dont fully know turtlr

steady harness
#

not exactly image, but in the snake game

#

snake cant be a "square" can it

#

or an arrow

#

wait no i meant sprite

steady harness
#

my question is, suppose instead of a circle/arrow/square, i want a snake

#

like

#

actually leave that, what about the apple thing

steady harness
#

timer, score, high score, all can be done

livid spear
steady harness
livid spear
steady harness
livid spear
summer trail
#

Am I weird for having the idea to be able to convert most other games and mechanics into FNF in Lua

crude kernel
#

Technically possible

#

Just pretty hard

summer trail
#

Indeed

steady harness
#

@livid spear in your game, did you make them move by arrow keys or wasd

steady harness
#

i see

#

alr

tepid star
#

What games use arrow keys still lol

steady harness
#

snake game

#

👍

summer trail
#

fnf

livid spear
steady harness
drowsy herald
#

You’d have to run that code as an administrator nerd

livid spear
#

💀

drowsy herald
#

Also there are 6 bullet holes in a revolver not 10

livid spear
#

Everyone should know that

drowsy herald
#

im gonna start learning how to code

drowsy herald
crude kernel
#

Yessir

#

Which language you deciding to use first

tepid star
#

say python

arctic brook
#

I’m learning Java now

barren current
#

Nice

tepid star
#

so true

jaunty geyser
#

lmfaoo

dapper peak
crude kernel
#

Us today AscLmaoCry

drowsy herald
#

Increase your output

crude kernel
#

Nah

#

Sprintt 1 we still needed feedback on our design and we still have to receive their fonts and info

drowsy herald
#

I’m working really slow too lmao, I stop every now and then to test before I continue working

#

I was supposed to have 2 projects done last week for you know who

#

💀

crude kernel
#

Oh Lmao

#

I have yet to get a task Kek

drowsy herald
#

Lmao, speaking of that Cappa

crude kernel
#

Probably better that I don't tho in the setup stage

drowsy herald
#

wtf

crude kernel
#

No I mean for that project

drowsy herald
#

Oh

#

That Lmao

#

Yeah that’s a me problem

crude kernel
#

Ye Kek

drowsy herald
crude kernel
#

Then it would become an us problem

#

Cause I would mes it up