#development
1 messages Β· Page 1365 of 1
@earnest phoenix You can send to me a image
No need for an image, just go to the commands tab and click on the package manager and then type in the package you want
you can change version in package.json and then click run button
Since thatβs too much for him already somebody should at least tell v12 requires a few changes in your code in order to work. Probably create a backup of your whole project incl. node
now djs version is 12.4.1,
How can i make when someone invites my bot redirect him to my support server link?
Cause i have added a redirect url but it doesn't work
@earnest phoenix you can speak arabic?
No why?
Becuse i can help you @earnest phoenix
Ok but why i have to speak arabic?
Becuse i'm speak arabic @earnest phoenix
@gilded dawn you can't speak english?
I want to ask how do I add a bot to top.gg
@tepid grove #502193464054644737 will gladly help with that
C'ant speak english@earnest phoenix
Ok then i can't
Ok
@rustic nova could you pls help me too?
No clue about redirects on the bot page
And where can i take support for www.discord.com/developers/applications
How can I put my bot on your site
@gilded dawn see what i said to ohayou
@rustic nova thx
@rustic nova thanks
hi i haven't been running the bots console for about 1 hour i get this back and whatever i do is not good but if i write another bot id then emg starts what could be the problem
[NODE.JS]
2|yue-chan | [WS => Manager] Fetched Gateway Information
2|yue-chan | URL: wss://gateway.discord.gg
2|yue-chan | Recommended Shards: 1
2|yue-chan | [WS => Manager] Session Limit Information
2|yue-chan | Total: 1000
2|yue-chan | Remaining: 0
2|yue-chan | [WS => Manager] Spawning shards: 0
2|yue-chan | [WS => Manager] Exceeded identify threshold. Will attempt a connection in 71146268ms
please someone tell me what I did wrong
(posting stackoverflow because I dont want to type it out again for discord)
https://stackoverflow.com/questions/64679139/nameerror-name-open-is-not-defined-when-trying-to-log-to-files
So I chose to implement logging in my discord.py bot which is fine and dandy and works alright. but once I add logging to files, be it through using a filehandler
handler = logging.FileHandler(
In programming how should I tackle these situation.
I know I can't access the speak method.
I want the animal to speak while moving...
class Animal {
move() {
console.log(`Moving.... ${this.speak()}`);
}
}
class Dog extends Animal {
speak() {
return 'Bark!';
}
}
const dog = new Dog();
dog.move();
I know I could, override the move method for all Child instances
the only thing is that not all animals can speak, so inside the move method you can check if the speak method exists
Define an empty speak method for the Animal class
Wat?? How it is accessing the child method
its not a child method
please help i haven't been running the bots console for about 1 hour i get this back and whatever i do is not good but if i write another bot id then emg starts what could be the problem
[NODE.JS]
2|yue-chan | [WS => Manager] Fetched Gateway Information
2|yue-chan | URL: wss://gateway.discord.gg
2|yue-chan | Recommended Shards: 1
2|yue-chan | [WS => Manager] Session Limit Information
2|yue-chan | Total: 1000
2|yue-chan | Remaining: 0
2|yue-chan | [WS => Manager] Spawning shards: 0
2|yue-chan | [WS => Manager] Exceeded identify threshold. Will attempt a connection in 71146268ms
the prototypes get merged into a single object
the dog methods are merged into the animal methods
the resulting instance has all methods
Ooh, I think I'm getting it
The only way it will generate error is when, I create instance of Animal
yes, or any other child instance that doesnt provide a speak method
so in the animal class you can check if the speak method exists before calling it
@earnest phoenix you reached your daily login limit
you can only connect to discord 1000 times per day, and you used all of that up
you can connect again in 19 hours
@quartz kindle WHY???
How can you even manage to login to Discord 1000 times a day
how is it possible when the bot 0-24 is running without stopping?
Time to fix your code
might be network issue, it may have tried to connect multiple times
Can maybe be the case
your bot crashed or disconnected and reconnected 1000 times
oh i found a domain problem
π€
then I have to wait 19 hours
owner returns None. How do I fix this? It's the most basic command lol
weird asf
thanks for the advice though
How can i make when someone invites my bot redirect him to my support server link? Cause i have added a redirect url but it doesn't work
What it is called, when its opponent's turn
bruh
@earnest phoenix redirecting people after adding can only be done with oauth2
the person needs to "login with discord" in your website or wherever, then you get their access token and permission to redirect them
I already did that but it doesn't work
Oh, i thought this could happenes when someones invites my bot then it gets him to the link i added
@quartz kindle but when someone can get this access tab?
What is that business you put in .setColor that adapts to the discord theme, I forgot
Won't work on both themes, but #36393f for dark theme
I already did it once but I don't remember
console.log(servercheck);
if(servercheck){
var role = message.guild.roles.cache.find(role => role.id=== "773443476615987231");
message.member.roles.add(role);
message.channel.send("You are verified successfully!")
}
if(!servercheck){
message.channel.send(":x: You must join the required server to verify!");
}``` well even when im in the server it returns as false
can someone help
hey, how turn based games works in discord ?
do u need to use database for that ?
and how u manage multiple user at a time ?
like if i say -game , bot will guess a number and will give the range in reply , the command user need to guess the number within 30 sec(try multiple times) .
how to handle multiple user ,when they will use the command at a time ?
ig message collectors
displayHexColor is on <GuildMember>
it gives the role color, the member has currently
oh
The color above are all the color, discord has built-in. They are also the same you choose to set color of the role, in server settings
console.log(servercheck); if(servercheck){ var role = message.guild.roles.cache.find(role => role.id=== "773443476615987231"); message.member.roles.add(role); message.channel.send("You are verified successfully!") } if(!servercheck){ message.channel.send(":x: You must join the required server to verify!"); }``` well even when im in the server it returns as false
@ivory seal umm pls help
@cerulean salmon message collectors and a metric ton of logic
ok sir
if I use nekos.life api and put a footer that says (all boys and girls u show are more than 18 years old)
can I use it? D:
No
You won't be able to use any nsfw endpoints on the nekos.life api
Doesn't matter what you do
okie thanks π
nekos has the specific issue of returning loli/shota images
which per discord's ToS is illegal as it goes under "no minor images" rule
idk, I'm not into nsfw stuff for bots

It's better to not implement nsfw stuff until you have a trusted and acceptable service for that
yeah, nsfw can get REALLY dangerous REALLY fast
yup, i think... maybe I can filtler I mean, downloads those images or gif and put those in a sql
it's just a snap of the wrist and everything is...gone
no filter will save you if their filter is weak
like, there's always 1% that doesn't get detected by the filter
or 1% where the user that posted didn't use the right tags
noo I mean I see it and if this image has something about minors I dont download that image
filetered by me, by my self
but prepare to have a huge load of questionable images in ur disk
but prepare to have a huge load of questionable images in ur disk
@lyric mountain hahah yeeh
thanks :3
ah, one more thing: no nsfw outside nsfw channels
that WILL get ur bot banned regardless if you added a disclaimer footer or not
How to detect if a message DON'T have a image? (To delete it)
which language and lib?
regardless of the lib, check if the message has attachments, if it has then check if it's an image
TypeError: Cannot read property 'toDateString' of undefined
Whatever your using toDateString on is undefined
my code : - var created = "Created: " + user.createdAt.toDateString();
What's user defined as
What's user defined as
@solemn latchvar user = message.mentions.users.first() || client.users.cache.get(args[0])
Ah global variable
any solution
Are u using id?
If you are using id then probably the user is not cached
Instead of get use fetch
message.guild.members.fetch(id)
not using id
If you are mentioning then log user and see the property name
Hi
hi, can anyone help me with a SSLPeerUnverifiedException?
I host my bot (JDA) on a ubuntu server and it sometimes throws this Exception:
javax.net.ssl.SSLPeerUnverifiedException: Hostname cdn.discordapp.com not verified (no certificates)
listen lets you listen to events in multiple places.
event lets you listen to events in one place
k
does embed.setDescription accept array of string??
ππΎ
i dont think so
@quartz kindle 
HoaX What stats??
@earnest phoenix lmao finally
now you should be able to install better-sqlite3 without errors
...
Does anyone have a link to a document to correct this error?
I literally look at another file that works with better-sqlite3 and it doesn't give that error
hi, can anyone help me with a SSLPeerUnverifiedException?
I host my bot (JDA) on a ubuntu server and it sometimes throws this Exception:
javax.net.ssl.SSLPeerUnverifiedException: Hostname cdn.discordapp.com not verified (no certificates)
@cunning timber maybe I can help
I use jda too
what's ur version?
also, java or kotlin?
@earnest phoenix whats logs.js line 10
@earnest phoenix whats logs.js line 10
@quartz kindle
your query is wrong
you're passing in the guild id but you dont add this guild id to the query
the correct query should be SELECT username, message FROM lounge WHERE id = ? LIMIT 1
you need the WHERE id = ? to include the id you're passing to .all()
not sure how your database is sturcutred tho
it might not be id, but guild or guildid or something else
ok
I am going to try
you need the WHERE id = ? to include the id you're passing to .all()
@quartz kindle the server id?
well, I got a problem with farewell message, did I pass something?
try focus on guildmemberremove
I tried many ways, and doesn't works
Suppose I've a embed footer with a image and text. If I update the embed doing embed.setfooter('updated'), will the image be removed?
you'd need to edit the message to apply the changes
yaya, I mean after applying the changes
as long as you don't clear or create again the embedbuilder the image will be there
that's one of the advantages of using a builder π
no, the image will be undefined
is that a bot on one file?
you can use setFooter("updated", embed.footer.iconURL) to keep it @rocky hearth
ah, you meant the footer image
so I need to keep adding the footer image again?
ye
you could create a custom builder that overrides the setFooter
this way you could make it always use the latest image
use embed.footer.iconURL
by extending MessageEmbed?
you can just get the old reference
ig he wants a single-param function
I just want to change the text
or what if I do embed.footer.text = 'updated'
@quartz kindle
or what if I do
embed.footer.text = 'updated'
@rocky hearth definitely don't even try
most stuff is encapsulated
rarely something like that would work
hmm I understand
if you want a single-param way of updating the text you'll need to extend the embedbuilder
it's easier to just pass the icon everytime tho
like, it'll make negligible difference performance-wise
@rocky hearth sure, that works
that's what the embed constructor do anyway
it just does that and return this
<style>
.content {
color: "blue" }
</style>
<p class="content"> hi </p>
This is not changing the color of my text in my bots description.
that's what the embed constructor do anyway
@pale vessel what he said isn't inside the constructor
come again
like, he wants to reuse the same builder, without creating another one
@earnest phoenix as i said, idk what your database structure looks like
could be id, guild, guildid, guild_id, whatever
userID
you can still modify it
the constructor itself?
then why do you have .all(message.guild.id)?
then why do you have .all(message.guild.id)?
@quartz kindle so that it can be used on all servers and not just the one I tested
yeah, ik
what I pointed out is that he tried to directly modify the attribute
which wouldn't work without the method
yep, it's fine
js is weird
let me test it out
LOL
@earnest phoenix thats not how that works
better-sqlite3 uses something called a "prepared statement", do you know what that is?
js is definitely weird
better-sqlite3 uses something called a "prepared statement", do you know what that is?
@quartz kindle π ?I honestly don't know what that is
stopping to think, does js even have private variables?
have you ever heard about sql injection?
yes
private variables are a thing from node 12+ afaik
@earnest phoenix a prepared statement is to protect against sql injection
for example
There were no private variables before
// this is vulnerable to sql injection. the variable can add unsafe commands to the SQL
.prepare(`SELECT * FROM table WHERE id = ${variable}`).get()
// this is safe. the variable is added to the query in a special way that protects the query from unsafe commands
.prepare("SELECT * FROM table WHERE id = ?").get(variable)
``` @earnest phoenix
you can access and modify anything
so instead of allowing a string that may include another command to pass through, it only does one variable?
Yes, I reliased that few months back. Therefore I started working with typescript. It's alot easier and type safe
@earnest phoenix so in your code, message.guild.id serves no purpose
because you dont have a guild id field in your data
//Example SQL injection
"SELECT * FROM user WHERE name = " + name;
//User's name is "1;DELETE FROM user;"
"SELECT * FROM user WHERE name = 1;DELETE FROM user;"
//Resulting SQL
which will give u headache for days
<style>
.content {
color: "blue" }
</style>
<p class="content"> hi </p>
This is not changing the color of my text in my bots description.
https://cdn.discordapp.com/attachments/272764566411149314/773584887159980052/unknown.png
It works with my own website not sure why it doesnt work with dbl
@severe pike google "css specificity"
Yes, I reliased that few months back. Therefore I started working with typescript. It's alot easier and type safe
@rocky hearth ain't it? something I always hated about JS is having way too many weird stuff
you need .longdescription, i guess
I think I had a stroke
Ok thanks tim ill take a look
flaze, is that eval command created by you? Looks cool
incredible how tim said almost the same thing as I but you treated me like a horse would
//Example SQL injection
"SELECT * FROM user WHERE name = " + name;
//User's name is "1;DELETE FROM user;"
"SELECT * FROM user WHERE name = 1;DELETE FROM user;"
//Resulting SQL
@lyric mountain But the thing is, I don't understand why I have to store that
Tim i've had a look here: https://www.w3schools.com/css/css_specificity.asp
But I am unsure in how to fix this issue.
the users and id
you're not able to query for users without some key or unique index
like, let's say I have 100 users in my database, all having IDs from 1 to 100
if I do SELECT * FROM users it'll return me 100 entries
if I do SELECT * FROM users WHERE id = 1 it'll return me one entry
that is absolutely faster than filtering the collection in the code
hey guys i wanted to ask can a discord bot stream video in a voice channel
ea
what are you trying to achieve?
a command to see the logs
you murderer
lol
I screwed up a lot?
just do SELECT * FROM lounge LIMIT 10).all()
you will probably need to order by timestamp tho
wait i have an error on the messageembed
is this chat just for bot dev or something else?
because i have an issue with vba and i don't know if it's right to ask a question about this on this server
Nani
this channel is for all kinds of development
never heard of before I gave it a quick google lul
it's something about excel right?
yes
vba is visual basic lol
yes
you never heard of visual basic before?
I only heard of, but never used it ig
i've done some shit with excel vba, but i dont remember much about it
also didn't knew it's also called vba
if i wanted to use it again id have to learn it again
Dim extension As String
Dim chemin As String, nomfichier As String
Dim style As Integer
extension = ".xlsm"
chemin = "path"
nomfichier = ActiveSheet.Range("b1") & "_" & Range("b3") & "_" & Range("d3") & "_" & Format(Now, "yyyymmdd hh""h""mm") & "_Calcul corp" & extension
With ActiveWorkbook
.SaveAs Filename:=chemin & nomfichier
End With
End Sub
I thought it'd be VB or something like
ok, now I hate vba
xD
if you have these drives auto syncing with a folder on your pc, give it that folder
if you want to upload directly to these drives without autosync, you'd need some sort of oauth2 or login api
oh, discord's code block has syntax highlighter for vb
this will be a file for customers so i can't specify a local path
it has syntax highlighting for like 150 languages
i want one drive for all users
couldn't u use relative paths?
I already got it
the problem is that gdrive is not a physical path, its an api
porfin puta madre
you need to make it connect to the api, provide credentials and authorization, possibly oauth2
google how to connect to to gdrive with excel vba
definitely oauth2 since it's sensitive data
οΈ»β¦Μ΄β¦ββ
It no longer gives an error and the command works
nice, I'm happy = true that you solved it
unneeded variable
damn
xD
anyone know how to add reactions with discord.py
FROM before SELECT
this is cursed
"happy" is declared but its value is never read
what r good ways to like schedule a task in python that happen even if you restart the program?
cron
crontab?
cronjob ig, iirc crontab is a linux-only naming
but it's all the same thing
cron works on scheduled dates, so it'll execute regardless if you restart the code or not
as long as it's online when the time comes
how can I check if someone has voted for my bot?
I understand I get a POST at my python app's webhook server
but when I upload my application to heroku
there are the easy and the reliable ways
it doesn't recognize it as a websever
typically you'd add something like web gunicorn app:app
to the procfile
are you using the correct path to your app?
wdym?
is that path correct?
yes it is
also, have you made a request handler in ur code?
that's the issue
I thought using the built in handler would work
you need to tell ur code how to handle the requests
self.dblpy = dbl.DBLClient(self.bot, self.dbl_token, webhook_path='/dblwebhook', webhook_auth=self.webhook_auth_token, webhook_port=8000)
doesn't this line
do that?
that's an on-demand watcher
you request -> it tells you if an user has voted
the webhook is the inverse
it tells you whenever someone votes -> you handle it
class TopGG(commands.Cog):
def __init__(self, bot):
self.dblpy = dbl.DBLClient(self.bot, self.dbl_token, webhook_path='/dblwebhook', webhook_auth=self.webhook_auth_token, webhook_port=8000)
@commands.Cog.listener()
async def on_dbl_vote(self, data):
# do something
yeah
so that's whyI have this listener
that's quite confuse
the webhook calls the on_dbl_vote event
the issue is that heroku doesn't recognize this file as a webhook server
no you're good
I do get an error
which?
r u using a worker dyno
yes
I am using a worker dyno
I also tried adding a web dyno
but I have no idea what file to point it to
worker dynos do not open ports at all, you need to separate your processes into web/worker or figure something out
that's what I have been tryna do
that'll effectively murder your quota tho
but where would I point my web dyno to?
idk the specifics on if worker and web dynos can see each other, assuming they cant, you'll need to the web dyno to point to a database or something
the web dyno gets it's own domain and you can reach the endpoint there
pointing to my bot.py file
it still works
okay let me try hosting the bot with just a web dyno
I might be a little off-topic here but would y'all recommend using a Raspberry Pi to host bots?
The new Raspberry Pi 400 looks tasty
a web dyno will shutdown the bot after some minutes of inactivity
I might be a little off-topic here but would y'all recommend using a Raspberry Pi to host bots?
The new Raspberry Pi 400 looks tasty
@acoustic bridge depends
for smaller bots it's a nice deal
wait will the web dyno actually shut down?
so I can't rely on it to receive commands on the fly?
400 looks sexy btw, but if you're going to scale the pi will definitely hold u back after a certain extent
if that's the case, can't I run a web dyno and worker dyno side by side
web dynos are meant to boot up only when there are requests being sent to the url
bots don't use the url
that means every single time the dyno sleeps your bot will need to login again
400 looks sexy btw, but if you're going to scale the pi will definitely hold u back after a certain extent
Not sure how far i could scale but i'd have a simple bot who has some fun commands, welcome messages and may run music commands.
which will reach ratelimit pretty fast
Not sure how far i could scale but i'd have a simple bot who has some fun commands, welcome messages and may run music commands.
@acoustic bridge the issue is the caching itself
commands don't matter much alone
How much effect would that take
I mean if my python script for example is just 21 KB
OOM errors, parallelism limitations, etc etc
no matter how small yer code is, discord sends a metric ton of data
constantly
Oh if that's the case
@acoustic bridge you'll be fine, just remember to move off the pi once you start getting larger guilds n whatnot, or find a way to use less cache by using a lighter library or efficient code
Yea i guess
My private server is just like 20 users right now, so it should be fine
ah is it for private purposes?
Pretty much
then it's fine
if you're going to run a single-guild bot then hardware matters quite little
and what if i would go for 2 different bots?
so it all depends on the size of a guild/server
it depends on the guild count
rarely you'll have many members to be considered "too much"
Welp
I'd say my bots are just fun bots, they dont administrate a whole company so yeah. I guess i'm safe with a Pi
@sand dune but u can guarantee if is a string, doing ``
guildMemberUpdate does not work anymore ?
It should work regardless of intents
Server members intents is locked to guild user join/leave events and presence intent effects userupdate not guilduserupdate
i believe it shouldn't
it's a member related event
you need the intent enabled to recieve the member
can anyone help me with vcpkg
im trying to add it to my cygwin thingyβ’οΈ but i keep getting the error Unknown uname: CYGWIN_NT-10.0
how ?
running ./bootstrap-vcpkg.sh in the vcpkg dir
but nothing happens D:
other than that error ofc
i'm gonna run the batch file
message.author.roles.cache.has cannot read cache of undefined ;-;
;-;
well, where did you get the token in the first place
Integrate your service with Discord β whether it's a bot or a game or whatever your wildest imagination can come up with.
well, where did you get the token in the first place
@earnest phoenix discord developer portal?
yeah, you'd regenerate your token and get a new one at that same place, or copy the existing one
I regenerated, and gave the same token as before
You already gave us the error ;-;
Β―_(γ)_/Β―
therefore you passed an invalid token π€·ββοΈ
@earnest phoenix i passed the token that was on portal
'.'
are you sure you're using the token and not the client secret
they're not the same
^^
did you press ctrl + s
@tulip ledge no
thats prob ur issue
i will try
if u edit a file u always save
sorry
are you sure you're using the token and not the client secret
@earnest phoenix
oh cool I didnt know that
are you returning the token from your config
are you returning the token from your config
@earnest phoenix what do u mean
hm yeah
console.log it and see what it outputs
hhhhh
so i'm making a confess command and uh
if(command === "confess") {
message.delete().catch(O_o=>{});
let confess = args.join(" ").slice(1);
if(!confess) return message.reply({ embed: { color: ('RANDOM'), description: (`please provide a confession to make,`) } }).then(message => message.delete({timeout: 5000}));
msssage.guild.channels.cache.find(i => i.name === 'confessions'.send(new Discord.MessageEmbed()
.setColor("RANDOM")
.setTitle("Incoming Confession")
.setDescription(confess)
.setFooter("Confession posted anonymously")))
await message.reply({ embed: { color: ('RANDOM'), description: ("you're super secret confession has been submitted, thank's and come again.") } }).then(message => message.delete({timeout: 5000}));
}
this is my code
and this is the error i get
moon need halp lmao
is that all it says?
msssage
I would help but Iβm at school lolll
creeper ssssssss
apparently i constipated and on my serverinfo thing i put another ) so it ended the message event
hhh these glasses are fucking me over today
wait nevermind still says message is now defined
my bot is sending 4 messages at the same time
make sure you only have one instance
you had this issue yesterday
yap
remember?
you fixed it yesterday by closing out all the other instances
editors?
every time you run the command in the console, and dont close it, it stays open
then you open a new one and now the bots logged in twice
then again, until you get to 4 times
wait no
so when you want to restart the bot, end it before opening a new one
i fixed it
ah
you can quickly fix it by restarting your pc, but from now on only open the bot once
@young flame Try catch, is a async error i guess, for me i got this error twice, one is async error, and two is because i need it to upload a docker in heroku
sorry for bad english btw
im from br
@young flame Try catch, is a async error i guess, for me i got this error twice, one is async error, and two is because i need it to upload a docker in heroku
@sterile pebble oh no i just goofed
it works now
imagine not checking for permission before deleting it
API is not your error handler, properly code your bot before doing requests
WOT?
tim you're old enough to know that the API also has error limits
get enough erros and your token revoked
i just got them and i've been googing all day
i dont get errors
CUZ U VOID THEM
api is my error handler lmao
U CUCK
i dont check permissions
i just code and test and if it works yay if not i find loop holes
my token has been rejected more times then i have been pinged
i dont cache permissions, and i dont wanna cache them just for this, since i can just try to delete and ignore if it fails
Why my code can`t search by a gif using giphy api in Heroku, but acttualy i can search if i run my bot in nodemon or i made a dockerfile and upload in heroku
somebody can tell me why?
i really dont understand
permissions is like super tiny to cache though right 
wellll
hh
i see the point, but at the same time
sorry
besides missing permissions is not the only cause for delete failures, the major cause for failing a delete is the message no longer existing or being accessible, which will fail even if permission check passes
missed clicked and sent my unban commanD
shileding probably the better term
besidesΒ² my bot doesnt delete other people's messages, only its own so no need for permissions anyway :D

proof implies absolute
besidesΒ² my bot doesnt delete other people's messages, only its own so no need for permissions anyway :D
@quartz kindle yes
i like you tim
ik
you completely mistook what we both said
he ignores them because he gets none since his bot doesnt really do that
i didn't take a nap
go sleep and then fix that code
nap is unnecessary
we all told you whats wrong with it
only sleep when finish the app
sleep is for the weak, nothing that vodka and energy drinks wont solve. As a plus, you get so pale on the 5th day people might actually think you're a vampire, win-win situation
ah yes, forgot to add the drugs onto the mix

jk, dont do lasagna kids
anyhow, back to coding
i already set a bad example with my code, rather not be a drug addict example here too
sleep is for the weak, nothing that vodka and energy drinks wont solve. As a plus, you get so pale on the 5th day people might actually think you're a vampire, win-win situation
@opal plank i have drank more alcohol when coding a bot them my dad does now
drink*
my english is oout the roof
i dont like to drink, but i smoke weed
out
english
i just noticed i have some major typos in my bot
people unironically starting to become me, im not found of that, staph

why is english red
i dont like to drink, but i smoke weed
@sterile pebble i do every unholy thing you can
that's why i'm the dark side of the moon
kek
im gonna pull a sneaky, ngl
guys how long for my bot to be judged
?
regardless, i rather sacrifice a few api errors than cache extra stuff :D
5+ weeks
omg
guys how long for my bot to be judged
?
@sterile pebble 5+ weeks
Speaking of approval, i think imma about to put my bot on the queue rn, even though it has jack shit. Doubt it'd be reviewed in less than 4 days
it's not like i wanted to make this a fucking job, 5 weeks man
then dont
^
I have a lot of friends
dm a mod to remove your application, move on to something else
well, there are like 1000+ bots waiting to be reviewed so...
^^^^

fuck it, imma post it on the page
0 function bot
les go
actually, lies, it has 2 commands
damn boys
i was going to make a lazybot, that complains at every command done, and leaves if you make it do too many commands
because memes
how to make a bot:
step 1 - create account on discord developer
step 2 - add bot to top.gg
step 3 - code bot
npm and stufss
a place to share your bot to people who are not your friends
Timy, wanna help me with fresh from start noodle botum codum?
it gon be big botum, trust me
got my mony on this one
bit italian botum
lasagna botum
in html how would you make it so its not completly left but like left center
and i dont want complete center
i see you quite a lot here, so im assuming you got spare time, a lot of it, how bout we coop a bot?
flex box
make the width of the container smaller
oh ok
Botum feat. Tim the CodingMan
ive never coded with anyone
first time for everything
@earnest phoenix You gonna need it justify content space around and align items center
i think this gonna help u
??
presences are no longer enabled by default
you need to enable them in the dev portal
really ?
im gonna scream if this bot gets more than 75 servers, legit, 50% of the things im adding on it are guild_presence reliant
for fun and for challenge
I don't understand why they did that
for fun
i like to dev my bot
if you going into discord bots to get money, sorry to breakk it to you, not happening
although if your bot gets big enought, you can monetize it
is really fun
i added premium features to mine at around 1000-1500 guilds
sure
i can probably live share my bot once it gets somewhat completed, just dont want anyone yoinking the idea rght away, it falls under unique bot
?
3 unique bots for the collection, git rekt bot community with ya oversaturated common bots
oh
i found it
Hey guys, i just noticed my bot turns off every time it receives a DM, well if there's a command in the dm, could anyone help me with making the bot ignoring dm messages?
@earnest phoenix check if the message came from a dm channel, if it did, return
most libraries have a way to check channel type
for example in discord.js it would be if(message.channel.type === "dm") return
hmmm....
im wondering if what im doing is stupid or smart
time to ask tim
@quartz kindle
for example in discord.js it would be
if(message.channel.type === "dm") return
@quartz kindle thanks
how smart is it to make maps with objects just for easy chganging them?
like
map.set(123, {bool: true});
so then i can change obj.bool = false
rather than simply declaring it as true/false raw values
isnt djs mostly just mapped objects
object referencing
anyone knows how to make a message counter with a database?
for expressions like "hello" and then the bot identifies how many times you tiped it
@quartz kindle thanks
@earnest phoenix u can do it with includes too
To catch every dm word
btw
I can't manage to detect the message
im working on adding a music module to my bot, whats the best way to do youtube search?
youtube api limits are pretty small
if(message.channel.type.includes('dm')) // do stufs
im working on adding a music module to my bot, whats the best way to do youtube search?
@proper bolt Search about DisTube
Wait a sec
ty
ty
@dreamy thistle https://www.npmjs.com/package/distube
you can just take the func man
im guessing its just cheerio
looks like they are just using https://www.npmjs.com/package/ytsr
is youtube-dl still borked?
like taken down?
Think so
yea it is

github CEO tweeted something about it
what did he say?
hey can someone help me on how to get images in the bots description
@drifting spruce either upload them somewhere like imgur and then link them in the description
or convert them to base64 and embed them in the description
ok thanks
they said they were working on getting it back
removing some part of it in compliance with RIAA iirc
is there a way i can get a discord username and only use one letter of it or just like seperate the letters??
wot?
like turn Grainger into an array of letters?
yeah
h4.text-center #{user.username} is cool!
.word.text-center
span M
span A
span N
span G
span U
``` it is actually pug and at the span i want each letter
im a genius
destructuring ftw
just do js [...'string here']
see? this is what i mean, sometimes i can be smart, but sometimes, i do some stupid fucking shit
Not sending nothing.
@earnest phoenix Omg, my eyezzzz
thats not that readable tho
who cares about redable? destructuring best
how can u dev in white board man?
if they dont know about destructuring, sorry, they shouldnt be coding
yeah, but i`m talk about dev
if someone isnt familiar with es6+
everybody here is talking about dev, but sometimes is about ide`s and projects dude
lol
is not stackoverflow xD
"not sending nothing" is a double negative which implies a positive
@quartz kindle Can i ask something?
You know about requisitions inside discord.js
?
requisitions? wdym
Like, i want to take wirte a word
like "example"
and search a gif named example
how would you get a link to an image from your pc
Actually i can do it, but only if i run it on localhost or i create a container and deploy in heroku
and the problem is
@drifting spruce re-read what i said before
i dont understand WHY docker works
upload it or base64 it
im kinda confused with imagur
if you dont like imgur, try another website
if i deploy my code in heroku, without be in a container, he can`t search by gifs
ok
@sterile pebble lol wut
yeah, exactly that i said
you're doing a web search for gifs right?
yeah
with some module that uses http or node-fetch
then there should be no reason for it not to work
any error? how exactly does it "not work"?
actually works in heroku, as if there was an implant then make the code
why is SDK so inconsisten? holy shit
who needs consistancy?
fuck that
which sdk
for presence
discord sdk?
ah
@quartz kindle
the problem for me is that I donβt understand why itβs working, it wasnβt supposed to work, as you said, itβs used http module
I understand why works in localhost
this shit and bans/kicks on logs has to be the most inconsistent shit discord has
it works, why sucks so much
I am playing around with a game, and the physics are setup in a way that I have no idea why it works one way but not the other
maybe i just hijacked this shit
so guys, if http requests not working on heruko, just docker.
but dont ask me why works
hahaha
How do I remove all users from a reaction but one?
is the one the bot?
yes
remove them all, then add the bots reaction again
I too thought of that. But it will append the reaction to last
Can't I just filter it out?
I don't believe so.
The best I can think of is to remove users with a loop
going to be api abuse
hmm π€
plus, if theres more then a couple hundred it could take awhile
@quartz kindle do you happen to know if d.js would screech if i were to randomly add emitters onto it? Like, theres no errors but i feel like it cant be that simple. I know im doing dum dum stuffz
like, legit just adding client.on('lol_test', 'heheh') and a client.on('lol_test', () => {}) somewhere
sure, you can do that no problem
reaction.users.remove() vs reaction.remove()?
client.on("bla", hue => console.log(hue)) // huehuehue
client.emit("bla","huehuehue")
@rocky hearth first removes a single user from a reaction, second removes the entire reaction
to remove the single user, the para shouldn't be optional
i did that before
with djslight v2
it had a built in command handler, that emmited commands as events
client.on("/help", msg => {})
perfect then
cuz before i used to have my own emitters since i knew i wasnt fucking with anything
I always wondered about doing commands like that
specially cuz i have routers, like in the twitch ddos project
so idk if it might interfere
as long as you dont emit an existing event its fine
abuser smh
Im sure there are humans out there wanna be abused
stop
lmao
ugh fine
enjoy laggy stream!
speaking of stream, i think i accidently killed my bot's stream for the past week and never bothered to put it back on
oh well
shame
i need 2 though
im covered
one router and one for the user to use
lel
there we go
works fine, yay
presence is annoying to play with
its so inconsistent
if theres no trigger it doesnt update
even though it should
Hi
likle
like
.setFooter("check discord community guidelines here")
but that won't work so what do i do?


