#development

1 messages · Page 1288 of 1

eternal osprey
#

i use javascript.

#

@boreal iron i tried logging the gRole and role.

violet mesa
#

i cant help then

eternal osprey
#

the role command works.

#

so that's not the problem

#

but the gRole variable doesn't seem to log anything.

#

it doesn't add any roles.

final lava
#

@eternal osprey If you are on Discord.js v12, then I'm pretty sure its
await rMember.roles.add(gRole, '<reason>')

violet mesa
#

@abstract coyote use google

boreal iron
#

if(!role) return message.channel.send("Specify a role!");

eternal osprey
#

the usage of the command: !giverole @member rolename

boreal iron
#

you return the script

eternal osprey
#

wiat what

boreal iron
#

Does the message "Specify a role!" appear?

eternal osprey
#

no

boreal iron
#

ok nvm, thought that would happen

eternal osprey
#

if i use !giverole @member rolename

final lava
#

@eternal osprey If you are on Discord.js v12, then I'm pretty sure its
await rMember.roles.add(gRole, '<reason>')

eternal osprey
#

okay

#

but what the fuck should i input in reason?

#

just test.

#

or something?

#
  await(rMember.roles.add(gRole.id, 'reason'));```
cobalt spruce
#

Cannot read property 'split' of undefined

#

wtf

eternal osprey
#

and just input gRole?

cobalt spruce
#

let helpArray = message.content.split(" ");

#

@boreal iron

#

Cannot read property 'split' of undefined

clever dust
#

whould i have to remove the gRole.id?
@eternal osprey you should do rMember.roles.add(gRole, 'reason') if gRole is a role object, you could also pass in the role id directly

violet mesa
#

how do i see what item the person uses and then with id's do what its suppose to do through id
discord.py, if you dont understand anything tell me what u dont understand ill try to explain : >
help pls

final lava
#

@eternal osprey If you have ever seen Dyno do its Auto-Role, you would see in the Audit logs that is says With Reason: Dyno Autorole
The reason would show in the Audit logs

eternal osprey
#

oowh okay.

final lava
#

oh sorry

#

await rMember.roles.add(rRole.id, <reason>')

#

there

#

yes, add the role ID instead of the object

clever dust
violet mesa
#

how do i see what item the person uses and then with id's do what its suppose to do through id
discord.py, if you dont understand anything tell me what u dont understand ill try to explain : >

#

help

earnest phoenix
#

Map.toArray is not a function???

boreal iron
#

@cobalt spruce message.content is undefined in your case.

violet mesa
#

please

eternal osprey
#

it still doesn't work

boreal iron
#

Send a few line before and after the error

earnest phoenix
#

@violet mesa begging is a sign you aren't be a good programmer

violet mesa
#

???

earnest phoenix
#

you're literally begging to be helped

violet mesa
#

yes

#

no

#

i never begged

#

i said pls help

earnest phoenix
#

Map.toArray is not a function???
@earnest phoenix my bad it's just Map.array

abstract coyote
#

Hey okay im trying to check if a message includes a mention of a user that has a specific role... How could I check if the message has the mention of the user that has the role?

clever dust
#

check if there is a mentioned user -> turn the user into a member object -> check if the member has that specific role

earnest phoenix
#

Why not check the members straight

#

MessageMentions#members exists

clever dust
#

he asked for user

abstract coyote
#

or member

#

sorry

#

XD

earnest phoenix
#

I'm talkin' to him btw

#

here's a more detailed step by step version:

#
  1. Get the mentioned member through MessageMentions#members
#
  1. Check the member's roles by getting the GuildMemberRoleManager object through await GuildMember#roles#fetchAll() OR GuildMember#roles#cache
#
  1. Check if it includes the specified role through Collection.some
#
  1. You're now left with a boolean.
#

All this explanation,
Just get the mention by <message>.mentions.members.first() as it returns a GuildMember,
check if it has the role by <GuildMember>.roles.cache.has(<Role ID>),
Done

#
  1. Do whatever you wanna do next.
#

@earnest phoenix I'm super bored of school hence i typed a whole guide for this guy to pass the time

abstract coyote
#
const pinged = message.mentions.members.first;
if(pinged.roles.cache.has(roleid or wutever lol){
  message.channel.send('pog lol')
}

``` something like that? I am not good at this yet :)
earnest phoenix
#

yes

abstract coyote
#

:D

earnest phoenix
#

Doing all that is kinda mostly useless for beginners hence they don't understand

#

@abstract coyote first is a method

#

the role id must be a string btw

abstract coyote
#

yee

earnest phoenix
#

methods should be ran like functions

#

so add a () at the end

abstract coyote
#

could I put an array of role ids into the pinged.roles.cache.has(The Array?)

earnest phoenix
#

Check if the mentioned user exists before proceeding

abstract coyote
#

or should I interpret it differently

earnest phoenix
#

could I put an array of role ids into the pinged.roles.cache.has(The Array?)
@abstract coyote no that's not how Collections work

abstract coyote
#

oof ;-;

earnest phoenix
#

has also accepts arrays

#

wut da fuk

#

help

#

i am immume to reading updated docs

#

how do i learn to read new stuff in docs

clever dust
#

maybe there are so many users that it couldn't fit into a single message

autumn aspen
#
const Discord = require("discord.js");
const ms = require("ms")

module.exports.config = {
    name: "tempban", 
    aliases: []
}
    
module.exports.run = async (client, message, args) => {
    let user = message.guild.member(message.mentions.users.first());
    if (!user) return message.channel.send('Please specify a User to tempban.');
    
    let time = args[2];
    
    
    if(!user) return message.channel.send('Can\'t seem to find this user. Sorry about that!');
    if (!user.bannable) return message.channel.send('This user can\'t be tempbanned. It is either because they are a mod/admin, or their highest role is higher than mine.\n\`Or:\`\nthe bot you trying to tempban with or yourself, owner, etc!');

    if (user.id === message.author.id) return message.channel.send('You cannot tempban yourself!');
    
    if (!time) return message.channel.send('You must specify a time in days! (Ex: /tempban @Endph#5742 1 They is / are underaged.)');
    
    if (isNaN(time)) return message.channel.send(`${args[2]} is not a number!`);
    
    if (!isNaN(time)) time = parseFloat(args[2]);
    

Someone help I cant change the reason? Is it anyways that I can change the / to args[3] the reason or smh

#

/tempban @autumn aspen 1 They is / are underaged.

Its locked on that reason :/

earnest phoenix
#

/tempban @autumn aspen 1 They is / are underaged.

Its locked on that reason :/
@autumn aspen because you ARE underage mmLol

#

facts

modest smelt
#

when will we know if our bot is accepted?

earnest phoenix
#

when will we know if our bot is accepted?
@modest smelt luca will dm you also #support

#

when will we know if our bot is accepted?
@modest smelt u will get a dm

autumn aspen
#

@autumn aspen because you ARE underage mmLol
@earnest phoenix dude pls help me man?

modest smelt
#

ok

faint prism
#

when will we know if our bot is accepted?
@modest smelt @gilded plank dms you

earnest phoenix
#

@autumn aspen you're alergic to jokes or what?

autumn aspen
#

@autumn aspen you're alergic to jokes or what?
@earnest phoenix no but pls

#

lol

earnest phoenix
#

ok

autumn aspen
#

anyone that can help me? :sad:

#

lmaoooooooooooooooooooooooooooooooooooo

boreal iron
#

what do need?

earnest phoenix
#

@autumn aspen well i can't help with the reason one but there are heck more silent errors in your code

faint prism
#

Man, I'm tryna regex the json out of this html and it works in regexr but not in my c# script

autumn aspen
#

@autumn aspen well i can't help with the reason one but there are heck more silent errors in your code
@earnest phoenix wdym

faint prism
#

Frustrating

earnest phoenix
#

you're treating a GuildMember object as a User object

boreal iron
#

You may forgot the g for global or m for multiline, Auger?

autumn aspen
#

yeah?

faint prism
#

You may forgot the g for global or m for multiline, Auger?
@boreal iron You might just be a lifesaver

earnest phoenix
#

let user = message.guild.member(message.mentions.users.first());
this is very wrong

faint prism
#

I definitely forgot to include /pattern/g

#

Lol tysm

boreal iron
#

lel

#

happend to me, too sometimes.

autumn aspen
#

this is very wrong
@earnest phoenix oh lol

earnest phoenix
#

@autumn aspen You shouldn't pass User objects to a function that treats the passed object as a GuildMember

faint prism
#

I'm not going to lie, I immediately switched over to using indexes and substrings

earnest phoenix
#

silent errors...silent errors

#

@earnest phoenix ok you're getting against discord guidelines now

#

no prawn
please no prawn

boreal iron
#

don't worry, depending on the callback you sometimes need the options and sometimes not

autumn aspen
#

silent errors...silent errors
@earnest phoenix dude that was only one lol

earnest phoenix
#

bruh

#

you think I'm done?

boreal iron
#

in case of PHP you don't need them, but need to define the options as parameters of the function

autumn aspen
#

yes

earnest phoenix
#

wtf

autumn aspen
#

lol then tell

#

more silent erros

#

errors

earnest phoenix
#

types a big ass quote

autumn aspen
#

ha..ha

clever dust
#

message.guild.member(user) will turn that user object into a member object

boreal iron
#

What are trying to do with your code, Endph?

#

What's missing?

earnest phoenix
#

@clever dust still he's treating User objects as GuildMembers. If I tell my bot to eval that same exact line except the message contains a User ping who is not in this server it might throw an error

vernal rivet
#

idk why you would use the user property on the mentions. isn't there a member property?

clever dust
cinder patio
#

You can use mentions.members though?

vernal rivet
#

yes

cinder patio
#

Why use .member

autumn aspen
#

@earnest phoenix lmao it wasnt even a problem Im dumb

earnest phoenix
#

It's not a big ass problem but you should try to remove silent errors when you find them. But you shouldn't just go around finding silent errors because javascript is gay and you'll find pointless stuff.

vernal rivet
#

message.mentions.member returns a GuildMember, where as message.mentions.user returns User.

earnest phoenix
#

It's not a big ass problem but you should try to remove silent errors when you find them. But you shouldn't just go around finding silent errors because javascript is gay and you'll find pointless stuff.
^ i ignored this once and now i have a big list of stuff to fix

vernal rivet
#

oofers

earnest phoenix
#

Javascript isn't gay, bad code is gay

autumn aspen
#

It's not a big ass problem but you should try to remove silent errors when you find them. But you shouldn't just go around finding silent errors because javascript is gay and you'll find pointless stuff.
@earnest phoenix yes I will fix them when I see it

vernal rivet
#

shrug ehhhh i mean if you want to compare it to other languages, it kind of is gay, but yea bad code is much more gay than js

earnest phoenix
#

Javascript isn't gay, bad code is gay
@earnest phoenix

stronglyDisagree(sentence.split(",")[0]);
stronglyAgree(sentence.split(",")[1]);
#

Actually no programming language is gay, they serve their given purpose, only gay programming language is clojure or lisp, bruv

vernal rivet
#

what is disagree, what is agree? milk_think ||the question we all ask ourselves, just like jeff||

earnest phoenix
#

All programming languages are gay
So it's harder for hackers to use them badly 👍

#

Wot

thick gull
#

what

earnest phoenix
#

because nobody can understand them

#

Why do you program when you don't understand it then

vernal rivet
#

so you mean high level languages

earnest phoenix
#

i edited nothing but discord shows it's edited waitWhatSpin

#

Discord is a stable platform™️

vernal rivet
#

why trademark the "platform"?

slender thistle
#

because it's a joke

vernal rivet
#

lol

earnest phoenix
#

Also all programming languages are understandable except for brainfuck

#

Like wtf is it supposed to mean

vernal rivet
#

or glass FLSweat

earnest phoenix
#

Discord is a stable platform™️
@earnest phoenix

agree(sentence); // programming languages don't have sarcasm btw
vernal rivet
#

ReferenceError: agree is not defined

earnest phoenix
#

ERROR: agree is not defined
@vernal rivet humans can't decide on anything that's why

#

Basically why wars happen

vernal rivet
#

dogekek but thats what Javascript will say to you

earnest phoenix
#

Unless agree and disagree are native functions created by godly powers of some sort

#

:dogekek: but thats what Javascript will say to you
@vernal rivet where's the funny?

#

also #general if you wanna milk the joke further

thick gull
#

Unless agree and disagree are native functions created by godly powers of some sort
@earnest phoenix you could require a package

earnest phoenix
#

How do I know if a message is embed or not?

#

How do I know if a message is embed or not?
@earnest phoenix messages can contain embeds the whole message can't be an embed

#

A message can't be an actual embed, embed is a property of it, something attached to the message

#

my knowledge isn't broad enough to know the discord.js method to check if a message contains an embed

#

hits up docs

#

If you want to check if the message only contains an embed and no content,

if (!<message>.content && <message>.embeds[0]) {
// Do stuff
}```
#

@earnest phoenix message.embeds returns an array. If the array is empty there is no embed
Also follow what voltrex said

vernal rivet
#

^^^

earnest phoenix
#

okay, I got it. thanks

thick gull
#

agree;

module.exports = function(sentence) {
    if (!sentence) sentence = 'sentence'
    console.log(`I agree with; ${sentence}`)
}

disagree;

module.exports = function(sentence) {
    if (!sentence) sentence = 'sentence'
    console.log(`I disagree with; ${sentence}`)
}

your code

const agree = require('agree')
const disagree = require('disagree')
agree('code913 smells')
disagree('code913 smells')
// => I disagree with; / I agree with; code913 smells
#

i think

#

maybe

#

idk

earnest phoenix
#

gtg guys

thick gull
#

yeah

#

it should work like that

#

without something like agree.with()

earnest phoenix
#

Why make it a npm package tho

thick gull
#

idk

#

not required

#

could've just done like

#

'./utils/agree.js'

#

or something

#

midk

earnest phoenix
#

all these guys making jokes that i smell...if only they knew it's true

thick gull
#

doesnt really matter

vernal rivet
#

./ is current directory. just the name is a npm package name

thick gull
#

i kn o w

vernal rivet
#

also it would be better to make the functions in the same file, and call on them there

earnest phoenix
#
const agree = sentence => sentence ? console.log("I agree with " + sentence) : null;
const disagree = sentence => sentence ? console.log("I disagree with " + sentence) : null;

agree("Bruh"); // I agree with Bruh
disagree("Bruh"); // I disagree with Bruh```
thick gull
#

no thats the joke™️

vernal rivet
#

dogekek don't you love arrow functions and elvis operators, they are great

thick gull
#

im like doing a math quiz while on discord development channels

#

how to get a passing grade 101

compact oriole
#

bro math is ez

vernal rivet
#

math is great

compact oriole
#

they said college math was gonna be hard

earnest phoenix
#

Math is great if you understand it

compact oriole
#

yea

#

I love math

vernal rivet
#

^^^

thick gull
#

i hate math

#

im bad at it

vernal rivet
#

thats sounds like you should study more, shrug

thick gull
#

thats the problem

earnest phoenix
#

I'm pretty sure 97% of members here don't know math

thick gull
#

i dont stu d y

vernal rivet
#

then you should, if you want to major in CST, you are going to be seeing a lot of math

earnest phoenix
#

dogekek don't you love arrow functions and elvis operators, they are great
@vernal rivet by elvis, they're actually called conditional operators

vernal rivet
#

you know its funny, because they are called either one

earnest cloak
#

i plan on getting a rasberry pi next week to host my bot but would heroku work for now or are there better options?

earnest phoenix
#

I'm pretty sure 97% of members here don't know math
@earnest phoenix well computers basically do METH with 1s and 0s and 5% of people here are computers programmers so you're 2% wrong mate toldya not to skip METH class

vernal rivet
#

but dude its cooler to say elvis operators, because it makes you wonder did Elvis Presley program?

earnest phoenix
#

getting an rpi isn't really profitable per se

#

Computers are advanced calculators

#

(getting it only for bot hosting that is)

vernal rivet
#

milk_think but aren't we calculators

earnest phoenix
#

We don't function as reading an unending stream of 0's and 1's aka binary so not technically

ionic dawn
#

Computers are advanced calculators
@earnest phoenix eyeshake

vernal rivet
#

you know that thing where some smart guy said that the brain is a computer, milk_think does that mean we do take in unending stream of 0's and 1's.

earnest phoenix
#

getting an rpi isn't really profitable per se
@earnest phoenix ok but who asked

#

you know that thing where some smart guy said that the brain is a computer, christmasthink does that mean we do take in unending stream of 0's and 1's.
@vernal rivet literally my fifth grade science book

#

It does compute stuff just like a computer but doesn't output it as a result of another stream of them, brain just simulates computers in a human organ way

vernal rivet
earnest phoenix
#

Gives commands for human body to function so yea we might also be advanced calculators in a non digital way

vernal rivet
#

So basically we are robots from the past.

earnest phoenix
#

Reject advanced humans as calculators, return to monke

vernal rivet
#

yes

earnest phoenix
vernal rivet
#

if we are like computers can i do deltree in my root directory, and delete myself from existence?

earnest phoenix
#

Possible if you find the bash command line in your root directory, if you can though

valid frigate
earnest phoenix
#

if we are like computers can i do deltree in my root directory, and delete myself from existence?
@vernal rivet suicide is already defined

vernal rivet
#

win + x, clicks on Command Prompet(Administrator)

shy turret
#

what would be GET https://discord.com/api/v8/invites/INVITECODEHERE but using discordjs

earnest phoenix
#

Use node-fetch

#

have you checked the docs

#

Or the already made method

#

<client>.fetchInvite()

shy turret
#

yes but im either blind or i cant find it in the docs

#

ok it's the first one

earnest phoenix
#

win + x, clicks on Command Prompet(Administrator)
@vernal rivet
Command Prompt + Donald Trumpet == Command Prompet PogChomp

#

development more like development-shitpost-haha69funny-general-support-testing1

vernal rivet
#

^^^^

earnest phoenix
#

development more like development-shitpost-haha69funny-general-support-testing1
@earnest phoenix don't forget 499th-modum-shitpost

#

Wait i forgot ping_modums_24/7

vernal rivet
#

oofers

earnest phoenix
#

Well it's in starboard anyway oof

vernal rivet
#

is that ts

opal plank
#

any suggestions to type out channels and let any other?

#

yes it is

vernal rivet
#

what is channels supposed to do

earnest phoenix
#

@opal plank what is that nice green line on the left Git?

opal plank
#

be a number

#

yeah thats git support

#

shows modifications

#

between repo and current workplace

#

anyway, some help here pls?

earnest phoenix
#

git sucks
i like github
~ me in January, 2020 (when i wasn't into this programming stuff)

eternal osprey
#

hey how would i make a command to stop the setinterval?

earnest phoenix
#

clearInterval() exists

eternal osprey
#

i have

#

but clearinterval logs undefined

slender thistle
#

Starting from discord.py 1.5.0, intents are supported. My current question is as follows:

Does discord.Indents(messages=True) default all other intents to False?

earnest phoenix
#

clearInterval() exists
@earnest phoenix thank god you saved me yet another google search

eternal osprey
#
 generateEmbedFromFeed(args, (embed) => {
        // once the twitter search is resolved, we can edit the original message with the embed
        messageToEdit.edit(embed)
      })
  
      // again every 5 seconds
      let testing =  
       setInterval(() => {
        generateEmbedFromFeed(args, (embed) => {
          messageToEdit.edit(embed)

          
        })


      }, 5000);

      if (message.content.startsWith(prefix + 'removefeed')) {
        clearInterval(testing)
        message.channel.send('The feed has been stopped!')
          }

    }```
#

i have done this

#

i have googled, i have looked at the docs.

vernal rivet
#

what is it complaining about erwin?

eternal osprey
#

i just can't get it working.

earnest phoenix
#

That interval variable was set inside the function which you can't access it from outside the function

#

f

eternal osprey
#

okay, i was thinking so.

vernal rivet
#

@opal plank what is the red error saying?

earnest phoenix
#
let interval;
// Function {
interval = <interval set here>;
// }

clearInterval(interval); // Stop```
opal plank
#

@vernal rivet what red error?

earnest phoenix
#

Can you store the value returned from the setInterval function to use it in closeInterval (in the same process)?
or are those both void functions

opal plank
#

oh

#

index bs

vernal rivet
#

under channels

opal plank
#

i need a NOT somehow

#

key : string NOT channels

eternal osprey
#

isn't that just what i have done @earnest phoenix

earnest phoenix
#

No

opal plank
#

dunno if ts has anything of that sort

earnest phoenix
#

i need a NOT somehow
@opal plank !somehow

opal plank
#

can we try be helpful here?

vernal rivet
#

that doesn't work in ts typing i believe

earnest phoenix
#

You're defining the testing variable inside the function, do it outside the function @eternal osprey

cinder patio
#

|, but if you have a lot of classes to list, it'd be a pain...

vernal rivet
#

^^^

eternal osprey
#
         messageToEdit.edit(embed)

          
        })


      }, 5000);

     

    }
    
    if (message.content.startsWith(prefix + 'removefeed')) {
      clearInterval(testing)
      message.channel.send('The feed has been stopped!')
        }
  ``` like this
#

sorry for the spaces.

opal plank
#

@cinder patio thats just OR not NOT

cinder patio
#

there's no such thing as not

eternal osprey
#

this is outside the function

opal plank
#

indeed

earnest phoenix
#

*bitwise OR

opal plank
#

which is why im asking if you guys know another solution

#

the variable names are generated dynamically

vernal rivet
#

so it needs to be a string and a channel, depending on the value?

earnest phoenix
#
let testing;
 generateEmbedFromFeed(args, (embed) => {
        // once the twitter search is resolved, we can edit the original message with the embed
        messageToEdit.edit(embed)
      })
  
      // again every 5 seconds
      testing =  
       setInterval(() => {
        generateEmbedFromFeed(args, (embed) => {
          messageToEdit.edit(embed)

          
        })


      }, 5000);

      if (message.content.startsWith(prefix + 'removefeed')) {
        clearInterval(testing)
        message.channel.send('The feed has been stopped!')
          }

    }``` @eternal osprey like this
#

On top

opal plank
#

for example
apple:chat, channels:0
banas:chat, channels:0
....

#

etc

cinder patio
#

I only know of |, but if there are tons of types, then you're better of using any, and specifying the type in other places

opal plank
#

having any's is gonna be even more of a hassle

earnest phoenix
#

@opal plank maybe add a function that gets executed when you run new on the class/interface that checks if key is NOT channels and throw an error if it is? That's possible in normal js not sure if it's possible in typescript interfaces

autumn aspen
#

-bots

gilded plankBOT
opal plank
#

@earnest phoenix not in Ts

placid phoenix
earnest phoenix
#

f

cinder patio
#

@opal plank you can use generics

opal plank
#

i mean, i guess

eternal osprey
#

okay, i'll try.

opal plank
#

can set them as T

#

actually that might not be a bad solution

earnest phoenix
#

how do i update repl thing
@placid phoenix you mean update the software on repl.it or the read evaluate print loop thing?

cinder patio
#

yup,

    a: T
}```
opal plank
#

ty feud

placid phoenix
#

@placid phoenix you mean update the software on repl.it or the read evaluate print loop thing?
@earnest phoenix print loop thing

earnest phoenix
#

idk tbh

eternal osprey
#

it still did not work @earnest phoenix

earnest phoenix
#

ask shivaco he's da python guy

eternal osprey
#

it's still updating.

#

and updating.

vernal rivet
#

whats your problem awsome?

eternal osprey
#

my setinterval won't stop.

slender thistle
#

Stop telling people to contact me for everything that's Python

earnest phoenix
#

Did you even execute the function you made to set the interval

slender thistle
#

I'll help here if I'm available

vernal rivet
#

yea, what voltrex sent should work

placid phoenix
slender thistle
#

what the fuck is the client package

vernal rivet
eternal osprey
#

shit

earnest phoenix
#

is regex better than vanilla JS

eternal osprey
#

i fucked up my code

#

and can't ctrl + z any further

slender thistle
#

Define "better"

#

It's less performant most of the time

earnest phoenix
#

i fucked up my code
@eternal osprey always has been

eternal osprey
#

what should i do

opal plank
earnest phoenix
#

Rewrite it

eternal osprey
#

@earnest phoenix thanks man.

earnest phoenix
#

Define "better"
@slender thistle like it can convert massive functions on strings down to smol /letter stuff

sly dawn
#

send help quick

#

my bot is displaying wrong status

slender thistle
#

Easier != Better

vernal rivet
#

that doesn't help us, what library

mint cypress
#

My bot after 10h the status deleted

sly dawn
#

discord.js

earnest phoenix
#

send help quick
@sly dawn how do we know you're not an imposter asking for help to kill us Thonk

slender thistle
#

What's your library and code

mint cypress
#

Why

slender thistle
vernal rivet
#

what does your code look like for that?

mint cypress
#

@slender thistle djs

slender thistle
#

kindly shut the fuck up if you're not going to be helpful

sly dawn
#

@slender thistle its discord.js and my code recently is ```css
broo = new Discord.Client({
presence:{
activity:{
name:${bot.guilds.cache.size} with ${bot.users.cache.size} users! | c!help,
type: 'PLAYING',
}
}
})

earnest phoenix
#

this channel is back to anarchy

vernal rivet
#

?

slender thistle
#

You're part of that anarchy, to no surprise 🙃

earnest phoenix
#

Shivaco can you be nice

sly dawn
#

and my bot is displaying moderating | !help with wrong prefix written

earnest phoenix
vernal rivet
#

why are you setting it in the ClientOptions?

quartz kindle
#

@opal plank remember when we talked about the self invoking recursive function

boreal iron
sly dawn
#

@vernal rivet because my bot disconnects and reconnects and its status not here, so i created client

opal plank
#

@quartz kindle yup

#

what about em?

quartz kindle
#

its still running

#

lmfao

opal plank
#

LMAO

earnest phoenix
#

@sly dawn You should not set a presence in client options

opal plank
vernal rivet
#

you can set them again in the reconnecting event

earnest phoenix
#

Use <client>.user.setActivity()

opal plank
#

i guess we now ruled out it works fine

sly dawn
#

@earnest phoenix if i dont, my bot disconnects and reconnects and doesnt appear the activity

opal plank
#

i should've saved that snippet tbh tim

#

it was some high level js flexing

slender thistle
#

LMFAO Tim

earnest phoenix
#

@earnest phoenix if i dont, my bot disconnects and reconnects and doesnt appear the activity
@sly dawn How so

opal plank
vernal rivet
#

you can set them again in the reconnecting event

quartz kindle
#

lmfao

sly dawn
#

@earnest phoenix look, herkou always disconnect my bot and reconnect it, due to reconnect, its status dissappears and doesnt appear

vernal rivet
#

i just said how ;-;

earnest phoenix
#

Seems like a host problem

#

Somehow

quartz kindle
#

@sly dawn if its not a dynamic activity, set it in the client options instead

earnest phoenix
#

@sly dawn you can't set the status directly in the contructor because the bot ain't logged in so discord says it's offline and ignores status change requests

vernal rivet
#

heroku is not built for discord bots

sly dawn
#

then i would have been changing it more than 100 times

earnest phoenix
#

@sly dawn please stop using heroku

vernal rivet
#

they even said this themselves, that their hosting service was not built for bots

sly dawn
#

@earnest phoenix then which i use to host mybot

earnest phoenix
#

a real VPS

sly dawn
#

i dont have money lmao

vernal rivet
#

repl is good if you want free

sly dawn
#

@vernal rivet repl?

earnest phoenix
#

Use <client>.user.setActivity()

sly dawn
#

its a coding site

opal plank
#
(function highFlexing() {console.log('Who needs setInterval anyway :shrug:'), setTimeout(highFlexing, 2000)})()

@quartz kindle run this one too

vernal rivet
#

yes

earnest phoenix
#

repl is good if you want free
@vernal rivet only for smol bots

#

its a coding site
@sly dawn and it also allows hosting apps

sly dawn
#

i have a big bot lol

vernal rivet
#

doesn't mean you can't abuse it dogekek

quartz kindle
#

@opal plank lmfao

slender thistle
#

It's an online testing environment with a built-in IDE

sly dawn
#

@earnest phoenix then will my bot stay 24/7

earnest phoenix
#

@sly dawn add premium features then use the revenue to buy a VPS

#

Big bot hosted on heroku

slender thistle
#

but repl.it don't mind their machines running 24/7

earnest phoenix
#

I don't believe

vernal rivet
#

mhm

earnest phoenix
#

@earnest phoenix then will my bot stay 24/7
@sly dawn 90% no 10% yes

vernal rivet
#

i have one running on it, just do repl + uptimerobot

sly dawn
#

@earnest phoenix my bot has loads of commands

#

@vernal rivet uptimerobot stays ur bot for only 2 hours i guess

earnest phoenix
#

i just use repl for hosting game websites now so i can chill while dbl chat is dead

#

@vernal rivet uptimerobot stays ur bot for only 2 hours i guess
@sly dawn fuck no

#

A big bot means it's in many guilds

#

repl ain't meant for big bots

#

Not many commands

sly dawn
#

@earnest phoenix oh lmfao

earnest phoenix
#

They're a testing environment

sly dawn
#

well my bot is in 24 guilds

#

and watching 40k pple

earnest phoenix
#

Which is why i took down my bot from their site

quartz kindle
#

thats a very small bot

opal plank
#
(function highFlexing() {setTimeout(() => {highFlexing; console.log('Who needs setInterval anyway :shrug:')}, 2000)})()

there we go, that looks better

violet mesa
#

discord.py
how do i check if arg is a mention or not

slender thistle
#

uhhh

earnest phoenix
#

After my exams are over I'll put my bot on a VPS

slender thistle
#

Regex?

sly dawn
#

why does even heroku re-connect

slender thistle
#

Honestly I'd go with regex for mentions for better precision ngl

earnest phoenix
#

Because it's not meant for bots

#

it's for testing

opal plank
#

doesnt py provide mentions in the message payload?

violet mesa
#

its for running code 24/7

opal plank
#

discord should ship the payload with the mentions in it

quartz kindle
#

bots always reconnect, discord disconnects them at least once every 4 hours

sly dawn
#

but somehow, my bot is displaying old status which i dont want, and i have new one but it aint displaying the new one

earnest phoenix
#

All free services are for testing
Even if you pay
Save up the money for a REAL VPS because VPSs are meant to run 24/7

slender thistle
#

oh wait

sly dawn
#

@quartz kindle the code u gave me isnt working lmao

opal plank
#

message.mentions

earnest phoenix
#

but somehow, my bot is displaying old status which i dont want, and i have new one but it aint displaying the new one
@sly dawn lag and/or API ratelimits and/or error in code

slender thistle
#

@violet mesa arg in message.mentions for user mentions

quartz kindle
#

@sly dawn what code

earnest phoenix
#

bots always reconnect, discord disconnects them at least once every 4 hours
@quartz kindle Every 4 hours? Mine stays up for days? Or you meant only in heroku

slender thistle
#

or just message.mentions directly

sly dawn
#

@quartz kindle broo = new Discord.Client({ presence:{ activity:{ name:`${bot.guilds.cache.size} with ${bot.users.cache.size} users! | c!help`, type: 'PLAYING', } } })

violet mesa
#

thx have a great day

quartz kindle
#

@earnest phoenix discord sends you a reconnect packet at least once every 4 hours for load balancing

#

the lib then sends a resume packet

#

to reconnect

opal plank
#

theres a 30% chance this might lead to one hell of a scolding but im still doing it

#

👀

quartz kindle
#

@sly dawn that code is only for static statuses, not for dynamic ones

#

thats why i said "if your status is not dynamic"

earnest phoenix
#

bots always reconnect, discord disconnects them at least once every 4 hours
@quartz kindle finally a good reason to explain @.mattthew#0001 and @.borboss#7877 why i have a setInterval function setting the status every five minutes

#

Oh like something that would balance the events payload and connection to discord gateway

sly dawn
#

@quartz kindle wdym by static statuses, and what dynamic, like?

slender thistle
#

What's the point in reconnect packets being sent on an interval?

quartz kindle
#

static status as in, only text

#

opposite to a dynamic one with variables

#

that depend on the bot being logged in

sly dawn
#

but i do have dynamic ones

#

and both 50 50

#

shall i remove 1 variable from it?

earnest phoenix
#

dynamic status: Playing/Streaming/Watching/Listening
static status: just text but it can't be set by bots

quartz kindle
#

you cannot access the caches before your bot logs in, which means you cannot set them in the initial presence

violet mesa
#

@slender thistle just a one last question how do i copy id of the guy who was mentioned

sly dawn
#

@earnest phoenix dam what do i do LMAO

quartz kindle
#

you need to set up a dummy/temporary presence and then once your bot logs in, you set the correct presence and replace the dummy one

earnest phoenix
#

i said that five minutes ago but ok @quartz kindle

slender thistle
#

@violet mesa How are you getting the mention in the first place?

#

Just access .id property of that

violet mesa
#

arg

earnest phoenix
#

you need to set up a dummy/temporary presence and then once your bot logs in, you set the correct presence and replace the dummy one
@quartz kindle new Discord.UserPresence?

violet mesa
#

last thing you told me was the wae

earnest phoenix
#

there's a typedef called UserPresence

violet mesa
#

way

sly dawn
#

@earnest phoenix with a variable?

earnest phoenix
#

yes

sly dawn
#

like example = new Discord.UserPresence

slender thistle
#

what

earnest phoenix
#

because you're gonna need to refernce it later

violet mesa
#

@violet mesa arg in message.mentions for user mentions

#

is the way

sly dawn
#

and then

type: "WATCHING"```?
earnest phoenix
#

yes (but the code is wrong)

violet mesa
#

then if its true

slender thistle
#

How do you use the command?

sly dawn
#

cool imma try it

quartz kindle
#

you dont need to use the presence constructor

violet mesa
#

prefix steal

#

and arg

violet mesa
#

that is suppose to be mention

earnest phoenix
#

@vernal rivet we're talking full on Presences not the quick and simple Activities

violet mesa
#

@slender thistle this is what i have u will understand this i think

@bot.command
async def rob(ctx, arg):
    mention = arg in message.mentions
    if mention == True:
        
    if mention == False:
        await ctx.send("must be a mention")
vernal rivet
#

you can use the setPresence()

slender thistle
#

oh my God

earnest phoenix
#

btw User and ClientUser have a very slightly different way of presences

slender thistle
#

That's so smart and dumb at the same time

sly dawn
#
broo = new Discord.UserPresence()
presence: "<insert status here>"
type: 'WATCHING'``` is it ok?
#

Wait ClientUser?

earnest phoenix
#

Why do that

violet mesa
#

That's so smart and dumb at the same time
@slender thistle thx?

#

lol

slender thistle
#

@violet mesa just apply :discord.Member to arg in the function parameters and ignore any checks

earnest phoenix
#

<client>.user.setActivity()

vernal rivet
#

the bot is a client, which can be expressed as ClientUser shrug

violet mesa
#

ohhh

#

ok

#

lmao

sly dawn
#

@earnest phoenix what next ahead of it?

vernal rivet
#

look at the link i sent

quartz kindle
#

a complete and correct solution for the activity issues would be something like this ```js
client = new Discord.Client({
presence: {
activity: {
name:"starting up",
type:"WATCHING"
}
}
})

client.once("ready", () => {
client.options.presence.activity = {
name: ${client.guilds.cache.size} bla bla bla,
type: "WATCHING"
}
client.user.setPresence(client.options.presence)
})

violet mesa
#

@slender thistle now how do i copy the guy who was mentioned id

vernal rivet
#

that takes you to the method

slender thistle
violet mesa
#

oh

earnest phoenix
#
<client>.user.setActivity("Bruh", {
type: "WATCHING"
});```
violet mesa
#

that ez

slender thistle
#

but please rename arg to member

violet mesa
#

lmao

slender thistle
#

pretty please

violet mesa
#

ok

#

sure

vernal rivet
#

PandaSouless thats more work to do tbh tim.

slender thistle
#

keep your variables explicit

violet mesa
#

there ya go

earnest phoenix
#

:PandaSouless: thats more work to do tbh tim.
@vernal rivet but Activity can only set Playing and online status

slender thistle
#

there we go

violet mesa
#

@bot.command
async def rob(ctx, member :discord.Member):
    member = member.id
```is this ok?
#

like

#

so far

vernal rivet
#

and? thats what he is doing shrug idk why you are making more complicated

slender thistle
#

member: discord.Member make it pretty at least

#

and just use member.id directly, don't reassign anything to member

violet mesa
#

lol

#

okie

earnest phoenix
violet mesa
#

ty!!!

earnest phoenix
#

It's actually Discord.PresenceData

sly dawn
#

@earnest phoenix i went on the link

violet mesa
#

ill make sure to make my code look better for u next time

#

lol

earnest phoenix
#

Not Discord.UserPresence

slender thistle
#

well not for me specifically, it's just nicer to read code that doesn't look like it was written with feet on a phone

violet mesa
#

okie

slender thistle
#

(that's throwing PEP aside)

earnest phoenix
#

Auger#8261 once said he hosts his bot on his phone. I still don't get WHY.

#

Writing code on mobile with hands is already hell to itself

#

Writing code on mobile with hands is already hell to itself
@earnest phoenix not on repl.it they've got a pretty nice editor which is as powerful as the computer one except that you can't open shell

sly dawn
#

@earnest phoenix u mean super hell

earnest phoenix
#

While here i am, coding everything on mobile and also hosting it

sly dawn
#

wait i can run my bot on computer? GWtloLaugh

vernal rivet
earnest phoenix
#

@earnest phoenix not on repl.it they've got a pretty nice editor which is as powerful as the computer one except that you can't open shell
@earnest phoenix Repl when i tried it 5 months ago deleted half of my code KEKWLaugh KEKWLaugh KEKWLaugh

#

wait i can run my bot on computer? :GWtloLaugh:
@sly dawn a host is a computer...bruh

sly dawn
#

@earnest phoenix okehh

earnest phoenix
#

@earnest phoenix Repl when j tried it 5 months ago deleted half of my code :KEKWLaugh: :KEKWLaugh: :KEKWLaugh:
@earnest phoenix oof i have version control and a setInterval pushing and pulling changes to my backup GitHub repo every five minutes

fervent goblet
vernal rivet
#

is that atom PandaSouless

fervent goblet
#

uh no

frank lava
#

how do I make a changing bot status

earnest phoenix
#

why does this not update after i update the bullet count again?
@fervent goblet OMG are you making a shooter game on Discord I'll happily play it gib invite

#

how do I make a changing bot status
@frank lava Interval

fervent goblet
#

i just started it

earnest phoenix
#

how do I make a changing bot status
@frank lava update the status every few seconds (but don't do too often else rate limit)

fervent goblet
#

i need to figure out how to constantly call data after it changes

earnest phoenix
#

i need to figure out how to constantly call data after it changes
@fervent goblet events OR setInterval

quartz kindle
#

that setInterval makes it look like spaghetti

#

is there anything stopping it?

earnest phoenix
#

No arrow function

fervent goblet
#

no

#

the interval runs

quartz kindle
#

is that interval supposed to run forever?

fervent goblet
#

it just does not update

#

yes

quartz kindle
#

you are not getting any new user data

#

you are operating on res

#

the same res as before

#

res is never updated

fervent goblet
#

ah

#

ok

#

wait

#

but it should tho

earnest phoenix
#

update res every single time the setInterval runs

#

but it should tho
@fervent goblet You're only getting the value of it once in the parent function of setInterval (exec)

#

Also run an actual for loop instead of forEach(), because it's slow

sly dawn
#

@quartz kindle your a life saver man, thx for it :)

delicate shore
#

My bot went offline

earnest phoenix
#

@quartz kindle your a life saver man, thx for it :)
@sly dawn no he's a Messiah

delicate shore
#

After saying this

#

[WS => Shard 0] [HeartbeatTimer] Didn't receive a heartbeat ack last time, assuming zombie connection. Destroying and reconnecting.
Status : READY
Sequence : 716671
Connection State: OPEN

[WS => Shard 0] [DESTROY]
Close Code : 4009
Reset : true
Emit DESTROYED: true

[WS => Shard 0] Clearing the heartbeat interval.

earnest phoenix
#

My bot went offline
@delicate shore yay...?

#

@delicate shore Connection issue

delicate shore
#

Oh

earnest phoenix
#

Shard was destroyed because it didn't receive a heartbeat

#

[WS => Shard 0] [HeartbeatTimer] Didn't receive a heartbeat ack last time, assuming zombie connection. Destroying and reconnecting.
Status : READY
Sequence : 716671
Connection State: OPEN

[WS => Shard 0] [DESTROY]
Close Code : 4009
Reset : true
Emit DESTROYED: true

[WS => Shard 0] Clearing the heartbeat interval.
@delicate shore what the fuck is wrong with Tim Berners-Lee why did he add Zombies to HTTP

delicate shore
#

Ok

fervent goblet
#

wait how do i only update the res

#

?

quartz kindle
#

idk what .exec does, but you likely need to run it again

earnest phoenix
#

no

quartz kindle
#

so you'll have to remove the interval altogether and make it a recursive function

earnest phoenix
#

Wtf

quartz kindle
#

sounds complicated lmao

cinder patio
#

You can probably do it without regex

#

and just one loop

earnest phoenix
#

Really? How tho

quartz kindle
#

this is what i do

#

but i use --option=value

#

not --option value

earnest phoenix
#

Hmm the --option way might be more complicated than that

#

Maybe

#

can you use yargs package on any string/array or does it only work on process.argv

opal plank
#

who wants to play a game with me?

earnest phoenix
#

The one i showed only took 15 minutes

#

who wants to play a game with me?
@opal plank me

#

To make

earnest phoenix
#

let's think of the worst ways to crash a node.js app

opal plank
#

estimate how little time THIS will get rate limited and yoinked off Twitch's api

prisma oriole
#

what am i looki-

earnest phoenix
#

process.on("unhandledRejection", () => process.exit());

opal plank
#

you are looking at me manually clustering twitch IRC connections

#

since the library doesnt handle more than 5,000 streams per connection

#

i made a dynamic system with a slave/master setup

earnest phoenix
#

let's think of the worst ways to crash a node.js app
@earnest phoenix winner gets an eel slap btw

opal plank
#

guesses on what will happen once i try that on 40k+ streams?

slender thistle
#

Erwin bro it's main/sub you baka

earnest phoenix
#

Erwin making gta 6 in console when

slender thistle
#

does winner get a POB?

iron vine
#

What is YouTube API Value 719150691880271912

quartz kindle
#

lmao shiv

earnest phoenix
#

Erwin making gta 6 in console when
@earnest phoenix we have no erwin here we only have a NOT erwin

#

What is YouTube API Value :719150691880271912:
@iron vine value?

iron vine
#

@iron vine value?
@earnest phoenix Yes..

opal plank
#

im 100% imma get my ass ratelimited hard

earnest phoenix
#

The hell do you mean by that

opal plank
#

i'll be lucky if this token doesnt get revoked

quartz kindle
#

twitch gonna call the ddos cops

slender thistle
#

"Solution loaded with 1 warning"
let's see what my classmate did

earnest phoenix
#

can you use yargs package on any string/array or does it only work on process.argv

opal plank
#

why is there 38 clients coming from the same ip?

earnest phoenix
#

sorry for repeating question

slender thistle
#

oh look it's my .NET framework fucking up again for whatever reason

quartz kindle
#

@earnest phoenix pretty sure you can use it on any string

earnest phoenix
#

poggertrain <apoggertrain758735308391972886>

quartz kindle
#

i've never used it personally, but most argument parsers i've seen work on strings

thick gull
#

why is there 38 clients coming from the same ip?
anything over 3 is a ddos blobcatban

[sarcasm, just incase you didnt get it]

quartz kindle
#

technically its not ddos because its from the same ip

#

xD

opal plank
#

purely research purposes

thick gull
#

ok ti M

earnest phoenix
#

i give up discord on mobile is hell i tried to send a pogger emote and discord send the escaped version

opal plank
#

who needs IPC , clustering, and all that when you can simply load 38 connections on one node

earnest phoenix
#

First time? @earnest phoenix

#

First time? @earnest phoenix
@earnest phoenix wut da fuk obviously no

#

It was a joke

opal plank
#

im guessing 30 minutes till i get ratelimited

quartz kindle
#

that long?

opal plank
#

joining a massive amount of channels takes a while

#

but i'd be doing it X's amounts faster

#

since there are x amount of clients running

quartz kindle
#

usually if you exceed a certain number of requests per second you get insta blocked

#

so if you're doing 38 clients concurrently

opal plank
silent cloud
quartz kindle
#

idk

opal plank
#

the librabry SHOULD handle this

#

i guess

#

maybe

#

prob not

#

but lets see

#

10 minutes to join 400 channels

#

im fairly certain IRC will run per connection

#

not sure if they check ip n such though

quartz kindle
#

they should at least be checking number of requests per IP

opal plank
#

we'll see what will happen

quartz kindle
#

but once connected to a websocket you should be fine

#

do they use websockets?

opal plank
#

yeah

quartz kindle
#

so once connected, limits should be per socket, not per ip

sonic lodge
#

ayo tim, could you add my bot to your bots-that-use-d.js-light list 🙂

quartz kindle
#

sure

opal plank
#

im just getting final touches to the stress

#

cuz i need to modify it to work it like this

misty sigil
#

lol

gentle lynx
#

is it possible to get a user's custom status in discord.js?

opal plank
#

lets queue 50k channels and see what happens

quartz kindle
#

yes glassy

opal plank
sonic lodge
misty sigil
gentle lynx
sonic lodge
#

this is not an ad

gentle lynx
#

how tho

misty sigil
#

i know

gentle lynx
#

.presence. ?

quartz kindle
#

@sonic lodge done

sonic lodge
#

ay im famous

gentle lynx
#

presence.status gives like online, idle, dnd, offline

#

.activites?

misty sigil
#

presence.activities

quartz kindle
#

presence.activities[0].name

gentle lynx
#

ty

misty sigil
opal plank
compact oriole
#

I wish people learned how to use the search function in docs...

misty sigil
#

yes

gentle lynx
#

activites returns an array but it doesn't return what's my custom status?

#

just "Custom Status"

earnest phoenix
#

in what library

gentle lynx
#

discord.js

quartz kindle
#

its somewhere in the activity

#

if its not in activity.name, then try activity.state or activity.details

earnest phoenix
#

custom status counts as rich presence ^

gentle lynx
#

ah ok it worked

#

ty

dawn swift
#

I pulled an all nighter trying to code a bot just to get the file directories fucked up😻

gentle lynx
#

cool

eternal osprey
#

this is sent in the wrong server. Sorry.

dawn swift
#

You can DM me if you need someone to talk to. I’m truly sorry to hear what you’re going through^

eternal osprey
#

No no it’s good. It was meant for my server with my friends.

dawn swift
#

Ahhh okay

eternal osprey
#

it’s okay

#

thanks though.

dawn swift
#

I hope you feel better soon!

eternal osprey
#

Thanks!

earnest phoenix
#

@green kestrel do you have a pig latin generator and a scrambler for trivia bot or do i have to manually put them in when adding questions?

green kestrel
#

It uses a generator

#

Same with the number hint types

#

They're re generated randomly each time a question is asked @earnest phoenix and sent with the API request for the question

earnest phoenix
#

oh ok

#

i added a question just now

#

moozic

#

tho I'm not 100% sure it's correct

#

can't trust DuckDuckGo

earnest phoenix
#

bruh no link embed

green kestrel
#

Source code for pig Latin pig_unamused

earnest phoenix
#

wait can you scramble strings in regex?

green kestrel
#

I disabled it with <> as I dont like GitHub embeds

earnest phoenix
#

smh

#

can i use your botum code

green kestrel
#

Yeah, the perl version from years ago used a regex to do pig Latin

#

Sure you can

earnest phoenix
#

even tho I'm not a c++ guy

green kestrel
#

It's Apache open source license

#

It should port easily to js

earnest phoenix
#

is it better to use d3.js for HTML5 games or should i do vanilla js and completely destroy myself

green kestrel
#

Always use a framework for game dev

earnest phoenix
#

like?

#

phaser?

green kestrel
#

For js and web games I can't advise, I make games in ue4

restive furnace
#

Well, I have made TicTacToe in React ¯\_(ツ)_/¯

earnest phoenix
#

free is typing

TypeError: free is a boolean you can't set it to a string dumbass
#

Always use a framework for game dev
otherwise you end up with something like minecraft with trash memory management and not properly creating, well, anything mmLol

#

otherwise you end up with something like minecraft with trash memory management and not properly creating, well, anything mmLol
@earnest phoenix please cease to exist 🙏 🙏 🙏 🙏 🙏

green kestrel
#

Minecraft is a poor example. There was no existing game engine or framework to make what was at the time a unique idea like that

earnest phoenix
#

unity existed

green kestrel
#

Use a framework or end up with Duke nukem forever.

earnest phoenix
#

what the absolute fuck Minecraft is perfect for what it is because making that hell awesome of a game without a framework is super cool

#

or bethesda

green kestrel
#

Unity doesn't work well for games like Minecraft, the way it allocates and chunks it's world don't mesh well with unity or ue4 as they aren't designed for dynamic world gen,.it's like bashing a bolt in with a sledgehammer

#

It's definitely doable, see pixark. Or don't, it's shit

#

What I'm saying is... Right tool for the job and only if there are no tools do you create one

restive furnace
#

Well, I have made TicTacToe in React ¯\_(ツ)_/¯
@restive furnace but if you want to make some game whats more native (executable), go with one of these: Unity, UE4, Godot, Panda Engine, BGFX (C++ Drawing Lib - Not Engine, MCPE was made with this), Construct4, Cocos 2dx or GDevelop. I have tried all of those, but ended up with making my own mmLol

earnest phoenix
#

guys stop everyone knows Minecraft is perfect better than Among Us

#

what the absolute fuck Minecraft is perfect for what it is because making that hell awesome of a game without a framework is super cool
minecraft is horrid, i went through the serverside code once and it's a disaster

the clientside shit like rendering is horrible too, luckily there's a new project called sodium that completely rewrites the rendering engine

#

minecraft is horrid, i went through the serverside code once and it's a disaster

the clientside shit like rendering is horrible too, luckily there's a new project called sodium that completely rewrites the rendering engine
@earnest phoenix why are you complaining that Minecraft is written in Java and C++

#

what

restive furnace
#

MC Java Edition is written in Java while MCPE is written in C++.

green kestrel
#

Minecraft's servers can't scale past 128 players. O(n^n) everywhere

#

Bedrock ones are a lot better. I mean java ones

restive furnace
#

Minecraft's servers can't scale past 128 players. O(n^n) everywhere
Well, how is there hypixel - with 80k players? on java edition? They probably have rewritten some of the servers code, but anyways

green kestrel
#

This is why the big java servers have queues

#

Hypixel: queues and shards

#

You'll never see an 80k user nick list

earnest phoenix
#

hypixel runs their own paper fork and scales to a bunch of mini servers

#

keep in mind that hypixel still has huge lag problems

#

that's partly their fault though they have such shit infrastructure

cobalt spruce
#

@boreal iron

boreal iron
#

The person you called is temporarily unavailable.

#

hmm what's up`?

cobalt spruce
#

@boreal iron man

#

I SPENT ALL DAY LOOKING IN DISCORD JS GUILD AND DOCS

#

I CANT DO THE HELP COMMAND

cobalt eagle
#

Hey

cobalt spruce
#

please man help ùe

#

me

lethal sonnet
cobalt spruce
#

@lethal sonnet I DID

earnest phoenix
#

I CANT DO THE HELP COMMAND
@cobalt spruce BECAUSE YOUR CODE IS WRONG BECAUSE YOU PROBABLY IGNORED LEARNING PROGRAMMING

lethal sonnet
#

@cobalt spruce so ?

cobalt spruce
#

@earnest phoenix BECAUSE IT WORKS

#

BUT ONLY I WANT TO MAKE IT AS EMBED
BUT I CANT

compact oriole
#

stop shouting ffs

cobalt spruce
#

IDK HOW TO USE DATA PUSH

earnest phoenix
#

@earnest phoenix BECAUSE IT WORKS
@cobalt spruce if it works why the fuck are you screaming over a help command

compact oriole
#

^^

earnest phoenix
#

IDK HOW TO USE DATA PUSH
@cobalt spruce learn...

cobalt spruce
#

@earnest phoenix # i want to do it embed

boreal iron
#

data push? told ya already data is an array and .push() adds elements to the array

#

tbh I don't even remember ur code and imma to lazy to scroll up

cobalt eagle
#

Just wanted to say a little something to everybody here, first thank you all for the help you gave me a little while ago, next just wanted to tell you all that no matter the errors you make in your code, no matter the obstacles, no matter the time you take to make things, no matter the failures, the hard times etc etc you are all doing great, all of you are doing great, from sernior bot creators that makes bot that are in billions of servers to people like me doing small bot for friends or for fun, everyone of you are great so don't give up, you can do it, have a nice day/evening/night and learn from your errors 😉

compact oriole
#

Just wanted to say a little something to everybody here, stop getting spoonfed

cobalt spruce
quartz kindle
#

but people need to eat

compact oriole
#

truu

cobalt spruce
#

data push? told ya already data is an array and .push() adds elements to the array
@boreal iron the words u said here ARE EPIC

#

THANKS MAN

#

back to work

cobalt eagle
#

and don't forget that everyone starts from the bottom before reaching the stars

boreal iron
#

oof? told u this already hours ago... lel

cobalt spruce
#

..

compact oriole
#

They start here getting spoonfed

cobalt eagle
#

true tho

compact oriole
#

so do not start here, start somhwere else

#

spoonfeeding is bad

cobalt eagle
#

but im trying to be kind and motivating

compact oriole
#

but if we demotivate people, shorter queue

#

so better for us LUL

cobalt eagle
#

Hkdbdksn

#

LMAOOO

#

true

#

on everyone my bot is gonna be tested in no time if you all stops coding

#

so pls remove your bots from top.gg and cut your hands to ensure that you won't code anymore

quartz kindle
#

LOL

cobalt eagle
#

ok nevermind it's been near 1 mounth so it is gonna be tested in not much time anyway

cobalt spruce
#

@boreal iron i wonder how i can add lines

boreal iron
#

I do remember it was .setFields ?!

open rune
#

yes

cobalt spruce
#

to put thoes commands

warm marsh
#

Could also used .join(',\n');

cobalt eagle
#

if you just want another line then .addField('field title', 'field text')

open rune
#

@cobalt spruce what are you trying to make?

earnest phoenix
#

Just wanted to say a little something to everybody here, stop getting spoonfed

but people need to eat
@quartz kindle lmfao

cobalt spruce
#

@open rune help command

open rune
#

what makes you stuck?

cobalt spruce
#

i want to make it line witch say
CommandName Command Usage

quartz kindle
#

add \n to the join

cobalt spruce
#

@open rune am stuck how i add the usage next to the name

warm marsh
#

Inside of the map

cobalt spruce
#

@quartz kindle thanks tim i did that

quartz kindle
#

do you have the usage written anywhere? like command.usage for example

cobalt spruce
#

do i do?
commands.map(command => command.name && command.usage).join(', ')

quartz kindle
#

that will just make it true

opal plank
#

oh god i did it

quartz kindle
#

use string concatenation or templating

cobalt spruce
#

am dum

#

dont push me hard men

open rune
cobalt spruce
#

sure

#

@open rune

opal plank
#

Tim, im mentally ready for a token revokation now

open rune
#

@cobalt spruce you can do this statically:

.addFields(
{ name: '🎲 Fun & Games', value: 'css\n'+ prefix() +'roll\n‏‏‎'+ prefix() +'coinflip‎[flip]\n‏‏‎ ‎\n‏‏‎ ‎\n \n', inline: true },
{ name: '\u200B', value: '\u200B', inline: true },
{ name: '🛠️ Utility', value: 'css\n'+ prefix() +'invite\n'+prefix()+'helphere[hh]\n \n \n \n', inline: true },
)

I give up, let it be...

quartz kindle
#

lmao³

opal plank
#

if that aint abuse idk what is

honest perch
#

\n\n\n\n\n\n\n\n\n\n\n

quartz kindle
#

you are an abuse

cobalt spruce
#

WTF

honest perch
#

@quartz kindle hello

#

how is your day

opal plank
#

lets watch twitch go down as i accidently dos them

quartz kindle
#

my day is ok lul

#

ty

earnest phoenix
#

send an image of your help command because discord formatting is so inconsistent WeSmart

quartz kindle
#

twitch wont even feel that

cobalt spruce
#

@open rune how i make my prefix as a function

#

?

quartz kindle
#

witch is still trying to edit the message lmao

cobalt spruce
#

.

earnest phoenix
#

this is why we bin our code

quartz kindle
#

wdym make your prefix as a function

cobalt spruce
#

prefix is not a function

#

error

#

lol

quartz kindle
#

lol

cobalt spruce
#

const { prefix } = require('../config.json');

honest perch
#

@quartz kindle im proud

quartz kindle
#

what are you trying to do

cobalt spruce
#

it was like this before

#

nah

honest perch
#

after 30 min i made a handler that supports custom commands

cobalt spruce
#

..

open rune
#

@cobalt spruce I took prefix of each guild.

cobalt spruce
#

ok

open rune
#

and I am trying to edit my code...

quartz kindle
#

thats why you dont copy/paste code

cobalt spruce
#

just wanted to say

#

Cannot read property 'join' of undefined

#

WTF

#

FOR REAL

quartz kindle
#

stop screaming lmao

cobalt spruce
#

commands.map(command => command.usage.join('\n'))

honest perch
#

TIM

quartz kindle
#

command.usage doesnt exist

cobalt spruce
#

module.exports = {
name: 'help2',
description: 'Ping!',
usage: 'pong?',

#

@quartz kindle

#

uhhhhhhhhhh

quartz kindle
#

commands.map means ALL commands have to have it

#

if one command doesnt, it will error

#

also, string.join() is not a thing

cobalt spruce
#

default dance

quartz kindle
#

you want the join() after the map, not inside it

cobalt spruce
#

where

#

after

quartz kindle
#

outside of the map

#

you want to join the result of the map

#

not join command.usage

opal plank
#

i believe this to be a befitting name for what im about to attempt

open rune
#

@cobalt spruce have you tried function?

function getList() {
var list = '';
list += commandList+'\n';
return list;
}

/** embed here **/
.addField('Album', getList(), false)

low shard
#

i try to install quick.db in another p

#

pc

#

but its say Error: Cannot find module 'quick.db'

#

i know

#

what is say

#

but i try

#

alot of ways to fix it

#

dont work

#

help?

earnest phoenix
#

you didn't install quick.db

low shard
#

i install

earnest phoenix
#

well you clearly didn't

quartz kindle
#

how did you install it?

low shard
#

npm i quick.db

quartz kindle
#

was the install successful?

low shard
#

lo

#

no