#development

1 messages · Page 1314 of 1

blissful coral
#

Yep

#

Tried my best

#

Js is just Better

#

¯_(ツ)_/¯

solemn latch
#

LOL

drifting wedge
#

lol

#

i mean js is complicated

#

i might do some js

#

but i want to finish my bot completly

blissful coral
#

I recommend it

#

More English then py lol

drifting wedge
#

then maybe do something else with js?

blissful coral
#

Yeah

#

Makes sense

drifting wedge
#

like some bot or something lol

#

maybe a dashboard for my bot?

blissful coral
#

Like filtering a bot is

#

if(message.author.bot) return

#

Lol

#

if(message.channel.type !== “dm”) return

#

Only take dms^

solemn latch
#

I kinda get context, kinda dont in py. probably still the biggest mystery to me.

#

I feel like its the py equiv of "this"

#

but at the same time its not

blissful coral
#

Py is really weird with the underscores and @s instead of just .s

drifting wedge
#

tho, i mean tbh my like goal is to work at discord lol

solemn latch
#

arrays are lists, but py also has arrays

drifting wedge
#

id be awsome to work MAKING like DSICORd

#

and also, everyone who ive seen, loves it there

blissful coral
#

I mean being a discord developer is not the same as a bot developer

#

At all

#

Lol

restive furnace
#

Stop it. Get some help. C++ is best. stopitgetsomehelp

blissful coral
drifting wedge
#

I mean being a discord developer is not the same as a bot developer
@blissful coral ik

solemn latch
#

scratch best language

drifting wedge
#

but making a bot is a way to learn

blissful coral
#

LOL

drifting wedge
#

like i now, know some python

blissful coral
#

Dude what do you mean binary is the best

quartz kindle
#

can python print entire objects?

blissful coral
#

Just code in binary

drifting wedge
#

like i saw on glassdoor, theyre like no bad reviews for discord lmao

trim saddle
#

@drifting wedge uhhh, what's your cog import look like

blissful coral
#

1s and 0s aren’t bad bro

drifting wedge
#

Just code in binary
@blissful coral i code in english

trim saddle
#

@quartz kindle *dictionaries

blissful coral
#

Python is far from English

#

Lmao

drifting wedge
#

@drifting wedge uhhh, what's your cog import look like
@trim saddle wdym, like ext import?

blissful coral
#

JavaScript closer tbh

quartz kindle
#

@trim saddle i mean, class instances

trim saddle
#

classes? i don't think so

drifting wedge
#

is java ever useful?

solemn latch
#

minecraft

blissful coral
#

Minecraft

restive furnace
#

can python print entire objects?
C++ can. ||But you need to overload operators||

blissful coral
#

Lulw

#

Making mods

quartz kindle
#

because like, his message instance is messed up, is there a way to print(message) so he sees what the fuck did message turn into?

blissful coral
#

.jar lulw

drifting wedge
#

but like for actual coding?

trim saddle
#

@drifting wedge is it something like from discord.ext import commands

restive furnace
#

but like for actual coding?
@drifting wedge NoChamp

#

Go for C# if you want to use java style language in real world.

drifting wedge
#

@drifting wedge is it something like from discord.ext import commands
@trim saddle yes

trim saddle
#

@quartz kindle most good class objects have __repr__ which is usually a string of data in the class

drifting wedge
#

its the same

trim saddle
#

commands.Cog.listener()

drifting wedge
#

oh

#

lemme try thay

earnest phoenix
#

I understand that i need to use the webhook to add the id to a database when someone voted

#

but what if someone voted when the bot is offlione

restive furnace
#

then it's your problem.

trim saddle
#

your bot shouldn't matter

#

if you have a webhook set up

sudden geyser
#

Go for C# if you want to use java style language in real world.
or kotlin

earnest phoenix
#

if you have a webhook set up
@trim saddle seperated from the bot

solemn latch
#

A lot of people also actually make secondary programs that only do the webhook and put it in the database

earnest phoenix
#

and then check the database for the id?

trim saddle
#

yes, ran seperately from the bot

solemn latch
#

lot more stable

#

yeah

earnest phoenix
#

smart smart

#

thanks guys.

solemn latch
#

then the only time it goes down is if the server goes down really

quartz kindle
#

@earnest phoenix a webhook server doesnt need to be connected to the bot

earnest phoenix
#

@earnest phoenix a webhook server doesnt need to be connected to the bot
@quartz kindle i understand

quartz kindle
#

you can make the webhook into a different process and just have it save to the same database that the bot uses

earnest phoenix
#

yes

restive furnace
#

or kotlin
or any C language. ||not really lmao, C/++ isn't same as C#||

quartz kindle
#

so if the bot goes offline, the webhook server will still receive votes

earnest phoenix
#

and save it to the database the bot acceses when its online later

quartz kindle
#

yup

earnest phoenix
#

👍

blissful coral
#

Or just have a separate instance of the bot that just has the webhook in it so if you want messages while it is down

#

So the second instance only has a webhook

quartz kindle
#

the difference between C/C++ and C# is that with C# you can see well, while with C/C++ everything is blurry and you need glasses

restive furnace
#

the difference between C/C++ and C# is that with C# you can see well, while with C/C++ everything is blurry and you need glasses
Sad I like manual memory management - eg.

#

are you allowed to have two different bot instances up as in two different programs? one program will handle specific commands and the other one will handle other commands.
@swift umbra use threads

silent cloud
#

Yo

sudden geyser
#

In C it's easy to shoot yourself in the foot

quartz kindle
#

@swift umbra yes you are allowed

silent cloud
#

Why write xrequire not defined?

#

const Tesseract = xrequire('tesseract');

sudden geyser
#

In C++ you have the possibility of blowing your whole leg off

#

But it's stronk

quartz kindle
#

@silent cloud what is xrequire lol

#

xrequire doesnt exist

restive furnace
#

In C++ you have the possibility of blowing your whole leg off

int main() {
    int array[5];
    array[69] // here you go free segfault
}```
silent cloud
#

I copied it from Bastion Bot code

snow urchin
#

Need someone to help me with canvas-constructor, ping me if you able!

silent cloud
#

Wtf

solemn latch
#

copy pasting is a bad idea 🤔

quartz kindle
#

dont copy code lol

silent cloud
#

If i need it ...

quartz kindle
#

@snow urchin dont ask to ask

sudden geyser
#

free I honestly can't tell if that's allowed to compile considering a lot of things you can do which look weird

silent cloud
#

Ohhh, maybe im wrong say, bcs i bad speak english

drifting wedge
#
2020-10-11 15:16:48.823 ERROR 22676 --- [           main] lavalink.server.Launcher                 : Application failed```
#

i get this when trying to run lavalink

silent cloud
#

I just tried to install Bastion at the request of the other, nothing changed

drifting wedge
#

help plezzz

#

should JAVA_HOME be into jdk or jdk/bin?

earnest phoenix
#

anyone mind explaining me what app.get('/', (req, res) => { does?

#

and where it is used for

sudden geyser
#

it defines an endpoint at /

silent cloud
#

still copying code off of the internet is bad unless it’s from stack overflow
@swift umbra bro, bastion code it made for your hosting, it special made for copy paste

sudden geyser
#

where / points to depends on what route namespace you may be in

quartz kindle
silent cloud
#

Thx

earnest phoenix
#

where / points to depends on what route namespace you may be in
@sudden geyser ok thanks lite

snow urchin
#

I am trying to make the background of this canvas a linearGradient using canvas-contructor, when I try to do it, it does not work, anyone know what to do?

quartz kindle
#

200,0,200,200 would make a 0 pixel line

#

you probably want 0,0,200,200

snow urchin
#

I will give it a shot

#

Made 0 difference

#

Still a blank bg

#

@quartz kindle Any idea's? (sorry for ping)

quartz kindle
#

idk

#

try with a hardcoded color

#

like red and blue

trim saddle
#

@snow urchin make the image in gimp 😳

snow urchin
#

what..

#

its an image that changes depending on certain data and colors

#

through nodejs

trim saddle
#

sounds like hella resources

snow urchin
#

its not

#

its simple canvas

#

its used in html too

quartz kindle
#

@trim saddle canvas is cheap af

#

as long as you dont make it too high res

trim saddle
#

do that so i can be right

quartz kindle
#

lmao

#

my bot generates canvases up to 4000x4000

#

in like 2 seconds

solemn latch
#

4000x4000 is discords limit too right?

quartz kindle
#

no

solemn latch
#

or was it 8000x8000

quartz kindle
#

discord's limit is 8mb

#

i think

#

you can make an 8000x8000 thats less than 8mb

slender thistle
#

jpg intensifies?

quartz kindle
#

my bot used to make them up to 8000x8000

#

but i lowered it to 4000x4000

#

because it would occasionally crash

drifting wedge
#
2020-10-11 15:16:48.823 ERROR 22676 --- [           main] lavalink.server.Launcher                 : Application failed```
#

i get this when trying to run lavalink?

#

shivaco, i removed ctx

#

but its still not wroking

#

its not getting the guild id?

slender thistle
#

send your code

solemn latch
#

did you log your message object like tim mentioned?

quartz kindle
#

i also added a font size option up with 500% which makes it hilarious

drifting wedge
#

1 sec

solemn latch
drifting wedge
#

the enitre thing?

#

its long af

#

@slender thistle

slender thistle
#

yes, use hastebin

azure siren
#
at RequestHandler.execute (/home/container/node_modules/discord.js/src/rest/RequestHandler.js:170:25)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:13) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:13) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
trim saddle
#

CODE BLOCKS

azure siren
#

I keep getting this

#

yeah sorry, it didn't work

trim saddle
#

it's literally ```

azure siren
#

I did that

trim saddle
#

either way you posted an error with no context

azure siren
#

I wanted to link some channels in a category

#

but I got this error

trim saddle
#

and your code is...

azure siren
#

uhh, lemme see

#

alright

drifting wedge
#

had an emergency

#

my bad

azure siren
drifting wedge
solemn latch
#

lol

#

this code wall

drifting wedge
#

@slender thistle my bad for the ping

#

the hastebin is above

slender thistle
#

Why are there 4 MongoClient's

flint yew
#

anyone know why getting this error in help.js for usage

#
usage(argString, prefix = this.client.commandPrefix, user = this.client.user) {
return this.constructor.usage(${this.name}${argString ?  ${argString} : ''}, prefix, user);
}```
#

it must give this usage: "ban @user reason",

drifting wedge
#

Why are there 4 MongoClient's
@slender thistle its complicated af

#

but bascially.....

#

this on message

sonic lodge
#

@flint yew you're missing backticks around the template literal: `

drifting wedge
#

ranks you up - gives you $ on the currency system

#

and gets the prefic

#

and also, it checks if u ping the bot

flint yew
#

@flint yew you're missing backticks around the template literal: `
@sonic lodge where u mean

drifting wedge
#

which then it sends you: hey, my prefix is: {prefix}

sonic lodge
#
(${this.name}${argString ?  ${argString} : ''}, prefix, user);
becomes
(`${this.name}${argString ?  ${argString} : ''}`, prefix, user);```
flint yew
#

@sonic lodge that the error

sonic lodge
#

that's the fix

flint yew
#

.addField('usage',search.usage)

#

this how i do it

sonic lodge
#

huh

flint yew
#

.addField(${search.name} Description:, search.description)

#

this working

#

but for usage not

sonic lodge
#

i showed you the fix

flint yew
#

okay

tardy hornet
#
case 'join':
      if(!message.guild.voicechannel)
      {
        if(!message.guild.voiceConnection){
            message.member.voicechannel.join()
            .then(connection =>{
              message.reply('Successfuly joined!');
            })
        }
      }
      else
      {
        message.reply("you must me in a voice channel to summon me!");
      }
      break;

too old to work right? 😦

drifting wedge
#

@slender thistle ? u there?

slender thistle
#

The user you have attempted to reach is dead. Please contact them when they seem alive enough to be bothered with Python.

drifting wedge
#

👌

#

how do i get the channel a message is sent in with d.py:

#

like the channel id:

#

wait, how do i send stuff with message.send?

#

ignore all above exept message.send

gentle lynx
#

pretty sure it is

opal plank
#

it aint

#

args is an array

#

you cant upperCase and array

gentle lynx
#

oh wait right

opal plank
#

you can upperCase a string

gentle lynx
#

i should've done args[0]

#

mb

#

ty

opal plank
#

np

gentle lynx
opal plank
gentle lynx
#

how can i check if a variable is an integer in node.js

opal plank
#

isNan() @gentle lynx

gentle lynx
#

i did this but its not even responding what

opal plank
#

not like that

#

args is an array

#

args[0] is either undefined or a string

#

you need to parse it first

gentle lynx
#

oh

opal plank
#

actually

#

my bad, i think isNaN works on string

#

lemme check rq

gentle lynx
opal plank
#

yes, you dont need to parse it

#

having it string format is fine

#

5f isnt a number

gentle lynx
#

ok so it replies when its not an int but it doesnt when its not

opal plank
#

55 is

gentle lynx
#

it doesnt respond

#

it should

#

can i show u the code

opal plank
#

isNaN() is Not a Number, its true when it ISNT a number

#

post it here

gentle lynx
#
/* eslint-disable no-return-assign */
module.exports = {
    name: 'heat',
    description: 'Heats an ore or a food in the furnace in return for money.',
    category: 'Main',
    usage: '[Item Name] [Amount]',
    aliases: [],
    execute(message, args) {
        if (!args[0]) {
            return message.reply(message.client.wrongUsage);
        }
        if (!args[1]) {
            return message.reply(message.client.wrongUsage);
        }
        if (isNaN(args[1])) {
            return message.reply(`The amount must be a number.`);
        }
        let item = args[0];
        item = item.toUpperCase();

        if (!message.client.items[item]) {
            return message.reply(`Item does not exist.\n\nNOTE: If the item name contains two words, type it without spaces, replace spaces with _.
For example: golden_apple`);
        }

        if (!message.client.items[item].heatFor) {
            return message.reply(`This item is not heat-able!`);
        }

        if (message.client.items[item].name.includes('Ore')) {
            const sql = `SELECT ${item} FROM inventory_ores WHERE ID='${message.author.id}'`;
            message.client.con.query(sql, (err, result) => {
                if (err) throw err;
            });
        } else {
            message.channel.send(`food`);
        }
    }
};
#

OH

#

wait

#

nevermind

opal plank
#

is NOT a number

gentle lynx
#

im dumb

opal plank
#

it returns true when it ISNT a number

#

reverse the signal

gentle lynx
#

it does respond

#

i forgot to put a message

earnest phoenix
#

Just a quick question
For JS is sharding hard? I been to mutiple websites but they all make it look so easy

gentle lynx
#

what signal

opal plank
#

lel

#

i mean signal as a bool

gentle lynx
#

yeah i want it to return when it's not a number

solemn latch
#

if your like erwin, sharding is hard

gentle lynx
#

im talking about args[1] not args[0]

opal plank
#

if you're erwin, you make your own sharding

earnest phoenix
#

It’s just a simple moderation bot so it doesn’t have any data storages

#

You could say it works like a static website

opal plank
#

sharding is more like splitting workload of guilds into different processes

#

having each bit(shard) take care of X amount of guilds

#

i think its 2.5 guilds per shard as of discord's standarts

earnest phoenix
#

If not they shut it down

solemn latch
#

2.5 guilds?

earnest phoenix
#

2.5k

opal plank
#

2.5k*

solemn latch
#

lol

opal plank
#

im drunk, gimme a break lmao

#

idk what you mean though eman

#

sharding is only needed once you got a ton of servers

earnest phoenix
#

Well yeah I but I don’t understand how to do it

opal plank
#

splitting processes to handle x amount of servers so your main process doesnt get bloated

#

your lib surely does it for you

#

so lets starts there

#

which lib do you use?

earnest phoenix
#

JS

opal plank
#

thats a language

#

not a lib

#

discord.js?

#

eris.js?

earnest phoenix
#

Discord.JS

opal plank
#

lemme pull the docs on sharding for ya

#

here you have it

#

like i said, most libs already have it handy for you,i just chose to do my own sharding due to lack of options

#

Twitch and youtube do NOT provide sharding, so i had to make my own

earnest phoenix
#

Ah so it goes by file

opal plank
#

trust me, you DONT wanna fuck with that, abuse as much as you can that the lib does the heavy lifting for you, sharding is a fine tuning process and quite complicated

earnest phoenix
#

Lol I can see how more advanced developers would want there own sharding tho

solemn latch
#

the hardest part of sharding in normal cases is making your code work across shards.
which a large portion of bots dont really need to do anyway

earnest phoenix
#

If I go by that website I would have to redo my bot completely

#

I use the old way of discord.JS

#

I prefer it

solemn latch
#

v11?

earnest phoenix
#

Yeah

solemn latch
#

v11 is deprecated and wont work forever

opal plank
#

^^

earnest phoenix
#

Yeah that’s why I would have to redo it

opal plank
#

you likely WANT to redo is asap

#

specially gateway intents

#

regardless of sharding

solemn latch
#

intents pogey

opal plank
#

you are on a very thin line rn by using v11

#

while v6 has been deprecated already, its not decomissioned

#

im currently just waiting for v13 to come out to port my code

earnest phoenix
#

Yeah I don’t develope much anymore since as soon as I finished my bot they came out with v12

opal plank
#

theres a guide if you wish, on how to port v11 to v12

solemn latch
#

unlucky timing

opal plank
#

there are very few breaking changes

earnest phoenix
#

Can you DM me the link

opal plank
#

i cna post it here, one sec

earnest phoenix
#

Yeah and after v12 came out I got very unmotivated

opal plank
#

just save that link

#

v13 should be coming any time soon

#

as v6 has been officially deprecated(but still the default one)

solemn latch
#

v12 is a lot more consistent in many ways.

opal plank
#

cant wait to fuck with v8

#

booze break, brb

earnest phoenix
#

Lol well I guess I will redo my bot :/

#

Only time I will be needing sharding tho is in v14 :0

solemn latch
#

99% of it probably doesnt need redoing

earnest phoenix
#

Who knows

solemn latch
#

its just adding .cache places mostly

opal plank
#

its more adapting , not re-doing

#

you should only need to re-do stuff if you feel like your bot needs a major optimization, v11 to v12 is mostly adding cache and updating some decpreated methods, not a major rework

#

basically reworks come from your own code, not from the lib itself. Lib updates from d.js seem fairly easy to fix

earnest phoenix
#

Yeah, looking at it, it looks like they simplefied it a lot

solemn latch
#

my og bot took like 30 minutes to swap everything over

earnest phoenix
#

It probably won’t take me very long

#

It’s just old ban and kick commands

#

Just a simple moderation bot for simple users

opal plank
#

ive scratched my code multiple times and started from scratch until i got a good and optimized code working, but that took multiple try and errors and LOTS of testing to see which was the most performant. I took the challenge to webscale my twitch bot, which has given me ample experience and confidence in my TS coding due to the fact i was able to create some rather amazing results comparing to whats currently on the market

earnest phoenix
#

Yeah lol it took me almost a year to get my bot where it was

solemn latch
#

i knew you programmed in scratch

earnest phoenix
#

Lol

opal plank
#

people who were in general chat saw how i was able to join over 100k twitch streams within 40 seconds with my sharding, when the library im using alone would do it in 14h by itself. My sharding has been proves so effective im thinking about installing it on my main production server

quartz kindle
#

i reduced a function processing time from 2 minutes to 6 seconds by changing vps and by splitting it into multiple processes

opal plank
#

^^^^^^^^

#

14h to 40 seconds, i cant even math out how big of a performance change that is

quartz kindle
#

xD

solemn latch
#

7%

earnest phoenix
#

xD

#

I'm using pm2, and even though i deleted process 2,3,4 - when i start a new process it's id is 5.

#

does that mean theyre secretly running in the background?

quartz kindle
#

no

opal plank
#

luckily i also got a ipv6 block with 26 ips in it, so i can hot swap them as needed to make sure im not abusing the api while still connecting a ton more processes onto it

quartz kindle
#

pm2 uses a database to store process information

#

and databases usually dont reclaim past IDs when they are no longer used

solemn latch
#

cant you get like thousands of ip's from that one company

#

for free

opal plank
#

im storing my processes on memory tbh, im just creating a unique name on them

earnest phoenix
#

ok ty thank

solemn latch
opal plank
#

my id is just slave + process number

earnest phoenix
#

my webhook is working now on my vps

#

connected to the database 😄

quartz kindle
#

you cant use the master/slave nomenclature anymore, because its racist

opal plank
quartz kindle
#

:^)

opal plank
#

i use that

#

why cant u use master/slave

#

its a befitting name

#

one works, one sit idle handling the income

earnest phoenix
#

Is it expensive to run a high end bot like that!

quartz kindle
#

lmao

earnest phoenix
#

?*

quartz kindle
#

what is your definition of high-end?

earnest phoenix
#

Like sharding wise

quartz kindle
#

like how many guilds?

earnest phoenix
#

So 2.5k servers or higher

opal plank
#

nah

quartz kindle
#

my bot is in 5k guilds, and i pay $3 per month

opal plank
#

if you dealing with 50k + i assume a bit

#

you'd need a powerful server with ram

#

unless you smort

#

and use dj-light

quartz kindle
#

:^)

opal plank
#

which doesnt require an insane amount of ram

#

free ads

earnest phoenix
#

Cause I know slav does around 100-300 a month American

opal plank
quartz kindle
#

<3

opal plank
#

lemme check my ram for comparison

solemn latch
#

djs lite cheater!

earnest phoenix
#

What host do you use?

opal plank
quartz kindle
#

im currently on galaxygate

opal plank
#

show ur stats timoty

#

flex on the ram usage

quartz kindle
#

lmao

opal plank
#

just eval process.memusage()

#

rss

earnest phoenix
#

So you’re bot is only in 67 servers? But you have almost 200k unique users

opal plank
#

indeed

quartz kindle
solemn latch
#

lemme pull mine up

opal plank
#

95k is from here, 30k is from dapi, and theres some rather big servers also using my bot

earnest phoenix
#

My bot is in 100+ servers but most of them are small expect this one

opal plank
#

my bot speciallizes for streamers, as its an all in one bot for all major streaming platforms, its mainly streamers that use it, which means i get a higher income than normal users

solemn latch
#

50 guilds, 150k users not counting this one

#

ish

opal plank
#

hold up

#

126???

#

thats human redable???

quartz kindle
#

i have 500k members, but none of them are cached xD

opal plank
#

mb?

quartz kindle
#

ye

opal plank
quartz kindle
earnest phoenix
#

Why is none of that cached

opal plank
#

my twitch one i can flex, i have no complaints over the twitch cache i put, 66k streams cached but i removed the user cache for this experiment

quartz kindle
#

because i disabled all caches

opal plank
#

usually it sits under 50mb

solemn latch
#

psh, your caching too much tim

opal plank
#

only thing cache in my twitch slave is streams

#

the users, as you can see here, make QUITE a difference

quartz kindle
#

i cache users, but not djs users, my custom user class

opal plank
quartz kindle
#

i also cache api responses for 24 hours

opal plank
#

200mb to 2000mb just with users alone

quartz kindle
#

xD

opal plank
#

though to be fair there are 1.7 mil users cached

#

while d.js has...

#

300k rounding up

#

so 600k would likely make up for the 2 mil ish i have on twitch

tardy hornet
#

hey, i have a full music command, i just dont have the command to make the bot join the vc lol

quartz kindle
#

then how do you know you have a music command? i mean how do you know it works

#

lmao

tardy hornet
#

hey, i have a full music command, i just dont have the command to make the bot join/leave the vc lol
@tardy hornet

#

then how do you know you have a music command? i mean how do you know it works
@quartz kindle i dont lol

opal plank
#

isnt it simply <channel>.join() ??

tardy hornet
#

idk

#

i dont think so

opal plank
#

i havent fucked with music whatosver, that seems one hell and a half to deal with to make something decent

#

you'd need lavalinka nd buy ipv6 blocks to route them

tardy hornet
#

lol

opal plank
#

otherwise you'll get ratelimited from youtube

#

theres a daily quota

#

proper music bots needs investment

#

not trying to disencourage you, just making it a fair warning that you'll need to put in some money if it grows

#

i dont think i can even disclose how Rythm does it since i got info thats not public

#

but its one hell of a nightmare

solemn latch
#

I always wondered what rythm pays for its servers

#

i know they have like 6 locations or something wild

opal plank
#

i dont know how much for the servers, but ive got info on how they deal with it internally

#

its a hellish nightmare i dont wanna have anything with

#

not even kidding

#

low end music bots and fun and good experience for a dev

quartz kindle
#

lmao

opal plank
#

high end music bots are costly, profitable and one hell of a nightmare

#

thats about all i can say

tardy hornet
#

@solemn latch rythm just hit 10m servers

earnest phoenix
#

rythm is a dumpster fire

solemn latch
#

as in the servers they rent from a host @tardy hornet not the number of guilds

tardy hornet
#

@solemn latch

opal plank
#

my server can likely run 40% of that without overdoing

solemn latch
#

with music?

opal plank
#

yeah

quartz kindle
opal plank
#

i had to think my hardest to put a dent on its network/process

#

like, legit SHIT CODE

quartz kindle
#

i mean

opal plank
#

the owner of the cluster dared me to make shit code and put a dent on that server

#

and so i did

quartz kindle
#

all you need to do is while(true){}

#

in 1000 threads

#

lmao

opal plank
#

within 4h iirc

#

175 bil tuple scans on the database

#

i completely used ONE core

#

ONE

#

O-N-E

solemn latch
#

gimmie one core plox

quartz kindle
#

i mean

solemn latch
quartz kindle
#

if it completely used one core

opal plank
#

one core and a half

quartz kindle
#

then its not multithreading at all?

opal plank
#

it is

#

thats the worst part

#

but iim taking values as %

quartz kindle
#

if it were multithreading it should use like 20% of each core, not max out one

opal plank
#

it was split, but i used up 8% of the total

#

here

#

i was using htop

#

it gives me a % overall value

#

while its split, i can check how much the processes were using

#

from the total, it was using 8%

earnest phoenix
#

this gives me ptsd from when i was working with music and i did a recursion method on accident that spawns a new thread everytime its called ThisIsFine

opal plank
#

i think it has 32, lemme doube check

quartz kindle
#

gib me your machine

opal plank
#

also i lied, not 26 ipv6's, its 29

#

i think those values are outdate

#

im fairly certain its 5gigabits now

earnest phoenix
#

scalable

quartz kindle
#

how fast is your disk again?

opal plank
#

hmm good question actually

quartz kindle
#

run nix-bench

opal plank
#

lemme open putty rq

solemn latch
#

psh bitvise

opal plank
#

can i even do that on linux?

#

lemme send a dm to the host rq

#

one sec

quartz kindle
#

curl -sS https://raw.githubusercontent.com/jgillich/nixbench/master/nixbench.sh | sh

tardy hornet
#

isnt it simply <channel>.join() ??
@opal plank

case 'join':
      message.user.channel.join()
      break;```
@opal plank lol the closet i got
opal plank
#

i just asked the owner of the host about it

quartz kindle
#

@tardy hornet remove user

solemn latch
#

message.user.channel?

quartz kindle
#

and add member.voice

opal plank
#

give it like 10 min, she answers rather quickly

#

but still, this host is insanely good

#

i wouldnt be able to webscale this twitch bot that easily if it wasnt for it

quartz kindle
#

is it from a hosting company?

#

or private

opal plank
#

i think its private

tardy hornet
#

=js case 'join': message.member.voice.channel.join() break;
@quartz kindle like that?

quartz kindle
#

yes

tardy hornet
#

oh

#

let me just edit that real quick

opal plank
#

what i DO know is that its a google one

tardy hornet
#

done

quartz kindle
#

a google one? holy hell

#

jesus

#

thats like 500 bucks a month

opal plank
#

it even has its own backup power gen, i remmber this shit being hella over the top

quartz kindle
#

or more

#

just.. why

opal plank
#

indeed, im really grateful the owner let me use it

#

she didnt have much purpose for such a powerful machine, so she asked me to dent it

quartz kindle
#

can you run nixbench on it? i sent you the command

opal plank
#

lemme try

quartz kindle
#

^ty

opal plank
#

the curl worked

#

whats the next one

#

ngix something something

quartz kindle
#

there is no next, it should auto run it as soon as it downloads

tardy hornet
#

@quartz kindle

case 'leave':
            message.member.voice.channel.leave()
            break;

thats for leave then?

opal plank
quartz kindle
#

meh

#

those are really bad

tardy hornet
#

yo tim

#

is it true?

quartz kindle
#

yes

tardy hornet
#

ok ty

solemn latch
tardy hornet
#

well 2 things left now, make that if the user isnt in the channel the bot wont join,

and to test my music command

#

and i got no idea how to do the first one

earnest phoenix
#

check if the voice property is defined

#

if it is, you may join

opal plank
#

it seems its not really that good on write speeds

earnest phoenix
#

if it isn't scream at the user

tardy hornet
#

oh

#

ok ty

#

@earnest phoenix

earnest phoenix
opal plank
#

whats weird to me is that it pulled the other test barely in hours

quartz kindle
#

this is mine

solemn latch
quartz kindle
#

but it makes sense being google

solemn latch
#

thonk

opal plank
#

AES and Gzip seems higher on mine

quartz kindle
#

google's disks are suck

opal plank
#

though im not gonna lie, i have no idea what they mean

quartz kindle
#

cryptography and compression

#

gzip is compression performance, AES is encryption performance

#

sha256 is hashing

opal plank
#

hashing is important though not as much for me

quartz marsh
#

cojudos

opal plank
#

there are some stuff im having to hash

quartz kindle
#

they are all cpu intensive operations hence why they're used to measure cpu performance

quartz marsh
#

pls magik @quartz kindle

quartz kindle
#

wat

opal plank
#

wot[

quartz marsh
#

me largo de aqui

opal plank
quartz marsh
#

sip por?

opal plank
quartz marsh
#

ok chao cojudos

tardy hornet
#

wait, @earnest phoenix can i just else it?

or its not working like that

opal plank
tardy hornet
#

or its not working like that

opal plank
#

there we g o, dealt with

quartz marsh
#

xd

opal plank
#

anyway Tim, this host is hella powerful

quartz kindle
#

but yeah its a pitty google's disks are so bad

opal plank
#

its been handling 80k per 15secs fine

#

i should likely update my graph since its technically wrong

#

im updating values every 15 secos

quartz kindle
#

i still have google's free forever machine, the f1-micro with 600mb ram, disk speeds there are 35MB/s lmao

quartz marsh
#

sjekhq88293788qwye nm3djisszskmdedfejbonjuroto 0wmc+qnwxdmmemierdsa mc'icraki mather fuckejee03jnfihrejwmo-n|1d 0cxnnn89819982892

earnest phoenix
#

@tardy hornet

if(vc variable)
  //defined
else
  //undefined
opal plank
#

320K messages/m

#

not accounting for the other shit

#

@split hazel can you warn @quartz marsh pls? trolling

solemn latch
#

did you ever get a bot running on it @quartz kindle

quartz kindle
#

ye

solemn latch
#

how did it go

quartz kindle
#

my bot was on it until like 1500 guilds

solemn latch
#

tf

opal plank
#

35mb/s? LMAO

quartz kindle
#

yup

solemn latch
#

probably should be recommending it a bit more then

opal plank
#

okay i see where you coming from now

quartz kindle
#

ye google is great to start with, much better than glitch/heroku/replit

solemn latch
#

yep was typing the same thing

opal plank
#

from my standarts those speeds are fast, though i assume they arent good for the upscaling standarts im going for

solemn latch
#

but for a starter bot platform?

#

no reason to use anything else imo

quartz kindle
#

my problem is that my project relies on an old C code from 1988 or something

#

that does a shit load of file reads

opal plank
#

YIKES

quartz kindle
#

so i need disk speed

#

for example i have a feature that needs to scan 20k+ small files

solemn latch
#

oldest project code

opal plank
#

400'ish mb/s, thats a bit more than double of what i got

tardy hornet
#

@earnest phoenix wdym by vc variable?

quartz kindle
#

which is the one that tool 2+ minutes in google

earnest phoenix
#

your voice channel var

opal plank
#

thats interesting though

split hazel
#

@quartz marsh please don't

quartz marsh
#

ഗർഭിണികളുടെ മക്കൾ

opal plank
#

i mean, i guess you can blame it on that, most of the stuff i had to do wasnt readily available for me

#

can you not port the code to js?

split hazel
#

-m 748242384378396764

gilded plankBOT
#

🤐 Muted Gatosensei#9638 (@quartz marsh)

opal plank
#

ty speedy

quartz kindle
#

no, the thing is like 50k+ lines

opal plank
#

hmmm

quartz kindle
#

and does lots of cpu intensive stuff

opal plank
#

is it fine to have such code integrated with the bot?

quartz kindle
#

its still being updated today, last update was a few months ago

opal plank
#

the one area i dont have experience with is integrating multiple languages in one bot

quartz kindle
#

but the whole thing is designed to work on files

#

i modified it a bit to allow for some functions to be called on strings instead of files

#

but i cant do that for all of them

opal plank
#

hmmm i see

#

i love seeing this kind of stuff, as a dev, i mean

#

i dont plan on only sticking with Ts/js

#

so seeing that kind of integration intrigues me

quartz kindle
#

i dont plan on moving out of js

#

lmao

#

i mean, integrating C/C++ in node.js is not that big of a deal, node.js has tons of tools to do it

opal plank
#

even some of my close group of friends use Ts nowadays after spending years on other langs such as Cpp, c#, rust and some others

#

among them includes people with 40+ years of coding, and a couple ex/current discord emplyees, i take their opinions very seriously

#

even though im confident in my Ts skills, i know for a fact ive yet to learn from all of them

#

C++ seems an unbailable tool for devs

quartz kindle
#

ye

#

being able to link C/C++ to node.js is one of its strong points

#

this way you can access tons of old but gold code standards and algorithms

#

the shit that every single thing out there relies on

opal plank
#

what i aim for is possibly try to port that code, but the fact that it hasnt been done before shows me 2 paths;
1- its not doable
2- its not as performant

#

so im a bit stuck between the cross and the sword

#

hoping to accomplish everything in one language but then wanting to learn other langs

quartz kindle
#

some code is simply unportable, or rather it would be way too hard to port it

opal plank
#

its a bit scary to jump into another lang and revive the noob days of js/ts, the amount of shit you get for being a newbie is insane

tardy hornet
#

i wanted to do it somehow diffrent

opal plank
#

re-living that thing over again is a bit of a concern imo

tardy hornet
#

if(!what do i put here) return message.channel.send('please join a voice channel first.')

#

i had couple of stuff to put

#

none of them worked

quartz kindle
#

if(!message.member.voice.channel)

#

g2g eat

opal plank
#

i remember back in the days where i had to ask what is a varible? what is an array? if i havent been blessed with such good people that commited to helping me as a new dev to learning, i dont think i would've been where im at

#

thinking about learning a whole new lang with new people is a scary though, to put it bluntly

#

the amount of shit you USUALLY**** get is insane

#

there are very big exceptions to that if you put the commitment into it

gritty bolt
#

I'm trying to run this but I keep getting the error messageReminderModel.find(...).forEach is not a function in mongoose. I'm trying to find everything with no filters, can anyone help?

    (await messageReminderModel.find({}).forEach(data => {```
misty sigil
#

(await messageReminderModel.find({})).forEach(data => { ?

gritty bolt
#

it'd help if I showed more probably my bad

misty sigil
#

no

gritty bolt
#
const messageReminderModel = mongoose.model('messageReminder', module.exports.messageReminderSchema);```
```js
//Node-Scheduler Function
nodeSchedule: async function scheduler() {
try {
    (await messageReminderModel.find({}).forEach(data => {
        let currentUnix = Date.now()
        if(data.time <= currentUnix) remindUser()
        schedule.scheduleJob(data.time, remindUser);
    console.log("Scheduled a reminder.");
}))
} catch (err) {
    console.log(err);
}
}
}```
misty sigil
#

just put a closing bracket after before .find

gritty bolt
#

wait thats it?

misty sigil
#

should be

gritty bolt
#

now I'm getting

    at Object.scheduler [as nodeSchedule] (C:\Users\Samst\Desktop\RemindMe\core.js:96:43)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)```
misty sigil
#

shit

#

no

#

its before .forEach

#

im stupd

gritty bolt
#

works now, thanks

#

oh one more issue

#

I'm getting TypeError: Cannot read property 'on' of undefined at Object.messageReminderAdd (C:\Users\Samst\Desktop\RemindMe\core.js:18:9) at Object.<anonymous> (C:\Users\Samst\Desktop\RemindMe\index.js:82:6) at Module._compile (internal/modules/cjs/loader.js:1138:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10) at Module.load (internal/modules/cjs/loader.js:986:32) at Function.Module._load (internal/modules/cjs/loader.js:879:14) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12) at internal/main/run_main_module.js:17:47
When trying to run js bot.on('messageReactionAdd', async (reaction, user) => {
"bot" is defined as js const index = require('./index'); const bot = index.bot

misty sigil
#

let me see what you're exporting from index

gritty bolt
#

bot is saved in my module.exports as so js module.exports.bot = new discord.Client(({ partials: ['MESSAGE', 'CHANNEL', 'REACTION'] }));

opal plank
#

why you saving your bot under a module export?

gritty bolt
#

i have functions in another file that I need to use it in

opal plank
#

while it should work, it'd be mostly best to have it on the index where the main/master stuff should happen

#

since client is a master piece of your bots code

gritty bolt
#

yeah

#

i'm trying to have a core.js file with the 3 core functions

#

so my index.js isn't huge

delicate zephyr
#

i feel that tbh

opal plank
#

while this isnt a requirement nor a necessity of your code, i'd highly recommend putting your client declaration on your index.js

delicate zephyr
#

Nah Erwin

misty sigil
#

i feel that

#

but theres a easier way to do it

delicate zephyr
#

I do the same thing

#

its literally personal preference

opal plank
#

index should contain your major assets

misty sigil
#

i made all my client stuff, events, command loaders etc

#

i made them all functions

opal plank
misty sigil
#

that i pass the client to

gritty bolt
#

how do I do it?

delicate zephyr
#

I mean yea, as a standard but if you wanna make your life easier with your own standard

#

if you're working alone it shouldnt matter

opal plank
#

again, i mentioned that

#

its not related to error

#

just as good practice

#

creating your client is the major and most important part of most of your code

delicate zephyr
#

I mean, Index.js should never have everything

#

one file things are just stupid

sacred cypress
#

I only see one issue here

opal plank
#

having it declared on your index should be the most important thing

sacred cypress
#

js instead of ts

delicate zephyr
#

Elian

sacred cypress
#

ts > all

opal plank
#

^^

#

u can code in js, just google luck handling errors

#

its much better for fix errors before you even compile your code

#

buts that just personal opinion, just like what i mentioned above

gritty bolt
#

creating your client is the major and most important part of most of your code
@opal plank i do this in my index file

opal plank
#

you may very well code in Js if you so wish, im not gonna judge

sacred cypress
#

It's okay Luke

#

I'm nobody

gritty bolt
#

i just need to use the variable in my other file

sacred cypress
#

I can't even connect to my postgres db

opal plank
#

@gritty bolt thats the thing, your index should serve as the dispatcher(aka, your main file) to dispatch it to other events, if you require it on one file, you'd need to chain it on a then() onto it, since its a major keystone of your project

#

require() is a promise iirc

#

so you'd have to wait for it to complete before running the rest of your code

#

thats why declaring it on your index is a major_++

gritty bolt
#

well

opal plank
#

i dont mean attaching extra things on your client, but the simple fact of declaring you client on your index

gritty bolt
#

does anyone know how to fix my issue

opal plank
#

unless its a module, it should be in there

gritty bolt
#

but didnt I declare it there though?

opal plank
#

like i said, you need to await it

gritty bolt
#

so like with an async function?

opal plank
#

which is what i meant byt .then()

#

require() is a promise

#

wait for its completion

#

i MAY be wrong, i just checked the code, its NodeRequire(), it might be hoisted

#

it seems weird that it'd resolve in sequence

gritty bolt
#

so pretty much the reason it's coming up as undefined is because I haven't waited for it to load yet?

opal plank
#

aka sync

#

lemme check one thing rq

#

well my compiler isnt screeching, so i assume its a promise

#

do call me on that if im wrong though

gritty bolt
#

ok i still really dont get how to actually fix this

opal plank
#

simple : await it

#

though you'd need to .then() it

gritty bolt
#

and then it'll stop coming up as undefined?

opal plank
#

lemme double check code, one sec

earnest phoenix
#

Red kinda sus idk

opal plank
#

try requiring {bot} right away

gritty bolt
#

didnt work

opal plank
#

module export should export a whole object

#

containing the exports

gritty bolt
#

i'm defining that here though I thought

const index = require('./index');```
#

unless i just dont know how to define it

#

which i wouldnt be suprised if i didnt

opal plank
#

try js const { bot } = require('./index.js'); bot.on() ...

gritty bolt
#
const discord = require('discord.js');
const ms = require('ms');
const { index } = require('./index.js');
const mongoose = require('mongoose');
const schedule = require('node-schedule');
const bot = index.bot```
```C:\Users\Samst\Desktop\RemindMe\core.js:7
const bot = index.bot
                  ^

TypeError: Cannot read property 'bot' of undefined```
opal plank
#

use what i said

#

not bot

#

{ bot }

#

module.exports exports an object

#

if you want a property inside of it, use { }

gritty bolt
#
const discord = require('discord.js');
const ms = require('ms');
const { index } = require('./index.js');
const mongoose = require('mongoose');
const schedule = require('node-schedule');
const { bot } = index.bot```

C:\Users\Samst\Desktop\RemindMe\core.js:7
const { bot } = index.bot
^

TypeError: Cannot read property 'bot' of undefined
at Object.<anonymous> (C:\Users\Samst\Desktop\RemindMe\core.js:7:23)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Module.require (internal/modules/cjs/loader.js:1026:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (C:\Users\Samst\Desktop\RemindMe\index.js:3:14)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47
[nodemon] app crashed - waiting for file changes before starting...

opal plank
#

what?

solemn latch
#

still wont work

opal plank
#

legit

#

copy paste what i said

#

you arent using what im saying

gritty bolt
#

im so confused though

opal plank
#

copy this

#

thats basically it

solemn latch
#

your reqesting index, when you named it bot

opal plank
#

you are not doing what i told you to

gritty bolt
#

but isn't that requiring the file?

opal plank
#

also make sure core is your main file

gritty bolt
#

core isn't my main file

#

core is a seperate file

opal plank
#

it should

gritty bolt
#

it contains 3 functions

#

index is my main file

opal plank
#

then why require index when index is your main file?

gritty bolt
#

because i need my bot varaible

opal plank
#

its like requiring Not Erwin from Not Erwin

#

pass it around

gritty bolt
#

how?

opal plank
#

in a function

solemn latch
#

function sayHelloToWoo(client) {}
sayHelloToWoo(client)

opal plank
gritty bolt
#

im just storing functions in a seperate file

#

then running them in my index.js

opal plank
#

functions? fine

#

i do the same

gritty bolt
#

to keep it more tidy

opal plank
#

but CLIENT is an important key of your file

gritty bolt
#

nothing is actually happening in there other than function storage

#

i need to use my client variable though in my functions

#

so I need to find a way to pass my client variable into them

solemn latch
#

you pass it in the function itself

#

(client)

gritty bolt
#

so js messageReminderAdd: async function messageReminderAdd(bot) {...?

opal plank
#

even i have stuff imported from other files

#

theres a PROPER way of doing it

#

delcaring your MAIN client isnt a good idea, whatosever

#

i'd HIGHLY recommend delcaring it on your index

solemn latch
#

I define my client in my index and pass it via the function

opal plank
#

^^^^

#

which is what most of us do

gritty bolt
#

so like what I did above?

opal plank
#

check the guide i sent you for commands in different files

gritty bolt
#

oh

#

wait

#

im stupid

solemn latch
#
const Discord = require('discord.js');
const client = new Discord.Client({ ws: { intents: ['GUILDS', 'GUILD_MESSAGES', 'GUILD_MESSAGE_REACTIONS'] } });
const { InitClient } = require(`${process.cwd()}/custom_modules/client/initClient`); // Loads all the commands
const initClient = new InitClient(client, Discord);
#

is how i handle mine

drifting wedge
#

wuts the best vps and most reputable?

gritty bolt
#

I use AWS

solemn latch
#

digitalocean probs

gritty bolt
#

highly recommend them

opal plank
#

there isnt one

drifting wedge
#

$ price isnt really an issue, but reputability is

solemn latch
#

most known for vps

opal plank
#

its preference

#

just like which lang is better

#

some vps offer better prices

#

some are free but limited

#

some are expensive but offer really high end hardware

#

it depends on your needs, just like a lang

gritty bolt
#

Google Cloud has free t2.micro servers

#

AWS EC2 has them for 12 months

drifting wedge
#

when would i need to move out of heroku?

solemn latch
#

i am looking for a dedi with a gpu 🤔

drifting wedge
#

cuz like servers =! usage

misty sigil
#

i'd move out of heroku asap

#

because you can

  1. host your own db clusters
#
  1. host more than one thing
#

etc

gritty bolt
#
const { InitClient } = require(`${process.cwd()}/custom_modules/client/initClient`); // Loads all the commands
const initClient = new InitClient(client, Discord);```
would you mind explaining to me what this is doing?
solemn latch
#

actually getting a real ip is nice

gritty bolt
#

this looks like what I want to do

#

but i dont really understand whats going on

solemn latch
#

its where i define my message events

#

startup events

#

etc

misty sigil
#

it passes the client into the thing

gritty bolt
#

okay

solemn latch
#

and im just passing it the client and the discord lib

opal plank
#

when would i need to move out of heroku?
@drifting wedge when you care about user experience, as heroku doesnt offer 24/7/30 experience, its 27 days a month iirc

#

welp, time to go back reading

drifting wedge
#

@drifting wedge when you care about user experience, as heroku doesnt offer 24/7/30 experience, its 27 days a month iirc
@opal plank i have 2 accounts KEKW

opal plank
#

@quartz kindle lemmme know if you wanna continue that discussion

solemn latch
#

idk how, but my system 32 folder opened

#

randomly

obtuse wind
#

Take convos to #general v don't know how system32 is related to development

solemn latch
#

development can be development conversations

earnest phoenix
#

k

pure lion
#

Is there a way to do music filters on ffmpeg e.g nightcore, bass boost etc

sand shore
#

sooo i added this among us bot and when you start a game it makes a new channel. Then I ended the game and its supposed to delete the channel but it like glitched out. Now when i try to delete the left over stuff I cant and its bugged. If anyone intelligent would like to help i can send server link and u can help. thanks

pure lion
#

I'm not intelligent

#

What's your lib

sonic lodge
#

you need to ask the developer of the bot on their support server

sand shore
#

what is that

pure lion
#

Oh it's not your bot

#

Jajajajaj

#

Wrong server

sand shore
#

well its not so much a problem with the bot just that i cant delete the channel

#

but couuld be a bot problem idk

pure lion
#

We aren't discord support

sand shore
#

🤷‍♂️ i have no where else to ask

solemn latch
#

the person who made the bot

sonic lodge
#

ask the developer of the bot on their support server

thick raven
#

Does anyone have a among us bot that can auto mute in discord when the game starts, then unmutes in emergency meetings etc

sand shore
#

yes but broken lmfao

solemn latch
#

you where answered in #support @thick raven

pure lion
#

Is there a way to do music filters on ffmpeg e.g nightcore, bass boost etc
@pure lion ooooohhh ooooohhh ooooohhh ooooohhh ooooohhh

misty sigil
#

Does anyone have a among us bot that can auto mute in discord when the game starts, then unmutes in emergency meetings etc
@thick raven no that’s impossible

sand shore
#

no its possible

#

there are a bunch

pure lion
#

Among us may have a feature like that in the future but I highly highly doubt it

sonic lodge
#

maybe possible if you Inject the DLLs™️

thick raven
#

this guy says it works tho

solemn latch
#

they do work, but you need to have your own bot yourself

#

on your own pc

#

which requires work

thick raven
#

Not sure if I'm down to doing that bai

earnest phoenix
#

there are bots that connect to your game

#

which takes away one slot

thick raven
#

Yeah ik

#

do you know any of those?

earnest phoenix
#

isn't there one in that reddit thread

pure lion
#

cry are you aware of how to do audio effects on ffmpeg?

earnest phoenix
#

uh

#

isn't it just applying an argument

thick raven
#

I really don't know how to use reddit

pure lion
#

I have no idea where to look for documentation

sonic lodge
#

it's just a message board

earnest phoenix
solemn latch
#

also, why dont people just give out a role and then mute the role

#

or you know, find friends who are not 11 and can actually be quiet

earnest phoenix
#

my solution was to just build a small UI to mute all people in a vc

#

there's also a way to keep that one slot free but you need to host the bot on your pc with the among us game; reading memory

#

since among us is unity it's extremely easy to read memory and find the game state

#

however that won't help you identify which player is which in discord

blissful coral
#

How do I get guild count with broadcastEval and sharding?

solemn latch
#

I think you want to use fetchClientValues not broadcastEval for that

blissful coral
#

Ok

#

Have this:

#
const getServerCount = async () => {
  // get guild collection size from all the shards
  const req = await client.shard.fetchClientValues('guilds.cache.size');

  // return the added value
  return req.reduce((p, n) => p + n, 0);
}
#
client.user.setActivity(`${getServerCount} Servers!`, {type: "WATCHING"})
solemn latch
#

should do

earnest phoenix
#

I'm needing help with intents

blissful coral
#

getting object promises @solemn latch

earnest phoenix
#

I've specified the intents my bot is going to be using in the code, and i've enabled it on the discordapp.com/developers page.

const client = new Discord.Client({ ws: { intents: ["GUILDS", "GUILD_MEMBERS", "GUILD_WEBHOOKS", "GUILD_MESSAGES", "DIRECT_MESSAGES"] }});
#

And it still says that I can't add it to other servers because of the lack of intents

blissful coral
#

Is your bot verified?

earnest phoenix
#

yea

solemn latch
#

is it verified with that intent?

blissful coral
#

^

solemn latch
#

ie did you request it

earnest phoenix
#

idk because it didn't ask me intents on the verification form

solemn latch
#

it should have

sonic lodge
#

all the way at the bottom

earnest phoenix
#

Fuck, I don't remember what I put then

solemn latch
#

f

#

might have to contact discord support

gritty bolt
#

I keep getting
ReferenceError: Cannot access 'user' before initialization
with this code

const user = await user```
solemn latch
#

what is this supposed to do?

blissful coral
#

because you are asking for making user with user

gritty bolt
#
bot.on('messageReactionAdd', async (reaction, user) => {
    console.log(reaction);
    if(reaction.emoji.name === "⏰") {
        let errorEmbed = new discord.MessageEmbed()
        .setTitle("An error has occured. It has been reported to the development team for further review.")
        .setColor("#FF0000");
        const messageLink = reaction.message.messageLink
        const user = await user
        let timeEmbed = new discord.MessageEmbed()```
sudden geyser
#

Where did you define user in the past.