#development

1 messages · Page 184 of 1

solemn latch
#

Then just uncompress in the folder you want

past field
#

okay

#

got it on my desktop

solemn latch
#

I don't use mac, excuse the stupid questions.
Is desktop your home folder?

If you type "ls" in the terminal it should show what your local folders/files are for your current directory for that terminal window

past field
#

okay, the desktop is basically like my home screen

solemn latch
#

Oh okay, perfect.

you can take this one step at a time.
if you do

cd Desktop

then

ls

It should show the folders on your desktop(you dont have to show it if you dont want to)

Then cd into the next folder you need to go to, once you see the package.json folder you're in the right spot and can stop.

#

At that point

npm i

or

npm install

should work.

past field
#

ok perfect!

#

i will try this asap

#

thank you so much!!

sterile lantern
#

^

past field
#

i have to get on the road and will be back if i have any questions later

solemn latch
past field
#

should i do the npm audit? or just continue on?

solemn latch
#

auditing is fine, you can also just wait until you're ready to deploy before doing it.

It can fix itself a lot of the time

past field
#

so at this point, he says the next thing to type is “node .”

solemn latch
solemn latch
#

If you do, you can just fix it after

past field
#

yeah it gave me an error

solemn latch
#

You're using visual studio code right?

past field
#

ok when i get back home (im at my moms now) ill go through the config i downloaded and fix it

past field
sterile lantern
#

im trying to use it inside of a command thing

solemn latch
sterile lantern
#

like here

lament rock
#

the runner might define global variables not natively in node

#

Unless there's a special context that variable is available, it would just likely be under global

solemn latch
#

I think it might be passed along from the event listener

#

I'm not entirely sure. I've never used cloudflares context.

sterile lantern
#

this?

solemn latch
#

Yeah, e might contain context

sterile lantern
#

yeah it does

#

e.context.waitUntil

#

hm

#

but how would that even work

#

wouldnt that mean i need to make each cmd a function

solemn latch
sterile lantern
#

nope

#

its inside the router.post

solemn latch
solemn latch
#

(or whatever you change the name to)

#

You should be able to keep passing it down

sterile lantern
#

so then request.context.waitUntil?

lament rock
#

I'd recommend each command being its own function anyways for readability

#

and use switches so the runtime can b-tree

solemn latch
#

I assume they're using express.

sterile lantern
#

request.context.waitUntil doesnt work

#

i am using itty router

#

request.waitUntil wouldnt work either

#

hmm

solemn latch
#

It looks like your structure is a bit different than the example code itty shows.
Does handlePost use router.handle(event.request) somewhere?

sterile lantern
#

yep

solemn latch
#

Any args you pass, like context should be available in all of your router.post's

sterile lantern
#

so if i passed

#

e.context

sterile lantern
solemn latch
#

It might have to be

router.handle(e.request, {context: e.context});

then

router.post('/', async (request, args) => {
const { context } = args;
// ...
}

Depending on how itty actually works.

#

But yeah

#

(ittys docs are kinda meh)

lament rock
#

ew express

sterile lantern
#

couldnt i pass e

frosty gale
sterile lantern
#

instead of e.request

solemn latch
#

e.request still has to be passed as the first parameter

sterile lantern
#

and then just change message to e.request.json

#

oh

sterile lantern
#

anyone have any idea why it isnt working?

eternal osprey
#

@green kestrel i started with the tcp parser and it's currently kicking my ass so damn hard. Why is it so hard to keep track of the packet status upon sending 😭

green kestrel
#

lol

#

told you tcp is pain

eternal osprey
#

thank you so much

#

i hope it can help hahaha

#

like the begin is down for sure, just need to get the packets sorted and tracked.

sterile lantern
green kestrel
#

youll probably also need the ip layer that sits below it

frosty gale
#

as far as the os is concerned you can send and receive arbitrary amounts of data which is enough

green kestrel
#

yup

sterile lantern
#

any idea why the code inside event.waitUntil isnt executing?? no errors

fixed it! used iife

past field
deft wolf
#

As far as I know, no token was provided for the REST request. From what I saw, in this project you need to use an .env file to store your bot's token. Then this token is loaded from this file and used in your bot

#

It's strange that it hasn't been explained anywhere, but maybe it's because it's an old guide

north cairn
#

hey this might be very dumb question but i want to ask that how much approximate storage a fully functional moderation discord bot takes to code

deft wolf
#

Storage do you mean disk capacity or RAM usage?

north cairn
#

disk capacity

deft wolf
#

It depends on how many dependencies you use because node modules in most cases take up the most disk capacity

north cairn
#

yea lets just take something like dyno or carl for example

deft wolf
#

My folder probably weighs 200mb even though I don't use half of these libraries

north cairn
north cairn
deft wolf
#

I have no idea, it's impossible to calculate it without running this bot and hosting it

#

Although I doubt you'll need more than 500-1000mb. I would be more worried about the RAM memory

north cairn
#

and needed storage for gaming type of bots would be lower than that of moderation bot?

deft wolf
#

Command files do not weigh much because they are only a few kilobytes. It also depends on whether you will host the database on your server. It will probably be a bigger problem than the bot files themselves

north cairn
#

in the beginning ,i am more concerned about the command filed

#

files*

floral shell
#

who here wants to help me with somethign rq

#

just need a question answered

pale vessel
#

do you want me to help u with something rq

#

just need a question to be asked

floral shell
#

Do u have a verified bot

#

or had one

pale vessel
#

oh, no

#

can't help u with that, but why

floral shell
#

im asking if you have had one or have one

pale vessel
#

i don't

floral shell
#

that you applied for intents for

#

know anyone who has

pale vessel
#

u wanna apply for an intent?

floral shell
#

i already did

pale vessel
#

they rejected?

floral shell
#

well

#

i got accepted guild members but denied message content and presence

#

denied multiple times actually

pale vessel
#

what reason did u give?

floral shell
#

im not understanding what a valid reason is to use both those intents

floral shell
#

and for presence i

#

Have vanity roles

pale vessel
#

it needs to be for something out of scope for application commands

floral shell
#

explain

pale vessel
#

something like a mini game that requires multiple user input for example

floral shell
#

i see

#

so giving the call command as a reason wont work

#

maybe should i say its for trivia

pale vessel
#

yeah u can BS

floral shell
#

believe me i do

pale vessel
#

u haven't bullshitted enough then

#

need to give pics too

floral shell
#

matter of a fact i bsd the most on the members intent

#

idk how i got accepted that one

#

and for presence?

pale vessel
#

what kind of bot is urs?

floral shell
#

multipurpose i guess

pale vessel
#

if it's a moderation bot u can probably say it's for some kind of a filter feature

floral shell
#

filter ?

pale vessel
#

maybe bans someone that plays league idk lmao

floral shell
#

At this point i might as well try it

pale vessel
#

u can also say it's for checking for users' game profiles

#

some activities have rich presence that includes those info (e.g. username)

floral shell
#

just bsd the message content well see what happens

eternal osprey
#

I made a checklist of possibly all things i would need for each layer according to the OSI model.

#

i do have a question tho about a website, not necessarily this side project:
i have a website hosted with a certain domain name. I also have a vps that's not connected to that website or whatsoever, as the website is hosted on a 3rd party hoster.
For my site i have a few api's i want to use. How can i connect that api to my site?

#

(like can i just do fetch requests to: vps_ip:port?), or do i need to give it the same domain name

green kestrel
#

yes you can directly connect to an api via ip like that

#

but it isnt a good idea

#

you dont want to directly expose the ip of your hosting, instead get a cheap domain and protect/hide the ip with cloudflare

#

if you dont, and you ever get DDoSed then your hosting provider will send you a nasty bill

#

if the third party hoster is a friends raspberry pi or something, they will be very upset with you

#

if you already have a domain, you can use a subdomain

#

e.g. api.chittykat.mew

floral shell
#

Anyone know if you can actually just disable an intent

quartz kindle
#

wdym by disabling?

deft wolf
#

It depends on what intents you mean. If you mean GuildMembers type intents, you can simply not add them to your client and your bot will not have access to events such as guildMemberAdd in this case

past field
past field
deft wolf
#

It should be called just .env

past field
past field
deft wolf
#

And I'm also not sure if the token should be in quotation marks

eternal osprey
past field
#

ok i’ll run node . with and without it to see if it’ll take it

eternal osprey
#

it's tsfeerhuysch

#

how would i redirect that subdomain to my vps ip?

#

basically an A dns record? That redirect ip:port to domain/api_endpoint?

quartz kindle
#

dns records dont deal with paths and ports, but yes, it will redirect a subdomain to an ip

past field
#

@deft wolf @solemn latch

#

idk what i’m doing wrong 😭

solemn latch
#

.env goes in the "root" folder. The same one your package.json is in.

#

Also, we need to get you a screenshot tool so you don't have to pull out your phone ^-^

past field
solemn latch
#

I don't mind, just saves you time

past field
solemn latch
#

We've all been at this point when learning programming.

past field
#

YES

#

IT WORKED

#

i could cry ugly tears rn and idek why cause ik i barely touched the surface of making a bot 💀

deft wolf
#

This is true, but with time everything will become easier and more logical for you. The beginnings are always the worst because then you know absolutely nothing masnakappa

solemn latch
#

Sadly bot development has gotten a lot harder for brand new devs over the past few years.

#

It wasn't that long ago that some reasonably successful bots were one file switch cased prefix command bots.

deft wolf
#

My first bot looked exactly the same in 2020 kappalul

#

Everything packed in one file. Even without config

green kestrel
past field
#

can it not be done the same way still?

green kestrel
#

if you can proof of concept your bot in <1000 lines, in on file, it may be a good idea

past field
#

also.. another dumb question… when looking in the file to put in the commands

#

is it safe to have chatgpt create a code for a / command?

green kestrel
#

no

#

chatgpt cannot code

#

it just strings stuff together in a line that sounds like it will fit

past field
#

ah ok

#

glad i asked

green kestrel
#

if the code it gives you runs, dont trust it. it probably has security vulnerabilities, chatgpt is not intelligent

#

you can use chatgpt to help refactor and improve existing code, but again dont trust it, review it, treat chatgpt like a beginner junior dev, and you the senior developer

solemn latch
#

Personally, I would recommend getting pretty decent at your programming language before using AI.

green kestrel
#

yeah

past field
#

ok that makes sense

green kestrel
#

you should be confident in reviewing other peoples code, and treat chatgpt's output like that, like some random sent you a pull request

past field
#

but i can just pull slash command codes from discord.js right?

green kestrel
#

pull them how

green kestrel
#

discord.js doesnt come with premade commands

past field
#

ohhhhh ok i got you, i thought i saw on there some premade commands

#

ok i got lots to learn, but im willing to learn it!

green kestrel
#

examples maybe? but you have no idea if theyre any good

past field
#

so like, right now the bot i have online just does /ping and it will respond with “Pong!”

#

if i wanted to add a /ban command to ban discord members/ID, there’s no where i can copy and paste a code to add it in VSC to configure in my bot?

green kestrel
#

sure you could find someone elses code and paste it in

#

but how would you know its correct, and how would you learn from it

past field
#

ah ok i got you

green kestrel
#

there comes a point when you constantly paste in prewritten stuff without understanding it, they wont work together and you have to know how to code it to fix it and make them work

past field
#

so it’s just a coding language i need to truly learn

green kestrel
#

yes

#

you can learn by example - i do

#

but you have to understand the example

#

so a small amount of base knowledge is all thats needed to get you going

#

im an old fart, and i never learned by video like a lot seem to now

#

i learned by messing with examples

past field
#

ok got you, i still have about an hour left of Macs’ workshop video to watch.. maybe i’ll learn more from there (i’ve learned so much from it and you all)

green kestrel
#

take someones code that you know works, and mess with it till it breaks, find out HOW and WHY you broke it, and then put it back together

past field
green kestrel
#

think of it like, dismantling a car and rebuilding the engine

#

find a bot with 3 or 4 commands

#

mess with it

#

try and change what the commands do

#

dont think of that as a bot you can release, more a learning tool

past field
green kestrel
#

github

#

dont be tempted to do a music bot though

#

theyre a LOT more work than you think they are

#

and most of the ones on github are against discord TOS

solemn latch
# past field

Have you finished getting that ping command working yet?

I think we might be jumping ahead a little bit if you havent gone through getting a simple call/response command running yet 👀

wheat mesa
#

I must say that learning the basic syntax of a language, then understanding basic concepts like functions and types, and then understanding error messages will get you a LONG way

solemn latch
#

oh cool ^-^

green kestrel
#

as soon as you learn the basics LEARN TO DEBUG

#

a lot of time people dont try to debug until they hit an error they cant find by looking at the code

#

but learn it early

#

youll feel less like throwing your PC case out the window

past field
#

the bot went back offline though

green kestrel
#

learn about how to use a debugger, step through debugging, tracing, and stack dumps

solemn latch
#

I feel like I still dont know how to debug as efficiently as possible.

But I think thats mostly react errors being SO bad.

green kestrel
#

what is debugging like in js land anyway, does node have a proper step through debugger with breakpoints, watches etc?

#

in my world we use GDB

solemn latch
#

No clue lmao, I've been using js for years, I still console.log 👀

past field
#

how do i keep the bot online?

solemn latch
#

JS errors are typically good enough.

past field
#

i used ping twice, and it resounded both times, then it went offline

deft wolf
#

If you close your terminal, the bot will turn off

solemn latch
green kestrel
#

thats an actual crash in my production bot

solemn latch
#

Which is why a server is recommended

past field
#

ohhh so like if i close my laptop it’ll turn the bot off

solemn latch
#

yeah

green kestrel
#

at least youre not asking how to run a bot without electricity

past field
solemn latch
#

off grid bots? sounds like a good project

solemn latch
green kestrel
#

i used to joke that you can do that by putting a raspberry pi in a street lamp, next to your neigbours house, connected to their wifi

#

i stopped making this joke in case some moron actually tried it and electrocuted themselves

deft wolf
past field
#

aw damn so i’m gonna have to do all of this over again on my pc

solemn latch
past field
#

because my pc is always on lol

green kestrel
#

but if you want to host your bot for free a rasberry pi is a great start. you can host one for as much as it costs to run your internet router, it takes near no space and makes no sound.

#

keeping your pc on can cost about as much as a vps each month, it isnt cost effective for hosting

solemn latch
green kestrel
#

raspberry pis are hard to get now though

solemn latch
#

You can learn a TON just by having to set it up, so that when you move to a rented VPS its so much easier.

green kestrel
#

its like the gpu shortage all over again

solemn latch
#

are they still? 👀

#

I feel like every time I want to get one they are impossible to get

green kestrel
#

i got one right in front of me, a pi 5, not built yet becasue i want to get an nvme hat next month

#

and i got a pi 4 behind my server

green kestrel
#

mine was preorder

past field
#

so right now, i set the bot as a private bot

#

if i change it to public, will it do it automatically?

green kestrel
#

yes

#

then you'd need to give people the invite link

solemn latch
#

$80 for the 8gb?

past field
#

ok got you

green kestrel
#

if your bot grows make a second token and second app, have a dev copy and a live copy

#

then you dont need to shut down the live copy every time you make dev changes

past field
#

i forgot how to get the link lol

solemn latch
#

Just dont buy 2

warm surge
green kestrel
#

is this at pi hut

solemn latch
#

microcenter

green kestrel
warm surge
#

WHY IS IT 10K EACH

green kestrel
#

to stop people buying bulk

solemn latch
#

Its probably a 1 per customer thing yeah

warm surge
#

bruh

green kestrel
#

thats exepensive tho!

#

even the price for one

solemn latch
#

I cant find any, even not in stock for under $80

#

at least the 8gb model

#

$60 for the 4gb

#

I'm going to have to buy a 5 at some point though

green kestrel
#

this lot was £80 preorder including postage

#

i ordered in november, took till jan to arrive

solemn latch
#

wild

#

I wish I preordered

green kestrel
#

from pi hut

past field
#

ok got it lol

#

so like, If I wanted to look at the code of a bot.. what do I search for on git hub?

#

just "moderation discord bot code" ?

green kestrel
#

javscript discord bot

#

and skip over any that say music bot

past field
#

ok

green kestrel
#

btw bots that are added to top.gg must be unique

past field
#

what's the mean

green kestrel
#

if you fork an existing one and slap your name on it, reviewers will reject it

past field
#

oh I was just wanting a custom bot for my server

#

but I do want to learn enough eventually to make a unique bot, I just don't know enough about the coding yet 😭

green kestrel
#

should be fine then just be sure to understand what youre putting in your bot

#

or you could put a backdoor or nuker in your bot

oak shoal
#

If I can't vote for bots, where can I report this problem? because there have been problems with it for about a month now and no one wants to fix it

green kestrel
oak shoal
#

Thank you

past field
#

ok so like

#

this is just an example for the sake of questions

#

i search "javascript discord bot" and found this

#

how exactly would I add the packets to the bot? Add this to the folder on my desktop path and install it with apm i? or would I add the code to the building blocks part in the config file?

#

idk if my question makes sense

deft wolf
#

In most cases, it is enough to copy the code of the command itself to your file. Then you can optionally download all the libraries you need with npm (and copy other files needed for this command to work)

#

I doubt the ban command needs anything extra, it's a fairly simple command

#

But it probably depends on how someone programmed it

past field
#

ok what about this

deft wolf
#

But there is no ban command

past field
#

would this be a good example to learn about the coding language?

#

ah ok gotcha

real rose
real rose
# green kestrel

yooo not sure if this was answered or what the context is. But what you using the pi for?

real rose
#

o:

#

Good idea actually

#

not a fan of my selfhosted runners on the same machine KEKW

green kestrel
#

they compile arm64 and arm7 (32 bit) deb packages for dpp and test them with unit tests

past field
#

pls let me know if I get annoying with all the questions lol

green kestrel
#

cant do self hosted arm runners on my intel machines

past field
#

so if I wanted to add this 8ball command to my bot.. what would be the best way to add it?

deft wolf
#

Just open this file on your browser

green kestrel
#

wtf

#

leaning on my server just rebooted it 😮

past field
deft wolf
#

Now you can just copy paste it into your command file

green kestrel
#

lmao i figured out why it rebooted

past field
#

so I would create a new file and paste the code in there? or add it under the ping code in the "ping.js" file?

green kestrel
#

if you have a keyboard plugged into linux server dont knock it onto the floor "buttered side down"

#

its likely to register as ctrl+alt+delete and reboot the system, smh

#

i was sure i disabled that keypress anyway...

deft wolf
past field
#

so create a new file with .js extension and paste the code in there and save it? if i wanted to keep both?

deft wolf
#

Yep

#

Just remember to create commands inside the "commands" folder

#

If they are located outside this folder, your bot will simply not load them

past field
#

ok gotcha

#

i’m gonna try it

deft wolf
#

Good luck flushedCat

past field
#

thank you so much for your help

#

do I have to do anything in the terminal?

#

like do I need to run npm i again?

#

or node . ?

deft wolf
#

No, just turn on your bot normally with node .

past field
#

oop was i supposed to turn it off before adding that js file for 8ball 🌚

real rose
#

It's not required to turn off your bot when modifying files :p But a restart will reload all the files and it should see your new one

past field
#

how do i restart it?

#

nude . ?

#

sorry that was a terrible joke

#

pls dont ban me for that lame joke

real rose
#

💀

deft wolf
#

Just close your existing terminal, open new one and type node .

past field
#

ok ill try it

past field
deft wolf
#

Closing the terminal will turn off your bot

past field
#

I'm guessing this x will turn off the terminal

#

oop i messed something up lmaooo

#

ok maybe that code doesn't work

deft wolf
#

Did you see anything in the console?

#

Oh, wait. Since the code you downloaded from github is 2 years old, this code probably doesn't have a slash command builder

past field
#

ohhhhhhhh

#

this is what popped up

deft wolf
#

Which was used in this new command

past field
past field
#

well

#

it has slashcommandbuilder in there

deft wolf
#

I'm not sure if @discord.js/builders doesn't need to be installed via npm i separately. I have never used this builder and I always did the commands the way you did the ping.js command

#

Can you send me a link to this new command?

past field
#

yes, here? or dm?

deft wolf
#

Here

past field
past field
#

so it may be completely different

deft wolf
#

Damn, there is no packages.json file in the repository to check whether it is installed separately or not mans_sad

past field
#

ah, so I should just move on from this one and keep looking for different commands with slashcommandbuilder?

#

i wish chatgpt could code well lol

deft wolf
#

No, no, this command is good, but it uses slashcommandbuilder which is not included in the main bot folder you downloaded from github (which is 2 years old) because the commands are registered using "raw json". You can try downloading this with npm install @discordjs/builders and see if that fixes your problem. If not, we will try to convert the command from slashcommandbuilder to raw json

past field
#

ohhh ok

#

so I need to download the 8ball js code, add it to the main bot folder, add it under commands and install it with npm install @discordjs/builders

#

then node . again ?

deft wolf
#

No, no, we'll leave 8ball command alone for now. You just need to type this in terminal while being in the main bot folder

past field
#

ah ok gotcha

#

@nynu ok done

deft wolf
#

And now try to run your bot as before with node .

past field
#

ok

#

ping command still works

deft wolf
#

What about 8ball command?

past field
#

let me add it again

#

no luck

deft wolf
#

Could you send the full error?

past field
#

yes 1 sec

#

@deft wolf

deft wolf
#

Ok, so i made it work but it's gonna be tricky. The question is whether you want to use slashcommandbuilder or raw json in your commands (or both as I managed to do)

past field
#

i’m a quick learner

deft wolf
#

I honestly have no idea, slashcommandbuilder is often recommended for new developers but I've never used it personally

deft wolf
#

You will definitely find more guides for slashcommand builder

#

Raw json is literally everything that is in the API documentation

real rose
#

for beginner def do slashcommandbuilder

past field
past field
warm surge
real rose
#

and

warm surge
deft wolf
past field
#

okay

#

have it open in the editor

past field
#

i know it’s a lot and you have other things to do so it means a lot to me that you are taking time to do this

deft wolf
#

To do this, we need to edit it (first image) in the same way as it looks in the second photo. We import slashcommandbuilder and replace the raw json that was with slashcommandbuilder

past field
#

okay gotcha, where do I get slashcommandbuilder in order to import it?

#

or is that a npm install type of thing

deft wolf
#

No, you just need to add const { SlashCommandBuilder } = require('@discordjs/builders'); in your code

past field
#

ok gotcha

deft wolf
#

Just like I did in the second photo (preferably at the very top)

past field
#

and you did that manually?

deft wolf
#

Yep, I just copy paste it from 8ball command

past field
#

OH

#

WAIT

#

I think I see what you're saying

#

ok hold on

#

nope nvm i suck

deft wolf
#

Okay, to simplify things, I can just send you the code here and you can paste it

#

It's nothing complicated but it can be annoying to write

#

We will soon have a more complicated issue, i.e. editing the index.js file kappalul

past field
past field
deft wolf
#

You need to add (), after .toJSON

past field
#

ok done

deft wolf
#

Do you have any errors in code?

#

It's usually easy to spot because the text is underlined in red

past field
#

async

deft wolf
#

You still need to add , after .toJSON()

past field
#

async is the only word that's underlined red

#

ohh ok

deft wolf
#

It's gonna separate data from execute

past field
#

OH ok gotcha

#

what about that , at the end

#

that's underlined too

#

do i need that there

past field
deft wolf
#

This shouldn't be a problem. If after adding , after .toJSON() nothing is underlined in red, it is good

#

If it is still underlined, remove it

past field
#

"unexpected end of input"

deft wolf
#

Yea, remove it

past field
#

oh wait

past field
#

could that be why

deft wolf
#

Well yes, one is from execute and another one is from module.exports

past field
deft wolf
#

Sure

const { SlashCommandBuilder } = require('@discordjs/builders');

module.exports = {
    data: new SlashCommandBuilder()
        .setName('ping')
        .setDescription('Replies with ping')
        .toJSON(),
    async execute(interaction) {

        interaction.reply("Pong!")

    }

}
past field
#

oops sorry

#

i got errors again

deft wolf
#

No, take it easy. We shouldn't run the bot yet because we still need to edit index.js file

past field
#

ohhhhh ok i got you

#

ok so I've copied and pasted this into the ping.js command file

deft wolf
#

The first step was to adapt the ping.js command to use slashcommandbuilder

past field
#

ok i get you!

#

ok done

deft wolf
#

The second step is to adapt index.js to load commands that were made using slashcommandbuilder

past field
#

ok

#

i have index.js open

deft wolf
#

Ok, so you need to find const commands = client.commands.map(({ execute, ...data }) => data); and delete this line of code

past field
#

I remember Mac kinda breaking this down and how it's like building blocks

deft wolf
#

It's not gonna be useful for us

past field
#

ok going to delete it now

#

for reference for me: deleting it from line 24

deft wolf
#

Yep, exactly

past field
#

ok it's deleted

deft wolf
#

Okay, now we need to create a new array (something that will store our command information). You can do this with const commands = []; (for me I added it on line 18)

past field
#

and for me, that's what I'm going to put on line 24 correct?

deft wolf
#

No no, we need to put that higher

past field
#

ok gotcha

deft wolf
#

I added it in this exact place

past field
#

ok i'm following

#

done

deft wolf
#

The next thing we need to do is change how the command name is saved in the bot's memory. Previously, the command name was available immediately, but now it is inside the data object. We need to change client.commands.set(command.name, command); to client.commands.set(command.data.name, command);

past field
#

line 23

deft wolf
#

Yes

past field
#

so replace line 23 with client.commands.set(command.data.name, command);

deft wolf
#

Exactly

past field
#

ok done

#

and saved

deft wolf
#

The final step is to add commands.push(command.data); right below what we just did. This will put information about the commands inside our previously defined, empty array which we will then send to Discord to register them

past field
#

ok

#

so nothing to change or replace here, just add it to line 24

#

which will then push } down to line 25

deft wolf
#

Yep

past field
#

ok done and saved

deft wolf
#

This must be inside so that information about each command is put into this array

past field
#

I'm understanding the marks a lot more

deft wolf
#

Now you can try to run your bot

past field
#

ok i'll try it now

#

worked! says it loaded 2 slash commands

deft wolf
#

Great, we managed to do it peepoPOGGIES

#

Try your commands

past field
#

ayo

#

i can cry right now

#

ima take a pic of me ugly crying just for u @deft wolf

deft wolf
#

No problem, I'm glad it was sorted out and you can finally move on with your adventure flushedCat

past field
#

I can't believe it

#

thank you a million times

#

omg

#

ok so at this point, all of the commands I add needs to have the slashcommandbuilder on it

deft wolf
#

Not necessarily, if you find a cool command but it is in raw json, you can also use it. In both cases, your command should be registered, but for a beginner, slashcommandbuilder will definitely be easier

past field
#

ok got you

#

so if I find a command that is in raw json, I just import the code like normal? or would I have to modify it?

deft wolf
#

The main factor in whether a command will be registered is whether it has data inside module.exports

past field
#

ohhh ok

#

and if it does, it will load the commans

deft wolf
#

Yes, I assume it could be done better and register commands if they have a data or not, but the important thing is that we managed to fix it

past field
#

YES! Thank you!!!

#

I have 4 commands on there now and they are all working

deft wolf
#

That's awesome. If you have a problem with something, you can come here and someone will definitely help you peepoGlad

past field
#

or like, is there another website I can find codes on?

#

I know github has some

harsh nova
deft wolf
#

People don't usually send ready-made code here. We help more with solving a problem with the code you already have or explaining various other things related to development. We can guide you on how to do something, but we won't write it for you

past field
#

ah ok

#

I was wanting to see if I can get a /ban command for the bot

#

so I'll need to figure out how to write it

deft wolf
#

You should be able to find such a command on github. Most bots have it because it is very basic

past field
#

and i'd just type like "javascript /ban discord bot code" ? or something like that?

wheat mesa
#

I’d recommend thinking about your problem as a series of sub-problems

wheat mesa
#

How do you want to take input for the ban command? Should it take IDs, member objects, names, etc?

How should the user be banned? Look up how to create a ban in a guild in the discord api

Should you delete their messages? If so, how?

Etc

#

Thinking about problems in smaller steps is important because it allows you to define what your intended behavior is

past field
#

ah so the ban command is a lot more

#

ok I can wait on that

wheat mesa
#

It can still be written quite easily, it just depends on how complex you want it to be

past field
#

very basic, i’m just creating it to learn right now

#

end goal is to have a multi use bot for moderation and engagement

green kestrel
#

your bot's code might be getting too big when...

ionic schooner
#

thats not tooooooooo bad

surreal sage
green kestrel
#

all my machines are brain-y names

#

my server is neuron, my desktop is brainwave, my laptop is cortex, my router is synapse, my NAS is frontal-lobe

surreal sage
#

nas 🗿

#

lobotomy

#

🗿

green kestrel
harsh nova
green kestrel
#

nice one, i'll do that from now on

#

or perhaps i'll call my managed switch lobotomy

harsh nova
#

wait did I just steal Astrids joke? I promise it was accidental

green kestrel
#

no astrid was there first

#

also

#

am i the only one who thinks skyrim when someone says astrid

harsh nova
#

yeah probably

#

pretty common swedish name tho so

harsh nova
#

ooooohhh

green kestrel
#

dark brotherhood ftw

harsh nova
#

never completed skyrim tbh

green kestrel
#

i didnt do any of dark brotherhood quest line until after i did the main quest

#

basically for whole main quest, my character was a goody two shoes

#

and after that power must have gone to his head because he joined the thieves guild and dark brotherhood, assassinated the emperor, made daedric pacts...

#

kinda makes sense in headcanon

#

lol

sterile lantern
#

when i submit a modal, i get this

#

im trying to defer it

quartz kindle
#

who the fk enforces typings at runtime

#

what a shit lib

sterile lantern
#

not sure what the issue is as InteractionType.ModalSubmit is just type 5

harsh nova
quartz kindle
#

typings should be enforced at compile time

#

afterwards ts shouldnt care lol

sterile lantern
#

this is cf worker stuff

quartz kindle
#

ew

#

lmao

sterile lantern
#

i havent had this error for practically any other interaction

#

its only erroring with modalsubmit

#

any idea how to fix ??

solemn latch
sterile lantern
#

i added a console.log at the very top and that doesnt work either

#

pain

past field
#

i have a question

#

i have the bot set as a public bot

#

so it’ll join a server

#

but i dont see the commands for it

sterile lantern
harsh nova
past field
#

um

#

register is globally?

harsh nova
#

If you registered them recently it might take an hour or so before they propagate to cache

past field
#

how do i register them

harsh nova
#

Hard thing to say without knowing what library / language you use

surreal sage
#

how can i transition height in css

#

like i just have a div

#

height isnt explicitely set

#

but how can i like

#

animate its position to smoothly go back to the center

#

(its in a flexbox, centered)

past field
#

coding with .js in visual studio code

sterile lantern
past field
sterile lantern
#

(assuming youre using v14, if youre using v13 switch to v13 guide and search slash command registration)

past field
#

can i be honest

harsh nova
#

yes

wheat mesa
#

no, honesty is discouraged here

surreal sage
#

fuck honesty

#

lying on top

past field
#

LMAO

wheat mesa
#

learn C++, it's easier

sterile lantern
#

watch a youtube video

#

theres plenty of them with discordjs

#

although if you dont know basic javascript, id start there first

past field
#

yeah i’ve been trying to learn last few days

#

so for now, i’ll have to update the guildID in config.json to get the commands to work in a specific server?

#

i’m guessing … until i globally register the commands

wheat mesa
#

🧌

sterile lantern
#

if so then yeah

#

im not sure what that guildid is used for, but if its used for registering guild cmds, then yeah that should work

past field
#

it worked

sterile lantern
frosty shuttle
#

That doesn't work like that

radiant kraken
sharp geyser
radiant kraken
#

ez stuff

wheat mesa
sharp geyser
sharp geyser
#

I yoinked most of the state management code from another repo and tailored it for myself

sharp geyser
#

not ads

#

its relevant to development

#

:D

radiant kraken
#

you did not ask for feedback so it's not related to development :D

#

/s

sharp geyser
radiant kraken
sharp geyser
#

Thanks

radiant kraken
#

any plans on learning more about C++/Rust?

sharp geyser
#

maybe at some point

#

I kind of am just focusing on this game in roblox rn

#

Once I have it in a place I feel comfortable leaving it in then I will proceed to learn C++ so I can try and make the same game in unreal KEKW

#

lua is just easier to use right now, so it will help me practice some game dev skills and think like a game developer rather than a bot developer

radiant kraken
#

based

wheat mesa
#

easier than unreal tbh 😭

sharp geyser
#

I'd rather use an already made 3D engine

#

If even you wont touch 3D then how would someone whos leagues dumber do so

wheat mesa
#

I won't touch 3d not because it's hard to do, but because I'm too lazy to do it

#

There's tons of resources out there

sharp geyser
#

Either way

#

no thanks

wheat mesa
#

Just requires the grindset

sharp geyser
#

im not smart enough

wheat mesa
#

Don't have that mindset

sharp geyser
#

its not a mindset

#

its just truthful

wheat mesa
#

You'll only be not smart enough if you believe you're not smart enough

sharp geyser
#

meh

#

I don't grasp things as easily as others so idk

pale vessel
radiant kraken
sharp geyser
pale vessel
#

because u never tried?

sharp geyser
#

I have been plagued by the disease that is bot development and am constantly just looking for the easy way to do things which is copying shit instead of figuring it out myself

#

Not to mention in servers I ask people for help in they seem to have this bad mood about helping me

#

despite me stating I am new

pale vessel
#

there's nothing wrong with that if u learn what the code does during the process

sharp geyser
#

thats the thing, I hardly ever do becasuse of what I just said

wheat mesa
sharp geyser
#

I'd ask people to help me understand or google it and when that doesn't work i'd ask again

wheat mesa
#

Now here I am

#

Because I didn’t give up

sharp geyser
#

People just have a bad mood when helping others it seems

wheat mesa
#

I still have a long ways to go but I learned because I had the motivation to learn

pale vessel
#

i started when i was like 14 coding php

sharp geyser
#

I started when I was 12 💀

wheat mesa
#

Thinking you’re not smart enough for something is guaranteed to stop you from achieving it

sharp geyser
#

Now look at me, still haven't accomplished a damn thing

wheat mesa
#

You’re what 18

#

Maybe 19

sharp geyser
#

19

#

Its been 7 years

#

I have learned next to nothing valuable

wheat mesa
#

I can tell you that you know more than a hell of a lot of university students

sharp geyser
#

I don't think I can be self taught anymore. Its hard to just go about it my own way

#

I am more used to being given a schedule

wheat mesa
#

You can self teach, you just need proper motivation

#

Sometimes we get into places where we’re not motivated

wheat mesa
#

That’s perfectly fine

#

I was like that for the last few months

pale vessel
#

i like doing things my way (slowly but surely)

#

if i have someone else to teach me it'd be too overwhelming

wheat mesa
#

I just got that motivation back and in the last week I’ve learned a ton

sharp geyser
#

motivation is hard to come by when i've been doing it for so long and have felt no accomplishment in my time of doing it.

#

Out of the 7 years i've been programming 4 of which was bot development and I made nothing exciting, the 2 of which was web dev/applications/libraries and then I took a year off

#

I am honestly not sure I want to continue down the programming path, but it feels like a shame to just give up so much time for naught

sharp geyser
# wheat mesa You can self teach, you just need proper motivation

I've been self teaching and even when I had the motivation I still wasn't actually learning anything. I learned what was on the surface of a programming language but I've never learned the depths of it. Like with typescript, I only used it for type safety but there was so much more to it I never bothered to learn, and even with js I never learned the stuff you can do with it. Self teaching just doesn't seem to be the right path for me. Yet I also don't want to pay out the ass to learn something that others can learn easily on the internet.

wheat mesa
#

Maybe you'd enjoy low level languages more if you want to learn about the "depths" of programming

#

I don't care all that much for typescript outside of the type safety; most people don't

#

You don't need to be a type theory wizard to be good at programming

sharp geyser
#

I mean I'd love to learn a low level language, I just feel my method which I use for just about everything is the wrong method

wheat mesa
#

There's no right method

#

There's no wrong method

#

Berry got a job being self taught, proves you don't need school or a degree to be good at it

sharp geyser
#

I mean while yes, but also no

#

Some methods of learning just isn't right for them

#

For me I tend to just dive into the language without any knowledge and just play around with it, but that also makes me lack fundamental knowledge about it.

wheat mesa
#

That's perfectly fine

#

You learn as you go

#

I learned Go by literally starting a project with it, then learning things as I went

#

that's how you'd learn most things in the actual industry anyways

sharp geyser
wheat mesa
#

That's why you can't hop into a senior role right after you graduate, because school doesn't teach you everything

sharp geyser
#

it makes me feel bored cause im not doing anything

wheat mesa
#

Then don't do it that way

#

Start with a project idea

#

As you need to learn things, look up how to do them

#

Ask here

#

Anything

sharp geyser
#

hm

#

I actually did have an idea

wheat mesa
#

All of these resources people recommend are just recommendations

#

It's not a blanket thing for everyone

#

There's no one set way to learn

sharp geyser
#

if you remember I made my own vector implementation in C++

wheat mesa
#

I do recall yes

sharp geyser
#

I wonder if I should try and reimplement a lot of other C++ classes myself

wheat mesa
#

Go for it

#

I can give you ideas of ones that would be relatively trivial to implement

sharp geyser
#

I'd like to hear it

wheat mesa
#

a bitset (std::bitset), a binary search tree (essentially std::set), a linked list (essentially std::list), a stack (std::stack), a queue (std::queue)

#

Start out with a non-templated version of them, then try to convert to templates

#

You'll find the templated version of a BST may be challenging

sharp geyser
#

What exactly do you mean by templated

wheat mesa
#

Accepts generic types

#

Like how std::vector accepts std::vector<int>, std::vector<string>, etc

#

Data structures are a great way to learn

sharp geyser
#

Gotcha

wheat mesa
#

But also if you have ideas for other projects that maintain your interest, go for it

#

Out of this list I'd probably start with like a stack or a bitset

#

Since those are the easiest to implement

sharp geyser
#

uh oh

wheat mesa
#

BST is fairly easy to write if you research it a bit, but gets a little more complex when you try to template it

sharp geyser
#

vs is erroring when I try and run my vector code EYES

wheat mesa
#

(Deallocating is also slightly difficult for anything recursive)

#

((Although you can write non-recursive BST methods, it's just more difficult to understand))

radiant kraken
#

who knows maybe soon we'll have someone making an entire operating system while they're 13

#

gen alpha is scary

wheat mesa
#

comparison is the thief of joy

pale vessel
#

they live up to their name

wheat mesa
#

Many kids have unlimited access to resources that simply weren't as abundant when we were kids

radiant kraken
#

true

#

it's a double edged sword honestly

wheat mesa
#

Youtube tutorials have grown infinitely, tech is now being taken seriously in schools

sharp geyser
pale vessel
#

who's the mf that forked it

#

oh waffle

#

did he do all the work

sharp geyser
#

no

wheat mesa
#

nah I actually fucked it up

sharp geyser
#

I did most of it with the help of waffle and voltrex and null

#

I didn't even know waffle forked it

pale vessel
#

well he made a PR

#

or committed (he had access i guess?)

sharp geyser
#

did he?

radiant kraken
#

on my phone

#

cuz at the time i was in my school

sharp geyser
#

Oh shit right

#

he fixed the heap corruption

pale vessel
#

can u explain that in league terms

radiant kraken
#

i uh was on voltrex mode for a day or two

sharp geyser
pale vessel
sharp geyser
#

oh right that shitty game

#

Also I realized I am using templates for the Vector class but not entirely

#
  Vector() : capacity(1), length(0), array(new int[1]){};
  explicit Vector(size_t size)
      : capacity(size), length(1), array(new int[size]){};

I am still using ints here

#

though I supposedly support the usage of anything

radiant kraken
#

yup

sharp geyser
#

oh wait no

#

wait maybe

radiant kraken
#

just replace int with T

sharp geyser
#

idk

#

will that work even if I use strings or bools or anything?

radiant kraken
#

yup

#

not sure for strings tho

sharp geyser
#

so new bool[1] is a valid thing?

radiant kraken
#

cuz they have constructors and destructors

sharp geyser
#

oh wait

#

that just creates an array of bools

radiant kraken
#

oh wait you use new so that should work fine

sharp geyser
#

with a size of 1

#

I am slowly relearning what my own code does

radiant kraken
#

good

#
template<typename T>
class MyVector<T> {

};
sharp geyser
#

can a vector support a mixture of types in normal c++?

radiant kraken
#

yes

#

wait no

#

all elements of a vector must be the same

sharp geyser
#

thats not a thing apparently

radiant kraken
#

it is

sharp geyser
#

a template argument list is not allowed in a declaration of a primary template

radiant kraken
#

show full error stack

sharp geyser
#
>------ Build started: Project: CMakeLists, Configuration: Debug ------
  [1/2] Building CXX object CMakeFiles\Vector.dir\main.cpp.obj
  FAILED: CMakeFiles/Vector.dir/main.cpp.obj 
  C:\PROGRA~1\MICROS~2\2022\COMMUN~1\VC\Tools\MSVC\1437~1.328\bin\Hostx64\x64\cl.exe  /nologo /TP   /DWIN32 /D_WINDOWS /EHsc /Ob0 /Od /RTC1 -std:c++20 -MDd -Zi /showIncludes /FoCMakeFiles\Vector.dir\main.cpp.obj /FdCMakeFiles\Vector.dir\ /FS -c C:\Dev\cpp-classes\main.cpp
C:\Dev\cpp-classes\Vector.h(11): error C3856: 'Vector': symbol is not a class template
C:\Dev\cpp-classes\Vector.h(11): error C2146: syntax error: missing ';' before identifier 'T'
C:\Dev\cpp-classes\Vector.h(11): error C2059: syntax error: '>'
C:\Dev\cpp-classes\Vector.h(11): error C2143: syntax error: missing ';' before '{'
C:\Dev\cpp-classes\Vector.h(11): error C2447: '{': missing function header (old-style formal list?)
C:\Dev\cpp-classes\main.cpp(6): error C2079: 'vec' uses undefined class 'Vector<int>'
C:\Dev\cpp-classes\main.cpp(16): error C2109: subscript requires array or pointer type
  ninja: build stopped: subcommand failed.

this is what the builder gives me

sharp geyser
sharp geyser
#

I dont need to do Vector<T>

wheat mesa
#

this is wrong

sharp geyser
#

stackoverflow says so

wheat mesa
#

It's ```cpp
template <typename T>
class Vector {
// Can use T here
}

radiant kraken
#

oh

#

i havent used c++ in like years

wheat mesa
#

you're mixing c++ and java

radiant kraken
#

and rust

pale vessel
#

impl<T> Vector<T> {}

wheat mesa
#

Java does ```java
public class ArrayList<T> {

}

radiant kraken
#

much cleaner

#

i like

wheat mesa
#

yeah but also much less powerful

#

Java generics get much messier than that

radiant kraken
#

oh no

sharp geyser
#

How the fuck do I change my settings in visual studio

#

its keymaps are weird

wheat mesa
#
public static<T> void DoSomething(ArrayList<? extends T> list, T something) {}
#

valid Java

#

cursed but valid

sharp geyser
#

Well

#

my vector class is templated

#

:D

#

It works with any types

#

wait are bools in C++ not represented as true and false when logging them?

#

they log as 0s or 1s

#

which makes sense but thats something I didn't know

#

it seems true or false are binded to 0 or 1

wheat mesa
#

Booleans are just numbers at their core

#

Everything is a number at its core

sharp geyser
#

fair

#

I just know that most other languages log them as true or false instead of their number counterparts

wheat mesa
#

I thought that was the case with C++ but I don't do much printing of booleans

#

Ah I see

#

Yeah

pale vessel
sharp geyser
#

On another note my Vector class supports any and all types it seems

#

theoretically using a template this should support custom types as well no?

radiant kraken
sharp geyser
#

or is there something special I have to do to not just support primatives only

radiant kraken
#

is it like impl<T> in rust

sharp geyser
#

I wonder if I can nest vectors

radiant kraken
#

yes

#

yes u can

#

its all types anyway

wheat mesa
radiant kraken
#

so

#

fn thing<T>

wheat mesa
#

yeah

#

basically

sharp geyser
#

well I fucked up somewhere

#

tried nesting a vector inside a vector and looping over that vector to print out the values

#

that didn't work out too well though

#
'Vector.exe' (Win32): Loaded 'C:\Dev\cpp-classes\out\build\x64-Debug\Vector.exe'. Symbols loaded.
'Vector.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'. 
'Vector.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'. 
'Vector.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'. 
'Vector.exe' (Win32): Loaded 'C:\Windows\System32\msvcp140d.dll'. 
'Vector.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140d.dll'. 
'Vector.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140_1d.dll'. 
'Vector.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbased.dll'. 
The thread 0x6374 has exited with code 0 (0x0).
HEAP[Vector.exe]: Invalid address specified to RtlValidateHeap( 000001B7C4840000, 000001B7C48465D0 )
A breakpoint instruction (__debugbreak() statement or a similar call) was executed in Vector.exe.
sharp geyser
#
#include <iostream>

#include "Vector.h"

int main() {
  //Vector<int> vec;

  //vec.insert(0, 100);
  //vec.insert(1, 1000);
  //vec.push_back(10000);

  //std::cout << vec.size() << std::endl;

  //Vector<std::string> vec;

  //vec.insert(0, "Hello, World");

    Vector<bool> vec;

    Vector<Vector<bool>> bool_vector;

    vec.insert(0, 1);

    bool_vector.insert(0, vec);

    std::cout << vec.size() << std::endl;


  for (int i = 0; i < vec.size(); i++) {
    std::cout << vec[i] << std::endl;
  }
  
  for (int i = 0; i < bool_vector.size(); i++) {
    for (int l = 0; l < bool_vector[i].size(); l++) {
      std::cout << bool_vector[i][l] << std::endl;
    }
  }

  return 0;
}
#
//
// Created by dyeaaaronjr on 11/13/2023.
//

#ifndef VECTOR_VECTOR_H
#define VECTOR_VECTOR_H

#include <stdexcept>

template <typename T>
class Vector {
  T *array;
  size_t capacity;
  size_t length;

  void resize_to_fit(size_t index) {
    int newCapacity = capacity;
    while (newCapacity <= index) {
      newCapacity *= 2;
    }

    T* temp = new T[newCapacity];

    memcpy(temp, array, sizeof(T) * capacity);
    capacity = newCapacity;
    delete[] array;
    array = temp;
  }

 public:
  Vector() : capacity(1), length(0), array(new T[1]){};
  explicit Vector(size_t size)
      : capacity(size), length(1), array(new T[size]){};

  size_t size() const { return length; }

  inline void push_back(T element) { insert(length, element); }

  void insert(size_t index, T element) {
    if (index >= capacity) {
      resize_to_fit(index);
    }

    if (index >= length) {
      length = index + 1;
    } else {
      length++;
    }

    array[index] = element;
  }
  T &operator[](size_t index) const {
    if (index >= length) {
      throw std::range_error("index out of range");
    }
    return array[index];
  }
  ~Vector() { delete[] array; }
};

#endif  // VECTOR_VECTOR_H
wheat mesa
#

This is generally not how I would recommend implementing an insert method

#

Vectors should not have potential for empty element slots

#

The reason your code is crashing isn't due to that though

#

It's due to the fact that your array is never resized

sharp geyser
#

Is it due to me nesting a vector inside it?

wheat mesa
#

You're not checking if the length of your array is greater than or equal to the capacity, only the index

sharp geyser
#

to be fair you wrote that part of the code to resize it

wheat mesa
#

Yeah but that was a long time ago and I wasn't thinking straight

sharp geyser
#

I didn't even know that was a potential issue tho

wheat mesa
#
void insert(size_t index, T element) {
  if (index >= capacity || length >= capacity) {
    resize_to_fit(index);
  }

  // ...
}
#

That's probably your error

wheat mesa
radiant kraken
#

remove insert(), just use push_back() instead

sharp geyser
#

Hm nope, it still causes an error

sharp geyser
#

It's nice to be able to insert at a specific index

wheat mesa
#

When inserting something into an array, if the index is out of bounds you should not change the size of the array to accommodate it, UNLESS it is only 1 over the length of the array

radiant kraken
#

causes a lot of unnecessary headaches

wheat mesa
#

Inserting at a specific index is going to require you to shift elements around

#

You should start with a simple push back method

radiant kraken
#

^

sharp geyser
#

I already have push_back no?

radiant kraken
#

i mean

wheat mesa
#

Yeah but it's based on insert

sharp geyser
#

oh wait

#

its based off insert

wheat mesa
#

Which honestly I'd just implement push back alone

radiant kraken
sharp geyser
#

bro I haven't touched this code in ages

#

I didn't even know it was based off insert

radiant kraken
#

you can also try implementing pop_back()

#

or

#

push_front()

wheat mesa
#

Yeah, start with push_back and pop_back

#

also change push_back to not be inline anymore

sharp geyser
#

Okay so the premise of the push_back is to take the element and push it to the back of the vector

radiant kraken
#

yes

wheat mesa
#

Yes

radiant kraken
#

just like .push()

sharp geyser