#development
1 messages ยท Page 1071 of 1
heck it work
thank you discord
Yea
I post it it just search in Less than 1 min that I send it to the internet
this will be helpful, as i always forgot to untick my .env when i commit a new file to git
I send it to my own domain and it doesn't appear on the Google but the discord still see it and change my token
@earnest phoenix if I move a bot from glitch
Go GitHub will
The env also love
Move
And then can I host bot on heroku
I host my bot on digitalocean
Ok
just add the .env to your gitignore file
What's the price @earnest phoenix
DO is 5$/Month
just add the .env to your gitignore file
@lusty quest
But will it be visible to everyone
if you add it to your gitignore it will not getting pushed to github
Ok
What is the best thing to host a bot 24/7 ?
Free or paid
vps
E
aws
hi i'm doing the avatar command i did some of them and it work but idk know how to see someone's pfp like example a?avatar 394182782173315072
aws.random.cat/meow
Pls no AWS or Google classroom
i'm sorry if my english is bad :<
use get
๐
use azure @earnest phoenix
K
What plan? And howmuch
oh?
you guys are talking about hosting?
ez just use a custom VPS
use zsh on an ubuntu VPS, not only do i do my bot dev on the VPS itself but i also run the bot
and neovim plus configurations
hi
hi i'm doing the
avatarcommand i did some of them and it work but idk know how to see someone's pfp like examplea?avatar 394182782173315072
get a VPS and your are done. you can get one that easy handle up to 500 Guilds for 5$ or less
(as long as you dont log every command lmao)
I don't know where to get and what plan and what os to use.
NFOServers
i use NFOServers
digitalocean (5$/month)
oh yes
digitilocean is VERY famous
for VPS'
and i heard it has good deals
I will try DigitalOcean
the only reason im using NFO servers is because one of the owners of this multiplayer game recommended it to me personally
but other then that i'd say do digitalocean
they are pretty solid. you pay for how many hours/month you have the VPS
the good thing about VPS and not dedicated hosting for a discord bot is
that you can host other things too
like for example with a VPS you can host a minecraft server
anything really
Ok
it took discord
like 200ms to detect token leak
Yea OoOoo
i think someone has a bot here that detects if you accedentally send a token in here. the bot will post the token into a gist so discord can detect it
(the bot makes the gist then instantly private and deletes it)
Nice
s!meme
sorry
Guys, can you change botโs name while it is in verification process of discord?
nope
yes
The easier is tag
The easier is to remember it for people
I am trying to get atleast a tag ending on 0
ok
Maybe I am just stupid lol
of bot
I know
Yo anyone here have caching issues with d.js v12? It's not caching all users. How do I force it to? :))
For eg
maybe you can change it, not sure, i wouldn't advise to do it though
Boomer#1234
1234#1234
New name #new number
fetchAllUsers i think @glad charm
might mess up the info in the queue
There are a lot of bots with #0001 with #6969
im not sure
its a client option
you should ask in the official api guild
1/2 of bots have tag ending on 0
i know for a fact that you cannot change the bot's name after getting verified (the endpoint to change your name gets locked)
I think owner just didnโt get a nice tag from the first try LMAO
But can you change it when itโs verified?
Thatโs my biggest question oof
i know for a fact that you cannot change the bot's name after getting verified (the endpoint to change your name gets locked)
@earnest phoenix
Oops
sorry fetchAllMembers is the one
im not sure if you can change it while it's in verification queue
yeah you should ask in the official api server
Eeck
right deleted
discord .gg/discord-developers
im a whitename so the bot deletes my invites
you cant change the tag if verified
lol
ask in the server i linked above
i dont think so
;0
Ok
Btw do you like my tag I got yesterday randomly? XD
#2750
I think itโs nice oof
thank you
Thx
go to #memes-and-media if you're going to be an annoying shit
this is a joke
if i had a server with 33k users i guess my bot wont stuck at 112 Guilds
๐ญ
http://node0.s8s.app/5kMq
@lusty quest Sadly not on v12
it is
I can not find it for the life of me.
i dont think the docs are outdated
e
its a client option
but it will have a impact on your Ram usage
how relevant
Is it possible to get the actual readable stdout or aka standard output from an exec on child process like this?
Vx_eval let { exec } = require("child_process");
exec("cat index.js").stdout```
use promisify
What's that
K lemme see
@pale vessel k worked, was able to see through my 6k line index.js 
194 pages, jesus
gawd damn
commands
ok does anyone using serenity discord lib know how to make a trait function async without needing async_trait
one file bot
because the majority of the io done in my bot is blocking and i kinda wanted to use an async runtime
@pale vessel k worked, was able to see through my 6k line index.js
@earnest phoenix one file bot ?
pong
Yea, working with seperate files on mobile is hell since i code on mobile
Hello, I tried to create automatic server count with dbl, but i get a problem with โasync def on_guild_post():โ error: method has no argument
Help
method has no argument
So
What should I put there?
I just copied and pasted what was in docs
Also putting my token there
XDDDD
I donโt know how this dbl works
~~so i want my website to show an embed when posted on discord. I did everything, but the logo wont appear. any idea why? this is my code for the logo: https://lumap.is-inside.me/RsP2xn2F.png ~~ seems to be solved by itself, just re published my website
lol
kek
Anyone know my my bot returns this in my pokemon search command, I do ${embed name} and it comes out as [object Object]
break;
case "search":
if (message.author.bot) return;
const replies = [
`You search around and find no pokemon!`,
`${Eevee}`,
`${Bulbasaur}`,
`${Pincurchin}`,
`${Rotom}`,
`${Pichu}`,
];
message.replytext = Math.floor(Math.random() * replies.length + 0);
return message.channel.send(replies[message.replytext]);
}
});```
also why are you adding a property to message
and so are the other properties (except for the first text in the array)
O.o- How do I send a random embed with a command
hm
anyone there to help me with my problem?
if(message.content.startsWith(prefix + 'mute')){
let user = message.mentions.members.first();
let role = message.guild.roles.find(r => r.name === 'Muted')
if(!role) message.guild.createRole({name: 'Muted'});
if(user.bot){
return message.channel.send("I can't mute a bot");
}
if(user.hasPermission('ADMINISTRATOR')) {
return message.channel.send(`I can't mute ${user} he is admin`);
}
if(!user){
message.channel.send(`Please specify a user to mute`);
}
message.guild.channels.forEach(f => {
f.overwritePermissions(role, {
SEND_MESSAGES: false
});
user.addRole(role)
.catch(console.error);
});
message.channel.send(`:white_check_mark: ${user} succesfully muted`);
msg.delete()
}```
what's your problem
the error is in first 2nd line i.e excel let role = message.guild.roles.find(r => r.name === 'Muted')
error = var guild = client.member.server.get(); ^ TypeError: Cannot read property 'server' of undefined
sorry for late answer
jesus.
๐
client.member isn't a thing
hm
what are you trying to do
how to put client.guilds.cache.size on bots activity
CTRL+C
i am pure "noob"
Keep this channel on topic
umm nvm back to my mistake
so alhassan I am beginner and I wan to make a mute and unmute command...
Get the member
and add a role to them
to unmute get the member and remove the role
is the bot playing anything
Keep this channel on topic
I didnt understand
errors in console
um
got it hold on
@trail finch We don't spoonfeed sorry.. best I can do is provide pseudo code
I'm hosting on a remote desktop connection
I'm hosting on a remote desktop connection
@swift void Windows?
uhh can I ask some question
how to be verified bot developer
by getting 75+ servers
my bot is retunring a lot of errors.
returning*
and sometimes, it leaves in the middle of the song
How long will this take
it can take easy 30 minutes on a potato
oh k makes sense.
I got 31 server
Epical
Anyone can help me with this problem?
You cannot use await outside of async function
Either make it an async function or use .then()
okey thank you ๐
no problemo
uhh my code made it so it set the status to streaming, but the bot says its playing a game, but if you go on its profile it says its streaming face_palm
Can you show the code you're using?
Is it done .-.
Uhh wait a min
I pressed ctrl+c and uhhh it said something but i didnt have time to read it...
isnt it already installed?
otherwise it wouldnt show the change/repair/remove options
ok ill install again.
what
you already have it installed
you reran the installer after installing it
I pressed ctrl+c mid way of it installing smth
But if you already had it installed then that didn't change much
doesnt streaming status require an actual stream url?
Oops sry for sending twice
Yeah streaming requires a Twitch URL
Where would I put the url
{type: 'STREAMING', url: 'url'}
from memory
otherwise slap a .then(console.log) after it, and have a look at the fields on the object
should be able to figure it out from that
My bot leaves the voice channel(s) in the middle of a song sometimes :/
What are you using
RDC
Do i tick or nah
do you want to?
I'd say tick
Idk do I need to?
if you have visual cpp runtimes installed everything should be fine
you don't need it ticked
otherwise tick it i guess
pepe hands
visual cpp?
c++
sure
bro tf
lol
BRUH THERE IS NTH THAT IS INSTALLING
wdym find installation
: Cannot read property 'status' of undefined, im trying to upgrade to discord.js v12
where this error occur
Would be useful if you show the code it's about
message.guild.channels.cache.filter(mem => mem.presence.status != "offline")
Channels don't have presences
(node:4276) UnhandledPromiseRejectionWarning: TypeError: message.guild.members.filter is not a function
members.cache.filter
Cannot read property 'cache' of undefined
.addField("members", `${emoji("625734329326239775")}online:${message.members.cache.filter(mem => mem.presence.status != "offline").size}\n${emoji("625734369776107582")}Total: ${message.guild.memberCount}`)
is this right?
message.members is not a thing
what do i do .-.
what are you even trying to do?
donwload node idk what to do im starting to code lmao
wot
just press that ๐ to see the hierarchy
k
hey guys, when im listing users of my bot it listing users from this server too. How to make that it will not list users from that server?
filter
how are you listing them, show code
console.log(bot have ${bot.users.cache.size} users);
oh
w8
console.log(`bot have ${bot.users.cache.size} users`);```
guild members size
bot.users contains cached users from all guilds
ye
its the global user cache
if you want to show users from a specific server, you need to access the guild member cache
or guild member count to include offlines
for example
message.guild.members.cache.size
i know it but im asking how to have all my users from every guilds but not from this "Discord Bot List"
oh you want all except this
yes
online only or including bots and offlines?
so bots n offlines?
this will give you all guilds except dbl bot.guilds.cache.filter(guild => guild.id !== dbl's id here)
then from the resulting list of guilds you can apply a reduce function to combine their memberCounts
for example resulingGuilds.reduce((a,b) => a + b.memberCount,0)
this will give you all guilds except dbl
bot.guilds.cache.filter(guild => guild.id !== dbl's id here)
@quartz kindle where i need to put it?
before them
and that filter is universal?
yes
yes
ok i will try it
Okay, anyone know how to get the invite code of a person that joined via?
errr lmao it crashed..
how to get this server ID? xd
copy ID
ok i didnt saw it
ive been trying to do an avatar command but the avatar wont show, im on discord js v12 code:message.author.avatarURL
Okay, anyone know how to get the invite code of a person that joined via?
message.author.avatarURL.get or message.author.avatarURL.cache.get
const {MessageEmbed} = require('discord.js')
moduel.exports={
name: 'giveaway',
description 'Create A Giveaway'
}
Am I doing it right so far?
Lmao
just some typo lol
?
description:
need a : after description
Oh k
and moduel
change moduel.exports={ to module.exports={
Okay, anyone know how to get the invite code of a person that joined via?
you can try to google, or wait someone to help you. spamming the question wont help.



const {MessageEmbed} = require('discord.js') module.exports={ name: 'giveaway', description: 'Create A Giveaway' usage: '<time> <prize>', category: 'fun', run: async(bot,message,args)=>{ }
Ok I am very confused and have no idea what im doing
how do i make my bot run? i use discord.js
client.logon(process.env.BOT_TOKEN);
logon is not a thing
wdym
its login
no me
no me
no me
no meow
Provide all possible information so people know what's up. Just saying "I get an error" doesn't give us enough information on your problem.
let myEmbed = new MessageEmbed();
^
ReferenceError: MessageEmbed is not defined
i am typing it
calm down
Sorry I didn't know you like enters so much that you press enter every line 
Anyways, you need to import the type MessageEmbed.
Which you can do with const { MessageEmbed } = require('discord.js'),
if you already have a require('discord') in your file, you can add the type in the object deconstructor (so like const { Client, MessageEmbed } = require('discord.js'))
I see, thank you so much.
uhh
bot.on('ready', () => {
console.log('Soul bot is online');
bot.user.setActivity('krunker.io gameplay', { type: "WATCHING", url: "https://www.youtube.com/watch?v=qTXpI-7ghp8"}).catch(console.error);
});
but it wont work
the result is
sorry my main language that i use discord is duct so you see kijkt naar not watching
but i can understand english
o
i see
but thats because it auto changes
Wait so on
const Discord is it a - or = after?
const Discord = require('discord.js');
const Client = new Discord.Client
Tis right?
Im so nuub
lmao
const Client = new Discord.Client();
alright
Hi
Have you spent any time learning the language you wish to code in?
who?
If Anyone Has The Code On The Air, Can They Share It With Me ?
@queen folio spoonfeeding is not allowed
If Anyone Has The Code On The Air, Can They Share It With Me ?
have you read the rules
No
I Don't Know English Very Much
Translation Errors Can Happen Even If We Try To Translate
no one will give you a code
here's a code for you
const Discord = require("discord.js")
process.exit(0)
easy code, will make your bot very cool
Translation Errors Can Happen Even If We Try To Translate
@queen folio dont use translator then
(if i understood right)
Can You Speak A Language You Don't Know ?
"client is not defined" help
Define it
then define it
bruh this my first day of coding and idk what that means im nuub
that hurts my eyes ;-; lmao
Js:
const client = something
PY:
client = something
etc. etc.
Can You Speak A Language You Don't Know ?
@queen folio no, but you should learn if you are gonna speak english
const Discord = require('discord.js');
const Client = new Discord.Client();
Smfh
variables are case sensitive
~~> Js:
const client = something
PY:
client = something
etc. etc.
@golden condor PY
client = discord.Client()~~ im. blind. ok.
I Am Trying To Learn
.toProperCase()
๐
๐ณ ๐
no
Flushed ramp
module.exports = (client) => {
console.log(`Ready to serve in ${client.channels.size} channels on ${client.guilds.size} servers, for a total of ${client.users.size} users.`);
}```
My Ready Event Just show in console as.
```Ready to serve in undefined channels on undefined servers, for a total of undefined users.```
On the V11 It works but on V12 It show as that
client.channels.cache
.size
(.size)
.length 
client.leaveVoiceChannel(message.member.voiceState.channelID);
Is how you make the bot leave the command author's voice channel, correct?
What language is that
so client.users.cache.size?
Because it's probably wrong
js
djs
VoiceChannel#leave();
message.member to get the member object
What
``const Discord = require('discord.js');
const client = new Discord.Client();
const prefix = "z!";
client.on('ready', () => {
console.log("Bot Has Been Started.");
})
Client.on('message', (message=>{
if(z!message.content.startsWith(prefix)) return;
})``
Is everything correct here?
looks fine to me
remove the z you have in your message event
z where
ok I might be a little bit blind
yes
did you know the basics of Javascript?
no Lmfao
how can i do pretty urls for my website? example: lumap.me/test.html --> lumap.me/test
are you using expressjs, @tight plinth
im using html+css
i think you can do this with a htaccess file iirc
and js (no node)
You can use htaccess yea
"Missing ) after arguement list"
`const Discord = require('discord.js');
const client = new Discord.Client();
const prefix = "z!";
client.on('ready', () => {
console.log("Bot Has Been Started.");
})
Client.on('message', (message=>{
if(!message.content.startsWith(prefix)) return;
})`
Where lol
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteRule ^(.*)$ $1.html [NC,L]```
How many characters does a custom emoji count as?
"Missing ) after arguement list"
`const Discord = require('discord.js');
const client = new Discord.Client();
const prefix = "z!";client.on('ready', () => {
console.log("Bot Has Been Started.");
})Client.on('message', (message=>{
if(!message.content.startsWith(prefix)) return;})`
Where lol
@winged frigate Basic js
Use a linter or something
its after the message and before the => @winged frigate
Ah i see.
so im using netlify to build & host my website, and i have this https://lumap.is-inside.me/Vgrka9n1.png option enabled. does it only works for html files? it doesnt seems to work with a mp4
embed the mp4 file into a html file?
hmm
netlify is good
`client.on('message', (message)=>{
if(!message.content.startsWith(prefix)) return;
if(message.content.startsWith(prefix + "help")){
message.channel.send("If you need help either message ModMail or create a ticket!")
}` Anybody know whats wrong with it?
read the link i sent u
embed the mp4 file into a html file?
@lusty quest ok, but now its ugly and people have to click the link to be able to watch the video
read the link i sent u
@digital ibex that is not helping
why is it not helping you
its very clear
i have no idea about html so idk
whats not clear?
nothing
so you understand it now?
then whats confusing you
read the link i sent u
i dd
:l
then what on the link is confusing
What's going on here lost?
tried to reload the ban commend. it reloads the command reload itself
args1
you're looking for the first word after the prefix
instead of 0
ok ty
theres no error
But what is it
the error message, so if u have Error: ur mom fat the error.message is ur mom fat
Oh makes sense
its args[1]
UnhandledPromiseRejection: you said you'd give me free vbux
@hazy sparrow try it and see
do i have to put that as the error.message?
okay
(not the message, just change the zero to a one)
ah
console.log('bob');
i didnt think of that
console.table('bob')
it works
Dynamically?
wdym?
to reload codes
other than going to the terminal you can just reload it from a command
for whole bot
i have it for seperate commands
ok
How does sniping messages work
@earnest phoenix
Basically, you make a snipe.json and write the deleted message (under the channel ID) in it, then when someone runs the command you can do one of three things: just get the message, get the message and then overwrite it instantly or make a count that counts how many times the message has been sniped then it to overwrite
Any questions?
can someone help me make a html for my bots description?
@pure lion oh.. lol thought it was smth else
Well now you know
You can also use a db but I really can't be asked to make a channel schema
Fuck it fine I'll make one
When i try run it through cmd "node ." it says Unknown Identifier.
ID: guild.id + channel.id
{ Boolean shit here }
snipe: String
can anyone help me make a html?
@winged frigate get rid of the ) after the quote and then see what happens, guess at what you need
@pine raven w3schools
ok
Nobody will spoonfeed either of you
Cool
OHHH IT WAS A ,
Boeing no spoonfeeding
i think
Almost
oh fuck thanks
Np
:> see it wasn't so bad
is it a role or user
how do i change the path of VS code terminal?
@hazy sparrow cd WHEREVER
same way you would normally
<@ID> @winged frigate
i forgot how i did in the console ;-;
ah ok
is it a role or user
@earnest phoenix user
you dont need the /
``<@id> @winged frigate
yes
@winged frigate its message.author
message.channel.send(`Check DMS ${message.author`)
yeah ik but it shows something else.
what does it show
line 14 put a }
guys
I have.
basic js
put another
basic js idk
${message.author}
thats what i've been telling
k
did you add it @winged frigate
yes
what does it send now
The thing i wanted.
and discord.js
and discord.js too

why is this thing reloading commands twice
๐คฃ
Add "scripts":"node mybot.js" into package.json
how
right?
how to
make a field with multiple
words
case 'help':
const embed3 = new Discord.MessageEmbed()
.setTitle('help')
.addField('Fun', 'smug', 'spawncard', true)
.addField('Moderation', 'kick', 'ban', true)
.addField('Utility', 'purge', true)
.addField('Other', 'youtube', 'profile', 'info version', true)
.addField('Version', '0.0.1', true)
.addField('current Server', message.guild.name, true)
.setColor('#5DADE2')
.setThumbnail(message.author.displayAvatarURL())
.setFooter('Subscribe to prof c4 on youtube.')
message.channel.send(embed3);
break;
this is my code
embed feild?
yes
wdym multiple words
i need for a help function
what about it
client.on('message', (message)=>) if(message.author.bot) to make it say "you cant ban a bot" after the message.author.bot what do i put
that wat i what to have
@winged frigate learn discord.js and node.js PLEASE
client.on('message', (message)=>)
if(message.author.bot) return messag.channel.send('you cant ban a bot');
I WILL IM JUST TRYING COMMANDS AND LEARNING THE BASICS THROUGH COMMANDS
no
yes
uh
can someone still help me
learn js
@tight plinth hOw
Learning JS through making a bot is a wire a lot of people trip on. You should learn JavaScript and Node.js throughly by reading and learning it by example (for example, sites like Mozilla Developer Docs).
.addField("TITLE", "DESCRIPTION", true)
case 'help':
const embed3 = new Discord.MessageEmbed()
.setTitle('help')
.addField('Fun', 'smug', 'spawncard', true)
.addField('Moderation', 'kick', 'ban', true)
.addField('Utility', 'purge', true)
.addField('Other', 'youtube', 'profile', 'info version', true)
.addField('Version', '0.0.1', true)
.addField('current Server', message.guild.name, true)
.setColor('#5DADE2')
.setThumbnail(message.author.displayAvatarURL())
.setFooter('Subscribe to prof c4 on youtube.')
message.channel.send(embed3);
break;
this is my code
i did that in the code
And?
how to like make a thing if a user reacts to the message it says for example:
Derku#0714 reacted!
which language
which language
@hazy sparrow js
k
^
^
quick question, does anyone know the equivalent of the rateLimit event for discord.js in eris?
cant find anything in the documentation about it
i also have a question how to display the guild/server img
ok
thx
its
.setThumbnail(message.guild.iconURL)
or
.setThumbnail(message.guild.bannerURL)
oeps i was to hasty
If you're using Discord.js v12, .iconURL and .bannerURL are both methods.
Hmm does iconURL give gif server pic too?
For nitro boosted servers I mean
@sudden geyser
Ping me if anyone answers thanks
@jolly quail yes. There's an option to set it as dynamic to automatically set it as a gif if it is, or return the static version of it.
@jolly quail yep
In v11 too?
No.
your bots not good then lmao
Lol

In v11, it was just a property. Whatever you set in your clientOptions would be what would be applied automatically.
But I think it did the dynamic vs. static for you already.
v12 is max btw
code
Richembed became message embed
i recommend switching to eris instead of djs v12
eris is hard
eris is hard if you dont know javascript
Lol
otherwise, its pretty simple
Eris, a NodeJS Discord library
tim hi
if you think eris is hard, you havent seen klasa-core and detritus
i need to try detritus
and of course discord.js-light
i havent tried before D:
Ty
lol
i tried to try d.js-light
but i dont use djs D:
i finally made the switch https://cdn.vurighosting.com/u/AlHN1t.png
any lib that allows you do customize caching is gonna be harder to use
tbh, if djs-light was the regular d.js i probably would be using it
because there are a lot of behavior changes and differences on how the entire program works depending on which caches you enable
if it was like that i would not even be into coding bots
wdym if it was the regular djs
It's not like v11 will become useless is it
like this https://discord.js.org
it is tho?
wdym?
I mean it works for now
tim what do you use
oh
ofc lol
he made it so he's probably gonna use it 
i use normal d.js ;-;
i made it specifically for my bots, then later on decided to change it so its better for pubic usage
and removed all the shit that was specifically made for my bots
how do you make a lib
uhj
sure
module.exports
you make a lib the same way you make multiple files
Is that true that there is ban onmee6 bot
Ok ๐

@digital ibex cool package, but I think this is misspelt on the front page readme file
whats that
a really really really really cool library
people be making libraries and here im not getting how to make a proper mute command
if u need help with it, u can use https://github.com/OfficiallyLost/lostbot/blob/master/src/commands/Moderation/mute.js as an example, BUTT its very messy and i need to re write it. it works though.
um, wow... i didn't realise it was this bad...
dafuq
ghostbot
did you make any custom commands?
yeah
should be fine, i think
Ok, so I don't think I can help you unless you want it to look like this ( https://jeremy-clarkson.is-inside.me/0eda8sgU.jpg ), but w3schools ( https://www.w3schools.com/css/default.asp ) has you covered
CATS
Cats indeed
c a t

