#development

1 messages · Page 1892 of 1

wheat mesa
#

"start": "your start script here"

fresh bluff
#

Like Under where?

royal portal
#
{
  "name": "ORPtest",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "dependencies": {
    "discord.js": "^13.1.0",
    "dotenv": "^10.0.0",
    "fs": "^0.0.1-security",
    "node": "^16.10.0"
  },
  "devDependencies": {},
  "scripts": {
    "test": "echo "Error: no test specified" && exit 1",
    "start": "node index.js"
  },
  "keywords": [],
  "author": "",
  "license": "ISC"
}
wheat mesa
#

^^

fresh bluff
#

HOLY CRAP THANK YOU

#

Did not work

royal portal
#

what error?!?!1

fresh bluff
#

That @royal portal

royal portal
#
{
  "name": "ORPtest",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "dependencies": {
    "discord.js": "^13.1.0",
    "dotenv": "^10.0.0",
    "fs": "^0.0.1-security",
    "node": "^16.10.0"
  },
  "devDependencies": {},
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "node index.js"
  },
  "keywords": [],
  "author": "",
  "license": "ISC"
}
fresh bluff
#

Ok now its a Node error

royal portal
#

show error

fresh bluff
#

Replit: Updating package configuration

--> npm install discord.js.
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/discord.js. - Not found
npm ERR! 404
npm ERR! 404 'discord.js.@latest' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/runner/.npm/_logs/2021-10-02T23_23_26_423Z-debug.log
exit status 1

#

There

royal portal
#

npm install discord.js@latest

fresh bluff
#

What do i do?

royal portal
#

you installed discord.js. instead of discord.js

fresh bluff
#

im confused

#

ohhh

#

@royal portal how do i reinstall it?

royal portal
#

uninstall it and then install it

fresh bluff
#

ok

quaint wasp
#

is there a command to delete all node modules in npm ?

fresh bluff
#

@royal portal I updated it and go this

/home/runner/ORPtest2/index.js:16
if(message.content === ${prefix}ping){
^

SyntaxError: Unexpected token '{'

royal portal
#
if(message.content === `${prefix}ping`){
fresh bluff
#

omg

#

what do i do?

#

@royal portal

royal portal
fresh bluff
#

ok

#

/home/runner/ORPtest2/index.js:14
message.author.bot) return;
^

SyntaxError: Unexpected token ')'

#

@royal portal

#

const Discord = require('discord.js')
const client = new Discord.Client()

require('dotenv').config();

const Prefix = process.env.Prefix

client.on('ready', () => {
console.log("Logged in as the bot!")
} )

client.on('message', message =>{
if(message.content === ${prefix}ping){
message.author.bot) return;

if(message.content === ${prefix}ping){
message.reply("pong!")
}
});

client.login(process.env.Token)

royal portal
#
const Discord = require('discord.js')
const client = new Discord.Client()

require('dotenv').config();

const Prefix = process.env.Prefix

client.on('ready', () => {
  console.log("Logged in as the bot!")
});

client.on('message', message =>{
  if(message.content === ${prefix}ping){
  message.author.bot) return;
}
  if(message.content === ${prefix}ping){
    message.reply("pong!")
  }
});

client.login(process.env.Token)
fresh bluff
#

Still Error

royal portal
#

what error?!?!1

fresh bluff
#

@royal portal Can i send you access to the Code?

royal portal
#
const Discord = require('discord.js')
const client = new Discord.Client()

require('dotenv').config();

const Prefix = process.env.Prefix

client.on('ready', () => {
  console.log("Logged in as the bot!")
});

client.on('message', message =>{
  if(message.content === `${prefix}ping`){
  if (message.author.bot) return;
}
  if(message.content === `${prefix}ping`){
    message.reply("pong!")
  }
});

client.login(process.env.Token)
#

try that

fresh bluff
#

ok

#

/home/runner/ORPtest2/node_modules/discord.js/src/rest/RESTManager.js:32
const token = this.client.token ?? this.client.accessToken;
^

SyntaxError: Unexpected token '?'

#

WTH

royal portal
#

did you create the .replit file?!?!1

fresh bluff
#

Do you want Edit access?

#

Yes

royal portal
#

show code of that file

fresh bluff
royal portal
#

you forgot " at the end

fresh bluff
#

OH MY GOD IM DUMB

#

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ORPtest2@1.0.0 start: node index.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ORPtest2@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/runner/.npm/_logs/2021-10-02T23_50_54_670Z-debug.log
exit status 1

royal portal
#

dont share it here

fresh bluff
#

but your DM's are closed

royal portal
#

show package.json

fresh bluff
royal portal
#

run curl -I https://discord.com/v7/gateway in shell then screenshot

fresh bluff
#

k

wooden kindle
#

okay so... i want to access my pi from my pc because its hosting a discord bot... so how would i do that

#

do i download something like team viewer or something els

solemn latch
#

Like ssh?

royal portal
royal portal
wooden kindle
fresh bluff
royal portal
royal portal
wooden kindle
#

because when im out and stuff like that i want to access my pi lets say from my nans

#

how would i do that

fresh bluff
royal portal
wooden kindle
#

should i download something like team viewer or use something els

fresh bluff
royal portal
fresh bluff
#

I just got a big message

royal portal
#

screenshot it

wooden kindle
royal portal
#

we just use some methods angeryBOYE

fresh bluff
wooden kindle
#

ohh ur using that thing to get v13

royal portal
#

might of gave wrong link

#

one sec

fresh bluff
#

ok

royal portal
#

run curl -I https://discord.com/api/v7/gateway in shell

fresh bluff
#

HTTP/2 200
date: Sat, 02 Oct 2021 23:57:30 GMT
content-type: application/json
content-length: 35
strict-transport-security: max-age=31536000; includeSubDomains; preload
x-envoy-upstream-service-time: 7
via: 1.1 google
alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400, h3-28=":443"; ma=86400, h3-27=":443"; ma=86400
cf-cache-status: HIT
age: 7451
expires: Sun, 03 Oct 2021 00:27:30 GMT
cache-control: public, max-age=1800
accept-ranges: bytes
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
report-to: {"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v3?s=OF094FbIl%2BeoHHAV18ZcEJOovf8h3O79HiNdWtYbI87Wl0wH9rS9HRwYp52LEVMCiuKBOKv9f5iJqDx1D4xXDjuTm7RzNvI3QDsNlJ8aB4SfJGBFHlDeIDuep8cM"}],"group":"cf-nel","max_age":604800}
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
x-content-type-options: nosniff
server: cloudflare

wheat mesa
#

What in the fuck

#

I don’t think it should be this hard to run a bot on replit...

fresh bluff
#

I don't know either @wheat mesa

royal portal
wheat mesa
#

You have to get node v16+, which I don’t believe you can just install as a dependency

royal portal
#

you can

wheat mesa
#

You can?

fresh bluff
#

@royal portal What do i do know?

#

now*

royal portal
wheat mesa
wooden kindle
#

@royal portal how do i do port forwarding

fresh bluff
royal portal
#

if you want to keep it simple, you can use something like teamviewer

royal portal
wheat mesa
#

I know for a fact that the nix method works

solemn latch
wheat mesa
#

For installing nodejs

fresh bluff
#

What do i hit @royal portal

wooden kindle
royal portal
fresh bluff
#

ok

royal portal
fresh bluff
#

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ORPtest2@1.0.0 start: node index.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ORPtest2@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/runner/.npm/_logs/2021-10-03T00_01_19_218Z-debug.log
exit status 1

#

Error

wheat mesa
#

Install nodejs with the nix method

wheat mesa
#

I haven’t seen anyone have these types of issues when installing this way

royal portal
#

make sure you made no mistakes

fresh bluff
#

@royal portal Can i just give you edit access

royal portal
#

send screenshot of index.js again

fresh bluff
royal portal
#

did you enter a token in the secrets tab?!?!1

fresh bluff
#

Yes i did

royal portal
#

whats the name of the secret?!?!1

fresh bluff
#

Token

royal portal
#

rename it to TOKEN

fresh bluff
#

ok

wheat mesa
#

You have to access it as process.env['TOKEN'] on replit, don’t you?

royal portal
#
const Discord = require('discord.js')
const client = new Discord.Client()

require('dotenv').config();

const prefix = "!"

client.on('ready', () => {
  console.log("Logged in as the bot!")
});

client.on('message', message =>{
  if(message.content === `${prefix}ping`){
  if (message.author.bot) return;
}
  if(message.content === `${prefix}ping`){
    message.reply("pong!")
  }
});

client.login(process.env.TOKEN)
royal portal
fresh bluff
#

Same error

wheat mesa
#

Pretty sure it’s a problem with the way he installed node

royal portal
#

make sure to add the code i said

royal portal
wheat mesa
#

I know

fresh bluff
#

}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ORPtest2@1.0.0 start: node index.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ORPtest2@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/runner/.npm/_logs/2021-10-03T00_06_24_933Z-debug.log
exit status 1

wheat mesa
#

But I highly doubt he’d be getting these errors with npm with a good package.json file

#

If it weren’t for something wrong with the install

#

Show a screenshot of your package.json file again

wheat mesa
#

Nvm

#

It’s intents now

fresh bluff
fresh bluff
wheat mesa
#

You need to provide intents when instantiating a client

royal portal
#
const { Client, Intents } = require('discord.js');
const client = new Client({ intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES] });

require('dotenv').config();

const prefix = "!"

client.on('ready', () => {
  console.log("Logged in as the bot!")
});

client.on('message', message =>{
  if(message.content === `${prefix}ping`){
  if (message.author.bot) return;
}
  if(message.content === `${prefix}ping`){
    message.reply("pong!")
  }
});

client.login(process.env.TOKEN)
wheat mesa
#

Spoon feeding him isn’t going to help all that much

fresh bluff
#

IT RAN

royal portal
#

does it work?!?!1

wheat mesa
fresh bluff
#

ITS ALIVE

wheat mesa
#

Nice!

royal portal
#

make sure the commands work

fresh bluff
#

i forgot my Prefix

royal portal
#

your prefix is !

fresh bluff
#

i found it

royal portal
#

try !ping

fresh bluff
#

How do i add more commands and Custom status?

#

bc i don't know how

wheat mesa
#

Do you know Javascript?

solemn latch
fresh bluff
wheat mesa
#

And/or do you know what is happening in your code

royal portal
# fresh bluff How do i add more commands and Custom status?

you add more commands like this

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

require('dotenv').config();

const prefix = "!"

client.on('ready', () => {
  console.log("Logged in as the bot!")
});

client.on('message', message =>{
  if(message.author.bot) return;
  if(message.content === `${prefix}ping`){
    message.reply("Pong!")
  }
  if(message.content === `${prefix}command1`){
    message.reply("This is Command 1!")
  }
  if(message.content === `${prefix}command2`){
    message.reply("This is Command 2!")
  }
  if(message.content === `${prefix}command3`){
    message.reply("This is Command 3!")
  }
});

client.login(process.env.TOKEN)
wheat mesa
#

You should learn js before continuing

wheat mesa
#

It’s very difficult to make a bot without knowing how to use the language

royal portal
#

i recommend reading the docs for more help angeryBOYE

solemn latch
#

Don't spoonfeed 👀

wheat mesa
#

Also he’s not learning from spoonfeeding angeryBOYE

royal portal
fresh bluff
solemn latch
#

I would bet the guide covers it. If not the docs will

fresh bluff
#

let me check

#

@solemn latch is this it?

wheat mesa
#

no

#

That’s just the class for presence

#

That’s not how you make one for your bot

fresh bluff
#

is this it?

wheat mesa
fresh bluff
#

ok

#

would i make a new file?

wheat mesa
#

No. Why would you make a new file?

fresh bluff
#

To add the code

wheat mesa
#

You probably want to set the presence in your ready event

fresh bluff
#

Where in Ready?

#

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

require('dotenv').config();

const prefix = "!"

client.on('ready', () => {
console.log("Logged in as the bot!")
});

client.on('message', message =>{
if(message.content === ${prefix}ping){
if (message.author.bot) return;
}
if(message.content === ${prefix}ping){
message.reply("pong!")
}
});

client.login(process.env.TOKEN)

royal portal
wheat mesa
#

Learn javascript before continuing, or you’ll be confused a lot

fresh bluff
#

I found it

wheat mesa
#

There you go

fresh bluff
#

so where do i set client.user.setStatus('idle');

wheat mesa
#

In your ready event

fresh bluff
#

But

#

I want to add this

#

client.user.setActivity('discord.js', { type: 'WATCHING' });

#

but i get a error

#

Im dumb

wheat mesa
#

What’s the error

fresh bluff
#

nothing

wheat mesa
#

Ok

fresh bluff
#

So where do i add RPC?

wheat mesa
#

What?

#

You can’t give bots an RPC

fresh bluff
#

Wdym

lyric mountain
#

he means that you can't give bots an RPC

fresh bluff
#

How do i add this then

static void UpdatePresence()
{
DiscordRichPresence discordPresence;
memset(&discordPresence, 0, sizeof(discordPresence));
discordPresence.state = "Watching the Server";
discordPresence.details = "Security";
discordPresence.largeImageText = "N/A";
discordPresence.smallImageText = "Rouge Level-100";
discordPresence.partyMax = 5;
discordPresence.joinSecret = "= ";
Discord_UpdatePresence(&discordPresence);
}

wheat mesa
#

Oh god

lyric mountain
#

oh, cool, java

wheat mesa
#

That’s uh

#

C++

lyric mountain
#

ah, true

wheat mesa
#

You got on to the wrong part of the developer docs my friend

#

That’s for developing a user RPC

#

That has nothing to do with bots

fresh bluff
#

So bots can Have RPC

wheat mesa
#

They can’t

#

Users can

lyric mountain
#

nono, bots and RPC are two sides of the same coin

fresh bluff
#

How?

lyric mountain
#

"application" can refer to both bots and games

wheat mesa
#

RPC is a more complicated topic; ignore it for now

#

Just know that bots cannot have an RPC

#

And that if you find yourself copy pasting C++ code into your Javascript file, you’re doing something wrong

fresh bluff
#

Ok now im gonna add buttons

#

But where?

#

How do i add this code

const { MessageActionRow, MessageButton } = require('discord.js');

client.on('interactionCreate', async interaction => {
if (!interaction.isCommand()) return;

if (interaction.commandName === 'ping') {
    const row = new MessageActionRow()
        .addComponents(
            new MessageButton()
                .setCustomId('primary')
                .setLabel('Primary')
                .setStyle('PRIMARY'),
        );

    await interaction.reply({ content: 'Pong!', components: [row] });
}

});

wheat mesa
#

Copy pasting code will not help you just so you know

#

So I highly recommend learning what the code does, then you’ll be able to know where to put it 😛

fresh bluff
#

Ok to add Slash commands should i make a new file?

wheat mesa
#

I haven’t done slash commands with djs, but I would assume that you would want a command handler and separate the commands into separate files as you would normally do with message commands

#

Although you don’t HAVE to technically

lyric mountain
wheat mesa
fresh bluff
#

Ok how do i add a new command?

blissful coral
#

By creating a new file then putting a function to execute inside it coolAF

fresh bluff
#

Well now im turning the bot off for the night

#

but it does not want to turn off

#

There we go

pale vessel
#

You know things ain't right when you receive a ping in DAPI in the general channel

#

Shit, wrong channel

livid lichen
#

Did anyone else get a crap ton of servers yesterday?

fresh bluff
#

You have got to be kidding me

livid lichen
fresh bluff
#

Better not mess up my code

earnest phoenix
#

My bot needs to be invited with a different link to register slash commands. I used to use prefx. Is there a method for old servers?

livid lichen
#

God dammit replit I sware if you shut down my bots-

pale vessel
earnest phoenix
earnest phoenix
livid lichen
earnest phoenix
#

No they using subdomain for ports

livid lichen
earnest phoenix
#

You cant change something but your bot will be online i think

fresh bluff
#

Like @livid lichen if i lose this code then im done

earnest phoenix
#

Ofc if they dont close .repl.co too

fresh bluff
rapid raven
#

btw i made a economy bot in only one day

livid lichen
#

Slash commands are really annoying to set up. I'd hope you wouldn't lose it.

livid lichen
fresh bluff
#

This bot is run by that code

rapid raven
#

i made slash command in my bpt its soooo easy

livid lichen
boreal iron
earnest phoenix
#

And probably their update is ready they will just upload update

fresh bluff
rapid raven
#

i am telling

livid lichen
rapid raven
#

whyyyyyyyyyyyy

rapid raven
#

i am developr bro

livid lichen
#

ok

#

I am too.

fresh bluff
#

How did you set Slash commands up i want to know how

rapid raven
#

ok

rapid raven
#

talk me in dm

#

for slash command

boreal iron
#

Build a proper command handler, register/update/delete them

livid lichen
boreal iron
#

Not that it’s any kind of magic

livid lichen
#

True, but it can be annoying when errors come up.

boreal iron
livid lichen
#

I can't imagine bots' using raw slash commands api.

boreal iron
#

It’s really easy tho

#

Just to work with POST requests

#

You get from the API

livid lichen
#

True, but like I said if an error comes your way it can keep you up all night.

drifting wedge
#

GUYS

#

HELP

#

so i made a skill tree

#

is there a way to check which nodes are possible to be upgraded?

boreal iron
drifting wedge
#

maybe i can have a map of each node and what theyre connected to?

earnest phoenix
#

I need use discordjs builder for add input to something my slash right?

boreal iron
#

If you know what you doing but yeah as beginner it might be a mass as anything else, too

drifting wedge
#

talking to me?

proven lantern
#

how do i get the guild server count with discordjs and 2 shards?

boreal iron
#

Thought you wanna get rid of the gateway connection?

proven lantern
#

i want to compare

#

make sure my count isn't too far off

#

i need to keep the gateway until at least april next year

boreal iron
#

Yee

earnest phoenix
proven lantern
#

client.shard.fetchClientValues('guilds.cache.size').then(console.log);

#

found

#

even better client.shard.fetchClientValues('guilds.cache.size') .then(results => { console.log(`${results.reduce((acc, guildCount) => acc + guildCount, 0)} total guilds`); }) .catch(console.error);

#

it's only off by 28 servers

pale vessel
#

${results.reduce((acc, guildCount) => acc + guildCount, 0) + 28} better_lollipop

proven lantern
#

is there someway to tell which shard you are using?

#

i dont see it in there

#

maybe this will work

Array.prototype.indexOf.call(client.shard.ids, client.shard.id);```
pale vessel
#

You could just use guild.shardId

#

client.guilds.cache.first().shardId

proven lantern
#

tricky

#

thanks, testing that out

#

im going to do some more logging

#

maybe this will workclient.shard.ids.includes(0)

fresh bluff
#

Hey guys

#

I need help

#

HOW DO I UNISTALL A PACKAGE ON REPLIT

earnest phoenix
#

Just click trash icon

earnest phoenix
proven lantern
proven lantern
earnest phoenix
proven lantern
#

weird, why is it undefined for me

earnest phoenix
proven lantern
#

client.guilds.cache.first().shard.id works though

#

Tim

earnest phoenix
#

Its shardId

proven lantern
#

maybe a difference between djs and djs light?

#

idk

earnest phoenix
#

Yes

#

If its work

#

The reason why it shows 0 or 1 may be because it catches the difference guilds.

proven lantern
#

i get two shards when i start up so it's getting the first guild from the first shard to see what the shard id is

#

then the same code runs on the second shard

earnest phoenix
#

You calling first guild second time

proven lantern
#

naughty words

proven lantern
earnest phoenix
#

Thats why it shows 0 and 1

#

Do you have any other problem

proven lantern
earnest phoenix
#

Ask tim

scarlet cliff
#

im in desperate need of frontend devs for my bot's dashboard
i have been procrastinating on it for the past couple days and it will only drag the project on hold
please, i suck at css
i dont need you to do much, just the "frontend frontend" and ill do the "frontend backend" (you make website with no functionality, i make it do stuff when you press a button)

i can even pay if you want but i hope there's something we can exchange

wheat mesa
#

Color.decode()

lapis yoke
#

hi

#

can i have help

#

my replit doesnt work becz this

#

i need more

#

to let my web open

#

and work

#

so

#

does my replit domain work in vcode if i replaced

#

the free

wheat mesa
#

What

earnest phoenix
lapis yoke
#

um

#

i cant

#

do u have any code

earnest phoenix
#

What code?

lapis yoke
#

replit code

#

to have some days

earnest phoenix
#

Uninstall pakcages

lapis yoke
#

who

#

me

#

i cant

earnest phoenix
#

Yes you

lapis yoke
#

remove it

earnest phoenix
#

Why

lapis yoke
#

itss important

#

its web from a server and i cant play in anything

earnest phoenix
#

Let me see your packages

lapis yoke
#

and the pakages help me if it get

#

any problem

earnest phoenix
#

Inside

#

Not names

lapis yoke
#

i cant

earnest phoenix
#

Why

lapis yoke
#

for sec

#

did u see

earnest phoenix
#

First of all

#

I said packages

#

package.json includes thats

lapis yoke
#

5708

#

letters lol

earnest phoenix
#

pakckage.json?

#

As i thought

lapis yoke
#

98

earnest phoenix
#

You are module person

lapis yoke
#

letters

#

wdym

earnest phoenix
#

import a
import b
import c
import d
....
import z

lapis yoke
#

what is that

#

i cant change anything from the code

lapis yoke
#

i am a web hoster

#

so

#

its so bad and it wont work

#

can u come to dms

earnest phoenix
#

1:52. second

#

Your problem is using unnecessary modules

lapis yoke
#

how

earnest phoenix
#

What how ?

lapis yoke
#

how do i

#

it work 100% but i cant remove any pack

earnest phoenix
#

You installed every package you saw in npmjs.com

lapis yoke
#

no

#

its only two

#

and i just got it from a coder

#

so i got it with the packs

earnest phoenix
#

Just try to use less modules

lapis yoke
#

i cant

#

its a web

earnest phoenix
#

And ?

lapis yoke
#

and idk the things

earnest phoenix
#

You can code website by using no module

lapis yoke
#

and i cant remove the modules

#

its cool

#

i gtg

wheat mesa
#

I haven’t seen a list or screenshot of any of your packages yet...

earnest phoenix
#

I didnt see all packages but he installed everypackages which ones name start with c

wheat mesa
lapis yoke
#

becz

#

its not my pack its a pack i got it with the web

errant flax
#

that doesn't shows the point that u have to make ur installed packages as a secret

#

:plump_isee:

lapis yoke
#

i got it from masterious

earnest phoenix
#

Lol

lapis yoke
#

he helped me

earnest phoenix
#

And ?

lapis yoke
#

with giving me the web

earnest phoenix
#

And?

lapis yoke
#

idk what did he code

errant flax
#

installing random and uneeded packages will just slow down ur program

lapis yoke
#

so i cant change anything

earnest phoenix
#

I didnt say you change anything

#

Just show your package.json

#

This isnt secret thing

wheat mesa
#

Package.json is nothing to keep secret

lapis yoke
#

ok later i am in f.uck in zoom

errant flax
#

unless u store something in there mmLol

earnest phoenix
#

Look this is my package

pale vessel
#

"fs"

earnest phoenix
#

There is no anything is secret

lapis yoke
#

i have something like that

scarlet cliff
lapis yoke
#

Waffle i wanna eat u

earnest phoenix
#

Naughty things

#

🤭

lapis yoke
#

Waffle

errant flax
#

something

lapis yoke
#

and i will put on u something called

#

its brown and black thing

scarlet cliff
#

bruh

errant flax
lapis yoke
#

idk

#

i think he is making car

scarlet cliff
earnest phoenix
#

Yes

lapis yoke
#

yes what

scarlet cliff
lapis yoke
#

car

pale vessel
#

For heroku too

earnest phoenix
#

I use it for repl lol

lapis yoke
#

for ur friend too

#

tyrone

#

ur my food

scarlet cliff
#

why change the version tho

earnest phoenix
scarlet cliff
#

is the default low

earnest phoenix
#

Yes

#

14.18.0

#

But repl use node 12.22

#

And discordjs 13 need +16.6

errant flax
scarlet cliff
earnest phoenix
#

And latest versions always better

scarlet cliff
#

not necessarily

earnest phoenix
#

Yes but it seems op lol

lapis yoke
#

guys

earnest phoenix
lapis yoke
#

do u have this or know this

errant flax
#

latest versions has some goods and bads
like deprecating something/removing them entirely

lapis yoke
#

this da f boi

earnest phoenix
#

Yes sometimes update something take my days but i think they are good

errant flax
earnest phoenix
#

I was too lazy to clip

#

Add this to my server lol

pale vessel
earnest phoenix
#

I dont have nitro*

pale vessel
lapis yoke
#

hey

scarlet cliff
lapis yoke
#

guys

#

guess what

#

my school sucks and their meeting ended

#

and they will open it in 10m

#

10mins

#

lol

earnest phoenix
#

Bruh you gotta be kid

lapis yoke
#

no

errant flax
#

dev topic only :plump_isee:

lapis yoke
#

i am big but in school

earnest phoenix
#

I use this

scarlet cliff
#

remove the bg

#

please

earnest phoenix
#

No

errant flax
#

"i am big but in school"

  • wise man 2021
lapis yoke
#

i am in 7 grade

#

lol

errant flax
#

:node:

lapis yoke
#

shut it

earnest phoenix
#

So you are kid

errant flax
#

wait doesnt 7th grade means like ur....

lapis yoke
#

i should be in 8grade but my school made me 7 i should be 8

errant flax
#

11-12ish?

scarlet cliff
#

12

#

lmao

lapis yoke
#

no

#

13

scarlet cliff
#

acting like ur 8 tho

lapis yoke
#

my sis is 13 grade

#

she have 1 year and she leave our school

earnest phoenix
lapis yoke
#

i am not

#

i am just in sweaty mode

pale vessel
#

Give him a break WEARYbread

lapis yoke
#

and

#

u suck

earnest phoenix
#

Channel for chatting about development
Not for schoold food

lapis yoke
#

oh

#

shi

#

sorry

#

um

errant flax
#

wait so hes underage then

lapis yoke
#

i am new in coding .com

pale vessel
#

He said he's 13 gabbruh

#

Why u gotta be like this

scarlet cliff
#

fake

earnest phoenix
pale vessel
#

And nor do you

scarlet cliff
#

grade 7 is literally 11

lapis yoke
#

i have

earnest phoenix
#

Act its 14 in my country

lapis yoke
#

no

#

i am 13 not 11

#

so stop

#

or 12 hmmm

#

u suck

modest maple
#

Man stop with the fucking witch hunt guys

lapis yoke
#

fuck why are my school is suck its d

#

they are making me bored of english

#

لا

#

لا

#

لا

#

لا

modest maple
#

This has nothing to do with developement so go move to #general or take it to dms like christ

lapis yoke
#

guys

#

how do i fix the thing

#

for real

earnest phoenix
#

Remove unnecessary packages

#

Or dont ask it again

#

Ok?

lapis yoke
#

and what will happen

modest maple
#

Try it and see

lapis yoke
#

i have an backup if it got bad

#

so imma try

#

i removed the two

#

lock and jason

cinder patio
#

Don't remove Jason 😩

modest maple
lapis yoke
#

um

#

holy shit

#

wait

#

i have another back

modest maple
#

You needed to edit the json not remove it

lapis yoke
#

i fored

earnest phoenix
lapis yoke
#

what to remove and what to edit

earnest phoenix
#

That was really so funny

#

To read this lol

lapis yoke
#

what to remove

#

um

#

guys

#

i got the back again

#

both of them

#

sweaty mode

#

i am having a problem cant get fixed

#

byw

lunar wraith
#

Hey

boreal iron
#

Really should stop reading the message history… smh

modest maple
#

Mhmm

#

shivacado

slender thistle
#

Chili Phishy

errant flax
#

how do i check if a person is viewing a website with a mobile device?

#

whats that thonk

boreal iron
#

There’s never a 100% accuracy but use the user agent in the first place as well as screen size of the device.

errant flax
#

what if they use desktop mode?

#

would that affect it?

boreal iron
#

The screen size can be calculated easily checking for the devices document size is JS

boreal iron
errant flax
#

the document size or the navigator thing

boreal iron
#

But you can use browsers on mobile as well providing a modified user agent and force a desktop known resolution

#

It totally makes sense to use an existing user agent parser/a whole library

errant flax
#

so what do i use thonk

boreal iron
#

They’re capable of listing each available, known browser, OS, if mobile client or not etc.

errant flax
#

so what lib should i use??
this lib will be in native js right thonk

boreal iron
#

Actually got a good one with a high accuracy but I’m not at the PC atm okeh

errant flax
#

shit pd_wheeze

#

just ping me if u got it

boreal iron
#

Yee a native JS solution if you want that.
I’m using PHP but the result is the same.

errant flax
#

idk a single thing abt php iara_nervous_sweat

boreal iron
#

With the difference JS can be blocked by default, PHP not KEKW

errant flax
#

wym?

next crown
#

Hi one question
Is there any command or way I can see in what servers r my bots
Without me being in that servers

earnest phoenix
errant flax
boreal iron
errant flax
#

screw them if they dont want the site to work properly

boreal iron
errant flax
#

:kekw:

next crown
errant flax
earnest phoenix
earnest phoenix
#

It will check if user wievs with mobile

errant flax
#

i don't understand the code

earnest phoenix
#

Just copy paste

errant flax
#

was that regex i saw

earnest phoenix
#

I didnt even read this lol

boreal iron
# next crown ?

Loop through the guilds to get the property you want. Or just use a filter for the collection.

errant flax
errant flax
#

does it return true or false

errant flax
earnest phoenix
#

if(mobile) {
} else {
}

earnest phoenix
#

Desktop and mobile

next crown
#

Can we dm it's easier

errant flax
boreal iron
next crown
#

And that will do what?

earnest phoenix
boreal iron
next crown
#

Yes

errant flax
next crown
#

Or should I make a command =servers with this code?

boreal iron
earnest phoenix
next crown
#

And how does bot show me servers? Sry I have a lot of questions 😂

boreal iron
earnest phoenix
#

The code i sent will care

#

It checks if user use tablet or phone

#

And if yes it will return mobile = true

boreal iron
boreal iron
next crown
#

Don't mind description

boreal iron
#

That message var tho doesn’t make any sense.

next crown
#

That's what u send me

boreal iron
#

The loop logs your guilds in the console

next crown
#

Ok so it won't work like this?

boreal iron
#

It will return an error telling you, you can’t send an empty message

next crown
#

Can we make it work somehow that I type =servers and show me servers?

boreal iron
#

No

next crown
#

Why?

boreal iron
#

That would be a privacy issue

next crown
#

?

eternal osprey
#

how do i check what the unicode is of ✅

#

isn't it: /u2705?

boreal iron
# next crown ?

You’re not allowed to publicly list all guilds your bot is in without explicit consent of the guild owners.

next crown
eternal osprey
#

I am disabling and removing that then

#

lmao

next crown
#

Lmao

boreal iron
#

You should before your bot gets reported

boreal iron
#

That would be its end

eternal osprey
next crown
#

@boreal iron can we dm?

eternal osprey
#

For example if some guild abused a command or discovered a bug.

#

But it's disabled already. Don't worry, and thanks for the advice

boreal iron
eternal osprey
boreal iron
#

Because not all members are cached at any time.

pearl trail
#

enable server members intent?

earnest phoenix
#

.memberCount

#

guild.memberCount

boreal iron
#

You will have the memberCount property available in the GUILD_CREATE event and READY event

#

Once

#

djs will most likely cache this

#

Loop through your guilds and use reduce() on the guild.memberCount property

#

Or use a filter… etc

next crown
#

@boreal iron it works thanks but I have one more question can I somehow have inv links to that servers?

boreal iron
#

If you’re allowed to generate them and the bot has the needed permissions…

next crown
#

Bot have administrator permisions on all servers

boreal iron
#

Omg … no bot needs administrator permissions, no one, never

next crown
#

?

earnest phoenix
#
guild.channels.cache.first().createInvite(
  {
    maxAge: 0,
    maxUses: 0
  },
  `Requested with command by ${message.author.tag}`
)
#

@next crown try this

next crown
#

Where?

earnest phoenix
#

Add code

next crown
#

In my ready variable?

next crown
#

@earnest phoenix I have a error

#

guild is not defined

earnest phoenix
#

Then define it

next crown
#

How?

earnest phoenix
#

By defining

next crown
#

???

boreal iron
#

Where did you throw that code in?

next crown
#

Ready variable

#

Where is all rest

earnest phoenix
#

Why you got it on ready

next crown
#

Dude your confusing me

#

@boreal iron how do I get invite link to those servers?

earnest phoenix
#

which guild you want it ?

next crown
#

All my bot is in

boreal iron
#

It’s still a privacy concern mass creating invite links for guilds your bot is in.
And why would you put it into the ready event?
Creating invite links on any startup?
Wut, why?

next crown
pearl trail
#

be careful as you can reach the rate limit

errant flax
#

i report ur bot to discord rn iara_saywhat

#

jk

#

but why mass creating invites

#

like what do u need it for????

boreal iron
earnest phoenix
boreal iron
#

This doesn’t justify to create mass invite links

errant flax
#

not only its a privacy thing topgg mods can kick ur bot out of topgg KEKW

boreal iron
#

Spoon feeding is not allowed in here, especially if it violates the ToS

earnest phoenix
#

He asked for code

#

And i showed lol

errant flax
#

thats still spoon feeding

earnest phoenix
#

Sad

boreal iron
#

The reason he asked for still doesn’t justify this

errant flax
#

so does showing someone a code spoon feeding

#

jk im being sarcastic

boreal iron
#

I can understand the reason to log guilds your bot is in, but posting them in Discord is just… you know.
But also creating mass invite links for no reason and requiring administrator permissions for your bot… omg
Should be considered as spam and potential risk and being banned immediately

earnest phoenix
#

Hmm

#

What if he gets already created invite

boreal iron
#

I wonder how he will explain this in a verification process later on

#

As like any (suspicious) activity is being logged by Discord anyways

split hazel
#

sussy

eternal osprey
#

why can't i get the unicode of 🟢

earnest phoenix
#

I am using guildCreate if guildmemberCount < 20 guild.leave()

scarlet cliff
#

copy that

#

paste

#

done

eternal osprey
scarlet cliff
#

what?

eternal osprey
#

doesn't recognize the encoding

errant flax
eternal osprey
#

so i have to use unicode escape characters

scarlet cliff
#

?????

errant flax
earnest phoenix
errant flax
#

wait how do djs blocks ur bot

scarlet cliff
#

same for me (above @errant flax ) ^^

errant flax
#

and why do they care

#

i thought discord handles it

#

:plump_isee:

boreal iron
earnest phoenix
#

They dont give me ✓

eternal osprey
# scarlet cliff ?????

my vps doesn't recognize the characters, eventhough it;'s a unicode emoji. It reverts everything back to ??

scarlet cliff
#

what

eternal osprey
#

so that's why i need to use\u characters

earnest phoenix
errant flax
errant flax
earnest phoenix
#

And they said we wont give bc this reason

#

I deleted my bot

#

it was my first tear

errant flax
#

i didnt knew djs has a blacklist thing

#

wonder if that will happen to me iara_nervous_sweat

scarlet cliff
errant flax
#

"discordjs shit blocked my first bot bc unorganic growing"

boreal iron
cinder patio
#

they meant discord

earnest phoenix
errant flax
#

oh

rich copper
#

discord.py
whenever I press a button it says this interaction falied

#

how can i fix it?

earnest phoenix
#

it is dead now

rich copper
#

huh

earnest phoenix
#

you should switch to a discord.py fork because the library has been ditched by the creator

#

it will stop working when message intent comes along iirc

rich copper
#

u mean nextcord?

earnest phoenix
#

¯_(ツ)_/¯

#

your choice

modest maple
earnest phoenix
modest maple
#

v2 has supported interactions for a while

#

although it's not maintained any more

#

it still works

#

for now atleast

earnest phoenix
#

it will stop working when v8 goes poof

modest maple
#

Not to mention that basically all the Discord.py forks suck ass

earnest phoenix
#

(i mean the api version not js engine)

modest maple
earnest phoenix
earnest phoenix
#

is this why you don't comment on libs made for languages you don't use

gusty lintel
#

im develoqer

earnest phoenix
errant flax
#

anybody here uses socket.io?

earnest phoenix
modest maple
#

Sip This is why you dont spurt out random nonsense acting as if it's the truth

earnest phoenix
modest maple
#

shrug And you choose to repeat that aimlessly instead of checking, even though you should know better than to trust the average bot developer's A) Knowledge of the subject and B) that they themselves have verified that

earnest phoenix
scarlet cliff
#

why

earnest phoenix
scarlet cliff
#

why does this happen

earnest phoenix
# scarlet cliff why

because we js devs will continue to increase the size of our node_modules until our hard disk explodes

scarlet cliff
#

just

#

npm i ws

modest maple
#

Sip I mean Socket IO is more than just WS

scarlet cliff
#

i dont care

earnest phoenix
modest maple
#

So again with the Uninformed aimless opinions of someone who is aimlessly coding without any thought or knowledge about what it is they're doing and saying mmLol

split hazel
#

cry about it

let test = 5;
var test2 = 2;
scarlet cliff
#

are you talking to me >:(

boreal iron
earnest phoenix
#

I am talking to you after you watch the entire thing

#

javascript devs dont care about efficiency
as long as we can write 2 lines of code in 1 using a lib we'll use that lib

scarlet cliff
#

there is special and specific hate towards that

errant flax
earnest phoenix
#

I hate websockets in general they're to hard to work with

earnest phoenix
scarlet cliff
modest maple
#

🤣 PyThon slow2 seentoomuch pAIn ❗ You sHoUld use js BeCaUse 🚤 misaka_zoom Use 🕸️ 🔌 BecAUse 🔌 IO is BaD aS I am programmingsocks CodEr wItH 🦾 ExPerIencE anD tHeY hammer_and_sickle_think Must bE the SamE as 🕸️ 🔌

earnest phoenix
boreal iron
#

Pff PHP still is the superstar

modest maple
#

Thats just gonna come up as gibberish on the start bored so not much reason to star that mmLol

earnest phoenix
boreal iron
#

Huh what?

#

Wdym by star that?

earnest phoenix
#

Js is better than python i think

#

+⭐

modest maple
earnest phoenix
#

Bc its more flex

#

owo why can't i post the raw text +:star:

modest maple
#

because

#

discord

earnest phoenix
#

discord is not a good thing

  • vsauce
scarlet cliff
#
  • me
boreal iron
earnest phoenix
#

It worked

errant flax
earnest phoenix
#

Slay your website is wonderfull

errant flax
earnest phoenix
errant flax
#

oh kek

#

thats so outdated

#

:pd_wheeze:

earnest phoenix
#

body {
bgcolor: white;
text-align: center;
}
done

#

Lol

errant flax
#

lmfao

earnest phoenix
#

a {
text-decoration: none;
}

#

Challenge accepted. Wish me good luck

errant flax
#

hey if ppl go to my abt me page often

#

should i redirect it to a rickroll

earnest phoenix
#

*here lemme just copy some styles from discord*

errant flax
earnest phoenix
#

How to do that on discord

errant flax
boreal iron
earnest phoenix
#

Redirect to rickroll

boreal iron
#

Without all the trash …

errant flax
earnest phoenix
#

io.emit

errant flax
#

oh ok

errant flax
#

or any chat app

earnest phoenix
#

also imma make it in deno

#

first problem: tf do you serve react in deno

#

wait you don't even need a bundler

split hazel
earnest phoenix
boreal iron
#

troll detector exploded

earnest phoenix
#

at least for esm users

split hazel
#

googles article frantically to find reasons why node is better than deno

earnest phoenix
#

finds they're both made by the same guy

#

why italic letters

split hazel
#

because it emphasises that the text represents actions rather than speech

quartz kindle
#

better challenge: make it in just-js on linux

boreal iron
#

cough PHP

quartz kindle
#

eats PHP for breakfast

boreal iron
#

STFU

split hazel
#

yo tim i was searching for you at 11pm

boreal iron
#

He pretyped that

split hazel
#

how do stack frames work-

boreal iron
#

I knew what was coming

earnest phoenix
#
~/UnfoldedAbleMp3$ deno upgrade
Looking up latest version
Found latest version 1.14.2
Checking https://github.com/denoland/deno/releases/download/v1.14.2/deno-x86_64-unknown-linux-gnu.zip
31.5 MiB / 31.5 MiB (100.0%)
Deno is upgrading to version 1.14.2
Archive:  /tmp/.tmpzHTjme/deno.zip
  inflating: deno                    
error: Read-only file system (os error 30)

I think it's time to delete my replit account

split hazel
#

the filesystem is a book

#

get it

#

because you're not allowed to write on books

#

lmao

earnest phoenix
#

good thing i dont use typescript

#

Deno is so fake name

split hazel
#

that page took me a solid 20 seconds to load

earnest phoenix
#

Node's letters have changed places

split hazel
#

but then im also cloning a massive github repository in the background

boreal iron
quartz kindle
boreal iron
#

Repeat that, Sir

earnest phoenix
#

Deno is fake name

split hazel
boreal iron
#

pepowot 🔫

earnest phoenix
#

They forgot to come up with the new name while copying the code of the node

#

🤣

quartz kindle
#

basically as far as i get it, recursive functions are all pre-analyzed, then resolved backwards

#

thats what the function stack is for

earnest phoenix
#

ah yes, deno repls with node v14

#

and typescript errors in a non typescript file

quartz kindle
#

jenious

earnest phoenix
# quartz kindle jenious

deno bundle src/index.jsx frontend/bundle.js && node server.js
sometimes my genius... it's almost frightening

quartz kindle
#

lmao

split hazel
#

fat 64 = ntfs change my mind

earnest phoenix
#

excuse me

Emit "frontend/bundle.js" (232.49KB)
split hazel
#

that is fat

#

you should perform compressum

quartz kindle
errant flax
#

i wonder why repl.it's things r outdated

inland quail
earnest phoenix
#

spot the error

~/UnfoldedAbleMp3$ npx esbuild src/index.jsx --outfile=frontend/bundle.js

  frontend/bundle.js  272b 

⚡ Done in 5ms
#

wtf
2 kb is faster to build

robust moth
#

👍

earnest phoenix
quartz kindle
#

repl.it has thousands/millions of users, and many updates can contain breaking changes that would kill/break stuff for many people

#

thats why they cant simply update their shit

earnest phoenix
#

isn't that the users fault

#

using node v12

#

If they wanna use oldest thing then they can use shell

#

Or dont upragade old versions of packages

#
cardss.includes(args.join(' '))
#

cardss has Mega Knight

#

so how can i make it like, if i type MEgA knight

#

it'll respond?

#

bc it doesn't answer