#development
1 messages ยท Page 807 of 1
so its just index.html on glitch, without any server side code
Lol wait
It has a JS file yeah
Go here
Tim
but its browser js, not server js, right?
You can see the basic template
like a js file you include in your html file
im asking him
but its loaded in the html file, right?
Yeah
How would that be set up?
you have to rebuild your website into using a webserver library like express
instead of html files
So there's literally no way to pick up a request
not without server side code
Can't I just add the code for server side?
you do it by rebuilding your website into using a webserver
for instance, instead of index.html
you will have an index.js file, that must be set as the "main" file in your package.json
and then in that js file, you need to use a library like express
configure a route like app.get("/")
and then run the server on glitch's port like app.listen(process.env.PORT)
and then from that app.get() part, you will receive requests, and inside that request you can send html files
or you can configure static files
but the main entry point will be the js webserver, not the html file
when people open your website, your webserver receives a request and the decides what to do with it and what to send
instead of glitch automatically sending them your html file
once you get the idea of it it is soooooooo much nicer
no
its really not as hard as you think
you must explicitly tell glitch to use your server
"hey glitch, i want all requests to be handled by my webserver instead of you sending a file automatically"
Wouldn't that work if if I did a /receive.html file?
no
das not how dat works
an html file doesnt do anything on its own
when you open a website that has an html file, your browser downloads the file, then opens it
Ok
an html file never does anything on the server
if it really is too much for u, you can always use a basic framework
Is it possible to do it the other way?
Loading the page gets the most recent post with an image
if you can access this page from your browser, yes
a page that automatucaly gives you the most recent post
as in, upload it and then put it in an embed or?
as in, a file in your computer, or an url
url
gif is an image
whats the link
try using a direct link instead
yes
tennor images dont seem to load properly
now time to remove that link from test command
how can I search members of a guild if I only have their username?
are the members cached?
yes
the member object will have the name
console.log(message.guild.members.cache.find(user => user.username === 'Timo Aardappel'))
guild.members.find() or guild.members.cache.find() if v12
itterate through
@wet iron this is for development not gif spamming
this return undefined
@prime cliff it was todo with the issue
members gives you a member object, not a user object
member objects dont have usernames
carry on then
they have nicknames
if you want to check for both, you can do this
.find(member => member.nickname === "some name" || member.user.username === "some name")
hm
ye, tim is smart
smart enough to get some working code
or read the docs
basically
I cant read them without dying lmao
https://discord.js.org is a very good site
this is a strike-through message
:pepewhip:
@quartz kindle thanks it worked!
๐
Anyone know why I get this error every time when my bot is connecting and how to fix it? (djs v12)
AbortError: The user aborted a request.
message.author is a user object, not a member object
How do i get the authors permissions?
use a member object instead
i dont understand it
message.member
oh
@wise orbit it means that you have a bad connexion
D.js has a timeout for long requests
๐ค okay,I see, I think restarting the router will do me good
thank you
There is a client option for that
restRequestTimeout
Upgrade it to test it
ty
np
anyone want to build me a bot
In minecraft?
truth I am new
I need for discord
a stock bot but not like others
I have a system I built I want to add to it
making it different than all others
Smh people trying to tag everyone
sorry is that bad
we dont build bots for people, especially not for free
here we help each other with bot programming, learning and doing things ourselves
for most people, the bots are a project, right? mostly for fun
@crimson vapor mine's a hobby
For some reason when i enter (domain)/img/file in my browser i can pull it up
but my bots not embedding it
Does anyone have any ideas?
does this and gives the poop symbol
probably just not loading
ya thats what im trying to figure out
why will it load in browser bot not on discord
I mean its probably just taking forever
Isn't your image too heavy?
Have you tried loading the gif as a file and sending it?
Instead of embedding on an embed
No i havent. But that gives me an idea (not for the bot im wondering if the file is downloadable now)
Ill try that in a bit ๐
Ah
Welp
Seems like server-side issues
Since you can load the gif in the browser, so it's not issues on your side
Lol idk what i did though
the ports open and i turned off the firewall to test 
anyway, ty!
You're welcome
Could someone help me get started with CSS of the bot page?
not sure where to start tbh
Do you know how css work already?
Yeah alittle bit, I can do some stuff with it like gradients and others
I just wanna set the background to dark theme
Just add a <style></style> tag at the end of your long desc and put your css inside it
hmm incog worked
but doesnt help the bot
<style>
body {
background-color: #212125
}
</style>
Use F12 if you need to get classes and ids for the elements
Okay thank you ๐
Ah, btw
Some styles will require a !important tag after it
So if it seems not to show your changes try to add it to the style parameter
or try learning css specificity instead of abusing !important lul
That also works
The issue is that there are important tags on the page's styles
So it overrides your changes
yeah some of them have it lul
!important !important
!rllyimportantcodewhatever
Stopping to think, is it possible to inject css on github?
you can install some extensions like Stylus and change website's css
you can even use premade ones online so it's cool but I don't like any of em
yeah but thats only for you
@lyric mountain Dont know if you care but i looked at logs and found the issue
it was ModSecurity falsey identifying discord and my cdn
took maybe a minute to fix
client.guilds.get('544677366455336974').fetchInvites().then(i => message.channel.send(`discord.gg/${i.code}`));
Anyone know whatโs wrong with this?
Trying to eval and have my bot create an invite for the id
Why is i.code inside the string?
Isnโt that the invite code?
I mean, why not concat it?
how do you make the bot not tell when someone joins/leaves the server
if you are fetching more than one, wouldn't there be multiple?
so you would need to choose one?
Donโt program it in frosty
@last willow onMemberJoinEvent and onMemberLeaveEvent
Oh if itโs not your bot
Hmm you could change the welcome channel
Then hide it
^
Lol
Lol
Admins, give us pikachu emote asap
Not those, I mean THE pikachu emote
Dat
Srry
^
HTML/CSS:
Should I have a div with width: 100% and then create my table inside that div
or
Should I just set the table's width to 100% with display: flex and only align the table to center
Depends on what you're doing
For some sort of command list or just some random info it's better to have an adaptive table
Actually, I'll need some other stuff around the table so I might go for a div
@lyric mountain what Noah done was correct with I.code in the string, it's called a template literal.
@forest mirage fetchInvites returns a collection thus will require the .first used on it before .code is available.
let invites = await client.guilds.get("id").fetchInvites();
let first = invites.first() || false;
if (!first) return;
// then use first.code
Ah, thanks
There might be a few problems with what I sent, been awake far too long.
Also apologise for the mention. Both of you.
Donโt apologize! I appreciate your help nonetheless 
Discord.js
I want to have a bot make a transfer of messages from one server channel to another, how would I do this while keeping the messages in order?
best way to implement a math 5 * 4 / (3 + 2) - 1 type command? obviously i dont want to eval anything given to me by a users input. should i regexp and parse for number and mathematic operators only? should i split each as its own argument and then validate that each are numbers / math ops? how would you do it? @ anyonewhocares
Do you think it's possible that there's a module that handles that?
Discord.js
I want to have a bot make a transfer of messages from one server channel to another, how would I do this while keeping the messages in order?
For each message:
await client.channels.get("ChannelID").send("Message") @floral bloom
@lime jewel I'm sorry, I mean how do I get the messages from first to last and send them to another server?
oh probably yea
that seems very overshare @floral bloom
like, for what reason?
and then like, how far back are you trying to go?
what if a particular message already got sent?
are you trying to do this for all channels?
#datamining?
what if someone is getting anxieties
like, for what reason?
Because it is a roleplay channel for a friend and they want it saved because the channel may be deleted.
and then like, how far back are you trying to go?
January 31st, 2020, 23:49 (EST) [32 days]
what if a particular message already got sent?
What do you mean by this?
are you trying to do this for all channels?
No, only one channel.
#datamining?
Huh?
@neat ingot
maybe that will help
it wont be quick to get the past 32 days of messages though
and you would need to wait till it had them all before you started sending to a new channel
and then your gona have to send them with an embed or something to show the user who said the things avatar and username in
or some other formatting to highlight such
Thanks! I'll look into it. ๐
np ๐
nevermind ๐คทโโ๏ธ
Can anyone help me
Regarding making my own starboard bot
im tryna figure that out rn
K
https://github.com/AnIdiotsGuide/discordjs-bot-guide/blob/master/coding-guides/making-your-own-starboard.md ๐คท๐ปโโ๏ธ
thats js ):
Starboard guide ^^^
the logic is the same
o
because d.js is the most popular and its usually safe to assume especially around here with so many beginners
True
That I can't help with ๐ฌ I don't use v12 yet.
Oof
read docs?
Bruh, I'm correct
But now I have an other problem
My bot can't leave voice channels
@earnest phoenix you mean like shell/PowerShell commands?,
My bot is still in the vc
@earnest phoenix reading this might help you understand that maybe ๐ค https://www.npmjs.com/package/shelljs
I've never actually dug into how that works for d.js or if it even can execute them (i would imagine it can)
well
i was gonna say
just do whatever the djs equivalent of exit() is
to leave a vc
;p
How do I get bot developer role?
For example to stop the bot with d.js is process.exit() iirc
@candid granite add a bot to the top.gg site
And get it approved/accepted
how long till it is approved or accepted?
oh/.... great
actually
@mental bobcat (684065290845552652)
was declined at 635pm, but apparently was added hours earlier
so
They will decline you sooner for small issues like spam desc etc...
Easy to clear out a bulk amount of bots that way and keep it short
@floral axle (614845107522240513) added last thurs 2:08pm, declined yesterday 6:12am so i'd still say a week
Yeah the 2 weeks or more things was a estimate
Last bot I added I waited 3 weeks maybe 2 and a half
๐คท๐ปโโ๏ธ
mine got approved in 6 days
That's not bad
that was only 5 or so days ago, thats why i've been saying a week
I am trying to change my prefix
it's really annoying
someone wanna tell me how to make this an uncommon prefix? if (message.content.indexOf(config.prefix) !== 0) return;
........
oh.. my bad, wrong line
config.prefix afaik you should probably be editing the prefix via the config.json
const prefix = "g!";
yeah, I didn't have that was the problem
VPS
care to elaborate on that?
VPS or RDP
how do I use it
a server
its like a computer
and you connect to it with ssh
and you set your bot up there
link?
so get used to the command line
rdp is better to me
there are many providers
easy access
but which do you use.. link
vps can be a pain sometimes
check pinned messages
i use both
pain thats definitely worth it
vps for my small bot, rdp for my bigger bot
which do you use...
lol
none of those look good. one isn't even english
what?
hands up
how do I use it?
youtube can help u with that
You can't expect not to have that response when you recommend glitch to someone who can potentially afford a cheap VPS
Learning basic command lines takes literally 5 minutes
Then don't go into bot development
Bot development library's are NOT beginner friendly and require you to have the basics down before attempting it
for some one with no means of paying, glitch is still probably the best option
but if they have money or even access to a card for free trials, then a vps will always be a better option
you can access a vps on your phone, whats your point
Seems like the lazy person's way out
remember the time where everyone had computers and nobody had phones? pepperidge farm remembers
You can access a VPS via phone altho coding on phone is ๐คข
tho
Having version control is a good thing, why would it be a perk to not have to use one.
^^
Pushing shit randomly tends to never end well or be a good thing
And if working in a team makes life hell
eh, i dont version control my bots lul
smh
Smh
Tim you were our god, now thy hath been sullied
That's Shakespeare enough ish
i was always a heretic, you just chose to believe what you wanted to believe
why are the only persons defending glitch the persons who know nothing
Count bots?
which language do you using
@modest maple Can you not trashtalk at stuff here please
use filter()
Glitch isn't "shit" when you use it correctly
shitting on a service only because it's free is stupid
if the member is a bot
^
also, it will only work on cached members
example
filter(member => member.user.bot)
member.user?
yes
What will this return?
a member object contains information about the member in the guild, like nicknames, roles, etc
Ok
a user object contains information about the person's account, like username, tag, if its a bot or not
use .size for get count
you can get the user from a member by member.user
@ocean frigate stop react spam pls
That was a hint to stop if you didn't get it
I already got it
Anyways letโs keep this channel for bot developement
@modest maple wow that was rude
client.snipy[`${message.channel.id}`] = {content: `${message.content}`,sender: `${message.author.tag}`};5:16 PM
TypeError: Cannot read property 'channel' of undefined```
I Don't understand it
message is undefined
It triggers on messageDelete
const Discord = require("discord.js");
module.exports = (client, message) => {
client.snipy[message.channel.id] = {content: `${message.content}`,sender: `${message.author.tag}`};
var fs = require('fs');
var fileName = './snipe.json';
fs.writeFile(fileName, JSON.stringify(client.snipy), (error) => {
if (error) {
return console.log('oops')
}
});
};```
๐ค
Did i wrong?
@charred jetty try checking if message#channel is valid since it might be the cause of the issue.
Um ok
what commands should I add to my bot
what if someone's deleting messages in DMs?
context
you do it like: require("./events/messageDelete.js")(client, message)? or is this not even needed
thonk
if someone is deleting a message and you want to get the message or something you just set up a messageDelete event to catch those and report or push them to an array
Hero, can you show us where you called that file's function.
it should be no different between DMs and guilds
yes
@lilac wharf message is undefined
Hero, can you show us where you called that file's function.
In server.js
client.snipy = JSON.parse(fs.readFileSync("./snipe.json", "utf8"));
And the previously given code was in messageDelete.js event
Snipe Command is working perfectly
yes but show us your event handler where you require messageDelete.js event
Ok
Check #502193464054644737
util/eventLoader.js
const reqEvent = (event) => require(`../events/${event}`); module.exports = client => { client.on('ready', () => reqEvent('ready')(client)); client.on('reconnecting', () => reqEvent('reconnecting')(client)); client.on('disconnect', () => reqEvent('disconnect')(client)); client.on('message', reqEvent('message')); client.on('guildMemberAdd', reqEvent('guildMemberAdd')); client.on('guildMemberRemove', reqEvent('guildMemberRemove')); client.on('guildMemberUpdate', reqEvent('guildMemberUpdate')); client.on('guildBanAdd', reqEvent('guildBanAdd')); client.on('guildBanRemove', reqEvent('guildBanRemove')); client.on('voiceStateUpdate', reqEvent('voiceStateUpdate')); client.on('messageDelete', reqEvent('messageDelete')); };
well that's why. the first argument would be message.
as you're doing client.on('messageDelete', reqEvent('messageDelete'));, it's being treated like client.on('messageDelete', (message) => reqEvent('messageDelete')(message)), which, the first argument for the function in that file is client. So client is the message instance, rather than the message variable.
No, message is nothing.
and client is message.
You can use an easy workaround by using something like reqEvent('eventName').bind(client) so it gets called like (client, message).
why are bots not allowed to respond to non-commands?
because it's annoying (in this server at least)
Imagine you send "hello" in a Discord channel and you get spammed with 20+ bots responding
Lol
I see, well my bot says if you use I am {] it replies''
ikr
have you tried reading it
because it says well and clear what's the issue
and what does the error say
Have you considered the idea that string for server1 may not equal string for server2
Reading comprehension
understand what you read
because the error quite literally
says what you did wrong
I like how we "help" people here like
not telling them what method/function they could use to fix their errors
we just tell them to read and understand
this doesn't work for turkish peep but somehow it works for u
i often push people to figure it themselves; beacause they can and that's how you learn
it's in a field
Well do you know what a character is
You can't have more than 1024 characters in a string for a feild
Field
pushing people to figure out things themselves produces amazing results and you can see that anywhere where schools adapted that way
truncate it
find the last few characters before it crosses 1024 characters and replace them with, for example, dots
wat
yes and...?
store that in a variable
then truncate it
and boom
profit
im not at home so i cant help you with code examples because theyre a pain on mobile
but there are plenty of truncation examples on google
search for it a bit
@earnest phoenix use filter()
Example
Message.guild.roles.filter(role => role.name !== "@everyone").map(a=> a).join(" - ")
My Web-Site Giving 404 UNKOWN error
@zenith orchid i think you can leave out that .map
@cold lion then the site you requested doesnt exist
@earnest phoenix I can only see the site
what site
Wait
ye tim
until your bot is approved, only you can see it
Tim
@quartz kindle if the bot is unverified it hands out a 403 unauthorized
How approved
did you apply?
-bots @cold lion
he did
then wait about 1-2 weeks
you will receive a message from Luca saying if it was approved or not
๐
@earnest phoenix Ha,
i use mongodb and its good
How to make a bot self-deaf with djs v12 power?
Google?
Who is google
Use lmgtfy
mongoose is an ORM for mongodb
you need to have mongodb installed somewhere as a server
or use something like Atlas or Mlab which is like an online mongodb database you can connect to
@earnest phoenix no go to the console and type npm i name
name = name of the module(mongoose or sqlite3 or another)
I think yes
@earnest phoenix on glitch
Omg...
just click add package and search the name
rtd
or u can use ur no game no life skillz
I recommend sqlite
sqlite is great
sqlite is an embedded database
but it usually does not server the same purpose as mongoose
just make a text file and rename the extension to .sqlite
depends
will you store a realtime data of all the people on earth?
if not, probably not too much
sqlite
lighter and easier to use
You use nodejs right?
Read that
a lot of useful info
as well as some examples to use
mine has over 80k entries just in the member table, and weighs just a little more than 2.5 MB
My bot is in just a handful of servers
yep
lemme check
still fits in a CD-ROM
sqlite doesn't have a server
the file itself is the database
idk if glitch is volatile or not
what is glitch?
if it's volatile then you'll not be able to use embedded databases
what is glitch?
@summer sedge free host
glitch.com @summer sedge
I don't trust free hosts ๐
yeah, there's a reason for glitch.com be blacklisted in some webservices
but still, for small bots it's enough
create a file.txt
rename extension to .sqlite
???
profit
const SQLite = require("better-sqlite3");
const sql = new SQLite('./scores.sqlite');
const getUsage = sql.prepare("SELECT * FROM usage WHERE command = ?");
const setUsage = sql.prepare("INSERT OR REPLACE INTO usage (command, number) VALUES (@command, @number);");
js creates the file if it not exists iirc
yes it does
it will spit out errors if your tables are not set up
so just make sure you set up your tables
laughs in JPA
to use a database you must make a query
then you can either call your database right after, or when you need it in your code
see that "SELECT * FROM ..."?
that is a select query, which will bring all fields from table X
Learning SQL on the go isn't fun
in the case I mentioned you can call your database from anywhere with
getUsage or setUsage
since it's predefined
I learnt sql on the go
it's pretty fun
Learning SQL on the go isn't fun
@slender thistle it is
seeing your project gain life is awesome
^
Debatable but subjective
Ok, now I start My warn command. Thankd
@earnest phoenix remember to check which field types sqlite supports
npm i better-sqlite3 --save
Ultimate question: You put new SQLite. What do I install that with?
@earnest phoenix are you on ubuntu?
^
just run the npm command unicorn sent
BRUH
create a table calles warns
add its fields (id, warns, userid)
then use a query to manipulate it
can someone help me? My play command can't detect queue, even if it's exported from index.js
uhm
Hello my bot have a problem, when I put "Neotux'Bot | In $ {client.guilds.size} servers) in the ready.js (for status) it puts me (Neotux'Bot | In undefind servers)? Why ?!
(files can be found at https://github.com/lumap/PichuRewrite )
share the code @earnest phoenix
Oki thank's you i test
Do you have v12?
I think he have
im right lol
and this ".cache." is in all code for this ?
wait a sec
Oki
@earnest phoenix https://discordjs.guide/additional-info/changes-in-v12.html
here you go
your parameters are wrong
command.execute(client,message,args,dbl,queue) > execute(client,message,args,queue)
so the queue in your case is actually dbl
rly
o
only the order does
I didnt know
beacause every other commands are fine
I will verify, but i think u are correct
and yes, you are
Ok
another question : with djs v12, this ```js
let response;
try {
response = await message.channel.awaitMessages(msg => 0 < msg.content && msg.content < videos.length + 1 && msg.author.id == message.author.id, {
maxMatches: 1,
time: 10000,
errors: ['time']
});
} catch(e) {
return message.channel.send("โ Video selection timed out.")
}
apparently no messages are detected
im having this strange issue where my bot awaiting reactions seems to be shared amongst instances of things. like, if im awaiting a reaction for one thing, its cancelling the other. but this didnt happen before today and I havent changed anything with the reactions at all?!
errors: ['time']
its triggering the completion of the other awaiting reactions with no reaction collected
so confuzed ๐
MessageEmbed()
^
i cant
i actually cant
@earnest phoenix you typed setColor in lowercase
it's not .setcolor, its .setColor(color)
Thank's you i start in v12
11.5*
that makes more sense
๐
musta been when i rebuilt my containers, will need to check the package.json and hardcode 11.5.1 till i switch to 12 ๐
i dont run npm install, my docker compose file does ๐
i dont have any node modules for the project locally
well i do, but inside a container somewhere
wow..
yea that fixed it entirely. shouldnt 11.5.1 and 11.6.1 be fully compatible though?
like, the ^11.5.1 literally means compatible with version
src: https://docs.npmjs.com/files/package.json
i think it means if theres newer version (not major update) it auto updates. (even tho theyre not fully compatible) like ^1.23 you put, and then it finds 1.24 version and installs it automatically. thats what i think.
11.6 should be compatible with 11.5, what was the problem?
@neat ingot do you have any idea why my container (only when ran with docker compose) exits after a few seconds with code 0? (i know this is vague and stuff but if you need more info lmk)
reactions were buggy af @quartz kindle
i have confirmation reactions that the user checks to confirm like, healing (it costs credits to heal) for example. and i also have enemies that spawn, which you need to trigger reactions to battle. for some reason it was sharing the reactions
like, if i reacted to heal it would trigger the spawn message reactions as having no emoji
only happened after container updated from 11.5->11.6 ๐
@mossy vine look for the error message in the log. if you dont have -d when you docker-compose up containername it will auto log, if you want to get the log of running containers use docker-compose logs -f containername
wait does docker-compose up need a containername??
What is good site to learn discord.js?
the d.js documentation
but learn js first
oh is this a joke
hang on
@neat ingot can docker not deal with symbolic links
or whatever theyre called
its doesnt need one no, but you can give one if your only wanting to stop or boot a specific container
i havent has any issues with my containers linking together, if thats what you mean?
no
In computing, a symbolic link (also symlink or soft link) is a term for any file that contains a reference to another file or directory in the form of an absolute or relative path and that affects pathname resolution.Symbolic links were already present by 1978 in minicomputer ...
so my project structure is
master/ (name of project)
monorepo/ (main folder)
docker-compose.yml
master/ (symlink to ../master/
[symlinks to all other projects]
i move the docker-compose out of the directory, and now its working
im minding ./main-bot/src from the docker projects rool folder into /dekbot/src within the container
which is the path you set in the dockerfile
like umm
yeah that still really isnt what i mean lol
but i think i got it so
np ๐
if my container is running a webserver, and in my docker compose file i have ports: -8000:8000 shuoldnt i be able to access it at localhost:8000?
yes
i have a seperate nginx container to reverse proxy
but yes, you can
my nginx container exposes port 80 and such
which redirects to internal ports
yeah i cant access it
im running a webserver in a container
says its listening on 127.0.0.1:8000
its dockerfile exposes port 8000
and in docker compose i have 8000:8000
sick
whats the advantage of running containers instead of running your stuff directly in your vps?
it feels good
lmao
^ this guy gets it
i was hinking that
youi dont need to set the ip on the server
just port
and it autos to 0000
@quartz kindle i dont think im actually going to be benefitting from its advantages for a good while, but instead of headaches when rewriting -> headaches when writing
you can also make your containers share an inner network if they want to speak to one another without exposing ports 'to the wild' ๐
docker is pretty neet
thats wild and i absolutely dont understand it
add the first one to your service
and the bottom one at the very bottom of your file
any 'service' you make, give them that network id and they will share it ๐
what is that driver field btw
i honestly cant remember ๐
adding network was a random decision when i was figuring how to set it up
i remember reading it at the time but idk now ๐
but right now if i yeet up a different service it can access this webserver service at https://containername right?
idk if they have to share the network or not, but thats what i do
my nginx redirects to http://dekbot:1234/
or rather
the nxing directs to https://botweb:port
within botweb i make calls out to https://dekbot:port for info
no s
just http:
i assume they would share a network by default ๐
but you might want things on a diff network for some reason
Pretty sure that's not how containers work, Unless you're using some third party website e.g. codeanywhere even still they just give you a name.
has someone a idea how to count all members that are in all voice channels or other said a "Total members in all voice" count with Discord.js 11.5.1?
reduce()
?
message.guild.channels.filter(a => a.type === "voice").reduce((a, b) => a + b.members.size, 0)```
Can some ppl help me fetching messages with djs v12? https://discordapp.com/channels/264445053596991498/265156286406983680/684491200996442200
Did you link the wrong message
This is just to show it doesn't work
I don't see you fetching messages anywhere
Line 44
that just waits for a response
@summer sedge if I give a response, nothing happens and it logs message propriety
What version of Discord.js are you using, Lumap?
he said v12 lol
oof didn't see
I don't think maxMatches is a thing.
Try using max instead @tight plinth
I tested it myself and it seems to work.
how do you get a py bot to not say ??? as the status?
its not added yet but cant remember where it is
you have it in this server
i dont
i meant it as you need to have it in this server
no
there used to be tho right?
no
nope
there is code for server count, so it doesnt show N/A
but for status there is no code, all it needs is to be in this server
thanks
lib
@modern sable um do you guys do stuff about names like this
yup, ty
i was mini modding :)
ngl i i use compact mode so i thought #general was just @digital ibex spamming xd
cuz i didnt see any other names
lol
how would one make a bot overlap a gif over the persons profile picture
language?
java script with discord js
hm. i'm honestly not sure, as i dont use js
i mean i use JS but im honestly not even sure about that one (Overlaping the Avatar)
does a port of PIL exist?
use an image manipulation lib like canvas or something
ok i figured it out but i only works when you tag a user. errors when you dont tag anyone
let target = message.mentions.users.first() || message.guild.members.get(args[0]).user || message.author;
@honest perch make it default to the message author if no one is mentioned
Will avoid the error
Or just make it return
Or provide a message telling them to mention someone
The error comes from trying to get the property user of undefined most likely
ok i did this instead let target = message.author || message.guild.members.get(args[0]).user || message.mentions.users.first(); and it works
Well
It will always message.author
Doesnt solve the problem
The other ones will never run
If you mention someone it will still be the author
^
Yeah not I meant like if(!target) { target = message.author
still doesnt work
let target = message.mentions.users.first();
let user = target
if (!target) target = message.author
@honest perch something like this
Not saying this is gonna work as is you will have to do some editing ๐คท๐ปโโ๏ธ
let user = target 
Yeah that's irrelevant
I was just thinking that
Lol
IDEK what I was trying to do with that ๐ค
let target = (message.mentions.users.first()) ? message.mentions.users.first() : message.author;
better version 
That works to.
ternary > *
//true
Or just
let target = message.mentions.users.first() || message.author;
that too
They seem to want to allow by id too
So you could use ternary for that then ors for the rest
you can chain ternary
Yes, but why would you for that
or even wrap it around parentheses then .id
also chaining ternary just makes it harder to read
Making it more complicated
Does anyone know a way to put matplotlib plots in discord embeds without saving the file?
How can I make like an owner only command
Are you even a developer lol
they're a help vampire
if (user.id == 443181357246447617)
people tend to... ignore them in this channel now
you know, the escape key is useful for improving readability
they've been told about a thousand times to learn the language before working with it and they still don't do it lol
and also to read docs... which oh what a surprise they also don't want to do
what are docs
then why is everyone making a big fuss about it
everyone knows you learn code like english you dont look up every word in the coding dicrtipnary ๐๐
hey
hi
Hi guys ๐๐
j
@outer niche learn the language, then try to do stuff
we're not here to spoon feed you
someone had to tell 'em
hes already been told that countless times








