#development
1 messages · Page 1860 of 1
primitives are immutable, but objects are not
so if they have X object, with property Y which is a string, if you change the property Y with a new value, the X object will contain the new value, as long as they always access it via the X object
file1
module.exports = "poggers";
file2
const file1 = sync.require("./file1")
console.log(file1) // "poggers"
yes
sync.require?
yes. But, if the mod was updated, it would not reflect the update
What is sync.require
if the mod and the updated mod returned an object, it would
That's sync.require
cool
how does the user obtain the value?
what code do they write?
Need your maneger primium
Wut?
exists Discord-Oauth in react.js?
What
I was researching about, but I didn't find anything.
about DiscordOauth2 with react.js

Well, you'd implement oauth2 in your backend
and just simply have your frontend be able to interact with it
Such as making a button that takes you to the oauth2 authorization page for your application and then redirect to a callback url that exchanges the code for an access token which you use to request their information and then display whatever you want on the frontend
if you return the primitive directly, you are always returning a copy of it
since primitives dont have references

the only way to solve this would be to make the require always return an object
and to put the result of the required file inside an object
Okay, isn't it?
Pain. Figured there would be
Alright, what do u guys do when you get burnt out?
light the fire again
how
with your mind
how
concentrating real real hard
concentrating on what?
fire
huh?
my project I was working on
I have like 0 motivation and the moment I open visual studio code I just phyiscally freeze
Take a break, do something else to clear your mind and go back to it later. Watch yt, a movie, or a tv show, or sleep
do something fun
that's not what you're currently doing
aka stop developing and go do something else
like watch a show
I usually have two projects
then come back the next day
My main and a side if i get bored of the main
I've watched all 5 seasons of lucifer in like 5 days
And I still have no motivation at all
impossible
well, I still need to see 8 but
lol
you get the deal
then maybe you've lost the motivation to program
career ending stuff right there
well how do I get it back?
Honestly just take a break man
bro, I'm only 15
over working yourself aint fun
Cuz I enjoyed it
enjoyed
I enjoyed learning new stuff
past tense
have you been learning too much?
I advise taking a break tbh
idk
its what I did
I've already taken a break of like 5 days
And I rlly wanna start working again cuz I wanna finish my project but I physically can't
eventually you will start to do it again
I played video games for months and suddenly just started programming again
Anyway, it's up to you to find that motivation to develop software. Like misty has said, you can continue to take a break even if you haven't developed in a while. There have been days where I don't know what I want to develop then come back the next day with an idea to solve a problem.
mmmh, alright
For me, it's been taking a few days off my ClojureScript project to think about design while watching shows
it's just annoying I rlly wanna finish this project I've been working on it for a year now
You probably just burn yourself out on that one project
if you wanna program still try and work on something else for a bit
you can always go back to it
Alright, time to pick up react again then
You could go outside and call the police if somebody committed are parking violation
parking violation spotted
lmao thought the same tho
That’s what happens if parents allow children to visit the internet
what do u mean with this btw?
They should fucking work on the rice fields, then this wouldn’t happen 
is this some weird grown up metafore?
i have a bot using a mlm to do stuff, i've it already written in python but im thinking of rewriting it for speed, since the model takes a solid second to do its thing. is there a language that would be good for such a thing or is this not a language thing?
lmao
machine learning model
oh sorry
i dont think language is that much of a factor, it depends how the libraries you're using work and what language they use
I also thought that at first
if you want maximum performance, the only way is to go lower level, like C/C++/Rust
hm
but if the library you are using is already made in C, then it wont make much of a difference
nah, tenserflow keras
so yeah i think i need to find a c/c++ lib for ml
👍
im trying to register my fist slash command and im getting a 400 error. any idea what's wrong with my request?
I can't remember
Also
isn't it supposed to be a post req
or can a get req work as well?
I think it would be a 403 actually ye tim
Are you supposed to be fetching all commands in a guild
try using a post request instead of get maybe?
hahaha, yea
im going to be hooking all my commands up to slash commands
i registered a slash command successfully, but it's not showing up in my guild. do i need to reinvite it?
try reloading the client
yeah, got a 201
#development message
The description can't be empty, too
it's type 2, which is a user command
anything other than type 1 can't have descriptions
the description is "" when you fetch the command though
it didn't register
uh nvm then
isnt type 2 one of those that you have to left click a user and go to App?
xD
high five
they should have known
the command name is "High Five"
only type 2 and 3 supports that kind of naming
i thought i could use the user one for my record command. doesn't look like it'll work
!record [#PLACEMENT PLAYERS...]... GAME_NAME
!record #1 @player1 @player2 #2 @player3 @player4 Counter Strike
user commands only provide you the user you click the command on
that's all, no other arguments at all
same goes to message commands
do you have some good docs that go over the difference between the types?
not sure, but it's pretty simple
it's just that you don't need options for type 2 and 3
they provide you the full user/message object under interaction.data.resolved
should i just create a type:1 option that allows free text and then make it use the same syntax for my command?
gotcha
otherwise the new update would have broken lots of bots
probably not, maybe just that 1 bot that uses slash commands /s
is there a way to support array input?
nope, you have to explicitly make an option for each one
or use type 3/string and parse them manually
thats what we're all waiting/hoping for
is there someway to tell the slash command to call an endpoint? do i still need a socket connection for slash commands?
is this where i register the endpoint for the slash commands to invoke?
If you want to handle slash commands through HTTP rather than the gateway
If I had to assume, it'll hit just that endpoint with the data in the body.
So there's no routing.
will this interfere with the message listener if i put in an endpoint?
if you add an interaction endpoint they will be sent to that endpoint instead of the gateway
so your gateway will no longer receive InteractionCreate events
other events are not affected
also, if you're gonna implement the endpoint yourself, it needs to be https and it needs to conform to all the security stuff, like responding to pings and returning 401 on invalid signature
One message removed from a suspended account.
One message removed from a suspended account.
wut
One message removed from a suspended account.
oh lmao
sup
Ceiling
sky
why?
Does anyone here have an example of a decent project structure in NodeJS? I'm thinking about entirely changing my Discord bot's structure soon 🤷♂️
Assuming you're referring to files and folders, it doesn't really matter. Just pick whatever suits your needs/feels right.
Right - this. If I pick whatever suits my needs, it normally ends up getting messy and needing a refactor (which is what is happening). Just curious if anyone feels strongly about their specific file structure.
But refactors are a good thing
Ye, refactoring mean you're improving your knowledge
Bcuz you're seeing the difference between your old self and present
Nonetheless, I do recommend categorized file structure, it somewhat feels more organized
I don't have a concrete structure myself, but I choose to split files and folders based on namespaces (aka what section of work they're responsible for) and preferring single, large files rather than a bunch of isolated files in nested folders. For example,
src
|_ assistant
|_ client.clj
|_ client
| |_ commands.clj ; All commands are in here
| |_ wikipedia.clj ; Subcommands of wikipedia command
|_ db.clj ; most database operations in here
|_ something.clj
Like, a folder for models, a folder for controllers, a folder for utility stuff, etc
Also I prefer one file for each thing, mainly because it's very easy to find where everything is
@quartz kindle remember our discussion earlier about memory references and such? What if instead, I pass the user a getter to get the current value on the Object? Can that even be done?
same as giving them an object
they have to call the getter from somewhere
what you could do tho, is tell them to always use require
everywhere in their code
and not assign it to any variable
lol

I don't get getters
why not just leave it as a function call
it is more "convenient"
they're a method without using the parenthesis
get gud
private values
git gud --hard
still needs objects
lel
well
you could do something like
eh nvm wouldnt work

This problem is melting my brain
Does the engine call anything specifically to get the value of something? Like I can make my own Object to pass to the user, but the user would have no way to know that it's an Object and thinks it could be a string
another possibility is to give them an object with custom coercing methods
but thats not as transparent, the user will still see it as an object
damn
but stuff like typeof a would still show "object"?
yes
fuck
I'm trying to set an user's nickname, but guild.members isn't defined. How would I do this?
guild.members.fetch(id).then(user => user.setNickname('[' + elo + '] ' + p1));
It shouldn't be undefined.
So guild is probably not the right value.
And I hope there's a better way to set the member's nickname because you're making one request for the guild member and another to set their nickname when that should really be one
ah. idk im essentially given the id, but then need to set the user's nick based on that
in intents?
Both in code and intents
alr
thgats kinda what im confused on
ive tried client.members and guild.members. both dont seem to work
as in .fetch is always undefined
i dont, which is probably the issue. asdf im so stupid mb
Well, u need to define what the variable is
Simply saying guild ain't gonna make the code understand what it is supposed to be
yeah i kinda messed up there lol
can someone help me with this error please?
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: FileNotFoundError: [Errno 2] No such file or directory: '/home/runner/Server-Shield-Bot-Code/cogs\\..\\json\\data.json'
Your file path is heavily messed up
yea... I've been trying to switch to cogs from client.command
wait so i think this is the code:
@commands.Cog.listener()
async def on_message(self, message):
with open(os.path.dirname(__file__) + f'\\..\\json\\data.json','r+') as f:
data=json.load(f)
if message.content in data[str(message.guild.id)]:
await message.delete()
i have to remove the .. right
You have to use /
os.path.dirname is returning path with /, so you gotta use it
And you can't have .. there
alright
do I replace all of the \ with /
like this?
f'//json//data.json','r+') as f:
...idk how to explain it but...you're new to IO ain't u?
Search examples on how to access a file on python
alright
And DON'T carbon-copy it
Np, and btw u don't need double /
how do i make a calculator that can multiply in my bot
in node.js
const math = require('math-expression-evaluator');
const stripIndents = require('common-tags').stripIndents;
const config = require("../../config.json")
module.exports = {
name: "calc",
aliases: ["calculate"],
category: "📋 School Commands",
description: "Calculates a math equation",
usage: "[command | input]",
run: async (client, message, args) => {
//command
if(args.length < 1)
return message.reply(`You must provide a equation to be solved on the calculator`);
const question = args.join(' ');
let answer;
if(question.indexOf('9 + 10') > -1) {
answer = '21';
} else {
try {
answer = math.eval(question);
} catch (err) {
message.channel.send(`Invalid math equation: ${err}`);
}
}
message.channel.send({
embed: utils.embed('', stripIndents`
**Equation:**\n\`\`\`\n${question}\n\`\`\`
**Answer:**\n\`\`\`\n${answer}\n\`\`\`
`)
});
}
};
it can solve simple addition problems
nothing more
make your own expression parser
m
It's a joke answer
how do i get a user's about me?
Depends on the language
nodejs
whats the url?
You have to find information about the user using the API, depends on what your "about me" command is supposed to do
what lib
having a strange issue with djs
if I drag a bot from one voice channel to another, it doesn't update the voice state
It does, however, update on voice channel join
hi extreme
um
weird
does it not send anything on the voice state update event? @crimson vapor
client.on('raw', (p) => {
if (p.t === 'VOICE_STATE_UPDATE') console.log(p)
})
client.on('voiceStateUpdate', (o, n) => {
console.log(o.channelId, n.channelId)
})``` this is what im doing
you can see the raw event above the two channel ids
hm
One message removed from a suspended account.
p.t?
p
it'll just be message stuff
@pale vessel any ideas
can someone help me with this error...
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: KeyError: '809186279077314590'
im not sure what this is
please ping me if you know
CommandInvokeError — exception raised in a command
KeyError — you tried to get a key from a dictionary when it's not present
can someone help me getting the soundcloud client id im not able to find that for my bot
Doesn't that need the official API, which is closed for signups?
what's the difference between SlashCommandClient and InteractionCommandClient in detritus
maybe InteractionCommandClient is for more than just slash commands
it's just a theory
a detritus theory
detritus theory nice
i have another question
for slash commands when I run commandClient.add and there is already a slash command registered with the exact same name description etc does it republish the command or just let it stay like it is
@pale vessel can ye help me
no cuz I don't use the thing
you can TIAS
won't hurt
unless it does
then someone else needs to help
const user = message.mentions.users.first() || message.guild.members.cache.get(args[0]) || message.author
I wanna cache user with id but itsnt working
you are mixing up members and users
message.guild.MEMBERS.get
Members not working on v13
On mention
they changed something
try reading the v13 upgrade docs
Couldnt find something about it
My problem is that if bot cache member with mention i can use user.username but if it cache with id i must use user.user.username
change members to users
then you wont need to do user.user.id it will always be user.id
oh wait
i just realized users doesn't exist
Yes it does
On the mentions prop it exists
add an if statement that checks if the user is a member and if it set the variable to user
We're talking about guild cache
The mentions part is fine
Oh I thought you were talking about mentions lawl
lawl
Well, you might not even get a member if they aren't cached
@earnest phoenix don't change anything just add an if statement checking if the user variable is a member
and sometimes the GUILD_MEMBERS intent doesn't cache them
so you typically have to fetch dont ya?
there is a || after the get
Well yes I am just saying it might never work no?
yeah that works
because you're not dealing with user objects
mmm
djs confuses me sometimes
I use detritus
Working while banning
But not working while try to getting avatar
Okay i wont

well you told em not to
Actually i am using dcoder
Bc replit is hard on phone
And thats not the problem discord js to weird
Working while banning
But not working while try to getting avatar
If i can get user with these code i can get his avatar too right
If it's a member object you have to do .user
for some reason when I type on replit on my phone my cursor moves more and more away from the text with every character
So dcoder is Better
<Member>.user.displayAvatarURL()
every ide sucks on my phone
Everything sucks on phone
If i do it it wont work with mention
You'll have to add an if statement that checks if the user is a member
Either get the mention by user or member
Hmm
Since you're using message.author at the end it makes sense to do by user
Else do message.member
const user = smh;
if (user.user) { user = user.user }
user is now definitely a user object
And do this
look at me not using // for comments
That's pointless if you want a user object get the user instead of the member
bruh
You'll have to use a check for guild member cache anyways
Well do they want a guild members or a user I'm confused
They want a user
They are doing message.author if none of it works
But they also want to use ID to get a member
You see what's going on here right
yeah
From their code it shows them using message.author at the end of the user variable declarations
const user = message.mentions.users.first() || message.guild.members.cache.get(args[0]) || message.author
if (user.user) { user = user.user }
I mean I guess that would work I just don't see the point in doing it that way
🤷
because
message.guild.users doesn't exist and doesn't need to exist
Well of course it doesn't exist
So if i use it it will work?
i guess user discord user means a member that is not inside the server but member is inside the server
At least in my language there is a difference like this between user and member
I have a code.. organised.. but long.
if (!args[0]) {
var user = message.author;
} else {
var user = message.mentions.members.first() || message.guild.members.cache.get(args[0]);
const embedError = new MessageEmbed()
.setColor(red)
if (!user) {
embedError.setDescription("❌ Invalid User");
return await message.channel.send({ embeds: [embedError] });
};
};
const Discord = require('discord.js')
module.exports = {
name: "avatar",
async run (client, message, args) {
const ment = message.mentions.members.first()
const id = message.guild.members.cache.get(args[0])
const auth = message.author
if(ment) {
const embed = new Discord.MessageEmbed()
.setTitle('User Avatar')
.setImage(user.displayAvatarURL({ dynamic: true, size:2048 }))
message.channel.send({embeds: [embed] })
} else if(id) {
const embed = new Discord.MessageEmbed()
.setTitle('User Avatar')
.setImage(user.user.displayAvatarURL({ dynamic: true, size:2048 }))
message.channel.send({embeds: [embed] })
} else(auth) {
const embed = new Discord.MessageEmbed()
.setTitle('User Avatar')
.setImage(user.displayAvatarURL({ dynamic: true, size:2048 }))
message.channel.send({embeds: [embed] })
}
}
}
Why all this?
because i'm tired of silly errors
Ill change them
But I was lazy
I sent it to question the possibility of it working
Nwm ill try it my self
if (!args[0]) {
var user = message.author;
} else {
var user = message.mentions.members.first() || message.guild.members.cache.get(args[0]);
const embedError = new MessageEmbed()
.setColor("RED")
if (!user) {
embedError.setDescription("❌ Invalid User");
return await message.channel.send({ embeds: [embedError] });
};
};
const embed = new Discord.MessageEmbed()
.setTitle(`${user.user.username} Avatar`)
.setImage(user.user.displayAvatarURL({ dynamic: true, size: 2048 }))
return message.channel.send({ embeds: [embed] })
Do that.
Hmm okay
Works?
Change message.author to message.member
Hey.
const { dependencies: { "discord.js" } } = require("../../../package.json");
Did I do something wrong here since it's giving me red dashing lines.
I want to get the value of discord.js
':' expected
What can I do instead, then?
Should I use fs?
What do you mean?
const Discord = require('discord.js')
module.exports = {
name: "avatar",
async run (client, message, args) {
let user = message.mentions.members.first() || message.guild.members.cache.get(args[0]) || message.member
const embed = new Discord.MessageEmbed()
.setTitle(`${user.user.username} Avatar`)
.setImage(user.user.displayAvatarURL({ dynamic: true, size: 2048 }))
return message.channel.send({ embeds: [embed] })
}
}
i think this is easier
just do require("package.json").dependencies["discord.js"];
but obviously change the path to the package
👍
Ok, does anyone know how to disable the weird but annoying thing with vscode where it auto completes for the method you want but it ends up eating the characters next to it on the line. It keeps doing it and it's annoying

does anyone know an actually good linter for java in vscode
i have an eslint extension but it only works for js

its linter kinda stinky tho
what the fuck is that cable
seems like some kind of proprietary shit
usb yellow square from a charger
Yo.
I have a string, example..
let string = "This is the rest of the sentence. Where one two three.."
I want it whereas after the sentence., instead of continuing the string.. it replaces them all with ...
Is that possible.. and should I do like .slice(beginning, string.length)?
For that string specifically, you can say
string = `${string.slice(0, string.indexOf("."))}..`; // I think this leaves 3 dots at end
let string = "oofmynme is the best human in the world";
console.log(string.slice(0, 22) + `...`)
I did this.
After h of human it leaves the rest as ...
Basic js question. ${variable} only works in template strings ``
Template literals need backticks
that matches all characters in the string
That's not what they want
oh whoops. \.
That wouldn't work either because of the g flag.
Well. Maybe it would
but you shouldn't include it
it's unnecessary
you have no clue what g does
"thing 1. thing2. thing3.." > "thing 1... thing2... thing3......"
That's your regex
doesnt the + match any number of consecutive characters?
yeah
so .. would be ... not ......
oh right mb
Either way, your regex isn't what they needed
they wanted everything after the . to be replaced with ...
What happened to <guild>.region?
removed. It's now voice channel rtcRegion
Oh god.
It is indeed a pain
bread
Maybe try to get the first sentence first (like what Papi did) and if not slice the string





Could you send me the function you made.. and does it support maps and arrays?
Example, looping through the roles of a guild.
Looks wrong somehow.

You could just map the roles by the name and pass the name through that fn
The baguette 🥖


await the promise
That would be the code you need, not the code you have
done.. still same output
Show more code
await bot.users.fetch(sServer.ownerId).toString()
(await func())
OH
toString() doesn't return a promise, users.fetch() does
And the ownerId is a string anyways
Btw you can use (await guild.fetchOwner()).toString()
wait.. that works too?
fetching the user and calling to string is not necessary since it just returns <@${ownerID}>
What they're doing will make the owner user object a string. Not the owner id.
smh
v13
Going back into my bed
what does v13 have to do with anything
Yoo saw ownerId to be the property he wanna fetch
- message.channel.send(user);
+ message.channel.send(user.toString());
No, that's unrelated
Just send <@${ownerID}>
He's saying you can just use <@ownerId> without fetching the full object
It doesn't change in v13
It still returns the same as <@${ownerId}>
Its dependent on the latency and the specs of your vps
1 CPU
1 GB
1 TB Bandwitdh
1 TB Bandwitdh
is something wrong about it?
Yes
What is it
As well as the code efficiency
Probably 1 gbit/s bandwidth or less not 1 tbit/s
Maybe you saw 1 TB traffic not bandwidth
Is transfer and traffic the same
Well transfer is a weird term for it but probably
There’s no other term for traffic than traffic 
bandwidth is how fast you can download/upload, traffic is how much you can download/upload
my bot became pretty slow after i switched to vultr
What’s vultr? Your provider?
If so did u monitor your process usage?
Vultr is my vps
"Usage" is the key word, yeah also explains it’s the traffic
If so did u monitor your process usage?
Yeah I did
Is the system usage at its limits already?
No
My ws ping is 80ms
and the rest ping?
That’s roundtrip, right?
ye
I didn’t change code.
Well, my old one was a bit faster tbh
Actually, it’s from 120-180ms as I used this way previously: Date.now() - message.createdTimestamp
Well, the command response time is slow
measure it
took like 3s to respond
That's when it's locally evaluating the expression which should be 0ms. The latency you're experiencing is lag between you <-> Discord <-> your bot
you'd wanna measure the ws latency no?
rest
no
ok
I want to pass an object to the event
for (const file of eventFiles) {
const event = require(`./events/${file}`);
if (event.once) {
client.once(event.name, (...args) => event.execute(...args));
} else {
client.on(event.name, (...args) => event.execute(...args));
}
}
event file:
module.exports = {
name: 'messageCreate',
async execute(message) {
}
}
So I want to pass the object for example logChannel, I got from my databank so I can use it in my event file.
I defined the log channel under:
for (const file of eventFiles) {
And I am trying to access it in the event file:
async execute(message, logChannel) {
Any Idea how I can do that?
First slash command!
Nice
how do you set intents though
Normal way?
im using detritus
not djs
Oh
Easy
const resolveID = async () => (await tiktok.getUserProfileInfo(accountshouldbehere)).user.id```hey this is my little code i have made. How would i get each guilds[message.autthor.id].tiktokname value to loop each one through the above function?( and what if each user has multiple accounts set!)
You grab the intents from the socket package that gets installed alongside detritus
the docs are generated with typedoc and im just flicking through random links
and just define the intents in the client
there is the detritus-client-socket
You can grab the intents from it
Do you want to transfer the messages seen by the bot to a log channel?
No I dont
Why you need log channel on message event then
i found gateway.intents property
how do i generate intents now
Mmm not entirely sure on that one tbh
I just grabbed GatewayIntents from the socket package and just loaded them in an array fashion iirc
ok
still dont get how to set intents
plus the fact typescript intellisense is absolute shit on replit
lawl
Cause you can't send an embed like that anymore
So what should i change ?
Since Discord.py is stopping development what should the best bet for people who were using it? Change to different language or use some fork versions of it?
Also if we're to change language which do you prefer should be nice with slash functions working properly
ReferenceError: Intents is not defined
const client = new Discord.Client({
intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES, Intents.FLAGS.GUILD_MEMBERS, Intents.FLAGS.GUILD_MESSAGE_REACTIONS],
partials: ['MESSAGE', 'CHANNEL', 'REACTION']
})
Import Intents
self explanatory
people saying it uses too much memory and eris and discord.js light are better? is it true?
I mean, you can use any fork someone makes or use a different lib there is probably one out there
like ```js
const Intents = require("intents")
?
tf no
const { Intents } = require('discord.js')
thx
@earnest phoenix
if (typeof data !== 'string') throw new error(errorMessage);
^
RangeError [EMBED_FIELD_VALUE]: MessageEmbed field values must be non-empty strings.
ok sorry
for(const key in guilds){
console.log(guilds[key].account)
}```Hey guys, this gives me an array of the accounts as users can have multiple. How would i eventually get each account name that are available>
Lol
Well ofc
Don't repost please
const embed = new MessageEmbed()
.setColor('738ADB')
.addField(`**General**`, [
` **Username:** ${client.user.username}`,
` **Tag:** ${client.user.tag}`,
])
.addField(`**Stats**`,[
`⌨️ **Channels:**\n \`\`\`${client.channels.cache.size}\`\`\``,
])
message.channel.send({ embeds: [embed] })
if (typeof data !== 'string') throw new error(errorMessage);
^
RangeError [EMBED_FIELD_VALUE]: MessageEmbed field values must be non-empty strings.
if (typeof data !== 'string') throw new error(errorMessage);
^
RangeError [EMBED_FIELD_VALUE]: MessageEmbed field values must be non-empty strings.
It's not empty ._.
how would i loop through this json file to get each account property of each user? Ping me when you have the answer please.
._.
Key note
typeof data !== 'string'
means what you are giving it isn't a string
array != string
If you wanna use an array use the join method on the array
ok
I am trying to fix it but yea you can tell me more if u want
if (typeof data !== 'string') throw new error(errorMessage);
^
RangeError [EMBED_FIELD_VALUE]: MessageEmbed field values must be non-empty strings.
const embed = new MessageEmbed()
.setColor('738ADB')
.addField(`**General**`, [
` **Username:** ${client.user.username}`,
` **Tag:** ${client.user.tag}`,
])
.addField(`**Stats**`,[
`⌨️ **Channels:**\n \`\`\`${client.channels.cache.size}\`\`\``,
])
message.channel.send({ embeds: [embed] })
Wait
ok
Nope
Wait should i type \n in spaces ?
Full code
const embed = new MessageEmbed()
.addField(`**General**`, [
` **Username:** ${client.user.username}`,
` **Tag:** ${client.user.tag}`,
` **ID:** ${client.user.id}`,
`📆 **Created At:** ${moment(client.user.createdAt).format("DD-MM-YYYY [at] HH:mm")}`,
` **Developer:** @pallid jungle`,
` **Bot Website:** https://Wolfy.yoyojoe.repl.co`,
`Version: ${version}`,
`━━━━━━━━━━━━━━━━━━`,
` **System**`,
'\n',
`Memory Total:\n\n**${client.commands.size}**`,
`Memory Used (*heap*):\n\n[**\` ${(heapUsed / 1024 / 1024).toFixed(0)} MB \`**]`,
`OS:\n\n**${process.platform} ${release}**`,
`DiscordJS:\n\n**v${discord_version}**`,
`Node:\n\n**${process.version}**`,
`CPU:\n\n**${cpus()[0].model}**`,
'\n'
])
.addField(`**Stats**`,[
` **Servers:**\n \`\`\`${client.guilds.cache.size}\`\`\``,
`⌨️ **Channels:**\n \`\`\`${client.channels.cache.size}\`\`\``,
` **Users:**\n \`\`\`${client.users.cache.size}\`\`\``,
])
message.channel.send({ embeds: [embed] })
Field values take strings as input and not arrays
mistyy already explain a lot of it in here
and you still don't get it
kk
you can use the join method to join all those string
just like ```js
<Array>.join("\n")
Also the first field's value string could potentially be over 1024 characters which might throw an error
Thx
I think it's not 1024 character
Field names are 256 and values are 1024
oh
lol
Quick tip: If you wanna write multi lined string but dont want to use \n and make a very loooong line. Test out NPM common-tags. Should be very helpful
To anyone :D
uwu this seems nice
or just
"1\n\
2\n\
3\n\
4";
I dont think u can have multiline strings without using template literals
where
You can
and ur joining the add field function?? wutt
You split your arguments with " " at your message event / handler. And then at the eval command you join it with " " again. Thats the reason you can eval it. If u were to code it in vsc u would face this error
Indeed they are just lookin for a spoonfeed probably lmao
Also your whole input including the " are interpreted as a string
I don't do that. I substring everything after the prefix, command and 1 space
As u can see that the " are also displayed in your reply content
In your eval command the " are the part of the string and not the syntax of representing a string. Just try doing your method on VSC and you'll see
Try it, and see it.
the \ at the end of a line while inside of a string means to continue the string on the next line
Oh wait, I did not notice that, blame my vision 
hehe
all g
for(const key in guilds){
console.log(...guilds[key].account)
g += `USER ID: ${key}:`+"\n"+ [...guilds[key].account]+"\n\n"
p = g.replace(/,/g, "\n")
console.log(g)
}
const embed = new Discord.MessageEmbed()
.setColor("RANDOM")
.setTimestamp()
.setDescription(p)
.setFooter("Your tiktok notifier!")
message.channel.send(embed)
}``` why is there an undefined in the embed>
Hey I have simple question regarding that Flickr emoji
Can I use these the down one is animated and it moves left to right
that code is very inefficient and badly written
show where you created the g and p variables
let g;
let p;
all the way at the top
i have found out that the issue lays in the g+=
but i am no sure why
if g starts with undefined, then that value is being added to g somewhere
before the code you showed
you have to initialize the variable to an empty string, but anyway you should rewrite that entire code, because its doing a lot of unneeded things and repeating them for no reason
Hello! Anyone know the best resource to get an array of almost all english words?
thanks!
that must of been fun to compile
My chrome crashed trying to open the words.txt

my entire pc BSODed 10 min ago from using google maps on the browser
Lol
y'all have amazing pcs that can't handle that shit but my potato pc can smh grind through
console log "test"
``` guys what's wrong here?
Missing a few symbols here and there, but it looks okay! 👍
console.log("monke")```
if i am not wrong lol
you are wrong
ok
its print("test")
i think we are using js
not anymore
;-;
also if you are using js
probably echo "test";
and double quotes
am pro
its easier to press lol
use prettier
hm
Or just dont hold shift while trying to type "
double quotes are ugly
monke doe
oo oo ah ah
I use double quotes to make it easier to tell the diffrence between ` and "
which is really dumb reasoning but 
it's personal preference...
though whoever isn't using double quotes is getting the electric chair
Hook me up then
I use double or single depending on my mood when I start the file
but i'll always stick to one or the other once I start.
Anyone know a bot that is like Members+?
My codes has both, auto completed imports have double when the other imports have single. And 90% of all the other strings that i write have the template literals
Dbl how2search
@shy tapir
mac are u epic gamer
it called basic
10 PRINT "HELLO :3"
like that
but idk how to run the code
A.A.A. great words
hey any one can help me?
ok sorry
i am using replit it and i have done all the thing and now when i press run it showing exit status 1
@earnest phoenix
anyone?
Please dont ping me for support
just wait patiently someone who can help will eventually help
+____+
One message removed from a suspended account.
👀
couldnt you just
console.log(` 1
11
0000111
00001111
0000111
11
1`)
or channel.send() it or whatever
One message removed from a suspended account.
whats the actual error? or only just exit 1?
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
Probably an already defined string, just replace 0 and 1 by something else?!
One message removed from a suspended account.
So i need some socks5 proxies and want to bypass captcha
Just exit status 1
not sure then. would contact replit support
possible?
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
save the arrow as string, then create a function and use it's parameters to replace either 1 or both symbols
One message removed from a suspended account.
One message removed from a suspended account.
the function?
I would void something like that, unless you need it to return the string
One message removed from a suspended account.
If you have a function just for making the string, and want to send it from the function youd make it a string.
if you are doing everything in the function and dont need anything returned void
So basically you have an array of words you want to remove from an array of words?
Well, I could think of one way though I don't know if its the most efficient way
Loops through the array you wanna clean, check if the element is included in your filter array, if so splice the element using indexOf() (it's key).
1 loop, 1 line
I would just use a filter
I would try looping over the array of words you have, and then check if the word in that array is included in the array of words you dont want, if so remove that word else continue
filter and use includes 
well yeah, just a few symbols less
why?
arr.filter(item => item.includes(otherArr));
should do it right? or am i being silly
op backwards, but you get the idea
Create a new array if the item isn't "bye"
and vise versa
Yea
I wonder what the source code for the filter method is
I can't be bothered to check tbh
its probably just a loop kek
One message removed from a suspended account.
what the fuck
ah yes, the right person to answer this
One message removed from a suspended account.
lol
One message removed from a suspended account.
Resisting = ban
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
whats the input supposed to do? replace the 0/1's?
or like add text to the right of the arrow?
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
can you just replace the 0s and 1s with 3s and 4s?
One message removed from a suspended account.
Then replace all 0 by the first passed argument and the 1 by the second passed argument
One message removed from a suspended account.
If one's passed only, it will of course replace the 0 only
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
Then replace all 0 by the first passed argument and the 1 by the second passed argument
?
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
If one's passed only, it will of course replace the 0 only
One message removed from a suspended account.
One message removed from a suspended account.
👍
might be faster/easier to construct it using format.
https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated
One message removed from a suspended account.
One message removed from a suspended account.
isn't there a method for replacing all instances of something with something else?
Console.WriteLine(" {0}", b);
Console.WriteLine(" {0}{0}", b);
etc etc
put your reading glasses on so you can see sharp
One message removed from a suspended account.
yes overused joke i know
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
@drowsy crag
inb4 muted for overusing jokes
Time to send the bear one 
lmao
imma get blocked
Can you just make the arrow into a single string and then use the replace method to replace all instances of those numbers with something else?
yep, just using newlines for each line(not sure how c# handles adding a newline in code in strings, might need to use \n\r). should work fine too
One message removed from a suspended account.
you can just use a singular write line then
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
id use composite rather than interp
One message removed from a suspended account.
That looks messy
One message removed from a suspended account.
One message removed from a suspended account.
Nah all good
One message removed from a suspended account.
pfft
One message removed from a suspended account.
same here tbh
dw, this is #development we all suck
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
@sage bobcat pat





