#development
1 messages · Page 1859 of 1
How to send attachments and embeds in the same message?
To send attachments:
if (message.content === ';file') {
const attachment = new Attachment('https://i.imgur.com/FpPLFbT.png');
message.c...
I just updated typescript
Context?
err is try...catch's err
But it is generating a new image every time?
I'm confused, what do you mean?
What version of TS
latest
Errors should be any, I dunno why it's unknown
i updated it like 5 min ago
const attachment = new Attachment(captcha.JPEGStream, 'test.jpeg');
const embed1 = new MessageEmbed()
.setAuthor('Error Lounge', "https://cdn.discordapp.com/attachments/877308243083395113/879200325209313290/errorpic.png")
.setTitle("Anti-Flood Verification")
.setFooter("Error Lounge Verification | discord.gg/", "https://cdn.discordapp.com/attachments/877308243083395113/879200325209313290/errorpic.png")
.setImage('attachment://test.jpeg')
.setColor("12ACB2")
const msg = await member.send({ embed1, files: [attachment]});``` @lyric mountain I did this and it is giving `TypeError: Attachment is not a constructor`
4.4.2
https://devblogs.microsoft.com/typescript/announcing-typescript-4-4-beta/#use-unknown-catch-variables there you have it
Today we are excited to announce the beta release of TypeScript 4.4! To get started using the beta, you can get it through NuGet, or use npm with the following command: npm install typescript@beta You can also get editor support by Downloading for Visual Studio 2019/2017 Following directions for Visual Studio Code and Sublime Text 3.
It's unknown instead of any now
vscode lang server says it is 4.3.5
Just use err: any or Error
You literally copypasted the answer didn't u?
Not literally but sort of lol
I don't know, I've been trying for like 2 hours and I'm super frustrated
...and in those 2 hours it didn't come to your mind to check the docs?
you can't use Error
I tried but I haven't used JS in agesss
I am kind of lost
I don't know how to do it
Even after viewing the docs
Cast it I guess
I just use any, easier
Yours looks like it's not an instance of Error, you should probably use error: any too
I'm creating an instance of "EventEmitter" in a file and it returns a value that I want to get in another file with another instance, is that possible?
But with that said, what am I doing wrong and how do I fix? @lyric mountain
Add the image as a file and reference it using attachments://name.extension
Is that not what I did?
No
Discord.js changed when compared to that stackoverflow answer
You need to see how to properly add an attachment
const attachment = new MessageAttachment(captcha.JPEGStream, 'test.jpeg');
const embed1 = new MessageEmbed()
.setAuthor('Error Lounge', "https://cdn.discordapp.com/attachments/877308243083395113/879200325209313290/errorpic.png")
.setTitle("Anti-Flood Verification")
.setFooter("Error Lounge Verification | discord.gg/", "https://cdn.discordapp.com/attachments/877308243083395113/879200325209313290/errorpic.png")
.setImage('attachments://test.jpeg')
.setColor("12ACB2")
const msg = await member.send({ embed1, files: [attachment]});``` I did this and now its just simply sending the image with no embed?
@lyric mountain
Like, how am I supposed to get the URL for the attachment?
And make sure it doesn't send seperately
You don't need the url, just the name
attachments:// refers to attachments in this message
My above code is using that though and it doesn’t even send the embed at all?
Don't you need member.send({ embeds: [embed1] }); in v13 now?
I’m not even using v13 so I’m not sure
Oh
You should be
I’m trynna get my shit to work before I switch cause it’s just a small private bot for my server
And this image stuff is really pissing me off I don’t understand now why it’s not even sending the embed in general
You're using named parameters
Should be member.send({ embed: embed1, files: [attachment]});
iirc that's how it works
How can I check if the owner of a server that a command was ran in is boosting a certain server?
I use Apparently both have itgif-encoder since it has DT typings
It's a little more barebones since it doesn't directly support canvas rendering context, but you can still provide an imageData
Everyone's gangsta until they learn gifs aren't just images
I dont think there is a way to do that. However if the bot is in the server that he is boosting, you can find by running a loop through your bot's guilds to find it using guildMember#premiumSince
@earnest phoenix if it's javascript use cilent.login(insert token here)
Java is pc right? If so i cant use it for i use iphone
uh
ok wait
where are you coding your bot?
on an app?
I used a website for discord bot client
well uh
if so find a button for starting the bot if that bot is made on the site
if not then ask another person plz I really don't know anything about making a bot on a website ;-;
I do have it in my dms but i just needed to know how to login with its token
which token? bot token?
which website?
Developer portal
ok
uh
wait
what programming language do you use?
English
if you haven't code anything you can't do anything
uhh
no
like
in which PROGRAMMING language
not english
english is talking language ;-;
I dont know what that is unfortunately sence i joined a month ago
well I guess you haven't code anything. watch some bot coding tutorial and continue asking later
you have to have some code for your bot first
in WHICH PROGRAMMING language?
you need some code for it
that's why it's "coding a bot"
I have the URL for it
you still need to code it
before you can fully start it
Well... I'm assuming that he's using one of those crappy bot development websites
Wouldn't recommend those
he said he only had the token so no ¯_(ツ)_/¯
he hadn't code anything
@earnest phoenix learn the basics of your programming language of choice before developing a discord bot. Having a token doesn't give your bot functionality automatically.
I have gave it some permissions on the website that i used it for Discord.com:developer
/developer
That does not matter
If you don't know how to use a programming language then developing a discord bot is going to be an extremely difficult task
Unless you use botghost which is bad
Botghost?
if (message.author.id === '673011572225998856') return;
this then main problem
message.author is undefined
how do the hell i do this
Is there another way that is easier to create a bot?
@earnest phoenix templates,github or hire someone
There's shortcuts, but they ultimately end in a messy, inefficient, and generally bad
how do i define it
(And by shortcuts I mean "automatic" bot creators)
Don't know, you didn't provide any code to go along with it
¯_(ツ)_/¯
this may be big
Ive seen someone do a code which said tul!register (name) tuy: text
const { MessageEmbed } = require('discord.js');
const { LOCALE } = require("../util/EvobotUtil");
const i18n = require("i18n");
i18n.setLocale(LOCALE);
module.exports = {
name: "eval",
aliases: ["evaldev"],
description: i18n.__("Vote"),
async execute(client, message, args){
if (message.author.id === '673011572225998856') return;
const embed = new MessageEmbed()
.setTitle('Evaluating...');
const msg = await message.channel.send(embed);
try {
```js const data = eval(args.join(' ').replace(/```/g, ''));
embed
.setTitle('Output: ')
.setDescription(await data);
await msg.edit(embed);
await msg.react(':white_check_mark:');
await msg.react(':x:');
const filter = (reaction, user) => (reaction.emoji.name === ':x:' || reaction.emoji.name === ':white_check_mark:') && (user.id === message.author.id);
msg.awaitReactions(filter, { max: 1 })
.then((collected) => {
collected.forEach((emoji) => {
switch (emoji._emoji.name) {
case ':white_check_mark:':
msg.reactions.removeAll();
break;
case ':x:':
msg.delete();
break;
}
});
});
} catch (e) {
embed
.setTitle('An Error has occured');
return msg.edit(embed);
}
},
};``````
@wheat mesa here the code
O_O
Show your command handler @earnest phoenix
idk where to find this rn i am tired and my friend not helping
exports.canModifyQueue = (member) => {
const { channelID } = member.voice;
const botChannel = member.guild.voice.channelID;
if (channelID !== botChannel) {
return;
}
return true;
};
let config;
try {
config = require("../config.json");
} catch (error) {
config = null;
}
exports.TOKEN = config ? config.TOKEN : process.env.TOKEN;
exports.PREFIX = config ? config.PREFIX : process.env.PREFIX;
exports.YOUTUBE_API_KEY = config ? config.YOUTUBE_API_KEY : process.env.YOUTUBE_API_KEY;
exports.SOUNDCLOUD_CLIENT_ID = config ? config.SOUNDCLOUD_CLIENT_ID : process.env.SOUNDCLOUD_CLIENT_ID;
exports.MAX_PLAYLIST_SIZE = config ? config.MAX_PLAYLIST_SIZE : process.env.MAX_PLAYLIST_SIZE;
exports.PRUNING = config ? config.PRUNING : process.env.PRUNING;
exports.STAY_TIME = config ? config.STAY_TIME : process.env.STAY_TIME;
exports.DEFAULT_VOLUME = config ? config.DEFAULT_VOLUME: process.env.DEFAULT_VOLUME;
exports.LOCALE = config ? config.LOCALE : process.env.LOCALE;```
i think this it??
Or you could attempt to solve the problem

Show the code for your command handler
What are you doing
try {
command.execute(message, args);
} catch (error) {
console.error(error);
message.reply(i18n.__("common.errorCommend")).catch(console.error);
}
});
i cant post all-
And that's your problem
yes?
you're not passing the client
^^
the client the problem?
so just defult it with a const
What
Either pass in client to your command.execute() function, or don't use client in your execute() function in your command
ok
the message is for owner only part-
Flazepe is saying that you don't need to pass in client as an arg to your function because you can access your client by using message.client
fix
https://gist.github.com/Rapptz/4a2f62751b9600a31a0d3c78100287f1
Was this shared earlier?
DiscordAPIError: Invalid Form Body
0.permissions[0].permission: This field is required
at RequestHandler.execute (C:\Users\sakit\Documents\djs-base-handler-master\node_modules\discord.js\src\rest\RequestHandler.js:298:13)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async RequestHandler.push (C:\Users\sakit\Documents\djs-base-handler-master\node_modules\discord.js\src\rest\RequestHandler.js:50:14)
at async ApplicationCommandPermissionsManager.set (C:\Users\sakit\Documents\djs-base-handler-master\node_modules\discord.js\src\managers\ApplicationCommandPermissionsManager.js:185:18) {
method: 'put',
path: '/applications/881018723803201589/guilds/821972674380038164/commands/permissions',
code: 50035,
httpStatus: 400,
requestData: {
json: [
{
id: '881025520064684128',
permissions: [
{ id: '857324471441293352', permission: undefined, type: 1 }
]
}
],
files: []
}
}```
this error comes when i put `userPermissions: ["ADMINISTRATOR"],` to a slash command
(ps i am using recons permission handling for slash commands)
if u need any code ask
Yeah
will i still need to have a open socket connection if my bot only uses slash commands?
any good docs for discord.js slash commands
good way to make your code difficult to unit test
You cant use message anymore after april 2022 anyways. So ...
So doing that old shitty command handler won’t work anymore
will i still need a vps for the socket connection?
unless you get the message intent and somehow sneak some normal commands in ur bot and not get reported
either way it doesn’t matter
if i can host all my commands on an http endpoints i shouldn't need a vps
In theory
or do i need the socket connection to show as online
Yeah
that's not good
what's the point
they should just have a health check endpoint. if that returns 200 then the bot is online
You can add slash commands to a server without adding the bot
magic?
Just remove the bot scope on the invite
the average user won’t understand that probably
they'll learn by april 2022
how are conflicting slash commands handled? like if two different bots want to register the same slash command name
They bot show up under different bots
^ it's possible to have 2 commands with the same name
nice
i wish it was like this when i first started working on these bots. i couldn't believe they made us setup a socket connection and receive all the chat messages.
will slash commands support this type of input format?
!record [#PLACEMENT PLAYERS...]... GAME_NAME
!record #1 @player1 @player2 #2 @player3 @player4 Counter Strike
!record #1 @imposter1 #1 @imposter2 #2 @crew1 #2 @crew2 #2 @crew3 Among Us
is there a limit to the number of slash commands? i have 36 commands currently
100 global
100 per guild
thanks, now im going to lookup the differnce between global and guild level slash commands
oh, global level will register the slash commands for any guild that has the bot invited. I'm guessing guild level commands lets you create a commands that is only registered to one guild. probably useful for testing it out before releasing to global
yes
What's chat input
chat input = slash command
user = context menu commands
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
Read the dec docs on the application commands. Everything should be specified there
ty
V
@whole glen what the heck are you actually trying to do
just when i say something the bot deletes it and re sends it (only on my server) i wanted to be sure is was ok
hyperchat bot used to do the same thing and it's accepted
C:\Users\sakit\Documents\Fire-Development\node_modules\mongoose\lib\helpers\query\wrapThunk.js:21
const err = new MongooseError('Query was already executed: ' + str);
^
MongooseError: Query was already executed: gtn.findOne({ guild: '796358397070540831' })
at model.Query._wrappedThunk [as _findOne] (C:\Users\sakit\Documents\Fire-Development\node_modules\mongoose\lib\helpers\query\wrapThunk.js:21:19)
at C:\Users\sakit\Documents\Fire-Development\node_modules\kareem\index.js:370:33
at processTicksAndRejections (node:internal/process/task_queues:78:11) {
originalStack: 'Error\n' +
' at model.Query._wrappedThunk [as _findOne] (C:\\Users\\sakit\\Documents\\Fire-Development\\node_modules\\mongoose\\lib\\helpers\\query\\wrapThunk.js:25:28)\n' +
' at C:\\Users\\sakit\\Documents\\Fire-Development\\node_modules\\kareem\\index.js:370:33\n' +
' at processTicksAndRejections (node:internal/process/task_queues:78:11)'
}```
whats this?
need help (discord.js)
update your node version
it needs at least 16.6
ohk
My Hero👀
if i dm someone when they vote, could it possibly violate tos?
Dpy is dead 😦
yes

^^ -_-
i dont think so
ah ok good
bcs few certified bots does it
do any one help me in bash lang
const err = new MongooseError('Query was already executed: ' + str);
^
MongooseError: Query was already executed: gtn.findOne({ guild: '796358397070540831' })
at model.Query._wrappedThunk [as _findOne] (C:\Users\sakit\Documents\Fire-Development\node_modules\mongoose\lib\helpers\query\wrapThunk.js:21:19)
at C:\Users\sakit\Documents\Fire-Development\node_modules\kareem\index.js:370:33
at processTicksAndRejections (node:internal/process/task_queues:78:11) {
originalStack: 'Error\n' +
' at model.Query._wrappedThunk [as _findOne] (C:\\Users\\sakit\\Documents\\Fire-Development\\node_modules\\mongoose\\lib\\helpers\\query\\wrapThunk.js:25:28)\n' +
' at C:\\Users\\sakit\\Documents\\Fire-Development\\node_modules\\kareem\\index.js:370:33\n' +
'```
help
Did you think discord should take over the development of dpy?
Then lets hack mee6 :D
lmfao
cringe
@vivid fulcrum what its a joke
i think someone will take over it as theres some big bots that use discord.py
lol
why the heck would discord develop dpy
Why would anyone use dpy 
you can't read too much into what Danny wrote on that gist
how i can play the song in discord guys
the list of which libs support slash commands in it is inaccurate as to spin a negative viewpoint that everyone must hate where discord is going like he does
and there's years of drama behind his personal decision to end development
personal arguments with discord devs
people are going to think that's the way all lib devs feel and this isn't further from the truth
Yeah I kinda figured there was a lot of drama behind it. It hasn't changed my opinion. Slash commands and message intent is a good move on Discord's part in my opinion.
Danny had never wanted to implement slash commands
true
there was that other gist about how they were crap
it's funny my lib was completely left off that list of his along with about 20 others that support slash commands fully, and a lot that it says don't support them do, in their development branches
Slash commands definitely need to get better, and I think it's very early days yet. They'll definitely become more powerful as the API gets improved.
oh well more python devs to convert to C++ I guess soon 
Another dpy lib will spring up I'm sure
I need the sub commands / sub command groups to be listed similar to the optional options in a command. For now it just looks tooo ugly
Can anyone help me fix this issue? Im not sure from where its coming from
MongoDB has successfully connected
Ready to serve on 25 servers, for 176393 users.
/workspace/node_modules/discord.js/src/rest/RequestHandler.js:298
throw new DiscordAPIError(data, res.status, request);
^
DiscordAPIError: 404: Not Found
at RequestHandler.execute (/workspace/node_modules/discord.js/src/rest/RequestHandler.js:298:13)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async RequestHandler.push (/workspace/node_modules/discord.js/src/rest/RequestHandler.js:50:14)
at async ChannelManager.fetch (/workspace/node_modules/discord.js/src/managers/ChannelManager.js:114:18) {
method: 'get',
path: '/channels',
code: 0,
httpStatus: 404,
requestData: { json: undefined, files: [] }
}
Anyone here know how i can get data from a JSON in HTML?
I have my bots server count hosted on my own (really basic) API and I need it to get the server count from the JSON api.
window.fetch()
window.fetch("https://your.website.link/path").then(r => r.json()).then(res => {
console.log(res) //The response
})
alr thanks

so discord.py is dead? dayum
why?
perhaps
hold on the repo was archived
he said hes sick and tired of discord's changes and how discord doesnt listen to developer feedback
and he doesnt like slash commands
lmao
would totally stand by his decision even if it meant my whole bot would break because of it
well maybe someone can fork it and keep going with those shit
probably
someone probably will, if they didnt already
not an issue I need to worry about 🙂
lmaoooo
think it's more of a heat of the moment thing
he'll hand ownership to someone else trusted
or she
they all declined
lmaooo
lmao
xD
he stated that he offered to give it to all devs he trusted, all of them declined
too big of a responsibility to suddenly have
ye
i mean
im still gonna do it to maintain my bots mostly
and to move out of discord.js
I just hate discord bots overall now and I'll completely stop developing them soon
it used to be fun back in the day
but with all the dramatic changes
ye
Rip
and discord not letting poor devs continue their bots because they can't doxx themselves to stripe and discord
its sad 😦
i've already done the verification
stripe is legit, i used to use them for card processing on my site
I know but the fact remains the same
Discord is really making it hard for us Devs
if that's not their aim they'll soon notice way less traffic towards developing bots
It kinda sucks since I have 2 bots writing in Dpy so i gotta decide if i wanna switch to a diff lang or not
And that wont be a easy task since both are in 15K+ guilds
And 1 uses OCR
that's the risk you're always taking with open source libs
they can stop being developed any moment
or stop being backwards compatible leaving you with a massive workload
i use discord.py, im not gonna stop and switch
i cba to rewrite 1500+ lines of discord.py into discord.js or something
I have no idea how much lines I have write lmao
Should be around 40-50K
But i'm currently doing a rewrite to make that go small
good luck lel

Discord is forcing us to change to Slash-Commands, which means the Bots wouldnt be able to Automod(because they cant see the Chat)
If you dont agree with their decision, it would be super cool if you sign this Petition
https://www.change.org/p/discord-inc-don-t-require-slash-commands-for-discord-bots
Maybe it'll help
lmao change org
respectfully fuck off they don't make companies do anything
if the company officially makes one then sure
but we can at least try
not forgetting to mention the scummy tactics the website uses
glad to see a select few weren't the only ones annoyed by the change
even if its not a concern for myself
someone asked about this in the djs server
djs maintainers said danny's acting childish
lol
just left their server 😎
lmao
and your life
you're not wrong, but i need to see whats going on every now and then to keep djsl updated
now they're planning another big change to their caching system
god forbid
because they figured out the new caching actually sucks
and it uses more ram than before
lmao
I'm slowly becoming numb to their drastic breaking changes
maybe that's their intent
thats what im doing
👍
throwback to the time I made something called oursql on glitch
o nice
communism
its not even commited to git yet
Hey
it's basically sqlite but turned into a server with websockets and resource controls
oursql bot written in ourcord when
How to get role developer?
release and get an approved bot
Ok
how do i remove one specific emoji in djs v12? message.reactions.remove("👍")? (emoji is a unicode)
But why i pasted my client id to top.gg but it didn’t recognize my bot?
your client id or the bot client id
im gonna make it come back
I don't know anymore djs might change it anytime to
discord.api.messsages.retrieve_from_api(discord.from_channel(id), messageid)
they were always the same
i was told otherwise but
how do i remove a reacted emoji fully? So not only the one of the users, but the bot one's as well
Hey, I need help, I want to make a command, that fetchs (amount) of Messages, and check, if they are a Link and delete them.
I'm rn stuck at this point here: (Can someone help me out?)
const messagecount = Number(args[0]) > 100
? 101
: Number(args[0]);
bot.channels.cache.get("849247207990493204").messages.fetch({ limit: messagecount })
.then(messages => {
console.log(messages);
});
Hey can someone help me?
Im trying to make a moderation bot. I want my bot to fetch the last 20 messages sent by a specific user in the server but i have no idea how. I cant find anything on google so can somebody help me?
fetch messages of the message.channel (the max was 100 but not sure). the messages are an array if i am not wrong, so you can use the filter to filter by 'your parameter' == message.member.id
message.reactions.removeAll()
i want to remove a specific emoji tho
and maybe in the removeAll() you can filter what eoji
does that function take a parameter?
ah yeah we can resolve and then filter
thnx
@eternal osprey js await message.channel.messages.fetch(m => m.author.id === message.author.id, {limit: 20}).then(logger.log(messages.join(",\n"))) referenceError: messages is not defined
oh wait nvm
anyone know how to get the id of the user who invited the bot to your server?
i'm trying to get the bot to send a welcome message to them with commands and setup instructions etc
await message.channel.messages.fetch(m => m.author.id === message.author.id, {limit: 20}).then(messages => {logger.log(messages)})``` why does this code return `[Object map]`
can someone help?
I'm trying something like you too, just that I want to fetch the links lol
and I'm stuck where you stuck xD
@eternal osprey can you help us?
Trying to update from v12 to v13
TypeError: settedParent.createOverwrite is not a function
at E:\C) Developing\Wolfy Djs-13\commands\tickets\ticket.js:54:34
at processTicksAndRejections (node:internal/process/task_queues:96:5)
settedParent.createOverwrite(message.guild.roles.cache.find(x => x.name === '@everyone'),{
SEND_MESSAGES: false,
VIEW_CHANNEL: false
});
because your logging function is badly implemented
how to fix?
stringifying objects that cannot be natively turned into a string will produce that output
is that a library or your own function
import something called utils first require('util')
it contains functions that stringify things that usually cannot be stringified
Because fetch returns a collection of the fetched messages
Which is an object 
and on the msg parameter you would run util.inspect(msg, { depth: 1 }) (this is how to fix your logging)
He doesn’t even loop through his msg parameter in his function
though chances are some logs will be too big to fit through the webhook
Expecting it to be no collection
why is my code adding that extra \ and "?
test[args[0][1]].time = ['"'+test1+'"']```
i've even logged it and it shows as:
how can i only log the content of the messages from this code
where are you getting that data from
It's escaping the double quotes because you cannot have double quotes in double quotes
" "test" "
and btw why doesnt my code only get the messages from the message.author?
i emptied the array first and then json.stringified it. Worked!
Because you’re trying to filter messages in the fetch method which is not supposed to work
how to do it then?
You might wanna take a look at the documentation
there is no way to fetch messages based on author id
doesnt help
how doesnt it?
they literally have an example?
It does you didn’t read carefully
It contains an example just for your use case
Nah you didn’t read carefully enough
channels has now a
permissionOverwrites property
Give the same error
code?
Just log settedParent
message.guild.channels.create(userName.toLowerCase() + "-" + userDiscriminator, {type: 'text'}).then(
(createdChannel) => {
// when it creates a ticket, it will create a category and name it ticket and put the ticket there
createdChannel.setParent(categoryID).then(
(settedParent) => {
// setting the perms for the channel so no one can see it
settedParent.permissionOverwrites(message.guild.roles.cache.find(x => x.name === '@everyone'),{
SEND_MESSAGES: false,
VIEW_CHANNEL: false
});
// setting the perm so the ticket creator can see it and send msgs in it
settedParent.permissionOverwrites(message.author.id,{
SEND_MESSAGES: true,
VIEW_CHANNEL: true,
CREATE_INSTANT_INVITE: false,
READ_MESSAGES: true,
ATTACH_FILES: true,
CONNECT: true,
ADD_REACTIONS: true,
READ_MESSAGE_HISTORY: true
});
As it’s not supposed to be what u think
permissionOverwrites is a property
oh
you can literally set the parent and the overwrites inside the channel create options
so you dont need to do 3 separate requests
you can do everything in one go
ok
is there a way to get a user's about me?
message.guild.channels.create("name", {
type: "bla",
parent: id,
permissionOverwrites: [
{},
{},
...
]
})
Ty bro
u can also lock the perms to the channel
Does this process of helping people again delay your API?

index.html:1 Access to fetch at 'http://IP HERE/details' from origin 'null' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.```
let hoppipa = await message.channel.messages.fetch(message.id === ps)```i am trying to get the previous sent embed so that i can react to it
but it returns me [[entries]] with a map of 50 arrays?
You might wanna read this and the following messages:
You’re running into the same issue using fetch() wrongly
how do i get my repl's ip address? in mobile
yes
everything i do is excuses to not work on it
lol
If you got your hostname just resolve it
why do you need its ip address?
there are hundreds of repls with the same ip address, so it wont really help you
lol what a great service tho sharing your IP with others 
What's your API going to be Tim?
What about an API that tells you if you should procrastinate or not
But it always answers yes

lmao
my brain
lmao no
its basically a v2 of my bot's api
for astronomy calculations and such
Nice!
the v1 has been in closed beta for like 1+ years lol
but i dont think its scalable enough to go public
Are you going to charge for it?
ye, im planning on going for some kind of tiers
Nice 👌
theres gonna be a free tier, then paid tiers with higher limits
And there we go again… capitalism is spreading
Hey devs need to eat too
if you hate capitalism that much, stop driving for money :^)
What? No that’s why they supposed to sit in front a Pc 24/7
No food required
google SPA
Damn I didn’t see that one coming 
When I see "Google": it costs 200 dollars
I'd definitely recommend chargebee if you want to do a subscription model
SPA = single page application
Any examples with this?
it's an umbrella term
Single page application technology has become the de facto standard for creating modern web applications today due to the numerous benefits related to loading times and user experience. In this article, you'll learn why industry giants are adopting the SPA framework and its role in the future of web development.
look into frameworks like react or angular
what
You have to use cors in your server
Like if you're using express
const express = require("express")
const cors = require("cors")
const app = express()
app.use(cors())
There are more configuration you can search on Google

<script>
$.getJSON('http://ip here/details', function(data) {
var text = `Servers: ${data.servers}<br>
Users: ${data.users}<br>`
document.getElementById("servers").innerHTML = `${data.servers}`;
document.getElementById("users").innerHTML = `${data.users}`;
});
</script>
<h1 id="servers" >0</h1>
<h1 id="users" >0</h1>```
if it works then it works
is it possible to use EJS and NextJS at the same time?
possible, probably yes, but... why would you want that?
using $.getJSON for ajax
using document for innerhtml
I'm a beginner, that doesn't mean I don't have silly doubts.
but saying that, i wanted to use as "oauth"
i've never used nextjs, but im pretty sure it can do everything ejs does by itself
Try creating an api endpoint in pages folder then do stuff with the oauth there
Or better for security: Use getServerSideProps for the component that needs oauth
ok
is anyone familiar with termius ssh? i used other ssh clients before but i'm switching to termius, i'm trying to scroll up and down but this is what i get instead of scrolling
have you tried the pgup/pgdown buttons?
unfortutately i have a 60% keyboard :P
rip
not the best for coding i know
Hello is dpy is shut down
yes
my keyboard is more compact and doesn't have num keys
but has all the necessary programmer keys:)
& backslash ` ~
hello
👋
Uhh god too much text dude
?
There's a lot of text so it doesn't look good either way.
But the second one looks better
thx
second one, would also be cool if you added an emoji to the more popular games
You may wanna use fields and titles
good idea
ehm
Ping?
Game title as field, and infos like the playtime etc as value
And you may wanna limit it to the top 10 games for example
good idea
i'd put it into a table-like structure
with the game names aligned to the left and the time played aligned to the right
or just make it an image if you know enough about image manipulation lmao
possibly in a code block
I'm not fetching game details but take a look at the general structure, using fields
ok
game1 50 hours played
game2 zyx 73 hours played
fgerher 92.5 hrs plyed
for example
ok
considered to waste more space of course
ok
whatever u like, the possibilities are endless
ok
Using inline fields might be a good idea, too for the account details as I mentioned before
which looks like a table
Why not working ?
const filter = async (button) => {
if(button.CustomId === '1'){
if (button.clicker.CustomId !== message.author.id) return button.reply.defer()
button.reply.send({ embeds: [info], ephemeral: true})
}
if(button.CustomId === '2'){
if (button.clicker.id !== message.author.id) return button.reply.defer()
button.reply.send({ embeds: [search], ephemeral: true})
}
if(button.CustomId === '3'){
if (button.clicker.CustomId !== message.author.id) return button.reply.defer()
button.reply.send({ embeds: [Utl], ephemeral: true})
}
if(button.CustomId === '4'){
if (button.clicker.CustomId !== message.author.id) return button.reply.defer()
button.reply.send({ embeds: [moderator], ephemeral: true})
}
if(button.CustomId === '5'){
if (button.clicker.CustomId !== message.author.id) return button.reply.defer()
button.reply.send({ embeds: [Fun], ephemeral: true})
}
}
why do you have button.clicker.CustomId?
btw it was just because i'm using screen on linux, im dumb as always
lel
@earnest phoenix nitro scam
ty 

It was for package my bad i edited the code to this
collector.on('collect', async interactionCreate => {
if(interactionCreate.CustomId === '1'){
if (interactionCreate.customId !== message.author.id) return interactionCreate.deferUpdate()
interactionCreate.reply({ embeds: [info], ephemeral: true})
}
if(interactionCreate.CustomId === '2'){
if (interactionCreate.clicker.id !== message.author.id) return interactionCreate.deferUpdate()
interactionCreate.reply({ embeds: [search], ephemeral: true})
}
if(interactionCreate.CustomId === '3'){
if (interactionCreate.clicker.CustomId !== message.author.id) return interactionCreate.deferUpdate()
interactionCreate.reply({ embeds: [Utl], ephemeral: true})
}
if(interactionCreate.CustomId === '4'){
if (interactionCreate.clicker.CustomId !== message.author.id) return interactionCreate.deferUpdate()
interactionCreate.reply({ embeds: [moderator], ephemeral: true})
}
if(interactionCreate.CustomId === '5'){
if (interactionCreate.clicker.CustomId !== message.author.id) return interactionCreate.deferUpdate()
interactionCreate.reply({ embeds: [Fun], ephemeral: true})
}
})
I want to make it without package
why do you have things mixed up?
Buttons id ?
you have
interactionCreate.customId
interactionCreate.CustomId
interactionCreate.clicker.id
interactionCreate.clicker.CustomId
all mixed up
I forgot XD
collector.on('collect', async interactionCreate => {
if(interactionCreate.CustomId === '1'){
if (interactionCreate.customId !== message.author.id) return interactionCreate.deferUpdate()
interactionCreate.reply({ embeds: [info], ephemeral: true})
}
if(interactionCreate.CustomId === '2'){
if (interactionCreate.id !== message.author.id) return interactionCreate.deferUpdate()
interactionCreate.reply({ embeds: [search], ephemeral: true})
}
if(interactionCreate.CustomId === '3'){
if (interactionCreate.CustomId !== message.author.id) return interactionCreate.deferUpdate()
interactionCreate.reply({ embeds: [Utl], ephemeral: true})
}
if(interactionCreate.CustomId === '4'){
if (interactionCreate.CustomId !== message.author.id) return interactionCreate.deferUpdate()
interactionCreate.reply({ embeds: [moderator], ephemeral: true})
}
if(interactionCreate.CustomId === '5'){
if (interactionCreate.CustomId !== message.author.id) return interactionCreate.deferUpdate()
interactionCreate.reply({ embeds: [Fun], ephemeral: true})
}
})
Done
now you have
interactionCreate.customId
interactionCreate.CustomId
interactionCreate.id
collector.on('collect', async interactionCreate => {
if(interactionCreate.CustomId === '1'){
if (interactionCreate.customId !== message.author.id) return interactionCreate.deferUpdate()
interactionCreate.reply({ embeds: [info], ephemeral: true})
}
if(interactionCreate.CustomId === '2'){
if (interactionCreate.customId !== message.author.id) return interactionCreate.deferUpdate()
interactionCreate.reply({ embeds: [search], ephemeral: true})
}
if(interactionCreate.CustomId === '3'){
if (interactionCreate.CustomId !== message.author.id) return interactionCreate.deferUpdate()
interactionCreate.reply({ embeds: [Utl], ephemeral: true})
}
if(interactionCreate.CustomId === '4'){
if (interactionCreate.CustomId !== message.author.id) return interactionCreate.deferUpdate()
interactionCreate.reply({ embeds: [moderator], ephemeral: true})
}
if(interactionCreate.CustomId === '5'){
if (interactionCreate.CustomId !== message.author.id) return interactionCreate.deferUpdate()
interactionCreate.reply({ embeds: [Fun], ephemeral: true})
}
})
Dn
interactionCreate.customId
interactionCreate.CustomId
What is the problem ?
one has capital C, the other doesnt
line 3
collector.on('collect', async interactionCreate => {
if(interactionCreate.CustomId === '1'){
if (interactionCreate.customId !== message.author.id) return interactionCreate.deferUpdate()
interactionCreate.reply({ embeds: [info], ephemeral: true})
}
if(interactionCreate.CustomId === '2'){
if (interactionCreate.customId !== message.author.id) return interactionCreate.deferUpdate()
interactionCreate.reply({ embeds: [search], ephemeral: true})
}
if(interactionCreate.CustomId === '3'){
if (interactionCreate.CustomId !== message.author.id) return interactionCreate.deferUpdate()
interactionCreate.reply({ embeds: [Utl], ephemeral: true})
}
if(interactionCreate.CustomId === '4'){
if (interactionCreate.CustomId !== message.author.id) return interactionCreate.deferUpdate()
interactionCreate.reply({ embeds: [moderator], ephemeral: true})
}
if(interactionCreate.CustomId === '5'){
if (interactionCreate.CustomId !== message.author.id) return interactionCreate.deferUpdate()
interactionCreate.reply({ embeds: [Fun], ephemeral: true})
}
})
dn
according to the docs, customId without capital C is the correct way
still same
oh wait
also, you're comparing a custom id to the author id
that comparison will never work
collector.on('collect', async interactionCreate => {
if(interactionCreate.customId === '1'){
if (interactionCreate.customId !== message.author.id) return interactionCreate.deferUpdate()
interactionCreate.reply({ embeds: [info], ephemeral: true})
}
if(interactionCreate.customId === '2'){
if (interactionCreate.customId !== message.author.id) return interactionCreate.deferUpdate()
interactionCreate.reply({ embeds: [search], ephemeral: true})
}
if(interactionCreate.customId === '3'){
if (interactionCreate.customId !== message.author.id) return interactionCreate.deferUpdate()
interactionCreate.reply({ embeds: [Utl], ephemeral: true})
}
if(interactionCreate.customId === '4'){
if (interactionCreate.customId !== message.author.id) return interactionCreate.deferUpdate()
interactionCreate.reply({ embeds: [moderator], ephemeral: true})
}
if(interactionCreate.customId === '5'){
if (interactionCreate.customId !== message.author.id) return interactionCreate.deferUpdate()
interactionCreate.reply({ embeds: [Fun], ephemeral: true})
}
})
Why?
isnt it obvious?
if customId is 5, then customId is 5
it will never be equal to the author id
the author id will never be 5
It's now giving me this err
https://sourceb.in/LwOD7RV1od
thats not an error?
thats the buttonInteraction object
but did you understand what i said?
oh
yea
I understand
@quartz kindle that will work?
if (!interactionCreate.author.id) return interactionCreate.deferUpdate()
interactions dont have .author
if (!interactionCreate.member.id) return interactionCreate.deferUpdate()
now you're checking if the member id doesnt exist
if the inteaction is sent in a guild, the member id will always exist, so your code will never defer
worked finally it's replying but i don't know why it's logging the button object
do you have a console.log somewhere?
oh i forgot to delete this
client.on('interactionCreate', interaction => {
if (!interaction.isButton()) return;
console.log(interaction);
});
I don't know what it should be
what do you want it to do?
This will work ?
if (!interactionCreate.member.id == message.author.id) return interactionCreate.deferUpdate()
Done
otherwise you're checking if the id exists, then then comparing the result of the existence check
@quartz kindle You are the best support 
that will be a one time payment of 499 us dollars for 3 years free tech support from certified microsoft tech support technician 100% legit and not a scam
my name is john smith from california and i do not have an indian accent, you are imagining things, i speak perfect english
tf
Okay no problem
🏦 499$ Has been transferred to John smith paypal!
I don't wanna repeat myself, fucking capitalism anywhere...
you sir have been scammed

Noo
np
🏦 499$ Come back to Joe paypal!
btw we do not accept paypal we only accept amazon gift cards
Free lawyer service for only $199 (on time purchase). Here and now.
Limitted offer, no scam.
btw you owe us taxes i am john smith from the IRS
hire this lawyer to help you pay your taxes and avoid going to jail
we are 100% not related to each other
Sir, I don't know You but thanks for suggesting our excellent service.
i dont know you either but lets get a coffee at the bar next door once our shift is over
we cant, our bosses keep 90% of what we make
u wanna continue to delay your API joining me on Factorio?
lmao
i dont remember how to play, i played it for like a few hours then never tried it again
playing like once per year, that's the ultimate offer
Tim doesn't know something... damn looks like the apocalypse isn't far anymore
lol have fun tho, ask her for some money, tell her you had a raff month
xD
how do I await inside .map()?
.map(async (things) => {}) should work
using async in a map callback is pointless
hello
@boreal iron
Hey, I want to delete links, that had been fetched, how to do this?
Im stuck here right now, could someone pls help me?
const messagecount = Number(args[0]) > 100
? 101
: Number(args[0]);
// System
if(isNaN(messagecount)) return message.channel.send(usageEmbed);
if(messagecount > 100) {
message.channel.send(":x: Du kannst nur Nachrichten zwischen **2 und 100** löschen.");
return;
} else if(messagecount < 2) {
message.channel.send(":x: Du kannst nur Nachrichten zwischen **2 und 100** löschen.");
return;
}
bot.channels.cache.get("881206811083042816").messages.fetch({ limit: messagecount })
.then(messages => {
let urlPattern = /(https?:\/\/)?(www\.)?(discord\.(gg|io|me|li|club)|discordapp\.com\/invite|discord\.com\/invite)\/.+[a-z]/gi;
let withLink = messages.filter(m => urlPattern.test(m.content));
if(!withLink) {
message.channel.send(noLinks);
return;
} else {
message.channel.bulkDelete(withLink, true);
message.channel.send("Erfolgreich alle Links gelöscht!");
}
});
}
how to get access to the variable declared inside a .then()
The recipient is temporarily unavailable.
What's up?
If you're in the .then, it's the first parameter. If you're outside it, you need to resolve the value returned from the chained promise.
e.g.
Promise.resolve(5)
.then((five) => console.log(five));
// or
let five = await Promise.resolve(5);
console.log(five);
// It would be a mistake to log it without awaiting it since it would be a promise.
@boreal iron
Or maybe you want to return a local variable since it's just a function
So I'm making a music bot in Node Js, how can I "store" (only in the process) playlists? how is the performance when i just would store it in an array?
Looks way better than before 👍
let playlist = {
// 123 is a guild ID
"123": [song1, song2]
}
You could also think about to add the avatar as thumbnail
And instead providing a link to the Steam profile
how would the performance be?
Is this right?
oh ok
i forgot about it
a sc
sec
In my opinion, you shouldn't worry about performance, but it should be good.
so here Promise is client.users.fetch(userid) ?
returns a promise resolving to a user
So you can await it or use a .then where the first argument to the function you pass is the resolved user
hmm ok
@boreal iron
I would like an example of this one with .then()
var u = await client.users.fetch(id)
console.log(u.tag)``` please
note that I want u to user outside `.then()`
In my example, Promise.resolve(5) represents the promise. So fetching the user is the promise. After that, .then((...) => {...}) doesn't change. But the ... does.
The first ... represents the user and the second represents what to do. So it could look like .then((user) => console.log(user.tag))
client.users.fetch(uid).then(u => {
console.log(u.id)
})
Of course, it would be more valuable if you learned how to use promises. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises
I want u to user outside .then()
var u = await client.users.fetch(id)
Then that's what u need
if(!u) console.log(u.id)
outside of .then()
probably can't
use await
they say it is possible by resolving the promise
still didn't get what u wanna do
yes then you have to put the code inside .then() not outside
The code outside will run without waiting for the promise to resolve unless you use await
the disappointment when nodejs v16 wont install on your windows 7
oh so I can't do this:js message.reply('hi').then(m=>{var mid = m.id}) mid
without await?
how do i use node now
#development message this
Hey, how can I delete the whole entrys of a user?
if(err) console.log(err);
if(!data.length) {
return message.channel.send(nowarns);
} else {
// delete every thing in the database from the user
}
});```
use uwuntu on virtualbox
usually data.delete()
what database you using?
this code is already working
wdym ?
oh
ah yes my pc can totally handle more than one program running at a time
the hell, didn't work for me
get a raspberry pi
I got one at 3k
mid is not defined
you can't use mid outside the promise
Just put the whole thing inside the function
yeah ok I'll use await then
if that's the only way
.then is better but anyway
ill just use replit with npm i node
npm i node@69.4.20
let shit = await fetch().then((yikes) => { if(yikes.ok) return yikes.child; });
to make things more complicated than needed
lmao
const annoyance = require("discord.js")
way too verbose
?
what
what?
I would react the same to your feedback
a sec
?
Use the embed generator
good point
i am open for any suggestions
cool
May highlight the hours in code tags
oh nevermind it started up it just had to download packages lol
10 hours
a sec
@vivid fulcrum @boreal iron
a lot more readable
yup
ok
Help, how can I suit this?
@vivid fulcrum
I only but my bot there, bot it v
Was a test, but now I quit the bot on this web, but I can quit this Web on my bot!
It’s better yeah
Maybe h inside the `` too
Also, that 3 years ago, why don't you use <t:timestamp:R>?
here's my spin on it @heady crystal
makes me want to cum
Flazepe what are you doing in detritus server
Lurk?
Spying on Erwin?
sure
Or betraying djs?
betraying rose
that's fine cuz I'm the one betraying djs
that's good
you have Erwin
he's very activtin other servers
I think he said this server made him lose so much braincells so he just stopped talking here
Erwin's last message was on July 10
go join his GenshinUtils server
oh ok
later
We loved erwin.
But
"When a wizard goes over to the (detritus) side there is no one and no body that matters to em anymore"
message.guild.channels.create(userName.toLowerCase() + "-" + userDiscriminator, {type: 'text'}, {
type: 'GUILD_TEXT',
permissionOverwrites: [
{
id: message.guild.id,
deny: ['SEND_MESSAGES', 'VIEW_CHANNEL'],
},
{
id: message.author.id,
allow: ['SEND_MESSAGES', 'VIEW_CHANNEL', 'READ_MESSAGES', 'ATTACH_FILES', 'CONNECT', 'ADD_REACTIONS', 'READ_MESSAGE_HISTORY'],
},
],
}).then(async (channel) => {
var ticketEmbed = new discord.MessageEmbed()
.setTitle(`Welcome in your ticket ${message.author.username}`)
channel.send({ content: `<@${message.author.id}>`, embeds: [ticketEmbed] })
})
how to set the parent ?
set the what
I mean send the channel to the category i want ;-;
did you not see the example i showed before?
Send the channel
Currently driving home, yeah
@quartz kindle Didn't work
parent: categoryID,
show code
What is the categoryID
People may don’t know blue text is a link 
message.guild.channels.create(userName.toLowerCase() + "-" + userDiscriminator, {type: 'text'}, {
type: 'GUILD_TEXT',
parent: categoryID,
permissionOverwrites: [
{
id: message.guild.id,
deny: ['SEND_MESSAGES', 'VIEW_CHANNEL'],
},
{
id: message.author.id,
allow: ['SEND_MESSAGES', 'VIEW_CHANNEL', 'READ_MESSAGES', 'ATTACH_FILES', 'CONNECT', 'ADD_REACTIONS', 'READ_MESSAGE_HISTORY'],
},
],
const categoryID = message.member.guild.channels.cache.find(c => c.name == "TICKETS")
why do you have type twice
why do you have 2 objects
idk
then dont?
Hey Tim, do you happen to know an alternative for mutating things without using Object.assign? I'm trying to keep memory references of say a string, but mutate it into a Map without having to redeclare a variable to update the reference
(name here, { object here })
you are doing (name here, { something }, { something else? })
ok ok
its only 1 object, not 2
Idk about js, but in java strings are final
Meaning you can't modify a string at all
strings can be mutated iirc
Worked again thanks @quartz kindle
aw no, my iframe in my bot page's description keeps disappeaaring after a while :(
why is that happening? ;-;
Might be a site issue even if i never saw a disappearing iFrame
Js is weird then
topgg site is trash anyways, not trying to be mean but it is how it is
Maybe once a beautiful day they will gonna fix their shit up
xd
you are bot developer xd
Looking back into more than 10y of experience even if I’m a frontend nub, not because I’m too dumb to code just because my level of creativity is trash
Same
I am forced to use the beta version
Backend programmers fear CSS
I can't switch
Doesn’t change the fact to fix existing issues
How damn complicated can it be to fix site issues even if they are temporarily
can confirm
Especially mobile
I do have creativity, but my sites end up looking like 4yo kid drawing mash-ups
Actually not why? Wtf
Sometimes the ads keep looping or do not show
sometimes I dont see the bots when they exist
I like fucking do responsive designs and fight with their related issues
:D
Too much responsive that they start arguing back 
I use chakra ui for everything because I cannot make a good looking UI on my own
But other than the younger kids I rely on backwards compatibility mostly using CSS2
I use Angular
PS it gives me a 100 lighthouse accessibility score
cause I love myself
:p
I've considered using Tailwind or plain CSS
Damn egoism, love me
Damn love
tailwind pog
I use it a lot
I discovered it yesterday.
I've been scared to develop for the web because of stuff like CSS
So a functional approach to CSS is exciting
don't worry CSS hates everyone
Anyone who can design with css is a god in my books
except Jen Simmons maybe
Even after so many years I somethings freak out, too don’t worry
I am trying to get into frontend more since I am probably going to be doing my project idea solo lawl
Even though I hate it
At the same time, I'm worried Tailwind will die out and everyone will move to another framework in a few years.
What’s tailwind? A CSS framework?
Yeah
who knows the web to create docs
Not sure if it's a "framework" but it is a tool nvm, it is

Gitbook is good for docs
Oh, okay
Is able to put in my domain?
Yes
like docs.domain.com
Yup
It lets you compose CSS through a bunch of CSS classes
Okya, ill try gitbook
Well wrapper, framework pff people actually name things as they like to
tysm
No problem! 
Only thing I hate is that it mixes documentation files with actual repo files
do you have an example?
I don't know I've not linked it to my repo at all. I just use it for the docs.
There are even people out there calling HTML a program language and they are still alive, so you shouldn’t worry about the actual name too much
I will probably have to make my own post request
Libs are listed on https://docs.top.gg
There is a go lib
How about a GitHub Wiki
There's readthedocs
Mac seems to post the docs link and run dbl commands all day long, aren’t you? 😅
Mac full mod when?
Shhh
Literally 90% of my interactions on public channels in this server
It's only been 10 days
Trial not over yet!
Dang f
Let’s spread lies about Mac getting him demoted.
Just to prevent him from getting promoted, then fucking getting arrogant, keep forgetting us poor society, fuck with us and ban us.
Oh he’s still here
u saw nothing
We need to get parm to change his nick to cheese when mac get promoted
So we can have Mac 'n Cheese duo
lmao
https://github.com/AmandaDiscord/Heatsync/blob/master/src/index.ts#L48
This method works on Objects. Objects are able to be reloaded properly. The basic idea of hot reloading. However, I would like to extend support to other types like strings or booleans and such. The problem becomes changing the type of the thing without changing its reference. I tried to wrap it in an object, but changing object properties overwrites the reference of the Object property
Calling your boss now and tell him you touched me, I swear
still not sure what you're looking for, you want to keep a copy of an object stored somewhere as a backup, then clone its values to restore them?
Sort of. The gist is that the user requires a file and the state of the Mod is stored and returned to the user. The user should be able to change the files and the lib will mutate the state of the mod and the user can continue to use the mod as if the process was restarted without having to re-declare anything or jump through any weird hoops
nope
so watch the file for changes, and on change read the file again?
yes, I have that down
So, discord.py is dead. What now?
0:00 - Intro
0:33 - The statement
2:34 - What happens next?
6:06 - The channel
7:46 - Final words
The full creator statement:
https://gist.github.com/Rapptz/4a2f62751b9600a31a0d3c78100287f1
The hikari streams:
https://www.youtube.com/playlist?list=PLYeOw6sTSy6YVmOn6pIV3q7_7anmwvOyv
The hikari Discord server:...
The problem is that only Objects can be synced effectively due to the fact that it uses Object.assign
The lib can require modules which export something other than an Object, but it cannot muted the reference so that the user gets an up to date version
That’s what Tim already said
It’s no longer maintained
i mean, if it returns a primitive, you can just directly assign it no?
i should change my bot ?
doesn't that overwrite the reference?
primitives dont have references
Okay. So. Let me throw you a scenario I'd like you to solve
You will have to at some point as further API communication might change
The user requires a module which only exports a string. This require is passed through the lib I just sent you, so the lib handles the require, the references to the require and it's exported members and such and returns the value back to the user. The user has the expectation that they don't have to re-declare anything at any point in time. The user updates the module and changes it so that it exports a boolean and would like their reference from their require which routed through the lib to point to the boolean without re-declaring their variable.
Currently, they will find that they don't get the boolean and are stuck with the string. How can this be fixed
how do they access the string?


