#development

1 messages · Page 1792 of 1

earnest phoenix
#

I'm a trial mod so I can't do it

copper cradle
#

lol

#

yeah, most people here don't actually have enough experience to do the most basic stuff, you'd be better off just hiring someone on fiverr or on freelancer

earnest phoenix
#

And fiver and freelancer have built in ways to protect the buyers and sellers, you don't know what might happen here cuteysadblob

slender thistle
cinder patio
#

That's so 2019

slender thistle
#

Did you run the repl?

cinder patio
#

yup

slender thistle
#

Nice

cinder patio
#

what's nice about it

slender thistle
#

Don't know, I'm just going through random repl apps

opaque seal
#

Kinda hate the fact that you need to find the typings for each thing honestly

opal plank
#

thats the whole point of it

#

you dont need to find the types

#

u make ur own

#

then hover on it, and you know its shape

opaque seal
#

Why not just use a statically typed language at this point if you don't have to compile for the web, I don't see a point for it

cinder patio
#

you use js' ecosystem and packages

opaque seal
#

Ig that's the only real benefit

#

But for Discord bots imo it's not that needed most of the times

opal plank
#

once ina lifetime i fucking managed to deploy it without something breaking

slender thistle
#

pog

earnest phoenix
#

.ping

clear marlin
#

.pong

opal plank
#

just add a .catch block onto your promise

inner fulcrum
#

wat thing u guys use to host ur bot

opal plank
#

@inner fulcrum

#

3 full clusters

inner fulcrum
#

wat FREE thing u guys use to host ur bot

#

lmao

opal plank
#

show ur code

opal plank
inner fulcrum
#

lmao

opal plank
#

waiting

#

there is

#

add a .catch block onto the .sned()

snow urchin
#

When NextJS is rendering a string that has line breaks (\n), it ofc does not show the line breaks, but also doesn't go to a new line? Any ideas?

opal plank
#

u need to pass in a function

#

@earnest phoenixhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/catch

The catch() method returns a Promise and
deals with rejected cases only. It behaves the same as calling Promise.prototype.then(undefined, onRejected) (in fact, calling
obj.catch(onRejected) internally calls
obj.then(undefined, onRejected)). This means that you have to provide an
onRejected function even if you want to fall back to an
u...

#

read that

#

Np

bright thorn
#

On Console log i got this error again and again

opal plank
#

you trying to edit a message that doesnt exist

#

or react to one

#

or something

#

the message has been deleted already

#

and you trying to do something to it

bright thorn
#

Oh

#

I am trying to edit a embed

#

msg.edit(embed1)

opal plank
#

if(!msg.deleted) rest...

bright thorn
#

I got it thnq

opal plank
#

i assume djs has handlers for that

woeful pike
#

css doesn't render newlines by default

snow urchin
#

aight

errant perch
#
bot.on('presenceUpdate', (oldMember, newMember) => {
    console.log(oldMember.user.presence.status + " " + newMember.user.presence.status)
});``` when changing my status from dnd to online the status of oldMember and newMember both say online. am i doing something wrong?
zinc wharf
#

Normally "oldMember" and "newMember" will be "oldPresence" and "newPresence" , but that shouldn't effect anything

errant perch
#

yea i just saw that on stack overflow and tried it for the fun of it

#

didnt work

#

obviously

zinc wharf
#

Do you have the correct perms to track presence? It would normally be on developer page

errant perch
#

yea i have the presence intent enabled

#

and the bot has admin permissions

zinc wharf
#

Right

#

Just done some testing

#

You have your things wrong

#

console.log(oldPresence.status + " " + newPresence.status);

#

This is it

errant perch
#

looks like it worked

#

thanks

zinc wharf
#

No worries

topaz wedge
#

I finally found out how to make an inline reply:

//FILE NAME: inlineReply.js
const { Message } = require("discord.js");

Message.prototype.inlineReply = async function(content = String()) {
        return this.client.api.channels[this.channel.id].messages.post({
            data: {
                content: content,
                message_reference: {
                    message_id: this.id,
                    channel_id: this.channel.id,
                    guild_id: this.guild.id
                }
            }
        })
    }

And to require it, I just do this:

//...
require('./inlineReply');
//... and now just do <Message>.inlineReply("content") and it works!
proud plover
#

Hi is there any way that where i can send all the collected messages from message collector at once in an embed ?

topaz wedge
cinder patio
proud plover
#

Thanks

topaz wedge
tulip ledge
#

is there a way to hide/remove a message attachement when editing?

earnest phoenix
tulip ledge
#

mhm I see

#

cuz I'm using a base64 image from an API and saving that as a temporary image and using that as thumbnail for the embed, would it be better for me to make an express server and get the image through there then?

earnest phoenix
#

What you can is upload the (for example) image to an image host or something and set the image in the embed

#

Those can be edited/removed

tulip ledge
earnest phoenix
tulip ledge
#

ty

tulip ledge
#

wait how

earnest phoenix
#

I meant through a message, not an embed; it can be removed from embeds

tulip ledge
#

i had the attachment in my embed

#

then I edit it to a message

#

is that possible?

pale vessel
tulip ledge
#

I want to remove the attachment

earnest phoenix
pale vessel
#

it's possible now that you can delete attachments for existing messages

#

and it wasn't possible for embeds before either, what are you talking about? the uploaded attachment would be outside the embed

#

It only worked for URLs

tulip ledge
#

but

#

how do u delete it?

earnest phoenix
#

Hey, How can I save a user who voted for my bot in last 12 hrs in discord.js?

cinder patio
#

For 12 hours personally I think an in-memory cache is good enough, as long as your bot doesn't restart every hour or something

pale vessel
#

It does work

earnest phoenix
#

Oh Ok thanks

pale vessel
tulip ledge
#

wait

#

do embed have attachment properties?

pale vessel
#

and then upload the file on edit also

pale vessel
tulip ledge
#

oh

pale vessel
#

you can also just upload new attachments on edit without setting the attachments property an empty array (it'll just add a new attachment to the message)

tulip ledge
#

msg.body = { attachments: [] };

#

Like this?

pale vessel
#

What library are you using?

tulip ledge
#

djs

pale vessel
#

since this is a new feature, I'm not sure if they implemented it yet on stable

#

maybe on master branch

tulip ledge
#

I'll just use the express server

pale vessel
#

Ooof

#

yeah that'll work

tulip ledge
#

1 issue tho

#

I always get this error Error: listen EACCES: permission denied :::8923

#

and can never fix it

crimson vapor
tulip ledge
#

Like I've had this issue for like over 6 months

#

and no one could every find out why

pale vessel
#

yeah no attachments property

#

rose master race

#

am I right MILLION

crimson vapor
#

uh

#

depends

pale vessel
#

frick slash commands

crimson vapor
#

yeah

#

berry's implementation wasn't what I wanted

pale vessel
#

go tell him to improve it

crimson vapor
#

he doesn't listen to me about it

pale vessel
#

F

crimson vapor
#

he thinks "they should be exactly the same"

#

so "you don't rewrite your commands"

#

yes how are you supposed to do aeon spin ^ with slash commands

#

like wtf?

sacred juniper
#

Hello

#

I have a question about discord confirmation

tulip ledge
#

anyone knows how to solve? Error: listen EACCES: permission denied :::45010 I get this error for every single port

zinc wharf
tulip ledge
#

with netstat -a?

zinc wharf
#

No, 192.168.1.1

tulip ledge
#

wait how

zinc wharf
#

You have to sign into your network router

tulip ledge
#

wellp

#

can't do that

zinc wharf
#

Whys not? Its rather easy

#

Ignore rat... backaway

tulip ledge
#

I just go to 192.168.1.1 in my browser?

zinc wharf
#

Indeed

tulip ledge
#

yeah

zinc wharf
#

But you need to know your root login of the router

tulip ledge
#

doesn't work

zinc wharf
#

Do ipconfig in your terminal, and find "Default Gateway"

#

Thats your IP of the router

tulip ledge
#

aha found it

#

Doesnt work either

#

And I also don't know the root login of the router

zinc wharf
#

Well, how the fuck do you change your router settings then lmao

crimson vapor
#

mostly it defaults to admin admin

tulip ledge
#

idk the technician does prob

crimson vapor
#

or its on the back of the router

slender thistle
#

Depends on the model

tulip ledge
#

but ye that ip doesn't work either

slender thistle
#

I literally had to call my ISP because their routers had different default password

crimson vapor
tulip ledge
#

wellp

#

no express server today ig

clever agate
#

someone help me

#

ytdl is giving 404 error

#

but the link exists

solemn latch
clever agate
#

I have now updated the YTDL

#

before i update the error was still active

solemn latch
#

ytdl seemed to break for everyone yesterday

clever agate
solemn latch
#

seems youtube might be updating stuff, or even intentionally breaking these scraping programs

clever agate
#

where do I get news from YTDL?

solemn latch
#

lavalink i hear still works

#

its better than ytdl anyway

clever agate
#

I will try to learn Lavalink

#

'-'

#

buttttt

opaque seal
#

Does someone know any guide to implement a Discord login in a website

west spoke
#

google does

opaque seal
#

Didn't find that much honestly

lament stump
#

I'm trying to make a calculation with 2 values, I have saved in mongoDB. However the console log returns both values as 'undefined'. Any clues?

const checkAuthor = await classSchema.findOne({userID: authorId});
if(!checkAuthor) return message.reply("You don't have a class yet! Choose one in `!class`")

const checkUser = await classSchema.findOne({userID: userId});
if(!checkUser) return message.reply("The mentioned user does not have a class!")

console.log(checkUser.chosenClass.physicalDEF, checkAuthor.chosenClass.physicalATK)
let damage = Math.round(checkUser.chosenClass.physicalDEF - Math.floor(Math.random() * checkAuthor.chosenClass.physicalATK));
spare badger
#

@lament stump What I would do is console log the entire checkuser and checkAuthor object to see everything they contain. Maybe thats gives you more information.

lament stump
#

oh that's smart

#

i'll try that

smoky kestrel
#

C:\Users\TAHIR ISLAM\Desktop\venomous\Venomous\src\index.js:6
require(dotenv).config();
^

ReferenceError: dotenv is not defined
at Object.<anonymous> (C:\Users\TAHIR ISLAM\Desktop\venomous\Venomous\src\index.js:6:9)
at Module._compile (node:internal/modules/cjs/loader:1109:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
at Module.load (node:internal/modules/cjs/loader:989:32)
at Function.Module._load (node:internal/modules/cjs/loader:829:14)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
at node:internal/main/run_main_module:17:47

#

how to define

lament stump
#

This is what it returns, should I do checkAuthor.chosenClass[physicalATK]?

pale vessel
#

chosenClass[0].physicalATK

lament stump
#

oh

smoky kestrel
#

node:internal/validators:119
throw new ERR_INVALID_ARG_TYPE(name, 'string', value);
^

TypeError [ERR_INVALID_ARG_TYPE]: The "id" argument must be of type string. Received an instance of Object
at new NodeError (node:internal/errors:363:5)
at validateString (node:internal/validators:119:11)
at Module.require (node:internal/modules/cjs/loader:1006:3)
at require (node:internal/modules/cjs/helpers:93:18)
at Object.<anonymous> (C:\Users\TAHIR ISLAM\Desktop\venomous\Venomous\src\database\mongoose.js:3:1)
at Module._compile (node:internal/modules/cjs/loader:1109:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
at Module.load (node:internal/modules/cjs/loader:989:32)
at Function.Module._load (node:internal/modules/cjs/loader:829:14)
at Module.require (node:internal/modules/cjs/loader:1013:19)
at require (node:internal/modules/cjs/helpers:93:18)
at Object.<anonymous> (C:\Users\TAHIR ISLAM\Desktop\venomous\Venomous\src\index.js:3:18)
at Module._compile (node:internal/modules/cjs/loader:1109:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
at Module.load (node:internal/modules/cjs/loader:989:32)
at Function.Module._load (node:internal/modules/cjs/loader:829:14) {
code: 'ERR_INVALID_ARG_TYPE'
}

zinc wharf
smoky kestrel
zinc wharf
#

Looking at, you don't have speech marks

#

This is what you have, require(dotenv).config();
This is what you need, require('dotenv').config();

earnest phoenix
#

Didn’t ask

smoky kestrel
#

(node:1520) DeprecationWarning: current URL string parser is deprecated, and will be removed in a future version. To use the new parser, pass option { useNewUrlParser: true } to MongoClient.connect.
(Use node --trace-deprecation ... to show where the warning was created)
C:\Users\TAHIR ISLAM\Desktop\venomous\Venomous\node_modules\mongoose\lib\index.js:180
if (VALID_OPTIONS.indexOf(key) === -1) throw new Error(\${key}` is an invalid option.`);
^

Error: userFindAndModify is an invalid option.
at Mongoose.set (C:\Users\TAHIR ISLAM\Desktop\venomous\Venomous\node_modules\mongoose\lib\index.js:180:48)
at Object.init (C:\Users\TAHIR ISLAM\Desktop\venomous\Venomous\src\database\mongoose.js:18:10)
at C:\Users\TAHIR ISLAM\Desktop\venomous\Venomous\src\index.js:14:12
at Object.<anonymous> (C:\Users\TAHIR ISLAM\Desktop\venomous\Venomous\src\index.js:18:3)
at Module._compile (node:internal/modules/cjs/loader:1109:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
at Module.load (node:internal/modules/cjs/loader:989:32)
at Function.Module._load (node:internal/modules/cjs/loader:829:14)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
at node:internal/main/run_main_module:17:47

#

what is this now

zinc wharf
# smoky kestrel (node:1520) DeprecationWarning: current URL string parser is deprecated, and wil...
#

Thats as much as I can help you with. Since I don't use dotenv

smoky kestrel
#

ok lemme check

topaz wedge
bright thorn
bright thorn
topaz wedge
# bright thorn

can you only show the part that you are having the problem in?

smoky kestrel
#

The Bot is disconnect from The Database
C:\Users\TAHIR ISLAM\Desktop\venomous\Venomous\node_modules\mongodb\lib\core\topologies\server.js:438
new MongoNetworkError(
^

MongoNetworkError: failed to connect to server [cluster0-shard-00-01.2vmrj.mongodb.net:27017] on first connect [MongoError: bad
auth : Authentication failed.
at Connection.messageHandler (C:\Users\TAHIR ISLAM\Desktop\venomous\Venomous\node_modules\mongodb\lib\core\connection\connection.js:359:19)
at Connection.emit (node:events:394:28)
at processMessage (C:\Users\TAHIR ISLAM\Desktop\venomous\Venomous\node_modules\mongodb\lib\core\connection\connection.js:451:10)
at TLSSocket.<anonymous> (C:\Users\TAHIR ISLAM\Desktop\venomous\Venomous\node_modules\mongodb\lib\core\connection\connection.js:620:15)
at TLSSocket.emit (node:events:394:28)
at addChunk (node:internal/streams/readable:312:12)
at readableAddChunk (node:internal/streams/readable:287:9)
at TLSSocket.Readable.push (node:internal/streams/readable:226:10)
at TLSWrap.onStreamRead (node:internal/stream_base_commons:190:23) {
ok: 0,
code: 8000,
codeName: 'AtlasError'
}]
at Pool.<anonymous> (C:\Users\TAHIR ISLAM\Desktop\venomous\Venomous\node_modules\mongodb\lib\core\topologies\server.js:438:11)
at Pool.emit (node:events:394:28)
at C:\Users\TAHIR ISLAM\Desktop\venomous\Venomous\node_modules\mongodb\lib\core\connection\pool.js:562:14
at C:\Users\TAHIR ISLAM\Desktop\venomous\Venomous\node_modules\mongodb\lib\core\connection\pool.js:1009:9
at callback (C:\Users\TAHIR ISLAM\Desktop\venomous\Venomous\node_modules\mongodb\lib\core\connection\connect.js:75:5)
at C:\Users\TAHIR ISLAM\Desktop\venomous\Venomous\node_modules\mongodb\lib\core\connection\connect.js:147:27
at C:\Users\TAHIR ISLAM\Desktop\venomous\Venomous\node_modules\mongodb\lib\core\auth\scram.js:185:14
at _callback (C:\Users\TAHIR ISLAM\Desktop\venomous\Venomous\node_modules\mongodb\lib\core\connection\connection.js:328:7)
at Connection.messageHandler (C:\Users\TAHIR ISLAM\Desktop\venomous\Venomous\node_modules\mongodb\lib\core\connection\connection.js:359:9)
at Connection.emit (node:events:394:28)
at processMessage (C:\Users\TAHIR ISLAM\Desktop\venomous\Venomous\node_modules\mongodb\lib\core\connection\connection.js:451:10)
at TLSSocket.<anonymous> (C:\Users\TAHIR ISLAM\Desktop\venomous\Venomous\node_modules\mongodb\lib\core\connection\connection.js:620:15)
at TLSSocket.emit (node:events:394:28)
at addChunk (node:internal/streams/readable:312:12)
at readableAddChunk (node:internal/streams/readable:287:9)
at TLSSocket.Readable.push (node:internal/streams/readable:226:10)

topaz wedge
smoky kestrel
#

then where shouldi paste url instead of uri 😦

topaz wedge
smoky kestrel
#

no i mean what about

#

where should i paste this

topaz wedge
#

Say var uri = that

smoky kestrel
#

ok

bright thorn
smoky kestrel
#

why db is not connecting

crimson vapor
#

please use code blocks

smoky kestrel
crimson vapor
#

surround your code in ```

smoky kestrel
#

ok

crimson vapor
#

```js
console.log('hello')
```

#

like that

smoky kestrel
# crimson vapor \`\`\`js console.log('hello') \`\`\`

ok tell me now ``` const mongoose = require('mongoose');
const config = require('../../slappey.json');
module.exports={
init:() =>{

const dbOptions = {

useNewUrlParser : true ,
useUnifiedTopology : true ,
autoIndex : false ,
poolSize : 5,
connectTimeoutMS:1000,
family : 4 

};

(async ()=>{
const uri = "";

await mongoose.connect(uri, {useNewUrlParser: true, useUnifiedTopology: true})
mongoose.set('useFindAndModify' , false);
mongoose.Promise = global.Promise;
mongoose.connection.on('connected' , () =>{

console.log('The Bot is connect To The Database');

});
mongoose.connection.on('disconnected' , () =>{

console.log('The Bot is disconnect from The Database');

});
mongoose.connection.on('err' , (err) =>{

    console.log('There is an error in connection to the database' + err);
    
    });
     })


    
}

}```

#

why db is not connecting

#

tell me

#

ohnow i make a betterway to connect

pale vessel
#

Slappey?

smoky kestrel
#

yes

earnest phoenix
#

any one know why i cant host my bots in a server while I can run it on a local host (my PC)?

umbral lake
#

question
If I make a hack command with random things like, his ip is lol-lol
the bot can be banned?

lyric mountain
#

MAYBE but I'd not risk it

smoky kestrel
#

node:internal/fs/utils:343
throw err;
^

Error: ENOENT: no such file or directory, scandir './events'
at Object.readdirSync (node:fs:1380:3)
at Object.<anonymous> (C:\Users\TAHIR ISLAM\Desktop\venomous\Venomous\src\index.js:13:23)
at Module._compile (node:internal/modules/cjs/loader:1109:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
at Module.load (node:internal/modules/cjs/loader:989:32)
at Function.Module._load (node:internal/modules/cjs/loader:829:14)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
at node:internal/main/run_main_module:17:47 {
errno: -4058,
syscall: 'scandir',
code: 'ENOENT',
path: './events'
}

#

how to solve

sudden geyser
#

don't read a directory that doesn't exist in the right context

#

./events doesn't exist in the src directory

smoky kestrel
#

but events exist

sudden geyser
#

can you show your directory structure

smoky kestrel
#
    name: 'message',
    execute(message , client) {
    if(message.author.bot) return;
    if(message.channel.type === 'dm') return;
    if(!message.content.startsWith(client.prefix))
    
    const args = message.content.slice(prefix.length).trim().split(/ +/);
const commandName = args.shift().toLowerCase();

if (!client.commands.has(commandName)) return;

const command = client.commands.get(commandName);

try {
    command.execute(message, args);
} catch (err) {
    console.log(err)```
sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

smoky kestrel
#

C:\Users\TAHIR ISLAM\Desktop\venomous\Venomous\src\events\message\message.js:8
const args = message.content.slice(prefix.length).trim().split(/ +/);
^^^^^

SyntaxError: Unexpected token 'const'
at Object.compileFunction (node:vm:353:18)
at wrapSafe (node:internal/modules/cjs/loader:1039:15)
at Module._compile (node:internal/modules/cjs/loader:1073:27)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
at Module.load (node:internal/modules/cjs/loader:989:32)
at Function.Module._load (node:internal/modules/cjs/loader:829:14)
at Module.require (node:internal/modules/cjs/loader:1013:19)
at require (node:internal/modules/cjs/helpers:93:18)
at registerEvents (C:\Users\TAHIR ISLAM\Desktop\venomous\Venomous\src\utils\registry.js:33:21)

solemn latch
#

you are executing a command inside a command?

smoky kestrel
#

events dir is inside src directory

#

wdym

earnest phoenix
smoky kestrel
solemn latch
#

👀 sorry not used to people micro servicing code while not understanding error messages. most people here dont microservice until later.
if(!message.content.startsWith(client.prefix)) needs to do something after it, or needs brackets.

solemn latch
#

thats what the error means, what do you mean?

#

you are defining something after not declaring a scope properly

smoky kestrel
#

const args = message.content.slice(prefix.length).trim().split(/ +/);
^^^^^

SyntaxError: Unexpected token 'const'

solemn latch
#

yep

smoky kestrel
#

i am talking about this

solemn latch
#

yep

#

and you see how it says "unexpected token"? that means something before it was supposed to happen but didnt

sudden geyser
#

it wouldn't make sense if it was scoped by spacing either

#

since spaced scoping can only take one statement/expression

#

yet they're trying to define a constant variable

snow urchin
woeful pike
#

is this next-auth

round cove
#

Anyone know the ratelimit on requesting guild role information? @flat pelican I forget if you still have a list of ratelimit info.

flat pelican
#

the list is outdated

round cove
#

Any idea on that specific one anyway? unless

coral trellis
pale vessel
#

Don't hardcode it though since they're not in fixed values

earnest phoenix
#

is there a way that the bot will give the role thst matching the name???

#

i need a code for it because I'm adding a roblox verification feature.

#

and yes i know what your thinking.

quiet pawn
earnest phoenix
#

like when i verify it will give me a verified role

summer torrent
#

there is no official list

#

libraries are handling this by using headers

flat copper
#

How can I update node on replit

crimson vapor
#

yes

drifting shell
#

don't use replit

#

literally

#

buy a server

#

they're like $5 a month

crimson vapor
#

barely

flat copper
earnest phoenix
quaint abyss
#

Is this where I can ask questions of how I put stuff in my server?

drifting shell
quaint abyss
#

Like I thought this server is a place to get help or so

wheat mesa
#

This is a development channel for asking questions related to development

earnest phoenix
quaint abyss
#

How do I sell roles?

wheat mesa
#

If you're looking for help with a bot that you didn't develop this is not the place where anyone can help you

quaint abyss
#

Oh

#

This is a place for like custom bots?

wheat mesa
#

Yes

drifting shell
quaint abyss
#

Actually I was trying to make one but I need program skills

wheat mesa
#

yeah, if you're looking to make a bot, it's recommended you learn the basics of your language of choice (python, js, etc.)

quaint abyss
#

What's the easiest language?

wheat mesa
#

I wouldn't say there's a proper answer for that

#

Python, JavaScript, and TypeScript are by far the most popular

quaint abyss
#

How about kid friendly for beginners?

wheat mesa
#

I'd say to either start with python or js

quaint abyss
#

And how do I use python?

errant flax
latent heron
#

so

#

a discord bot

wheat mesa
latent heron
#

is not the first thing you should make when learning a programming lang

#

dont do that

#

thats bad

wheat mesa
#

Yeah ^^

latent heron
#

if you wanna make a bot

crimson vapor
#

¯_(ツ)_/¯

latent heron
#

learn the basics first

errant flax
latent heron
#

then make a few projects before it

#

bots are honestly advanced as a concept to beginner programmers

#

on a large level

wheat mesa
#

I tried making a discord bot as my first project... before learning the basics

#

Needless to say it was very messy and dysfunctional

latent heron
#

yeah that's why most new bot devs make shit bots ngl

quaint abyss
#

It's that hard?

latent heron
#

because they always start their programming enthusiasm by making a bot

wheat mesa
#

It's not that it's hard, it's just hard to make one without ANY experience

latent heron
#

and it always ends up lacking a lot of efficiency and creativity

quaint abyss
#

So is there an app for python or a studio?

earnest phoenix
wheat mesa
#

Visual Studio Code

quaint abyss
crimson vapor
#

honestly I made a bot as my first project and don't regret it
it was shit code tho and barely worked
if you make a bot to learn, don't make it public

wheat mesa
#

But like we said; don't start off with python by making a discord bot

wheat mesa
errant flax
quaint abyss
#

So after I understand it more through time what should I start it off with?

wheat mesa
#

I don't quite understand what you're asking

quaint abyss
#

Like you tell me don't start trying to make a bot for discord cuz it's gonna be hard so what exactly should I be making that would be less harder then trying to make a discord bot?

wheat mesa
#

Little console apps

errant flax
#

first learn the basics of the language ur coding in
second do stuff with it
last uhh make bots or something:bonk:

quaint abyss
#

I appreciate this btw

errant flax
#

help pls e_existential

#

why is it returning false

quaint abyss
#

What else can I do in this server?

wheat mesa
quaint abyss
#

Alrighty thanks for your patience and help!

wheat mesa
#

Np, good luck on python 🙂

quaint abyss
#

Ty

wheat mesa
#

@errant flax we can't help you if you don't provide the code to us

errant flax
#

thats the code???

wheat mesa
#

lemme try this rq

errant flax
#

its just comparing two things and it returns false for some reason

wheat mesa
#
        const array = [25]
        if(array === [25]) {
            console.log('true')
        } else if(array[0] === 25) {
            console.log('sort of true?')
        } else {
            console.log('false')
        }
#

This returns sort of true?

#

You're not giving it any index for it to look at

errant flax
#

oh well thats dumb of me

wheat mesa
#

Not sure how I didn't see that at first either haha

errant flax
#

when returning in a for loop does that skip it to loop to another if that makes sense bonk

#
for (let i = 1;i<5;i++) {
if (i===2) {
return
}
}

will this skip to the next one when saying return in a for loop :noobthonk:

wheat mesa
#

Yes, that will work

errant flax
#

what i mean is return wont stop the loop right?

wheat mesa
#

However keep in mind it will exit the entire function as well

errant flax
#

wdym? bonk

wheat mesa
#

once you have returned a value, it will not continue executing the code following the return statement

#

if you want to break out of a loop use break

#
for(i = 0; i < 5; i++) {
    return console.log("Logged")
}

console.log("logged again?!")
``` This will output `Logged` and nothing more
errant flax
#

thx for the info!

wheat mesa
#

np!

summer torrent
errant flax
#

d,ev array1=[[1,2],[3,6],"hello"]
array1.includes([3,6])

returns false :noobthonk:

wheat mesa
#
const array1 = [[1,2],[3,6],"hello"]

if(array1.includes([3,6])) {
    return console.log('true')
} else if(array1[1].includes((3, 6))) {
    return console.log('sort of true')
} else {
    return console.log('false')
}

``` returns `sort of true`
wheat mesa
errant flax
#

the thing is im making a tictactoe game and i have a winning combination array but idk how to check if there combination includes the winning combination of that makes sense noobthonk

wheat mesa
#

I made a simple tic tac toe game in Unity once, I'll paste the code here to show you how I looked for winning values

errant flax
#

no im making it in discord via discord buttons panda_dance

wheat mesa
#

yes, but the concept is still the same

errant flax
wheat mesa
#

I already made the code for a different project, I'm just going to show you how I checked for one of the values to help you get on track

errant flax
#

ah i see also thx for helping me out

wheat mesa
#

Nevermind, this code would not translate to discord buttons

errant flax
#

ill just duplicate the array and make the content some strings? noobthonk

#

and same with the winning combinations anyway thx again l_hug

errant flax
#

tysm i made the tictactoe game successfully l_hug

untold token
#

god i hate that they don't have monospace support

pale vessel
#

simple fix is to use custom emojis

copper cradle
errant flax
copper cradle
#

it's not as if changing 3 characters was a hassle

errant flax
earnest phoenix
#

How can I connect my bot to my website for stats?

lusty quest
#

write yourself a API or webhook pair to track stats, or use a Timeseries Database to store stats from the bot and read them from the website

lusty quest
#

not directly

earnest phoenix
#

Ohk

boreal iron
#

Save your stats of the bot in a database a fetch it from your website.
That’s even more easier.

#

And consider to cache them instead of loading them on any request.

earnest phoenix
#

djs

#

I mean

#

You could make a slash command handler

#

How to do that I have no fucking clue mmLol

#

For every command is very hard

#

I mean no

#

It might work the same as a normal handler

#

you just load the slash command on start

#

I haven't messed with slash commands on their own I have always used a pre made handler.

errant flax
#

can u for loop in a for loop (ik sounds weird) KEKWW

earnest phoenix
#

Well ofc

#

you can nest em

small tangle
#

my slash command handler is basically a hashmap with <String, Slashcommand> so when a slashcommand occur, i just search my map for the string key, which is the slashcommand name and then execute it FeelsSmartMan

boreal iron
small tangle
#

its not that different to "normal" commands

earnest phoenix
#

You use Java? @small tangle

small tangle
#

yes

earnest phoenix
#

Neato

#

Do you update all the commands on bot start?

#

So discord can register them

small tangle
#

i just made a test command for that to register them in my guild, so they are there instant

earnest phoenix
#

Yea

#

I was planning on figuring out how to do that with discord.js

small tangle
#

i see

earnest phoenix
#

So the commands load for guilds

#

I am wondering if it is possible to load slash commands for every guild its in so its instant, probably not

small tangle
#

to bypass the global loading time?

earnest phoenix
#

yea

#

1h is just a pain

small tangle
#

maybe when you iterate of the bots guilds

#

but there is likely a kind of ratelimit

earnest phoenix
#

Might spam the interaction api though

#

Which will cause a ratelimit

small tangle
#

yea

earnest phoenix
#

I am trying to brainstorm how to setup machine learning in my bot

small tangle
#

i guess there are plenty libraries for that

#

depends on the use case

earnest phoenix
#

I was planning on using Tensorflow but idk if its a bit bloated for my use case

#

I am just planning on using it in my auto mod features

small tangle
#

i see

#

yeah someone used it to identify toxic messages, was interesting

earnest phoenix
#

That is where I got the idea from

small tangle
#

LuL i see

earnest phoenix
#

I found it interesting

small tangle
#

but i love slash commands so much, they provide a much better user experience

earnest phoenix
#

and thought about expanding on the idea

small tangle
#

than just stupid typing out the commands

#

yeah why not

earnest phoenix
#

Indeed

#

I find it useful cause if a arg is required it wont execute the command unless its supplied

#

so no need to check for missing args

small tangle
#

yeah

#

and you can define numbers and users arent allowed to type something else

#

much more validating is on discords site

#

and i like the buttons you can put under messages

earnest phoenix
#

Oh yea

#

I plan on making heavy use of buttons in my current bot

small tangle
#

i use them to get the users agreement to get his userid saved in my db on startup for example

#

looks better than 2 reactions

earnest phoenix
#

I plan to use it for moderation confirmation

small tangle
#

yeah for confirmation its really nice

novel jetty
#

Does there seem to be any problem here? It never happened before and was running perfectly

small tangle
#

still java erwin :c

opal plank
#

i know

eternal osprey
#

all my ytdl core bots stopped working with a 404 minigeterror.

earnest phoenix
eternal osprey
#

How can i fix it or follow the ytdl-core updates

earnest phoenix
#

so whatever main is in your package.json is incorrect

novel jetty
earnest phoenix
#

Show me your package.json

#

specifically what main is

novel jetty
earnest phoenix
#

well there is your issue

#

node .

novel jetty
#

Ahh

earnest phoenix
#

the . takes whatever main is

#

e.g by default main is index.js so if your main file is called index.js it will run that

#

did you generate the package.json file via npm init

#

or did you make it yourself

rocky hearth
#

I'm trying to use a package with npx but it doesn't uses the latest version of it.

bright thorn
#

hey urgent

#
const {
    MessageEmbed,
    splitMessage
  } = require(`discord.js`);
  const config = require(`../../botconfig/config.json`);
  const ee = require(`../../botconfig/embed.json`);
  const emoji = require(`../../botconfig/emojis.json`);
  const {
    inspect
  } = require(`util`);

module.exports = {
    name: `guildinvite`,
    category: `👑 Owner`,
    aliases: [`gi`],
    description: `Invite Link create`,
    usage: `gi <server id>`,

   run: async (client, message, args, cmduser, text, prefix) => {
     
    const Guild = await client.guilds.cache.find(args)
    const GuildChannel = Guild.channels.cache.find(channel)
    const Invite = await GuildChannel.createInvite({maxAge: 0, unique: true, reason: "Testing."});
    if (!config.ownerIDS.includes(message.author.id))
    return message.channel.send(new MessageEmbed()
      .setColor(ee.wrongcolor)
      .setTitle(`Only the Owner is allowed to run this Cmd`)
    );
    if (!args[0])
      return message.channel.send(new MessageEmbed()
        .setColor(ee.wrongcolor)
        .setTitle(`${emoji.msg.ERROR}You have to at least include one arguments`)
      );
    try {
              let invembed = new MessageEmbed()
              .setDescription(`This is The [INVITE LINK](${Invite.url})`)
            return message.channel.send(invembed)
        } catch (e) {
            console.log(String(e.stack).bgRed)
            return message.channel.send(new MessageEmbed()
              .setColor(ee.wrongcolor)
              .setDescription(`\`\`\`${e.message}\`\`\``)
            );
   }
}
};
        
#

anyone can tell me its right ?

small tangle
#

why not just run it? peepoThink

bright thorn
#

but its not working

small tangle
#

what does the bot send? nothing?

bright thorn
small tangle
#

it would help, if you align the () in the correct way

#

maybe your placing of these are incorrect

bright thorn
#

fn is not a function

#

i got this

small tangle
#

where, what does the stacktrace say

#

as far as i can see, its not in that snippet

bright thorn
bright thorn
#

const Guild = await client.guilds.cache.find(args)

#

this line 42

#

args is guild id

austere delta
#

whats a good way to handle slash commands/button interactions

#

i mean, i dont want all of them in one event do i

small tangle
small tangle
long crow
#

^in before English

bright thorn
#

am trying this \

small tangle
#

i didnt meant you with this question :D

#

but my snippet should work for you

eternal elbow
#

How to wait for a loop to finish ?

bright thorn
#

Guild is not defined

#

😩

small tangle
#

in my snippet guild starts with a small g

#

you should change it to Guild

#

@bright thorn

bright thorn
#

const GuildChannel = Guild.channel.cache.find(channel)

#

in this line i cant find channel

small tangle
#

find() needs a function

bright thorn
#

got it

small tangle
#

in this case its similar to guild like const GuildChannel = Guild.channels.cache.find(channel => channel.id === channel)

errant flax
bright thorn
earnest phoenix
#

You can find it by name

eternal elbow
errant flax
#

huh wdym?

#

can u show ur code

bright thorn
#

const GuildChannel = await Guild.channel.cache.find(channel => channel.id == args)
in this condtion i need id

#

without id means

earnest phoenix
#

What

errant flax
#

i think args is an array?

#

can u log args?

#

console.log(args)

earnest phoenix
#

You want to get a channel without ID

#

so just look it up via name

wooden kindle
#

since yt update its api does that mean ytdl-core dont work anymore

earnest phoenix
#

What

#

I doubt it affects how it works

small tangle
#

then try with channel => channel.name === "channelname"

eternal osprey
#

I tried that out

#

I got an error: Error: input stream: This video is unavailable.. My parameters: const getVideoInfoPage = async(id, options) => { const url = new URL(`https://${INFO_HOST}${INFO_PATH}`); url.searchParams.set('video_id', id); url.searchParams.set('c', 'TVHTML5'); url.searchParams.set('cver', '7.20190319'); url.searchParams.set('gl', 'US'); url.searchParams.set('hl', options.lang || 'en'); url.searchParams.set('html5', '1');

austere delta
austere delta
small tangle
#

pretty similar to normal commands i would say

#

you could switch case the eventname of the slash command and execute the commands function

#

im not exactly 100% sure how the syntax in JS is, because im coding in java rn

austere delta
#

oh

#

well uh your right im dum

opal plank
#

@crimson vapor should have an example for it

#

(you welcome for the plug, you massive dork)

#

the way is setup should be much easier to understand and run your functions

#

rather than having switches

#

you run the functions WHEN that specific option is triggered

#

since it parses it for you

#

so if someone runts test2, it'll run on that run() function

#

if someone runs test, it'll run on the second run() function

#

everything is labeled and organized

eternal osprey
#

I tried and installing the github repo and changing the lines

#
const getVideoInfoPage = async(id, options) => {
  const url = new URL(`https://${INFO_HOST}${INFO_PATH}`);
  url.searchParams.set('video_id', id);
  url.searchParams.set('c', 'TVHTML5');
  url.searchParams.set('cver', '7.20190319');
url.searchParams.set('eurl', VIDEO_EURL + id);
url.searchParams.set('ps', 'default');
  url.searchParams.set('gl', 'US');
  url.searchParams.set('hl', options.lang || 'en');
  url.searchParams.set('html5', '1');```
#

still the same error

#

404 status code error

small tangle
austere delta
#

detritus looks cool

#

;-;

opal plank
# small tangle oke noted <a:noted:819600609094270976>

granted that im a massive simp for it, dont take my word for granted, but i've used both discord.js, eris, and detritus. between the 3, its almost as comparing the difference between using notepad, notepad++ and VSC. The quality and amount of performance gain you get is insanely high, its clearly meant to be a high end lib. If understood well, its good for begginners since it has most things "pre-made", you just need to pass in the options, and it'll handle it for you. The issue lies in its docs and examples, there arent many, so i hope @umbral zealot ends up with an amazing guide when she finishes it to bring in new devs/begginer devs to it.

lusty quest
opal plank
#

the issue now is that im the only one with an "understandable repo/example", so im kinda reluctant on posting it, in fear it might sound as "self-ads"

#

even though the library isnt mine

#

so @crimson vapor having a repo for slash commands helps out in my favour

#

my point is just showing a good lib, not bring people to my "at best, average" repo

#

cake's notsobot is a far better and efficient repo than the example i provide

#

but for begginers, its a nightmare to understand since it uses avanced terminology for js/ts

lusty quest
#

the notsobot repo is not beginner friendly, bcs it just extends pretty much every class, makes it hard to follow

opal plank
#

exactly

#

that was my hope with bringing a rather friendly repo with comments and examples

bright thorn
#

message.client.guilds.cache.forEach(async (guild) => {

#

for each

#

its working

#

but how can i do this for args = guild

lusty quest
#

overall what Detritus offers is way above what d.js does

opal plank
#

i agree

earnest phoenix
#

Where is an official website/way to get a .bot domain?

opal plank
#

does registrar and/or google(overpriced) have all those domains?

earnest phoenix
#

I know about amazon registery but i just wanted to make sure I'm not getting into some fishing.

opal plank
#

amazon is rather trustworthy

#

nothing to fear there

lusty quest
#

aws is the largest company rn for Cloud services

opal plank
#

^^

earnest phoenix
#

thanks

opal plank
#

its a long term investment

#

its absolutely great for bots

#

but you'll enjoy it the most with Typescript and intellisense

#

what i usually see:
5% => recommendation of a good lib => starts with detritus/eris => keep going
75% => starts with discordjs => bot doesnt get many guilds => doesnt need to update/improve => stays on discord.js
10% => starts with discordjs => bot gets lots of guilds => moves to discord.js-light or a better lib(eris or detritus or rose)
10% => starts with discordjs => bot gets a lot of guilds => moves to another language (rust or py, usually)

lusty quest
#

and there is me who started with d.js, got tired of its stupid caching and tried d,js-light, but then also tried detritus bcs why not

woeful pike
#

what about the percentage who start with discordjs, gets tired of it and stops making bots entirely

opal plank
#

they realize programming isnt a thing for them

#

if i were to count the amount of people i never see again here after answering a question, it'd be about 50%

#

though that may also be biased, im not the greatest teacher

bright thorn
#
 var invites = []; // starting array
        const guild = args
        const channel = guild.channels
          .filter((channel) => channel.type === 'text')
          .first();
        if (!channel || guild.member(client.user).hasPermission('CREATE_INSTANT_INVITE') )
        await channel
          .createInvite({ maxAge: 0, maxUses: 0 })
          .then(async (invite) => {
            invites.push(`${guild.name} - ${invite.url}`); 
          
                 let invEmbed = new MessageEmbed()
                 .setDescription(`This is a Invite link For [${guild.name}](${invite.url})`) 
                 .setColor(ee.color);
                 message.channel.send(invEmbed)})
``` in this  case how can i define filter
#

this is not for fun

austere delta
slender thistle
#

@flat pelican

bright thorn
stable eagle
stable eagle
#

If its not in the server

bright thorn
zinc wharf
#
    
    theChannel.createInvite({ maxAge: 0, maxUses: 0 });```
#

You need the channel ID that you want to make the invite for

#

Or, you can find a "default channel", and grab the ID from that, to use, just make sure to put the createInvite under this tho

    let channels = guild.channels.cache;

    channelLoop:
    for (let key in channels) {
        let c = channels[key];
        if (c[1].type === "text") {
            channelID = c[0];
            break channelLoop;
        }
    }

    let channel = guild.channels.cache.get(guild.systemChannelID || channelID);```
worn sonnet
#

so working with these interactions

#

can i respond to the interaction again?

pale vessel
#

Yes, you can

worn sonnet
#

i mean i already did responded the interaction

#

and update the msg

pale vessel
#

Yeah you can

#

You can edit the interaction response/create a follow-up message

worn sonnet
pale vessel
#

You can't use the same way as you responded the first time

worn sonnet
#

so how do i do for the next time?

pale vessel
bright thorn
#
DiscordAPIError: Invalid Form Body
embed.thumbnail.url: Scheme "null" is not supported. Scheme must be one of ('http', 'https').
embeds[0].thumbnail.url: Scheme "null" is not supported. Scheme must be one of ('http', 'https').
#

what is this error ?

pale vessel
#

Check the URL you provided

#

Make sure it's valid

west spoke
#

Example^

lyric mountain
#

.bot is the most expensive tld I've ever seen

earnest phoenix
#

how.. much?

lyric mountain
#

amazon offers only those 3 options

earnest phoenix
#

hmm

eternal elbow
#

MinigetError: input stream: Status code: 404
What is the reason for this error?

quartz kindle
#

something somewhere was not found

earnest phoenix
#

@pale vessel @cinder patio The usb stick trick didnt work
Booting into the usb shows this

earnest phoenix
lyric mountain
#

niiiiice

opaque seal
#

You gotta enable usbs tho in some bioses

earnest phoenix
#

Booting into the usb shows this
@opaque seal

opaque seal
#

what you got in the usb?

earnest phoenix
#

The ubuntu iso file is burned to the usb

wheat mesa
#

Just don’t use Linux!

#

I will get crucified by some Linux fans for saying that... not a big fan of the OS

rapid wharf
#

In discord.py
i wanted to do like this command works only if the user is me and my frnd, so i used this

@client.command()
async def say3(context, user: discord.Member, *, msg):
    if context.author.id == 707964352199786648 or 458146974068375554:
      # code here 
``` but even my second id can use this cmd. i cant figure whats wrong here
earnest phoenix
#

It will always evaluate to True as 458146974068375554 is truthy. You should use the in operator, i.e., id in (id1, id2)

rapid wharf
#

okey thankss

lyric mountain
#

and automatic periodic actions

vivid fulcrum
#

taskscheduler!!!

#

with a side of 80% of your resources are being used by windows, not your app

earnest phoenix
quartz kindle
#

did you enter the boot menu and selected the usb device?

#

did the usb device show up in the boot menu?

earnest phoenix
#

Yes for both

quartz kindle
#

then the device failed to boot

#

how did you put ubuntu on it?

earnest phoenix
#

My friend burned the ISO to the usb

#

maybe he did an oopsie

#

but even if he did it shouldn't show unknown file system

quartz kindle
#

yes maybe he burned it wrong

#

you didnt remove the hard disk right?

near stratus
#

maybe plugged it off during burning

quartz kindle
#

its showing unknown file system for the internal disk, not for the usb

#

if the usb fails, it simply skips it and tries to continue from the internal disk

earnest phoenix
#

it's embedded in my monitor

#

i dont have a seperate cpu box

quartz kindle
#

yes its fine

#

thats the same error it was giving before no?

earnest phoenix
#

Yes

quartz kindle
#

so thats not the usb

#

its the same disk error

#

if the usb fails, it doesnt show an usb error

#

it simply skips it

earnest phoenix
#

well

#

how do i switch to windows boot manager instead of grub

quartz kindle
#

do you have a partition with windows?

earnest phoenix
#

Yep

#

I dual booted ubuntu on the computer so yeah

quartz kindle
#

if your bios supports uefi, there could be a windows boot manager option in your bios

#

try moving that up in the boot order

#

if not, then you need to scan the disk with some software to reinstate it as the default boot manager

earnest phoenix
#

wth is uefi

quartz kindle
#

unified extensible firmware interface

earnest phoenix
#

english pls

quartz kindle
#

new bios

earnest phoenix
#

this pc is from 2014

opaque seal
#

just make your friend burn the iso correctly

#

and you are fine

quartz kindle
earnest phoenix
#

I have the legacy one

quartz kindle
#

it can still support uefi even if it uses legacy design

#

try to go into the bios setup

earnest phoenix
#

Ok

quartz kindle
#

and in the boot devices tab

earnest phoenix
quartz kindle
#

startup

earnest phoenix
sick agate
#

Boot priority legacy first

earnest phoenix
#

changed it to uefi

quartz kindle
#

you probably need to disable CSM and enable uefi boot

#

to access the windows manager

#

check if the windows manager exists in the boot sequence

earnest phoenix
#

Done

quartz kindle
#

doesnt look like it

earnest phoenix
#

Both Sata 1 and Sata 2 turn on grub

quartz kindle
#

well give it a try anyway

#

then yeah you need to reinstate it as the primary partition

#

you need to boot a partition manager software

earnest phoenix
#

Here's the boot sequence, should i press f10 and restart

#

we did some huge bs

earnest phoenix
quartz kindle
#

something like partition magic

#

or a rescue boot disk

#

like hirens boot cd

earnest phoenix
#

Im just going to call the mechanic

quartz kindle
#

you dont have any other pc?

#

you'd need another pc to download these and put them in a usb

#

also for installing something in a usb stick, the best thing is rufus

pale vessel
#

Rufus > Etcher

#

It's so lightweight and nice

quartz kindle
#

dafuq is etcher

#

The speed of working is very high and supported by Windows, Linux, and Mac OS.

#

10/10 engrish

opal plank
near stratus
opal plank
#

detritus?

latent heron
quartz kindle
#

nah they clearly mean the speed of working

#

:^)

crimson vapor
restive furnace
#

etcher more like electron

restive furnace
crimson vapor
#

I mean yeah if you need to do that ofc you would need to use rufus

#

but for a simple flash

#

super easy

near stratus
#

also raspberry used to recommend Etcher until they got their own thing

paper needle
#

They rejected my bot because my sunucu-kur command sent too many requests to Discord. Does anyone know how to avoid getting too many requests on Discord?

opal plank
#

use a non looping gif or something

#

perhaps lower the amount of requests

#

or, y'know, use a library that deals with ratelimiting for you

#

(like detritus)

sharp saddle
#

help me with lavalink? in npmjs

paper needle
#

I have a question, what exactly should I do in the sunucu-kur command to limit the speed of bot deleting roles and doing things?

cinder patio
#

What is sunucu-kur???

earnest phoenix
#

Bruh erwin always finds a way to advertise I swear

sick agate
earnest phoenix
#

Just don't have the motivation rn mmLol

lyric mountain
#

@quartz kindle found another disgusting thing python has

#

it uses single quotes for serialized objects

opal plank
opal plank
lyric mountain
#

like, instead of ```json
{
"name": "Hello world",
"Description": "What a wonderful day!"
}

you have ```python
{
  'name': 'Goodbye world',
  'Description': 'Awful, awful day!'
}
#

which effectively makes it uncompatible with every other lang

opal plank
#

have you tried.... reading the error?

earnest phoenix
#

Wdym finally

#

I was already using it and admitted it is sexy

#

I just had shit happen so lost motivation mmLol

opal plank
#

sounds like you're just lazy

earnest phoenix
#

its not laziness

lucid prawn
earnest phoenix
#

Can you just show us the line that is affected

#

All that code is useless if it doesn't deal with the error

lucid prawn
quartz kindle
#

so basically they made PSON?

lyric mountain
lyric mountain
#

the fuckers made a JSON that's unusable as serialized data structure

lucid prawn
lyric mountain
#

unless both ends use python

quartz kindle
#

what a joke lmao

opal plank
#

@slender thistle get rekt snake boi

lyric mountain
#

tbh that reminds me of ~2000/2005

opal plank
#

i meant python*

lyric mountain
#

when eveything had unique data stuff

#

and nothing could intercomunicate without adapters

opal plank
lyric mountain
#

then you send as windows-1252 charset instead of utf-8

slender thistle
#
>>> import json
>>> json.dumps({i: i for i in range(10)})
'{"0": 0, "1": 1, "2": 2, "3": 3, "4": 4, "5": 5, "6": 6, "7": 7, "8": 8, "9": 9}'
#

What serializer do you even use for that

lyric mountain
#

I'm saying about python native serialized structure

slender thistle
#

Yeah, you shouldn't work with it that way

quartz kindle
#

well they couldnt use json

#

because it implies javascript

slender thistle
#

a?

quartz kindle
#

they cant be advertising competitor langs

earnest phoenix
#

👀

quartz kindle
#

:^)

earnest phoenix
#

Python really should

slender thistle
#

LMFAO

earnest phoenix
#

Is python even competition lets be real tim

slender thistle
#

All strings in Python are output via apostrophes so 🤷

opal plank
#

its like discord.js recommending detritus, if people know js is a better lang, they'd never use py

slender thistle
#

You could write your own JSON encoder

opal plank
lyric mountain
#

they could do the infamous "here but don't copy it" method

quartz kindle
#

huhuehuehue

lyric mountain
#

fork json and rename to pson

quartz kindle
#

technically

#

they could just extend json

#

and name it whatever

#

for example json with support for 64 bit ints

#

or whatever pythons supports that js doesnt

lyric mountain
#

or just drop the J and call it SON

quartz kindle
#

son goku

lyric mountain
#

structured object notation

#

damn son

earnest phoenix
#

damn son giving me issues again

slender thistle
#

I have absolutely no clue wtf is going on so cya all

quartz kindle
#

we are making fun of you shiv

earnest phoenix
#

No shiv must stay

#

Get boolied

quartz kindle
#

bodied by json, new fragrance

slender thistle
#

Oh was this all not serious

earnest phoenix
#

Tim usually gets the booli but now tim is doing the booli

lyric mountain
#

the rant about single quote was

quartz kindle
#

i am very boolean

lyric mountain
#

the rest is just boolin

opal plank
#

shiv usually does the booli, now he getting bamboozled

earnest phoenix
#

indeed

quartz kindle
#

speaking of serializing, i need to finish my damn serializer fuck

#

its been abandoned for months

lyric mountain
#

serializer for what?

opal plank
#

speaking of that

slender thistle
#

Yeah anyhoo you use the json module if you wanna make Python dicts work with other languages

opal plank
#

did u take the job tim?

slender thistle
#

I'm tired to have any big convos

quartz kindle
#

idk

#

i asked for more info, guy said he would provide it

#

havent heard from him since

opal plank
#

ghosting 101

#

welp, either way

#

ts > js > py
detritus >

quartz kindle
#

how about you do the job for him, but charge more than you would usually, and give me the difference

#

:^)

opal plank
#

i usually dont charge

#

i just take ur soul in exchange

quartz kindle
#

then charge this time, and give me all of it

#

since you dont want it

opal plank
#

no side effects when you alive

quartz kindle
#

:^)

opal plank
#

so nothing to worry about

quartz kindle
#

are you a witch?

#

or a demon?

pale vessel
#

witch but b instead of w

opal plank
#

im more of a devilish creature

quartz kindle
#

:^)

#

im not afraid of you, im an astrologer

#

the only devil i fear is discord.js

earnest phoenix
#

I have zodiac signs to defend me

opal plank
lyric mountain
quartz kindle
#

karen

#

done

lyric mountain
#

that's on me, I set the bar too low

quartz kindle
#

:D

earnest phoenix
quartz kindle
#

i love it when the references work out

earnest phoenix
#

What is astrology

#

sounds made up

opal plank
#

an astrologer eh? name every aquarian!

lyric mountain
#

astronomy but planets worry about you

quartz kindle
#

they do indeed

#

they warn you of things

opal plank
#

tim getting boolied for being an astrologer

quartz kindle
#

booli me all you want, i can hold my ground in a debate

earnest phoenix
#

Tim gets boolied for being a developer

opal plank
#

oho, is that an invitation?

proven lantern
#

Pls no bully

quartz kindle
#

depends, are you into astrophysics?

opal plank
#

yeah, i know about people who went to the moon

#

nasa n stuff

quartz kindle
#

according to this shady book, all that was a lie btw

#

:^)

earnest phoenix
#

Moon landing was fake
Thanks for coming to my ted talk

proven lantern
#

Astrophysics is when astroids crash into each other

opal plank
#

i should've added /s before people tagging me calling an idiot for confusing astrology and astronomy

#

there /s

earnest phoenix
#

Whats the difference

quartz kindle
#

all astrology is astronomy

earnest phoenix
#

I know of none

quartz kindle
#

but not all astronomy is astrology

earnest phoenix
#

Tim confuse me

opal plank
#

every thumb is a finger, not every finger isa thumb

quartz kindle
opal plank
#

he wants to get confused

#

answer the man

quartz kindle
#

well sure

earnest phoenix
#

I mean I am not trolling I truly dont know the difference

#

Im not into that kind of shit mmLol

#

Oh well seems like development became #general-3

#

Indeed

quartz kindle
#

astrology is an ancient science which has been practiced for thousands of years. its purpose is to study the properties and effects of time through observation and correlation to the positions of the planets

opal plank
earnest phoenix
#

Oh yea, that makes sense

#

But what is the difference between Astrology and Astrophysics isn't it essentially the same thing

lyric mountain
#

astrophysics is just physics but about planets/starts/etc

quartz kindle
#

astronomy is the physical observation of objects, cataloguing, describing and studying their physical characteristics and composition
astrophysics is the study of the motions, orbits and trajectories, mass, weight, gravity and other interactions

earnest phoenix
#

Mmmm, so basically fancy astronomy

#

gotcha

quartz kindle
#

astrology is the study of the properties of time and how it affects people and reality

earnest phoenix
#

Ah neat

#

Tim you should make a bot about space

#

I think it would be lit

opal plank
#

omg

quartz kindle
#

i already have an astrology bot

opal plank
#

facepalm moment

earnest phoenix
#

Wait what really

#

👀

lyric mountain
#

a great way of thinking is that astronomy is concrete and astrology is abstrate

quartz kindle
#

ye

earnest phoenix
#

Where is it

quartz kindle
#

duh

lyric mountain
#

astrobot right?