#development
1 messages · Page 1619 of 1
that's a required parameter?
tick-reaction?
why even if a member has a nickname the bot says no nickname?
.addField(":3656_NitroBoost: `-` **Nickname:**", `${target.nickname || "Fara Nickname"}`,inline, true)
Show us how you define target
let target = message.mentions.users.first() || message.author;
because it's a User object
users don't have nicknames, only GuildMembers do
User is a discord account, GuildMember represents a user in a specific guild
just change mentions.users to mentions.members and message.author to message.member
how can i get this to tagg the user without this small problem (Error: <@undefined>) ive tried adding .id after user but get Cannot get id of undefined anyhelp will be helpful ive been stressing over a show warnings command and this tips the triggering of more stress <:>
const user = message.mentions.members.first()
if(!user) {
return message.channel.send("Please Mention The Person You Are **Reminding**")
}
message.channel.send(`<@${message.mentions.user}>`);
message.channel.send(`Follow The Rules, Rules Channel: [#800870206427627541](/guild/264445053596991498/channel/800870206427627541/)`);
message.channel.send(user.toString())?
i didnt think of that tbh
if you .toString() a user, it gives you the mention
ty
const status = {
online: "Online",
idle: "Idle",
dnd: "Do Not Disturb",
offline: "Offline"
}
.
.
.
.addField(
":2713_Microphone: `-` **Status**",
`${status[target.presence.status]}`,
inline,
true
)
any idea why it says Offline everytime ?
plz help me
make sure you have the guild presences intent on
lol
you need more plaintext
more text in general 
This is my other stress i dont get it completely (quick.db) but reading the website about ti i kinda know wehat its doing but cant get it to retrieve
let reason = db.get(`warnings_${message.guild.id}_${user.id}_${reason}`)
if(reason === null) reason = 0;
message.channel.send(`${user} Has Been Warned For The Following Reasons\n ${reason} \nCrystal Warning List For ${message.mention.member}!`)
err
ReferenceError: Cannot access 'reason' before initialization ik it means not defined but it looks defined for me or do i need to add an extra line of code
i solved it
let member = message.mentions.users.first() || message.author;
.addField(":wrench: `-` **Roluri**", `${member.roles.filter(r => r.id !== message.guild.id).map(roles => `\`${roles.name}\``).join(" **|** ") || "Niciun rol"}`)
Cannot read property 'filter' of undefined
MessageMentions.users is Collection<string, User>
Message.author is User
User.roles does not exist
at the end of the class Logger block, you need a parenthesis method call
()
new (class Logger {...})()
Heyyo guys
My friend have this error and this is him code part
I didn't see anything bad in code
Unlimited 
?
Yes but what is it. Is it a string, is it actually a Buffer or what
Buffer
Try logging it
Are you sure? Because the error says it isn't a buffer
oh boy. Native dependencies
oh lol
Oh wtf
wow
tell him to read what includes does lol
Tell them to use the method properly https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes
^
when will this be solved
https://github.com/timotejroiko/discord.js-light/issues/35
Ty
what is discord.js light?
discord.js but you can disable caches
oh ok
my messageDelete.js doesnt show deleted messages anymore @_@

pog
btw anyone able to help me with this
Your catching mentions.members and if found then catching again but this time mentions.users
message.mentions.user is of course undefined, the property doesnât exist
catch user = ... mentions.users.first()
and return itâs id if found - user.id
See above
@boreal iron i grabbed thew wrong message this was what i meant to grab
Hmm Discord doesnât let me jump to the answer for whatever reason
let reason = db.get(`warnings_${message.guild.id}_${user.id}_${reason}`)
You are using reason before it's fully initialized, same thing as
let l = l + 1;
does that make sense?
kinda from what i got breaking down online not defined "reason" so idk whats what
...
let reason = // Here you start defining the "reason" variable
db.get(`warnings_${message.guild.id}_${user.id}_${reason}`)
// Here you are trying to use the same variable that's getting initialized (reason) In order to use the variable it must be alrady intialized.
The error is so straight-forward that I don't know how to explain it in other words
You are basically doing this
let a = a + 5
How can a be equal to a + 5 if a hasn't been defined before?
let reason = "I exist!";
console.log(reason); // correct
console.log(reason);
let reason = "I exist!"; // incorrect
funfact thats possible
and this is why i tell people not to use var in their code 
Well thatâs not 100% true
let key = mycar.keys();
let mycar = cars.buyed;
wonât return something nice BUT using another method like:
let mycar = random_car.lockpick();
let key = mycar.keys();
does the job for you
/sarcasm
Im just gonna patiently wait now for someone using stackoverflow or copied code without understanding

Or someone claiming that they wrote a bot 100% on their own but they're literally using code I wrote 3 years ago.
i wanna reply to them with this https://cdn.discordapp.com/attachments/704709682618433567/815210274277687316/aWjqgmx_460svvp9.webm
I've been trying to make an auto-expanding textarea for two hours now đ©
I've had people use my code down to the last multiline comment straight from my guide. And claim it was their own. 
one more đ
sure
Using any framework like jQuery or just JS?
no jquery
Youâre actually listening to each input event and call your function to resize the text area in there?
2 hours...
function auto_grow(element) {
element.style.height = "5px";
element.style.height = (element.scrollHeight)+"px";
}
<textarea oninput="auto_grow(this)"></textarea>
textarea {
resize: none;
overflow: hidden;
min-height: 50px;
max-height: 100px;
}
How to do this
which part? For the server count, check #topgg-api , docs in the topic of that channel.
No the online thing
There's no longer any way for top.gg to know that bots are online, that part will be deprecated or replaced by something eventually but for now you can't control that.
How to do server count or vote count
@umbral zealot
#topgg-api for those 2 things
Ok must l ask them
yes, you can ask how to do those things in #topgg-api , after reading the topic of that channel and looking at the API Docs.
they're not that hard.
Could actually send u a link how to calculate it correctly I you want to
Not being able to do much more on mobile tbh
what
I was shaming Feud for not finding the solution on stackoverflow after 5 minutes which is what I did.
Test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code editor.
đ© I was overthinking it
AHAHAHAHAHAHAHAH
CAN YOU SEND THE FULL VIDEO?
that's the full one afaik
I see it on the programming humour sub at least once a week
oh
why ```js
message.guild.owner
Is it okay when the bot sends a cooldown message every 15 seconds ?
Because the guild owner may be offline, so they're not cached. You can fetch them from their ID, message.guild.ownerId
Oh, ok
if the user triggers a command it will send the cooldown message just every 5 th time and not every time
guild.ownerID, by the way
Ty
I would send it once only and then add a var to the cached user, e.g. cooldown_hint_sent = true; including a timestamp and reset the var on every command if now() - timestamp > cooldown
just my opinion
hey umm
if (client.shard.ids.includes(0)) { some code }
this will execute for all guilds shared between the shards right?
what about the guilds on shard 1
it wont work for those guilds?
so its something like this
if (client.shard.ids.includes(0)) { if user voted do something from DBL server.listen(port) }
also it has "includeS"
which should work for both shards
?
or no?
yeah, so it should work i suppose
but the port will be called twice to listen right?
It'll run for every shard regardless
Because the ids do contain 0
So it's basically if (true) {}
yeah
but how does it listen to that port only once?
like it should throw a port already in use error
right
because its spawning for 2 shards
Use shard id not collection
if (client.shard.id === 0)
Idk if that's the proper way to get shard id, but you get the idea
ids is a collection
this will only work for 1 shard then
You don't want to get id of all shards
for the 0th shard
there's a way to get shard id
You want the individual id of the current shard
.shard.id doesn't exist
I know, that's what I said after my example
listen to shardReady event and store the ID
for some reason, discordjs doesn't store it in User class
Djs is a mess when it comes to shards
also the pic is from client class not shardingmanager
Thatâs the total amount of servers that your shard is handling
then ```js
bot.guilds.cache.users
that doesnât exist
for real?
no it doesnât
nitro bots are legal?
no
oh i meant
bot.users.cache.size
@misty sigil
hmm ok
You have no approved bots, nor boosted the server, nor own a lib, nor applied to br, etc etc
Also, what are nitro bots?
k
Nitro generation bots I assume
thats makes a nitro gift links
Doesn't sound too legit
ye no
ye
It is, if u want to prank
you can just spam random characters in hopes one of them is a gift
u can just steal someone's nitro gift
wdym I generated one by giving discord $5
What are the odds though
How many chars are in gift link?
let's see
Considering alphanumeric, there are 26 + 26 + 10 options per char
lmao
So 62 options per char
render(){
switch(this.props.color){
case("primary"):{
return(
<button className="btn btn-primary" >{this.props.name}</button>
);
}
case("secondary"):{
return(
<button className="btn btn-secondary" >{this.props.name}</button>
);
}
default:{
return(
<button className="btn" >{this.props.name}</button>
);
}
}
}
is there any alternative for this ?
in react
Switch to assign the class name to a variable, and return the whole thing at the end?
62^16 actually
className={"btn" + (this.props.color ? ` btn-${this.props.color}` : "")}
```?
ok thanks
ı know how to steal bots
you will be competing with other gift snipers
there's probably like 50 running right now in this guild
mee6 just have 3 script :/
yeah it works thanks!
Nah, just another "hAcKeRz"
i'm literally not lol, everything i've said is a legitimate fact
nobody cares
ı m not asked to u
hi not asked to u, i'm dad
got em
Texas hold em
hi dad im just idk

yes
ik isnt it cool how im lemme think
if they are dad
ill be the step bro đ
im jk
forgive me
you guys didnt see anything inapporpriate
okay
i promise
can you move please?
This is development channel not general
yes sorry
im using a command to get an image, and when i log it to the console it logs the image link fine, but when i set an embed image URL to that link, it comes up as [object undefined]
it might be just a problem with the npm package im using but im not sure
can you show us your code and what it logs exactly?
So I'm trying to get to know what command is causing my logs to be filled with Missing Permissions
try {
commandfile.run(message, args)
} catch (err) {
console.log(commandfile.name)
}
await it
Me?
Ah, await the try catch or where?
is causing my logs to be filled with Missing Permissions
just console.log the commandfile
K
if (msg.content.toLowerCase() === ",,neko") {
const nekotime = marii_.neko().then((res) => console.log(res));
const nEmbed = new Discord.MessageEmbed()
.setColor('#A76DDC')
.setTitle('neko time ;)')
.setImage(toString(nekotime));
msg.channel.send(nEmbed);
}
the error:
(node:5415) UnhandledPromiseRejectionWarning: DiscordAPIError: Invalid Form Body
embed.image.url: Scheme "[object undefined]" is not supported. Scheme must be one of ('http', 'https').
Ah, your issue is a misunderstanding of how promises work
Please read https://js.evie.dev/promises to learn how promises work and how to use them correctly
alright, thanks
undefined after I did mine...
log commandfile
inside the try or in the cache?
Well the error of Missing Permissions came and it didn't tell me what command caused it.
commandfile.name is undefined?
Simple fix, just log message.content xd
try {
console.log(`Running ${commandfile.name}, command by ${message.author.tag}`);
commandfile.run(message, args)
} catch (err) {
console.error(err)
console.log(commandfile.name)
}
boom
ok im confused here. Its probably some small thing i missed, or something i am doing completely wrong, but I cant seem to make my bot send the error message. (I have tried else and other else if statements, none work.) urlEnding is defined as let urlEnding = ['.png', '.jpg']
let filter = m => m.author.id === message.author.id
message.channel.send(`Please Post The Link Now! This expires in 10 seconds!`).then(() => {
message.channel.awaitMessages(filter, {
max: 1,
time: 10000,
errors: ['time']
})
.then(message => {
message = message.first()
if (message.content.startsWith('https://') || message.content.endsWith(urlEnding)) {
db.set(`wBg_${message.guild.id}`, args[0])
return message.channel.send(`WORKING! Link set to ${args[0]}`)
} else if (!message.content.startsWith('https://') || !message.content.endsWith(urlEnding)) {
return message.channel.send(`This link is invalid. Please make sure you have a valid link, that starts with 'https://' and ends with either '.png' or '.jpg'!`)
}})
})```
My issue is, it always says its working, even without https or the url endings.
endsWith() takes a string, not an array
how do i get my bot to stay online 24/7?
i do it like this
I would use a RegEx match instead of searching the content 2 tumes
Host and run it on a computer that stays online 24/7
also called "A VPS" or "A hosting service"
do not use those free panels
why cant i get it back online
Yeah. đ Not sure why.
or even a panel in general, get an actual VPS
you should just log the messsage content
what do you mean by that? What's the error you get?
how are you starting it?
?
How do you start your bot. boot it. run it. execute it.
yeah thats me being dumb, but it still always returns as working
im doing this is the terminal:
PS C:\Users\Lenovo\Desktop\me\New bot> node My_Bot.js```
but its not working
Ok so when you run that, what exactly does it do?
is that || intended?
did you mean &&?
does it go back to the prompt? or does it stay stuck? or what exactly?
changed that too, nothing
nothing i used it do save the commands but what do i do
"nothing" isn't a choice in this
what exactly happens when you do node My_Bot.js ?
Log message.content.startsWith('https://'), message.content.endsWith(urlEnding)
oke
Ok, issue on my side. It's fixed! đ
Not message.content.endsWith(urlEnding), your new code
it saves the commands
since that code is wrong
now how do i get it back online
"saves"? That's not a save command, that execute a node process.
Getting a bot online should be running node My_Bot.js again
Great question
to get a bot online based on a node library, you do node thebotfile.js and it goes online.
that's it
Now to keep it online requires a hosting service and more configurations, but to get it online to begin with, that's enough.
now the command does nothing, doesnt log, it doesnt do anything. Doesnt respond or send an error in console...
Idk
help me
ill figure it out, thanks for the help
terminal
ok so do that again
in visual studio code
I thought we were passed this
I ask questions but you don't answer, I can't help you if oyu can't answer these questions
i did that but it didnt work
Im trying to set up a command handler for my bot but I keep getting this error when I run the code Uncaught Error: ENOENT: no such file or directory, scandir './commands', this is the code
Ok so next I asked, "what happens when you do that", @hoary vine
you never answered
it does nothing
Hey
again, I said, "nothing" isn't correct, I need to know precisely, exactly, in details, exactly what happens
welcome to #development
does it go to the next line? does it stop? does it output anything?
i fixed it. Like i said, it was a dumb small error that I overlooked. I appreciate the help â€ïž
it goes to next line but it inputs nothing
Then that usually means the js file is empty, or there's no login line in it.
show us your My_Bot.js file (just without the token in it please)

fs is relative to the root of your project, and I'm a little confused as to what that is - you don't have a package.json or a node_modules folder anywhere in that project? How is it even running at all?
ok got it back online thx for the help
easy solution for this
@quartz kindle sorry for the ping but since you are the dev of djs-light .I have a question.Does djs-light have modified built-in ratelimit or is the standard like djs?
wrong ping, friend
what
woops
lol
yeah I see
Also that solution isn't a solution at all until we know where that package.json file is
and also how they start the bot I guess
the path is the current path of your index.js being started in node or however it's been called
I'm coding with NPP, means it's not creating a "project" etc. with package files etc.
assuming he isn't doing as well
"npp"? you mean notepad++?
rate limits should be all standard
that's the short term, yeah
Ok well you don't "create a project" with npp, you edit files with it.
a node project should always start with an npm init command in your project root
he meant something like a workspace in VSC
if it doesn't, you're doing development wrong.
No it doesn't. not really. Package.json is how node.js determines your dependencies and their versions and how you install them. So unless you're using no dependencies at all, it's required.
Now, we can discuss and bicker about what's a good way to run nodejs but it's a bit pointless since this guy didn't even bother answering my question and we're just talking between each other and not really helping đ
well true
It ran fine when I just had a if/ else if strand
STFU EVERYBODY
just for you#
fs comes with nodejs
lol
discord.js tho
My name is Hentai girl 69
I probaly messed up something in the beginning of the code
Wait
I don't think I choose node when making a new folder
You don't choose node
If you're using npm there's 100% chance you are using a node project
Did u init it?
Whats that
npm init
Don't think so
The bot used to work fine
If u didn't init it, it couldn't work at all
It's like trying to build a skyscraper without first floor
let dataEmbed = new Discord.MessageEmbed()
.setTitle(this.title ? this.title : "Tournament")
.addField(`Ended`, `**Type** âȘŒ \`${this.type == "slayerXP" ? "Slayer XP" : "Catacombs XP"}\`\n**Ended** âȘŒ ${moment(this.endAt).format("LLLL")}\n${(this.hostedBy ? this.messages.hostedBy.replace('{user}', this.hostedBy) : '')}`)
.addField(`Prizes`, this.prize)
.addField(`Top 10`, "`Gathering data...`")
.setColor("#FFFFF1")
.setFooter("This tournament has already ended.")
(await this.channel.messages.fetch(this.messageID)).edit(dataEmbed);
TypeError: (intermediate value).setTitle(...).addField(...).addField(...).addField(...).setColor(...).setFooter(...) is not a function
0|Bot | at /root/MM/util/Tournament.js:217:9
How do I fix?
That's just saying that you created a variable but you never read it anywhere in your code, pretty sure
@earnest phoenix u're still on?
possibly
Yes I'm fully aware of FS being a core node feature but it doesn't change that its path is relative to the root of the working directory which is usually where the package.json is located.
got some time now to test and investigate it but can't get forward without some help
not sure exactly how you're starting this, but to get this working correctly, you need to go to the terminal tab, go cd bot and then npm init --y, then npm i discord.js and then node index.js. That should make the whole thing functional for now
maybe some weird node.js logic stuff
I had that too
you can use shorthand flags with --?
I'm 100% certain the problem is that the working directory is not where the index is.
its kinda weird
It's not even "weird". It's exactly how nodejs works.
ig
fs is relative to the working directory, and require() is relative to the current file, and that's how node documents it too.
define doesn't work and show us your code
ok
you have to show us errors if any
and the code associated with it
otherwise we can't help
how can I escape user input for mysql queries in java
This is a great resource, tbh: https://zellwk.com/blog/asking-questions/
`const Discord = require('discord.js');
exports.run = async (client, message, args) => {
if (!args[0]) {
const embed = new Discord.RichEmbed()
.setDescription("Bir Ćehir yaz!")
.setColor("RANDOM")
message.channel.send({embed})
return
}
const konum = args.join(" ")
message.channel.send("", {
files: [
`http://wttr.in/${konum}_0tqp_lang=tr.png`
]
})
};
exports.conf = {
enabled: true,
guildOnly: false,
aliases: ['hava', 'hava-durumu', 'havabilgisi', 'hava-bilgisi', 'weather', 'weatherforecast'],
permLevel: 0
}
exports.help = {
name: 'havadurumu',
description: 'Yazılan konumun hava durumu bilgisini gösterir.',
usage: 'havadurumu [konum]'
}`
Like parameters?
i think
its keep charshing
like that a user cant do a sql injection
my visual studio code
There's a reason concatting in sql is also called "unsafe" and "prone to injection"
Use params
http://wttr.in/?konum&0tqp_lang=tr.png
this URL is wrong, it's not an image.
it's a website with html
@wispy holly .png at the front, not in the query parameter http://wttr.in/.png?konum&0tqp_lang=tr
how to make custom bot status?
that website looks nice btw
what programming language
well it's not mine so I don't really care tbh.
discord.js
you do Client.user.setActivity i think
ok
Working but that gives error in terminal
could we get this in actual codeblocks, because it's hard to kjnow how exactly you wrote this with the messed up formatting right now
good job you managed to hide the actual error
yep
scroll up
just post the error or we cant help you
like your main code
I'm guessing if you look at your events/ready.js file you'll find you forgot a c in const
pretty obvious while reading the error actually.
well that needs a bit of fixin' 
I think you cant have semicolon in a var name?
and you must write const in first line
Yeah I think they got it.
oh thx
hmm
where will ı paste this script to?
probably in your ready event
ok
ik but it says: An error has occurred while validating your input:
Detailed description too short. Minimum 300 characters. Add your commands. Spaces or empty spaces are not counted.
Detailed description too short. Minimum 300 characters. Add your commands. Spaces or empty spaces are not counted.
Ok but which part of this english sentence do you not understand?
this part
Detailed description too short. Minimum 300 characters. Add your commands. Spaces or empty spaces are not counted.
Here let me simplify it: write more words
ok
not worked
hı
More than few and less than too much
Tldr: write enough to describe ur bot
@has_permissions(ban_members=True)
@commands.command()
async def unban(self, ctx, *, member):
banned_user = await ctx.guild.bans()
member = member.strip("<@!>")
for ban_entry in banned_user:
user = ban_entry.user
if (user.name, user.descriminator) == (member):
await ctx.guild.unban(user)
embed = discord.Embed(title=f"{user.mention}unbanned by {ctx.author.id}", descriptiom=f"{user.mention} was unbanned by {ctx.author.id}"),
await ctx.send(embed=embed)
return``` will this also unban users via mention as this unbans via id not sure about mentions tho
mmmk
what the- i added a roll command i dont want it to do it like that-
script:
client.on('message', message => {
if (message.content === '!roll') {
var rollNumber = Math.random() * 6 + 1
message.channel.send('You rolled a ' + rollNumber)
}
});```
so make it to where it doesnt say the rest
what language
how
javascript
Math.floor() i think
@earnest phoenix nvm, got it working now
oh yea oops
or Math.round()
oh, i'm so sorry i totally forgot to respond
ah np, just needed to figure out how to work with buffers for UDP sockets @earnest phoenix
your have a f outside string
but it's actually not even complicated lmao
have you used python before?
you should know it belongs there if you have
oh that is python? no i never really used python
btw you wrote descriptiom
how this is part of this discussion?
but why is it f"{user.mention} was unbanned by {ctx.author.id}")? i mean doesnt the f at the beginning must be in the string?
no
f string in python, look it up
oh i never used python so it looked weird to me
probably because you coded it wrong
idk how
maybe you should start from the top. https://anidiots.guide/first-bot/your-first-bot
const Discord = require('discord.js');
const client = new Discord.Client();
client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}!`);
client.user.setActivity("Rhetty Chapter 6 saturday March 6th, 2PM")
});
// Game link command
client.on('message', message => {
// If the message is "ping"
if (message.content === '!game') {
// Send "pong" to the same channel
message.channel.send('https://roblox.com/games/5808867844/Rhett-y-Alpha-Chapter-5th?refPageId=f8dedd66-83bc-4999-9f41-c5673e2413a0');
}
});
client.on('message', message => {
// If the message is "ping"
if (message.content === '!ping') {
// Send "pong" to the same channel
message.channel.send('pong!');
}
});```
my favourite kind of pasta is the one prepared with ctrl and a tiny pinch of c and v
how do i fix
client.on('message', message => {
// If the message is "ping"
if (message.content === '!ping') {
// Send "pong" to the same channel
message.channel.send('pong!');
if (message.content === '!game') {
// Send "pong" to the same channel
message.channel.send('https://roblox.com/games/5808867844/Rhett-y-Alpha-Chapter-5th?refPageId=f8dedd66-83bc-4999-9f41-c5673e2413a0');
}
}
});```
yea ikr
learn js
just tell how to fix
and now an if statement in an entirely unrelated one that literally cannot fire
here <#development message>
just send the fixed script
LEARN JS
NO
THATS HOW YOU FIX IT
if you pay us, sure
our labor is not free
into my paypal
what no i have no money also idk how to pay
well
The #rules-and-info state
Do not spoon-feed developers
sucks to be you i guess
learn js
People aren't here to spoonfeed you, that's why they're telling you to learn the language before making a bot
we will not spoonfeed you solutions.
only with robux
learn js
Learn javascript first, then make a bot.
i did
how old are you, @hoary vine
No, clearly, you didn't, sorry.
sorry love but itâs obvious you havenât
Anyone how can i create rythm?
but if i didnt i wouldnt know how to write that script
fuck me
pray to discord gods and wait 3-5 business days for an answer
I'm typing the Embed Message command, but it doesn't work. It doesn't give an error. Why can you help me?
I would advise against making copies of other bots
copy/pasting is super easy, it's pretty clear that's what you did. You don't understand what it is you wrote.
provide context
can you show us the code for your embed command and we can take a look?
just help me
learn js
we did. Go learn javascript, we provided links to learn.
that's the help you get.
I need some fuckin beer
SHUT UP I ALREADY DID
NO YOU DIDNT
of course
then you should see the error
YOURE JUST BLINDLY COPYPASTING CODE
No need to argue, peeps
There's no need to scream at them.
How I can do a thing like:
const res = await verynicefunction('a link.gif');
console.log(res);
# CONSOLE:
# {
# fps: 48,
# images: [
# <Buffer>,
# <Buffer>,
# <Buffer>,
# <Buffer>,
# .......
# ]
#}

they screamed at us
Doesn't matter, you should try to stay calm. if it pisses you off to see them sream, you can easily just go read some other channel or server to cool down ^_^
iâm calm
they just have to admit it before getting banned
can we see more code for context
Looks good to me, are you sure you're sending precisely the correct message? Did you also make sure to save and restart your bot after writing this?
yes
messageEmbed
it might be messageEmbed
the class is MessageEmbed
we just donât know
True, we don't know how messageEmbed was defined.
i honestly doubt they imported it with the as operator đ€·ââïž
or redeclared it
what should I do
show us how you defined the variable named messageEmbed
whats the error
give us some more code
ah
well messageEmbed and MessageEmbed are not the same thing
javascript is case sensitive
itâs MessageEmbed, not messageEmbed
and MessageEmbed is a class so itâd be new MessageEmbed
ok i'll fix it
eeeeeh actually that's... not strictly required.
The new keyword is actually optional...
wait it is?

yeah. eslint will scream at you, but it it's optional
last time I tried it I was screamed at by node
iirc
itâs been a while since Iâve tried so I might as well try it again now
?
C:\Users\Hp\Desktop\bot\efe.js:33
const kanal = MessageEmbed()
^
TypeError: Class constructor MessageEmbed cannot be invoked without 'new'
Yea I was thinking that
gave this error
const kanal = new MessageEmbed()
Yeah, new is definitely required for constructors
yea I thought that
Else it's a static access
New is required for class constructors, but can also be used with functions
but i don't touch that
alright well, I might be wrong actually, seems that yes it's old archaic function-based stuff that doesn't need new
nevermidn
ah so itâs old stuff that doesnât require new
how do i do it like, the bot will get as many avatars as the user will mention
You're limited to 10 tho
yes, so how do i do that
Loop over mentions
run a loop through your arguments / mentions
Adding file to message
what should I do
take your keyboard and add the 3 letters, n , e , and w
repeat..until or if
new
or while
you can use a for loop
for .... in mentions
oh yes, its in pseudocode
Where do I add
umm, like?
if there is text even after the nest mention the bot will take it, and like that?
next*
here
Since it'll be a bounded loop, use for
for (let user of message.mentions.users.array()) {
...
}
``` 
No
It has a limit of 10 files
You can't loop solely over the array
You need a counter too
oh 
Just map that array
...still have limit issue
why manipulate it in the first place
you're just adding complexitiy for no reason
a map is iterable
let arr = message.mentions.users.array();
for (let i = 0; i < 10 && i < arr.size(); i++) {
...
}
anyone else been having problems with youtube-dl lately? music was working fine with my bot but now im getting this error for some songs:
DownloadError: [0;31mERROR:[0m No video formats found
wait no
wrong copy paste
was helping someone out in discord.py server lol
tenks
what the fuck
No
;-;
It's not guaranteed to have 10 mentions
That avatar array makes no sense at all
oh yes, i realised
And you don't need to define loop iterator outside of loop
why are you using const for c anyway
Just map through mentions... and get their avatars
Limit of files
If array len > 10 len = 10
Simple logic
And map through that array
Ezpz
Also why make a mass pfp command ?
@earnest phoenix may you got an idea
getBattlEyeBan(be_guid)
{
if(!be_guid || be_guid.length != 32) return null;
const socket = dgram.createSocket("udp4");
const buffer = Buffer.from("..6.." + be_guid, "ascii");
socket.on("message", (message) =>
{
const result = message.toString().slice(4);
if(result) //return getBattlEyeBan()
});
socket.send(buffer, xxxx, "1.2.3.4", (error) =>
{
if(error) socket.close();
});
}
calling getBattlEyeBan() will open the UDP socket listener
returning on if(result) would of course only return socket.on()
that would cause my called function to return undefined
I'm struggeling a little bit how to return the function 2nd degree
it will send a gif of all the pfps
wrap it in a promise
Also if you just want the code we won't give
nah, i am not a copy paster
Nice đ
getBattlEyeBan(...)
{
return new Promise((resolve, reject) => {
socket.on(..., () => {
const result = ...
if(result) resolve();
})
});
}
@boreal iron
Simple
good idea, will do it
thank you
wrong channel
what channel should i do it in
k
that console print tho lmfao
hehe
send me the plain text pls xd
Before I go into the docs n stuff - is it possible to have a !vote command that allows users to vote?
Yes
yes
thats called an embed with an embeded link attached to an bit of text
thats how people are gonna vote with that command
the only infact
which is the best database to use for heroku hosting? ( i don't want to buy a host until my bot is finished)
heroku = bad
If you somehow find a way to edit files uploaded to your heroku app - when the bot restarts all of the data will be reset to the initial upload
not talking about the monthly uptime limit - the lack of support - etc
when your bot isnt finished just host it on your pc
they provide a few free postgres rows or something
i heard that it kinda works with json files but it update the file after restart
my friends want to use the bot and i'm not online all day or have my pc on
you couldd host it on a raspberry pi
There are some pretty cheap VPSs in pinned messages as well
hope you dont want to save your data in a json file?
no, i would like to use mongodb, i used to use it on glitch but now they don't allow minitoring đŠ
and i don't really want to pay because there are better hosts for that money xd
normally a server costs a few ⏠per month like thats not much
and the rasberry pi are not that common in romania đŠ
i pay ÂŁ6.60/month for mine but you can get way cheaper
ik, it's not much but i don't want to pay until i finish
just self host it if its not done like i am, pay for good bot hosting and stuff thats actually meant and dedicated to bot hosting for discord
Where da heck do I get a topgg token
go to your bot edit page and select "Webhooks"
yeah, that should not be there
i did this but as i said, my friends want to use my bot too and i can't let my pc open 24/7
or at least change "Webhooks" to "API Access" or something
why cant you let your pc on?
because the taxes are huge in my country â ïž
and because my laptop will probably blow up xD
in germany we pay lot for power too
yes but germany is a rich country xD, you have big sallary, our minimum sallary is like 500euros
so yeah
im not sure i mean when you look at the schools for example xD
and a rich country doesnt mean that all people are rich
sounds like America to me

brazil iirc
how come i have the bot developer role and some people don't is it auto assigning it if i have a bot on top.gg ?
np
đ
The country of the chloroquine-addicted president and contradicting laws
And his army of negative iq zombies
anyone here familiar with eris.js
whats your issue?
what would js await message.guild.members.fetch()
i have js await client.guilds.get(message.guildID).fetchMembers({limit: client.guilds.get(message.guildID).memberCount})) but i get an empty array
guild.fetchAllMembers(), read docs https://abal.moe/Eris/docs/Guild#function-fetchMembers
im reading the docs
Eris, a NodeJS Discord library
i get an empty array
oh fuck
I was slow
all of this is optional
try it without the limit
and make sure you have guilds member intent
im not doing anything nefarious
atmods smh stinky userbot
i was gonna use it to take down a scam server by dming everyone that its a scam
self bots are against discord tos
Two ToS breaks in a single go
cease it immediately
abooze
how right or wrong what you are doing is doesnt matter if you break rules to do it
im not asking for help with userbot
i just want to know how to fetch member list
you wanna join me?
No

That's a useless crusade
xD
whelp at least i reported to dickscord
now time to clear my browsing history being thats a temp alt i didnt even "claim"
there its gone
why do you need to clear your browsing history???
so i dont have access to that account
even tho i can make another
clearing your browsing history does jack shit
it logs you out
ÂŻ_(ă)_/ÂŻ
bruh
so does logging out
LOL
fuck if i know
f12 empty cache and hard reloead 
Is there a way I can make for example _TEst_ not be diagonal? Since name.replace("_", "\_") still makes it diagonal
use regex
"string".replace(/_/g, '\_')
@round cove the underaged kid is in with another acc
yea.. that regex keeps that?
isnt that py?
uuhh there are no _s in test?
why do my slash commands look like this?
Still makes it diagonal
huh
output works but discord still makes it diagonal
its happening for all my cmds that show
yea its \\
"User used the /command"
Yup that works ty
anyone know why slash command appears like that?
when i removed the thingy that shows the user used command
it doesnt show
otherwise it shows like that
weird
How to make bot support Server
How
search up how to make discord servers
Discord is a quickly growing text and voice chat application, aimed at gamers in particular. Its sleek and simple design makes it an excellent alternative to older apps like Teamspeak and Skype. Discord has taken a lot of inspiration from Teamspeakâs extensive customization and management options but has buried some of those options within the i...
I know how to make Server
So add a channel by clicking +
Bot bot support Server how to make
A bot support server is literally just a server....

There's no special case for "bot support" servers
Just make a regular server and name it your bot support server
im disappointed


