#development

1 messages · Page 1807 of 1

opal plank
#

there are 2 objects in the array

#

each is an action row

#

inside each action row, i have buttons

quiet pawn
#

i see now

#

i thoughbt you meant like

#

make 2 rows like i have there then

message.channel.send('Message', row, row2)
opal plank
#

nah, its all part of the same message object]

#

i hate that format to be completely honest

cinder patio
#

Wait Erwin weren't you against message embed builders, now ur using button builders 😬

opal plank
#

cuz they parse the emojis for me

cinder patio
#

🤔

tired panther
#

lol

opal plank
#

<a:name:id> => {animated:true, name: name, id:id}

quiet pawn
#

lol

cinder patio
#

ah

opal plank
#

not like embed builders who do nothing but bloat

cinder patio
#

I mean you can make a function which does this

opal plank
#

notice how im not using actionRow() helpers

#

just the buttons

quiet pawn
#

i use old embed system for js

opal plank
#

could yeah, but the lib already has it

#

im willing to lose a few microseconds there for that extra parsing

#

the others are just there for consistency

#

so its not half builder half manual

#

also, feud, i think you were the one asking how i ported the reaction collector to buttons

#

thats how i did it lmao, you can literally see my old reactions in there as customId's

#

insanely easy port

#

that was about it

viral spade
#

Hello, i have disabled the PRESENCE intent for my discord.js bot. Now i randomly get these errors. Anybody knows how i can fix? I thought about disabling the INVITE intent too, although i thought about using it in the future.

viral spade
dense flame
#

I think its because of the missing intent

viral spade
#

which one?

lyric mountain
#

not necessarily, it means you're trying to access id of an undefined variable

#

that stacktrace helps little since it's all internal calls

dense flame
viral spade
#

yeah

dense flame
#

Hm.

lyric mountain
#

is that all of the thrown stacktrace?

quartz kindle
#

what djs version are you using?

viral spade
#

12

quartz kindle
#

full version

viral spade
#

not sure

quartz kindle
#

run npm ls

lyric mountain
#

did you disable the intent both on the dashboard AND the client builder?

viral spade
#

just here

quartz kindle
#

do you do anything to your channels? delete them from the cache or something?

earnest phoenix
viral spade
quartz kindle
#

oh jeez

#

thats super outdated

#

latest stable is 12.5.3

viral spade
#

so i put "12.5.3" in my dependencies?

quartz kindle
#

just run npm install discord.js

viral spade
#

i did

dense flame
#

npm i discord.js@12.5.3

viral spade
#

maybe in dependencies it translates "12" to 12.0.x ?

quartz kindle
#

techincally it should be ^12 in deps

#

so it always gets latest v12

viral spade
#

ok so i will put '^12'

quartz kindle
#

if you uninstall it and reinstall it, it does that by default

#

you can also do what cosmic said to install a specific version

earnest phoenix
#

npm i discord.js@latest or npm i discord.js@12.5.3 should work

viral spade
#

isnt it better to put into the package.json?

quartz kindle
#

does specifying 12.5.3 removes the ^ from package.json tho?

earnest phoenix
#

Probably, as you're installing a specific version

quartz kindle
#

you can put it in the package.json, but that wont do anything by itself

#

you have to actually run npm install

earnest phoenix
#

You gotta run npm i after putting it inside package.json

#

yea

quartz kindle
#

also sometimes your package-lock will override it

viral spade
#

so i did npm install before npm ls

earnest phoenix
#

I think its better for you to do a clean install, which means you gotta remove both of the package-lock.json file and the node_modules folder and run npm i

viral spade
#

that sounds nice

quartz kindle
#

i usually just do npm uninstall djs then npm install djs

earnest phoenix
#

That would work, I recommended that just in case if any of their other installed dependencies are outdated as well

quartz kindle
#

run npm outdated

viral spade
#

ok i will try that later, for now i have to let my bot run because users get pissed.
I guess i can excpect that updating will break other functionalities too?

quartz kindle
#

possibly but most of it should be fine

#

djs is not known for doing breaking changes on non major versions

#

check the release docs

viral spade
#

ok thank you very much so far. at the moment i have the shards starting up with the "disabled invites intent try", but later i will test it with the new update in any case.

quartz kindle
#

👍

lament rock
#

npm update is cool

earnest phoenix
#

too cool, but sometimes it could be overrided so it refuses to update to the latest versions

#

Clean installs drake

lament rock
quartz kindle
#

klin

sinful narwhal
#

<Message id=862355849417719839 channel=<TextChannel id=272764566411149314 name='development' position=11 nsfw=False news=False category_id=355951029025636362> type=<MessageType.default: 0> author=<Member id=180112943612952577 name='Tim' discriminator='2373' bot=False nick=None guild=<Guild id=264445053596991498 name='Top.gg' shard_id=None chunked=False member_count=186793>> flags=<MessageFlags value=0>>

#

<Message id=862355855580332092 channel=<TextChannel id=272764566411149314 name='development' position=11 nsfw=False news=False category_id=355951029025636362> type=<MessageType.default: 0> author=<Member id=812465886098620476 name='mmmax' discriminator='0003' bot=False nick=None guild=<Guild id=264445053596991498 name='Top.gg' shard_id=None chunked=False member_count=186793>> flags=<MessageFlags value=0>>

quartz kindle
#

lol

#

selfbot?

sinful narwhal
#

<Message id=862355897871237160 channel=<TextChannel id=272764566411149314 name='development' position=11 nsfw=False news=False category_id=355951029025636362> type=<MessageType.default: 0> author=<Member id=812465886098620476 name='mmmax' discriminator='0003' bot=False nick=None guild=<Guild id=264445053596991498 name='Top.gg' shard_id=None chunked=False member_count=186793>> flags=<MessageFlags value=0>>

#

<Message id=862355909413044234 channel=<TextChannel id=272764566411149314 name='development' position=11 nsfw=False news=False category_id=355951029025636362> type=<MessageType.default: 0> author=<Member id=180112943612952577 name='Tim' discriminator='2373' bot=False nick=None guild=<Guild id=264445053596991498 name='Top.gg' shard_id=None chunked=False member_count=186793>> flags=<MessageFlags value=0>>

quartz kindle
#

@rustic nova

sinful narwhal
#

<Message id=862355930044956712 channel=<TextChannel id=272764566411149314 name='development' position=11 nsfw=False news=False category_id=355951029025636362> type=<MessageType.default: 0> author=<Member id=180112943612952577 name='Tim' discriminator='2373' bot=False nick=None guild=<Guild id=264445053596991498 name='Top.gg' shard_id=None chunked=False member_count=186793>> flags=<MessageFlags value=0>>

rustic nova
#

LOL

quartz kindle
#

lmao

rustic nova
#

amogus

#

a

#

b

#

c

#

d

#

e

#

f

#

g

sinful narwhal
#

<Message id=862355940207230986 channel=<TextChannel id=272764566411149314 name='development' position=11 nsfw=False news=False category_id=355951029025636362> type=<MessageType.default: 0> author=<Member id=812465886098620476 name='mmmax' discriminator='0003' bot=False nick=None guild=<Guild id=264445053596991498 name='Top.gg' shard_id=None chunked=False member_count=186793>> flags=<MessageFlags value=0>>

rustic nova
#

-b 812465886098620476 selfbotting

gilded plankBOT
#

dblMod Banned mmmax#0003 (@sinful narwhal)

opal plank
#

is that js?

viral spade
#

Just for your info, disabling the GUILD_INVITES intent worked as for removing that error i posted further up. (Will still update the version soon)

opal plank
#

the fuck is that

tired panther
#

Does anyone knows a api, which creates transcripts in form of html as from Ticket messages?

solemn latch
#

👀 that seems very specific to something your doing.

tired panther
#

true, I want to add a ticket system for my server...but the transcript are important

lyric mountain
lyric mountain
#

html is just text

earnest phoenix
#

hey

lyric mountain
#

arnold

earnest phoenix
#

I'm getting this error: xl MongoError: MongoClient must be connected before calling MongoClient.prototype.db

modest maple
#

yes yes

lyric mountain
#

you can't access mongoclient before connecting it

earnest phoenix
#

Here's my code: ```js
require("dotenv").config({path: "path/to/.env"});
const uri = process.env.DBPASS;
const MongoClient = require("mongodb").MongoClient;
const mongo = new MongoClient(uri, {useNewUrlParser: true,useUnifiedTopology: true});
let bname = "Beyblade"

mongo.connect(err => {
console.log("MongoDB connected for Beyblade.js");
});

setInterval(() => {
mongo.db("main").collection("ids").updateOne({_id: bname}, {$set: {latest: datas[bname].latest}});
}, 600000);

const ids = mongo.db("main").collection("ids")
//const id = ids.find({});

class Beyblade {
constructor(name, type, image, firstOwner, id){
this.name = name;
this.type = type;
this.image = image;
this.firstOwner = firstOwner;
this.level = 1;
this.xp = 0;
this.specials = [];
this.passives = [];
this.aliases = [];
this.gen = 1;
bname = name || this.name;
if(id) this.id = id;
else {
if(this.name !== "Buddy Bey"){
}
}
}
async init(){
return true;
}
}

module.exports = Beyblade;

#

The commented part is where the errror lies

#

I believe it's already connected

lyric mountain
#

no it's not

earnest phoenix
earnest phoenix
lyric mountain
#

afaik database-related stuff aren't synchronous but async

#

so it doesn't necessarily wait for the database to connect before moving on

earnest phoenix
#

I see

earnest phoenix
quartz kindle
#

do you know callbacks work?

earnest phoenix
#

I've never really worked with them a ton

quartz kindle
#

according to your code, mongo.connect takes a callback function

earnest phoenix
#

yes

quartz kindle
#

meaning inside that function is where the database is ready

#

outside is not

viral spade
#

do members in voice channels automatically get cached in discord.js?

#

like, on startup?

quartz kindle
#

yes i believe so

#

you have an array of voice states on the initial guildCreates

#

not sure if they include full member/user data tho

viral spade
#

ok thx

earnest phoenix
quartz kindle
#

that would be one option yes

earnest phoenix
#

what's another option?

#

i don't believe that is a good idea

quartz kindle
#

why not?

earnest phoenix
#

well

viral spade
earnest phoenix
#

alr

quartz kindle
#

btw why are you using mongo there?

#

your class is not using it at all?

latent heron
#

I have a question regarding infrastructure internally on a website that involves the back-end reading the HTML "skeleton" contents and replacing string values of {0} or etc. in the actual website application. Would this be a sound method? (Comments added in the code to explain what functions do.)

include_once __DIR__, "/vendor/autoload.php";
use App\Infrastructure\Internal\Skeletons\SkeletonController;

const SERVER_ADDR = "localhost";

# Class::__construct() asks for the HTTP route and page to read.
$webpage = new SkeletonController(SERVER_ADDR, "/index.html");
$tags = ["{0}" => "title"];

# Class::modify() is a basic str_replace() but for tags and formatting.
foreach($tags as $tag => $val) { $webpage->modify($tag, $val); }
echo $webpage->getContent(); # Class::getContent() is string return.
#

@green kestrel 🙏🏻 i ask for your master PHP guidance

#

because I know a lot of platforms use front-end and such ie. React, Express and etc. to handle this but I want to do it internally because with PHP scripting I can do this for things such as 1-page form checks, data tables being displayed, etc.

royal herald
#

My discord bot is made of html,can someone help me?

pale vessel
#

What part do you need help with?

earnest phoenix
#
async function connect(){
mongo.connect(err => {
  console.log("MongoDB connected for Beyblade.js");
});

setInterval(() => {
  mongo.db("main").collection("ids").updateOne({_id: bname}, {$set: {latest: datas[bname].latest}});
}, 600000);

const ids = mongo.db("main").collection("ids")
const id = ids.find({});
const datas = {};
Promise.all([id]).then(data => {
  let beys = data[0];
  beys.forEach(bey => {
    datas[bey._id] = {
      latest: bey.latest,
      name: bey._id
    }
  });
  console.log("Updated data!");
});
};
opal plank
#

im pretty damn sure connect() returns a promise

#

and dont use forEach()

earnest phoenix
#

why not?

opal plank
#

also what the heck

#

why did u make ur code async if ur code is sync

lyric mountain
#

but it does have some overhead since you're creating single-use anon functions

green kestrel
#

I tend to keep my markup mostly in one file and code on the other and just pass vars between, basically model view controller

latent heron
#

i see

latent heron
humble rock
#

Why i got that error?

latent heron
#

but it's a bit odd of an idea to me to do that

#

because there's certain elements i'd like to be able to dynamically control on based server events, esp. if i want something like an account system on my website

lean reef
#

Someone know if sharding will fix that my bot takes 4min to ban one user on 250 servers?

lavish bramble
#
const msg = client.channels.cache.get("836870311923417118").messages.fetch("862383984511418388")

console.log(msg)

Its giving me nothing

royal herald
#

@rustic nova

rustic nova
#

Wtf I banned them tho

#

Discord stink

opal plank
#

ratelimits arent handled per shard, they are handled per token

humble rock
lean reef
opal plank
lean reef
#

You got any other idea that could fix it?

opal plank
#

theres nothing to fix

#

its a limitation

lean reef
#

Sike

humble rock
opal plank
#

the error

#

read it

humble rock
#

Cannot send an emty message, but the embed isn't empty

opal plank
#

you cant send a message without content

#

it is

#

add a content or embed to it

#

you are DEF sending something empty

#

otherwise it wouldnt throw u that error

#

it might not even be coming from there

rustic nova
opal plank
#

if they are in the server already, no

rustic nova
#

Oh yeah forgot about that

lean reef
#

They aren’t yet

opal plank
#

i assume you doing something like banning a user in all servers they are in

#

you gotta respect ratelimits or you'll be ratelimited, nothing that can be done there

#

maybe add helper bots

rustic nova
#

If they aren't present in a certain server, just ban them from that server once they attempt to join

opal plank
#

but thats kinda stupid imo

rustic nova
#

Yeah ik

opal plank
#

i meant my own thing

#

for helper bots

lean reef
opal plank
#

they still gotta deal with the servers they are aready in, but yeah

#

for future proofing

#

add that person as blacklisted

#

and check every join

lean reef
#

Cause that right there would mean that months of work and hundreds of dollars just got wasted

opal plank
#

did u spend hundreads of dollars on a bot that doesnt even properly ban users?

lean reef
opal plank
#

it is tho

#

hire a competent dev

lean reef
#

I did

opal plank
#

most bot devs are hobbists with less than 6 months of experience

lean reef
#

Well competent for my budget

opal plank
#

hundreads of dollars doesnt fit in the "idk how to handle bans"

#

but regardless

#

what SHOULD have been done is what hope said

lean reef
opal plank
#

ban the users in the servers they exist, and then add that user to a blacklist. on new member join, check if that user is on the database blacklisted, if so, ban them

#

no need to ban that users on all 250 servers your bot is in

humble rock
#

im not seeing nothing empty in the embed, i did messege.channel.send(embed) so it has to send the embed

opal plank
#

just gotta ban them on the 4 or 5 they are ACTUALLY in

opal plank
lean reef
#

Website, NDA’s, dev, staff, and so on

opal plank
#

neither of those are hard tbh

#

specially if u are using boilerplates

lean reef
opal plank
#

of course

lean reef
#

Oh

opal plank
#

just make sure to cache or fetch all members

#

cache if u have spare ram

lean reef
#

You are giving me hope

opal plank
#

fetch if u dont

lean reef
#

Got 750 mb ram

opal plank
#

/guilds/guildId/members/id

#

then you dont wanna cache

#

thats too little to keep all users cached

lean reef
#

Ok

opal plank
#

i cannot believe i managed to load that website

lean reef
opal plank
#

yes?

#

cuz you'd know if they are in the server or not

#

rather than banning them in a server they might not ever go to

lean reef
#

I am not a dev, that’s why I am asking this stupidly

#

Ok, makes sense

humble rock
opal plank
#

read the rest

#

actually i have a pic up here somewhere

humble rock
#

same error

opal plank
#

a debugger wont magically fix code for you duude

#

it'll help you FIND the bug

#

hence the name, debugger

#

gotta love that d.js doesnt throw u where the request was made

lean reef
opal plank
#

aight, gl

earnest phoenix
#

anyone know what this is?

lyric mountain
#

an error

opal plank
#

an error /s

lyric mountain
opal plank
earnest phoenix
lyric mountain
cobalt dawn
#

i dont get any erros in the terminal

lyric mountain
#

that is technically an error

#

how are you getting those counts?

cobalt dawn
#

I guess currently not xD

lyric mountain
#

currently not what?

cobalt dawn
lyric mountain
#

bot.users.cache.size

humble rock
#

add a .cache. between every users and size

cobalt dawn
#

Thanks works now

odd sapphire
#

How would I leave servers that are below 50 members? (discord.js)

earnest phoenix
#
client.guilds.cache.forEach((v,k,m)=>{
if(v.memberCount<50) {
v.leave();
};
})
#

don't forget to Implement cooldowns

odd sapphire
#

alr thx

lyric mountain
#

side note: that's a bad practice that'll put your bot's reputation in mud over time

earnest phoenix
#

You could Implement uncaching for small guilds

lyric mountain
#

he's probably not verified yet for resorting to such measures

odd sapphire
#

someone made like 40 servers with no members

#

to bring me to 100 server limit

lyric mountain
#

oh

#

why don't u just leave servers created by that guy?

quartz kindle
#

lol

#

thats some next level trolling

#

just get the guy's id and leave all guilds where the owner matches his id

odd sapphire
odd sapphire
#

Ehh

#

It's the only time I'm ever doing this

lyric mountain
#

if people add your bot, they expect to have it stay there

#

even if it's only 1 time

#

doing that is bad for your reputation

odd sapphire
#

Mk

#

Thanks

lusty quest
#

i would rather leave Bot Servers

#

they like to collect for no reason a stupid amount of bots

quartz kindle
#

yeah definitely leave bot farms

boreal iron
#

i would rather leave Bot Servers
Yeah and it’s easy to do
Just check if the server name contains specific words (like bot etc.)
Additional checks like bot member count > member count makes sense, too

lyric mountain
#

actually, check if count > member * 2

#

I've met legit servers of people who didn't have a clue what bot they wanted and added a shitton of them

#

later on they did remove unnecessary bots

limber mica
#

Does anyone have any bot feature ideas? Im too retarded to think of them.

odd sapphire
#

I'm asking for a friend, is a globalban command against discord tos? Banning someone in 250+ guilds that aren't owned by the bot owner

limber mica
#

Unless OWNERS permission

odd sapphire
limber mica
#

That is a major TOS violation

limber mica
earnest phoenix
#

how do I apply to get my bot veridied

odd sapphire
limber mica
limber mica
lyric mountain
#

you cant massban even with owner consent

#

that's api abuse

limber mica
odd sapphire
lyric mountain
limber mica
lyric mountain
#

doing something too much in a short timeframe is against tos

limber mica
#

@lyric mountain You got any ideas for bot features?

#

I need em

lyric mountain
#

yk what they say, good ideas are priceless

#

I doubt someone will give 'em openhanded

limber mica
#

god dammit

odd sapphire
limber mica
#

No, go find it yourself @odd sapphire If your too lazy to do it then just get banned

odd sapphire
limber mica
lusty quest
limber mica
limber mica
lusty quest
#

then i cant help you, bcs it could be to much

limber mica
lusty quest
#

using AI to do stuff like Voice Recognition

limber mica
lusty quest
#

nah

limber mica
lusty quest
#

last time ive used tensorflow js it used like 50-80mb

#

i know its possible, but you sort of want to do stuff with the voice recognition

limber mica
#

What API did you use?

lusty quest
#

lol API

limber mica
#

IDK

lusty quest
#

ive wrote my own AI

#

sure ended up in an internal API, but anyways

limber mica
#

I have 0 clue how to write an AI

lusty quest
#

this is why ive asked how hard you want the suggestion

limber mica
#

im looking through now

#

does not look that hard

#

wait

#

i scrolled down ;-;

boreal iron
limber mica
#

besides from the death part

lusty quest
boreal iron
#

Knew it

#

…need to travel into the past and stop you. oldEyes

lusty quest
#

nah, the bot is already dead

limber mica
lyric mountain
#

people try too much to have new ideas instead of thinking what people need

#

business rule #1 is: your product must fulfill someone's necessity

limber mica
#

I need fun features. That is why im asking the general population to get ideas people WANT or NEED

sudden geyser
#

That's a question better solved yourself.

limber mica
sudden geyser
#

The services many people use today are derived from others' work (inspiration) or original ideas by a single person or small group. The idea wasn't crowdsourced.

eternal osprey
#

hey

sudden geyser
#

While you think you can't answer it since you're the owner, users won't know what they want.

#

So it's up to you to figure it out.

eternal osprey
#

i actually forgot how to create an exe file for my js script.

#

is there any documentation or tutorial online?

sudden geyser
#

JavaScript is an interpreted programming language.

#

You don't build an executable off of it.

#

Unless you're wack

eternal osprey
#

woopsie

#

i guess it would be easier for people who didn't have any programming experience

sudden geyser
#

If you're using Node.js, for example, you run a file with node ./file.js

eternal osprey
#

to just boot up an exe instead of debugging and starting it etc.

#

yeah that is also possible

sudden geyser
#

It really depends.

lyric mountain
#

just like big business do

sudden geyser
#

There are advantages in categories like interpreters, transpilers, compilers, and virtual machines.

#

The big advantage of projects compiled to machine code is the user needs less of the software, but it may also be larger, harder to port, etc.

lyric mountain
#

make a market research, see what has too much offer and what has too much search

sudden geyser
#

For the most part, it depends on who's running the software. If it's just you, using any on the list is fine since you're the only one paying the price. If it's on a user's computer, you should consider what you want from your users.

eternal osprey
#

how can i catch a certain error, such as: bla bla bla is not iterable, and instead of that, actually logging something else too.

#

Like how can i detect a certain error

lyric mountain
#
try {
  // try doing something
} catch (error) {
  // handle error here
}
sudden geyser
#

You'd catch the abstract error and try to validate it. However, JavaScript errors are generally not made for machines to interpret, so users choose to do something on any generic error (Kuu's example) over trying to parse the error and see what it's about.

eternal osprey
#

would that just require an if statement after i caught it

lyric mountain
#

catching an specific error might be hard since js is non-typed

eternal osprey
#

aha okay

sudden geyser
#

But the best programs are those that don't require try/catch logic

eternal osprey
#

got em, won't do it then. Thanks guys!

eternal osprey
prime mist
sudden geyser
#

I just check the state

#

You wouldn't just pass a user's first argument to fetch by ID. You'd parse the ID and see if it failed

prime mist
#

Not sure if I follow...

#

What would you do if this fails:

const user = await fetchUser(id);
lyric mountain
#

basically you need to guess what error will pop inside the scope

prime mist
#

BTW I don't use try / catch either, but curious to see what others do.

lyric mountain
#

try-catch in js is quite rare given almost everything is async

prime mist
lyric mountain
#

and stuff a try-catch might grab are obvious errors

lyric mountain
prime mist
#

You will still need to put a conditional on the result if you wanted to short circuit the flow.

#

Which is the same as a catch block really.

#

But I think using .catch would make the code read better.

lyric mountain
#

it's more streamlined and you'll be dealing with each promise individually

#

also helps locating where the error happened

sudden geyser
# prime mist What would you do if this fails: ```ts const user = await fetchUser(id); ```

I would treat it as a generic error and say the user couldn't be fetched. Let's think of args[0]. Maybe you have an isSnowflake function that returns true/false if it's a snowflake.

The genericness comes from the error returned from await fetchUser(id). Did Discord fail? Did the user exist? Was the ID rejected regardless of my isSnowflake function? The goal is to avoid making assumptions.

I don't like try/catch/finally since it interrupts the flow of the program imo. It's very bulky, verbose, and allows for multiple errors of different types to be caught. Some languages make it easier to tell the source of it (e.g. a Rust enum)

prime mist
#

But as I was saying, you would still need if statements or something:

const result = await fetchResult().catch(console.error);
if (!result) return;

try/catch, not quite as nice IMO:

let result: Result;
try {
  result = await fetchResult();
catch (err) {
  console.error(err);
  return;
}
#

Or you rethrow the error with a more useful message.

prime mist
limber mica
#

Im very retarded right now

#

Im trying to add a variable im outputting from a for loop to another variable, how do i add them to one another over and over so the output of ALL the for loops is added up?

green kestrel
#

so in my discord lib im going from current version 1, to the next release being version 9.
this is because im changing my major version to always match the version of the discord library the lib is using.
this means that when the next release comes out with threads support, officially the discord api version will be 9 so the next version of D++ is 9.0.0. the minor and patch version numbers are based on the features we add and fixes we make still.

anyone think this may be confusing to users, seeing us jump from 1.0.3 to 9.0.0? i think its going to take some explaining in the readme and in the release announcement?

#

i ask because no other discord libs are using this version numbering scheme and i think it makes some sense to

sudden geyser
#

Some explaining would be fine

#

Java did the same thing you're doing.

green kestrel
#

theirs was based on a year though, wasnt it, or something? or a language standard version?

quartz kindle
#

does c++ have a package manager? the only reason for sticking with proper semver is because most package managers will never auto-update major versions due to breaking changes. If you put breaking changes on a minor version and then your package manager autoupdates it, it will crash your process

green kestrel
#

C++ as a language does not, no

#

theres a non-standardised mish mash of platform specific package systems such as vcpkg, chocolatey etc

final obsidian
#

whatcha think

green kestrel
#

all with different versioning policies

quartz kindle
#

it think its fine for the most part

final obsidian
#

Written in Node

quartz kindle
#

just be very clear whenever you push a breaking change

green kestrel
#

yeah

#

well generally, an api change is a breaking change

quartz kindle
#

ye

#

but sometimes there could be a breaking library change

#

if an idea comes up, if a change of direction happens

#

etc

sudden geyser
final obsidian
sudden geyser
green kestrel
#

this will be fun.... new caching controls in D++, lets see how low i can get a triviabot cluster to run at

#
                /* Set cache policy for D++ library
                 * --------------------------------
                 * User caching:  none
                 * Emoji caching: none
                 * Role caching:  aggressive
                */
                dpp::cache_policy_t cp = { dpp::cp_none, dpp::cp_none, dpp::cp_aggressive };
                /* Construct cluster */
                dpp::cluster bot(token, intents, dev ? 1 : from_string<uint32_t>(Bot::GetConfig("shardcount"), std::dec), clusterid, maxclusters, true, cp);
quartz kindle
#

nice

#

btw where do you store your caches again? unordered_map of structs?

green kestrel
#

yes

quartz kindle
#

do you use a pool allocator or something like an malloc replacement for allocating thousands of small things?

#

or just the regular malloc/new?

errant flax
#

wait if i changed my js file to ts wouldn't that work KEKA

wheat mesa
#

Huh

errant flax
#

such a dumb idea but if i rename the file and replace .js to .ts wouldn't that work lmaoCry

#

idk why i thought such of a dumb thing

wheat mesa
#

I mean... it depends?

prime mist
#

Without strict mode it should work.

errant flax
#

what is strict mode?

vivid fulcrum
#

i hate working on other people's code

#

a client on fiverr asked me to fix a bug in a js bot

#

and uh

#

this entire code is one big bug

errant flax
errant flax
prime mist
errant flax
#

oh hmm

#

anyways lemme do a quick discord bot login with ts

prime mist
#

I think without any configuration set, it is turned off to start with.

errant flax
#

anyways time to make a new app

prime mist
quartz kindle
#

inb4 runs node index.ts

errant flax
#

ye lol just realized

errant flax
#

oh ok ts gave me an error which i didnt noticed KannaPog

pale vessel
vivid fulcrum
#

yupp

green kestrel
#

nice, 142mb for a 10k guild cluster and a million users, thats one hell of an improvement 😄

lavish bramble
#
let m 
client.channels.cache.get("836870311923417118").messages.fetch("862383984511418388").then(msg => m = msg).then(() => {
  setInterval(() => {
    m.edit(embedG(client))
  }, 5000)
})
}
async function embedG(client){
const embed = new MessageEmbed()
.setTitle("**Bot Status**!")
.addField("**Guilds**:", client.guilds.cache.size)
.addField("**Users**:", client.users.cache.size)
.setColor("RANDOM")

return embed
}```
Error: cannot send empty message
pale vessel
#

Use m.edit({ embed: embedG(client) })

lavish bramble
#

Then
Error: embed[0].description is required

pale vessel
#

Are you using the master branch?

lavish bramble
#

How to check that?

#

And my
Djs v is 12.5.3

lament rock
long crow
#

Anyone know good alternative aside from jikan api? sometime I feel it slow as tortoise

pale vessel
#

Official MAL API

#

I personally use Jikan as it offers more info and I never had problems with it

#

Also, check out AniList GraphQL API. It's also really great and faster than Jikan

long crow
#

reading anilist documentation is a little daunting for me, like jikan doc more straight forward, but thanks for reply

#

Which version you on btw? @pale vessel I meant the jikan api version

pale vessel
#

v3

long crow
#

hmmm, on v4 right now, maybe I should downgrade to v3 KEKW

green kestrel
#

i need to retain caching of those three to do permissions checks

#

ive changed the settings to not cache users, with users and emojis cached it takes about 320mb

green kestrel
#

has the colour of the bot developer role changed?

#

it seems... brighter

long crow
#

It's mean most of them have Brighter Brain now

#

I'll show myself out

amber thistle
#

how would i start typing my css code?

#

like do i need to do

// my desc

<style>
.class name {
  ...
}
</style>
solemn latch
#

yeah, that works

amber thistle
#

aight thanks

#

is it possible to make particles?

#

cuz i dont think we can make html elements

#

could u link me a docs to that?

solemn latch
#

for css?

amber thistle
#
<style>
body {
 background: url("https://imgur.com/BVJsaGq.jpg");
 background-size: cover;
 background-attachment: fixed;
 opacity: 1;
}

.modal-background {
 background: none;
}

.entity-content, .centered {
 border-radius: 5px;
 background: rgba(0, 0, 0, 0.724);
}

.site-nav {
 background: rgba(0, 0, 0, 0.764);
}

code {
 color: #fff;
 font-weight: 600;
 font-family: Overpass,-apple-system,BlinkMacSystemFont,Segoe 
UI,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;
}
</style>

for some reason when i added these 2 lines border-radius: 5px; , .centered the site does not update my css, it overwrites it

#

oh wait nvm

#

i dont know why but there was a # in the url

flat copper
#

Can I do like if any command is executed then bot reacts to his own message?

dense flame
#

That's possible

flat copper
#

How?

twilit geode
#

are these links a discord feature or is it automatic

long crow
#

It's been out for few months? now

twilit geode
#

ok yea but is it automatic; or do I have to tell it to link or smthn

long crow
#

You need to provide it link etc

twilit geode
#

docs?

long crow
twilit geode
#

ty

quiet pawn
#

damn

#

the difference

#

from djs to djs light

#

lol

crimson vapor
#

you should have shown it at like 10 hours of uptime tbh

quiet pawn
#

i probably will stic k with djs light

#

for a while

crimson vapor
#

not 37 seconds

#

cc @opal plank

quiet pawn
#

usuage

crimson vapor
#

members and messages

quiet pawn
#

ill do an update with djs light when i get around 10 hours

opal plank
#

who darethn pongeth me

crimson vapor
#

fuck

#

wrong one

quiet pawn
#

ik but still

crimson vapor
opal plank
crimson vapor
#

replying to myself is so hard

opal plank
#

avdertising

quiet pawn
# opal plank if u care that much use detritusjs instead

well i dont that much but i like the small difference and all i had to do was add -light and

const client = new Discord.Client({
  cacheGuilds: true,
  cacheChannels: false,
  cacheOverwrites: false,
  cacheRoles: false,
  cacheEmojis: false,
  cachePresences: false,
  cacheMembers: true
});
opal plank
crimson vapor
#

watching anime

opal plank
#

well, yk'now how it goes

#

discord.js shit, detritus good

#

bla bla

#

anyway im out

quiet pawn
#

well im using light now i onl didnt before because statrcord

#

only supports offical libs

#

but i stopped using statcord

opal plank
#

detritus IS an official lib btw

#

ayway, bye

quiet pawn
#

lol

#

ad momnet #69 ?

crimson vapor
#

¯_(ツ)_/¯

#

everyone does it

#

bd?

#

fl0w uses better discord?

crimson vapor
waxen bough
#

djs/master they remove user.presence i wonder why

pale vessel
#

When you mod your client to make it look uglier

earnest phoenix
#

I'm getting this error: xl TypeError: Cannot read property 'run' of undefined
I'm not sure why. Here's my code -
index.js:js if(testForNumber == 0) { let spwn = client.spawns.get(spawn); spwn.run(message, prefix, db, available, client); }
spawnsystem.js:js module.exports.run = async (message, prefix, db, available, client) => { console.log("hi"); }

#

Of course, there is more, and if you have questions I'll answer it to the best of my abilities. Any help I'm grateful for and is welcomed.

opal plank
pale vessel
#

message.content.toLowerCase().has("detritus")

opal plank
boreal iron
#

poor Erwin

earnest phoenix
earnest phoenix
tulip cradle
#

Cmd handler whatt

earnest phoenix
#

when you say -help then the bot will say "This command doesn't exist"

#

how do u do dat

flat copper
#
Module:
module.exports = {
  cross: "<a![crosss](https://cdn.discordapp.com/emojis/844939715816063024.webp?size=128 "crosss")862535909550587925>",
  tick: "<a![tick](https://cdn.discordapp.com/emojis/787564306602524703.webp?size=128 "tick")862537918130946059>",
  music: ""
}
Index:
client.emojis = require("./utils/emojis")

Command:
Module.exports = {
//data
run(){
message.channel.send(client.emojis.tick)
}
}

Error : its giving me undefined

opal plank
#

commands that dont exist should not reply

earnest phoenix
#

Oh

#

it's against tos or..

opal plank
#

otherwise anything you'd do - for will reply with that

#

no, its just a dumb thing to do

earnest phoenix
#

ohh

opal plank
#

read this

earnest phoenix
#

How do i stop console saying errors

opal plank
#

check if a command exists first

earnest phoenix
#

When i type an invalid command I'm having errors on console. i need to stoo that cuz my bot restarts for some reason.

#

Example when misspelled

errant flax
#

just return it

opal plank
#

we dont magically know what you're doing

#

you either post ur code or figure out urself

earnest phoenix
#
  <rejected> TypeError: Cannot read property 'catch' of undefined
      at Object.run (/src/user/app/commands/disconnect.js:21:24)
      at module.exports (/src/user/app/events/message.js:36:13)
      at Client.emit (events.js:375:28)
      at MessageCreateAction.handle (/src/user/app/node_modules/discord.js/src/client/actions/MessageCreate.js:31:14)
      at Object.module.exports [as MESSAGE_CREATE] (/src/user/app/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
      at WebSocketManager.handlePacket (/src/user/app/node_modules/discord.js/src/client/websocket/WebSocketManager.js:384:31)
      at WebSocketShard.onPacket (/src/user/app/node_modules/discord.js/src/client/websocket/WebSocketShard.js:444:22)
      at WebSocketShard.onMessage (/src/user/app/node_modules/discord.js/src/client/websocket/WebSocketShard.js:301:10)
      at WebSocket.onMessage (/src/user/app/node_modules/discord.js/node_modules/ws/lib/event-target.js:132:16)
      at WebSocket.emit (events.js:375:28)```
#

one error comes

#

but i solve that probleam

#

still it come

spare badger
#

Show the code.

eternal elbow
#

Is it possible to update the codes without closing the bot?

earnest phoenix
#

Yes

eternal elbow
#

How ?

earnest phoenix
#

Dunno

eternal elbow
opal plank
#

detritus for example handles that

#
<Client>.clear();
<Client>.addMultipleIn();```
is an example of how you reload ur commands with new code
#

update the files and run that in a command

#

it'll re-import all the command files

earnest phoenix
#

ads

#

@mods

eternal elbow
cinder patio
#

That's only valid if you're using detritus

eternal elbow
#

Oh alright

opal plank
#

@eternal elbow but the point stands, just re-require ur files

earnest phoenix
#

man i wanna contribute some shit to detritus
gib repo

cinder patio
#

I dunno I use slash commands anyways mmLol

earnest phoenix
#

console.time("how long erwin takes to gib detritus repo")

opal plank
#

i use both tho

#

buit he added that onto slashCOmmands as well

cinder patio
#

Also what are these new emotes topggVeld

eternal elbow
opal plank
#

basically merged this into a single function call

cinder patio
#

give examples to methods

#

you better ask cake before doing anything tho

eternal elbow
earnest phoenix
#

still waiting for repo link

opal plank
#

the what

opal plank
#

thought u were meme'in

earnest phoenix
#

yeah

opal plank
earnest phoenix
#

U took 4 minutes to gib repo

#

owo wtf that's not the real detritus repo

opal plank
#

well, like i said, i thought u were mem'ing

#

what repo?

earnest phoenix
#

yeah

#

time to shit on detritus

opal plank
#

good luck

solemn jolt
#
voiceChannel.join().then(voice => {
      const receiver = voice.receiver;
      voice.on('speaking', (user, speaking) => {
        if (speaking) {
          console.log(`${user.username} started speaking`);
          const audioStream = receiver.createStream(user, { mode: 'pcm' });
          audioStream.on('end', () => {
            console.log(`${user.username} stopped speaking`);
            voice.play(audioStream, { type: 'opus' });

          });
        }
      });
solemn jolt
#

Why?

opal plank
#

event listener under that?

#

you gonna get maxEventListener reached

#

like real fucking soon

solemn jolt
#

Hiw i can fix it

opal plank
#

by not using voice.on() whenever

#

or at least remove the listerner after u used it

earnest phoenix
#

or use once

opal plank
#

use whatever command that is 22 time or more

#

you should get node screaming at you for having a possible emmory leak

solemn jolt
#
client.on("message", async message => {
  if (!message.guild && message.member.bot) return;
  let args = message.content.split(" "),
    cmd = args[0];
  if (cmd === "join") {
    //Get channel bye Name
    let channelName = args[1].toLowerCase();
    const voiceChannel = message.guild.channels.cache.filter(c => c.type === "voice" || c.type === "stage").find(channel => channel.name.toLowerCase() === channelName);
    //if there is no voice channel at all or the channel is not voice or stage 
    if (!voiceChannel || (voiceChannel.type !== 'voice' && voiceChannel.type !== 'stage')) return message.reply(`The channel #${channelName} doesn't exist or isn't a voice channel.`);
    //Join channel
    voiceChannel.join().then(voice => {
      const receiver = voice.receiver;
      voice.on('speaking', (user, speaking) => {
        if (speaking) {
          console.log(`${user.username} started speaking`);
          const audioStream = receiver.createStream(user, { mode: 'pcm' });
          audioStream.on('end', () => {
            console.log(`${user.username} stopped speaking`);
            voice.play(audioStream, { type: 'opus' });

          });
        }
      });
    }).catch(err => { throw err; });
  } 
})
#

This is all the code

#

I just want to record a voice

#

And play back

#

How i can do this?

earnest phoenix
#

Infinite loop

#

Youll listen to yourself

solemn jolt
#

My English not good i don't know what actually you say

opal plank
#

imma slap them with the thing

solemn jolt
#

😅

opal plank
#

learn first

earnest phoenix
#

I wonder how they said their question perfectly in english but cant read english

opal plank
#

translator maybe?

#

well, anyway, i explained the issue

solemn jolt
#

I have a translator

opal plank
#

and how to fix it

earnest phoenix
#

ok bye

solemn jolt
#

Ok

earnest phoenix
#

ill leave you to help them

opal plank
opal plank
earnest phoenix
#

im out too

#

imma stream

opal plank
#

yes

#

realistically you would learn js BEFORE u make a bot

#

but yeah

solemn jolt
#

Yes

#

I'll create 3 bot befor

#

But i Don't now sound muchness

eternal elbow
#

Does constantly writing and deleting files with fs decrease performance?

restive furnace
#

yes

lusty quest
#

can also lead to data corruption

#

also its blocking

feral aspen
#

How can I distinguish between a method and a function?

cinder patio
#

Do you want to do it inside the said function or outside?

#

there's no real way to check because in JS there is no difference between a method and a function

#

at least inside V8

long crow
#

Inside a module, it can become property too

lethal trout
#
const fetch = require('node-fetch')
const client = require('../index')
client.on('ready', () => {
    const automemeSchema = require("../models/automeme")
    automemeSchema.findOne({ guild: message.guild.id }, async (err, data) => {
        setInterval(() => {
            if (!data) return;
            if (err) throw err
            const channell = data.channel
            fetch('https://api.nuggetdev.com/api/meme')
                .then(res => res.json())
                .then(async json => {
                    const memeEmbed = new Discord.MessageEmbed()
                        .setTitle(json.title)
                        .setImage(json.url)
                        .setFooter(`Link: ${json.postLink} | Subreddit: ${json.subreddit}`)
                        .setColor('#FF0000');
                    channell.send(memeEmbed)

                });
        }, 30000);

    });
})```
Message not defined
i dont want it in the message event
line 5
marsh bluff
#

either hardcode the guild id instead of message.guild.id, or store it in a database

#

you cant access a message on ready event

fresh verge
#

How can I make it so whenever I add a new field to a data model, it automatically adds the new fields to all of the existing data?

old cliff
#
new Promise((res) => res(1))

Will this return a promise or 1?

tight trail
#

How could I make a command that has a 1 in 8 chance of sending?

earnest phoenix
old cliff
#

so is there a way to resolve it without awaiting?

earnest phoenix
#

Promise.resolve(), Promise.prototype.then() or just wrap it in an async function (async () => { ... })() and await it

old cliff
#

okay

sand parrot
#

hi

#

i want to know

#

how to enable the invite tracker

#

anyone can help me?

vivid fulcrum
south sinew
#

I may be just overlooking something in the Discord API docs, but is it possible to get a user's voice state in a guild without having to rely on cache from gateway events?

vivid fulcrum
#

nope

fading scaffold
#

@thorn flower

errant flax
#

made my slash command handler much more tidier and simpler FLOOSHED

small tangle
#

my bot itself got much more simpler since i switched to slashcommands

errant flax
#

ye much more usable

#

easy access*

#

the thing i like about slash commands r the options

small tangle
#

and for the user its a much better experience with tab completion and all

errant flax
#

AND with ephemeral message

#

so the channel wont get flooded with a chunk of embed/msg

small tangle
#

the chat is less spammy yea

#

i use them for error messages

errant flax
#

oo same

cinder patio
#

Components are kinda a mess tho

small tangle
#

to configure?

errant flax
cinder patio
#

just to work with them

errant flax
#

if i would pick buttons vs select menus
i would just select menus :hmm:

small tangle
#

would be nice to be able to define a vaild number range

errant flax
#

wdym?

#

i wonder what discord would add next with interactions hmm
and looking forward to threads which i dont have access to cuz im on mobile

small tangle
#

i can define a range like 0-5 and when an user enter 6 discord tells him that the valid range is 0-5

errant flax
#

i dont understand what u mean there

cinder patio
#

I want them to add countdowns, would be very useful for a lot of stuff

small tangle
#

oke i have a buy cmd which is like /buy item amount and amount should be max. 5 e.g.

errant flax
#

cant u do that but manually?

small tangle
#

and at slashcommands my IDE screams at me everytime i should nullcheck the values of the command params and im just like "i required them sad "

errant flax
#

like u just check if amount is greater or less than to something

small tangle
#

yeah thats what im doing rn

small tangle
#

but with the range im not having to do it

errant flax
#

args r kinda more easy to access with my slash cmd handler

#

so i dont have to do
args[0]...
now i can do
args.option1

small tangle
#

im not happy with the able/disable options rn of slashcommands

errant flax
#

do u mean the application.commands scope?

small tangle
#

because its only guildwise

small tangle
#

e.g. i should be the only person to execute the shutdown command, fine i disable the command globally and whitelist myself, but that whitelisting applies only to one guild

#

in another im not allowed to use that command too

errant flax
#

i would just leave it there out in the open but only requires the member id to mine

cinder patio
#

I only add admin commands to the bot's guild

small tangle
#

that would be actually an even better call xD

#

i should to that

errant flax
#

fun thing with a custom bot that u wont have to make slash commands globally and wait for 1h

#

i just upload it to the guild im using the bot for

#

wonder if people will still use reactions if buttons r open for most of discord's api wrappers

small tangle
#

button are way nicer imo, i use them for like approve/decline something

errant flax
#

sad that they limited the colors tho

cinder patio
#

Buttons are also less spammy

errant flax
#

im looking forward to let us devs choose the hexcolor for the button

#

and maybe animated buttons? hmm

cinder patio
#

can't you put animated emojis in buttons right now?\

pale vessel
#

You can, since it supports partial emojis

green kestrel
errant flax
small tangle
#

i guess they are just the image of the gif

#

iirc

green kestrel
#

yes you can freud

errant flax
#

but still custom button colors will be sick tho

green kestrel
#

they won't do that, the button colours match the apps theme

errant flax
#

hmm sad hmm

green kestrel
#

at least I don't think they will

#

it's a branding thing

errant flax
#

i wonder if they add more variety of colors

feral aspen
#

Heyo.

#
${bot.users.cache.get(res[i].userID).username || res[i].username}
#

I have this code...

#

Returns an error.. cannot read property .username of undefined I said, ok, let's do this.

lyric mountain
#

i have an apple

feral aspen
#
${bot.users.cache.get(res[i].userID)?.username ?? res[i].username}
#

Puts undefined, WHY

lyric mountain
#

can't u just do ```js
let usr = bot.users.cache.get(res[i].userID);
let name = "";

if (usr) name = usr.username;
else name = res[i].username;

#

a bit more verbose? yes but it saves a lot of time finding where the issue is

feral aspen
#

Makes no difference.

#

Will legit error the same thing.

pale vessel
#

What's res[i]?

lyric mountain
#

but you can debug that easier

feral aspen
#

it's a loop using descending method.

pale vessel
#

Are you sure the properties aren't undefined? Debug

feral aspen
#

Wait..

pale vessel
#

You need to know what you're working with

feral aspen
#

bot.users.cache.get(res[i].userID)?.username, I found out that this user id is sometimes not in the cache.

#

.. so instead, I want to show res[i].username

pale vessel
#

But if res[i].username exists why not just use that?

feral aspen
pale vessel
#

So is res[i].userID

feral aspen
#

Let's consider res[i] as an id, right?

#

I mean the object

#

Goodness.

#

It's like the document for MongoDB.

#

In this document, i saved two things, .username (username of the guy) and .userID (user id of the guy)

#

I did

#
${bot.users.cache.get(res[i].userID).username || res[i].username}
pale vessel
#

Why grab from cache?

feral aspen
pale vessel
#

...

feral aspen
#

Fetch?

pale vessel
#

You already store the username in the database

earnest phoenix
#

Can't you just do the or operator before getting the username

feral aspen
pale vessel
#

Then only store the ID and use fetch

feral aspen
#

Let me try.

#

bot.users.fetch() right?

pale vessel
#

yes

feral aspen
#
${bot.users.fetch(res[i].userID).username || res[i].username}```
#

Imma try this.

#

Do I add ?.

pale vessel
#

You don't need to use the username from database if you already have the user object

pale vessel
#

Yes.

#

And await the promise

lyric mountain
#

that's if the user doesn't exist anymore

#

probably ig

earnest phoenix
#

But that'd raise an error, no?

pale vessel
#

If it doesn't exist it shouldn't be inside the DB imo

feral aspen
#

I'm trying to fetch the updated username, if errored or undefined, then I would use the one inside the database.

#

Let me try

#

Well.. uh, it returned all undefined.

#
${bot.users.fetch(res[i].userID)?.username ?? res[i].username}
#

I used this.. returned undefined.

#

WAIT

#

One moment.

earnest phoenix
#

Bru, dot moment

earnest phoenix
feral aspen
#

Fixed.

#

Thanks!

tiny condor
#

How do I set the voting webhook?

earnest phoenix
#

Is there any good Question and Answer api?

grave sleet
#

There's a lot of them, Don't know if any are good

jovial elk
#

Hi everyone, does anyone know what caused this errors? its been happening for the last 1.5-2 weeks out of no where.. no changes done to the bot to cause it

this one happens frequently recently

discord.errors.ConnectionClosed: Shard ID None WebSocket closed with 1000

and the

aiohttp.client_exceptions.ClientOSError: [Errno 32] Broken pipe

error happened a lot last week, and returned today and it kind of breaks the bot, the bot keep restarting after that

earnest phoenix
#

which lang?

jovial elk
#

and i dont think i need to shard, since the bot is not in 2000+ discord servers

earnest phoenix
#

do you have bad internet connection?

vivid fulcrum
#

are you sure you're not on an outdated dpy version

distant mango
jovial elk
earnest phoenix
#

and your endpoint is?

jovial elk
earnest phoenix
#

is the webhook == your herkou domain

snow urchin
summer torrent
#

what url

#

show code and error

snow urchin
#

?

heavy marsh
#

How many shards do you all suggest for a 10k+ bot?

plain talon
#

10

opal plank
vivid fulcrum
#

make a call to this endpoint and let discord decide

opal plank
#

Remember that 2.5k is the limit per shard

fierce narwhal
#

Sorry to jump on to this, but what is a shard?

vivid fulcrum
fierce narwhal
#

ok thanks

opal plank
#

Damn cry's faster than me tday

opal plank
#

What IS axios?

#

Ususlly u'd axios.get

#

Did u create a new axios instance?

snow urchin
#

.get is the default

#

yes

flat copper
#
setInterval(() => {
client.channels.cache
		.get('836870311923417118')
		.messages.fetch('862383984511418388').then(msg => {
		  console.log(msg)
		  msg.edit(loads[result], {embed:  createEmbed(client)}).catch((e) => {
		    console.log(e)
		  })
		})
	}, 60000)```
Why message is not editing?
sacred aurora
snow urchin
#

its not cf

sacred aurora
#

hmm

#

here's the result from using axios tho

vivid fulcrum
#

it is cf lol

lethal trout
#

is there any java users here?

#

i need some help for school project

#

ping me if u know java

cinder patio
#

god typescript needs macros NOW!!!! There isn't a good macro implementation for TS yet and it's been like 8 years now

#

function macros to be specific

sudden geyser
#

What do you need macros for

lyric mountain
#

instead of asking "does someone know java" you could state your issue

solemn latch
#

-ask2ask

gilded plankBOT
#

Don't ask to ask.
Just ask your question, it wastes time if you say "i need help" or "can someone help me?" instead of just saying what the problem is. Save your time and other people's time and just ask the question.

Please read https://dontasktoask.com/ for an explanation on why this is an issue.

earnest phoenix
#

Is there any discord.js-redis libary ,which isn't outdated?

sudden geyser
#

Why not just use Redis directly?

earnest phoenix
#

I want to use redis as cache instead with discord.js-light

sudden geyser
#

All the library does is listen for events and modify the Redis cache.

earnest phoenix
#

@opal plank will detritus work on deno since it is ts?

pale vessel
#

no

#

It won't

#

Node and Deno are both different runtimes

limber mica
#

Does someone know a decent sharding manager?

opal plank
limber mica
opal plank
limber mica
#

for. the. love. of. christ

opal plank
#

Imagine not having a shard manager in ur lib

#

Pleb

limber mica
#

disc.js has a manager

opal plank
#

A shit one

limber mica
#

i want to see if there is a better one

opal plank
#

Yes

limber mica
#

Dont. You. Dare. Say. It

limber mica
opal plank
#

Detritus

limber mica
opal plank
#

Learn it

limber mica
#

MY BOT IS TOO BIG

opal plank
#

Like ebryone else

limber mica
#

Do you know a decent one for JAVASCRIPT that is compatible with DISCORD.JS

opal plank
limber mica
#

But in all honesty, do you know a good one?

#

Ive been looking for the perfect one

#

No luck

lyric mountain
#

the issue is djs in itself tbf

#

it treats shards like completely separate processes

crimson vapor
#

or something

limber mica
#

thats why im looking for something else

crimson vapor
#

the djs manager is shit

#

you could do shards: auto

limber mica
wheat mesa
#

Detritus

#

👍

limber mica
wheat mesa
#

Don't you dare insult detritus!

limber mica
#

detritus is ass, along with discord.js

wheat mesa
#

It's a great lib, the docs just aren't very detailed quite yet

earnest phoenix
wheat mesa
limber mica
#

I dont like it too much

#

its **O K **

wheat mesa
#

You have only used it a little bit

earnest phoenix
wheat mesa
#

I've only used Detritus for a little bit, and I already like it far more than djs

#

The docs are lacking, but the library itself is amazing

limber mica
#

What makes it better

wheat mesa
#

It's far more optimized

#

I'm sure @opal plank could give you a lot more reasons why Detritus is better as well

limber mica
earnest phoenix
#

@rapid prawn

limber mica
#

Hey erwin, i need some detritus examples

opal plank
limber mica
#

See if i can figure it out :)

opal plank
#

Or try the converted beforehand

solemn latch
#

well, the fact Detritus is updated to new features much faster than djs is nice.
the issue with djs is everyone uses random third party libraries for new features for months till djs updates.
so youll have people asking questions for a library only 2000 people use and there is no support for.

opal plank
#

Read the text

limber mica
#

got it

limber mica