#development
1 messages · Page 1848 of 1
Always sucked at HTML and CSS but it’s a really valuable skill
It is yeah
It really is.
Just gotta put in some effort and time to learn it
I've made webpages as soundboards for events even. Just a locally hosted page to make an easy UI so anyone can run the right sounds at the right time.
past few days been playing with css and html.
probably the worst thing ive made in the past year 
css is so hard just because there is no "finish"
The simpler the better
What's wrong with CSS? 😂
I actually like css, I just suck at it
It's not that bad. It's easier to learn than JS etc
Less properties
Less stuff to learn
Less stuff to learn is correct, but I’m not sure if it’s fair to compare it to learning js
flex makes it a lot more predicable imo.
still figuring it out, but its helped a ton
They’re made for fundamentally different purposes
CSS is for design, whereas js is usually handling logic
Sort of an apples and oranges type thing
Give me a book on how to learn CSS and I'll bet it'll be lighter than a book on JS
I struggle with design stuff purely because I don’t have a very creative background
I cant for the life of me figure out why this moves a few pixels 
https://i.woo.pics/2ddfa3a582.mp4
Which is why I suck at web dev atm
That and making things appear on a certain place in a website is a lot trickier than it seems
(For me, I’m inexperienced)
that part just kinda clicks. once i figured that out everything became a ton easier
When I do a site for a client, I do wireframes, then mockups, then I start to code. Makes the whole process more efficient and gives you a good direction to follow.
unless i want to suffer i am never gonna do anything front end lmao
^ front end for me is made out of necessity
i lost interest in web development a long time ago
anything that involves browsers
native applications are my go to
Web dev is here to stay imo. Native apps won't take over. There's still a lot of value in a good website.
just got my discord package. over 200MB compressed 
I agree, a lot of people don't want to download an application due to hardware limits like storage, or a slow computer, or just general inconvenience etc
laughs in terrible javascript
If it can be a website, I want it to be a website, excluding a few things.
If you don't want to carry the burden of developing for the web, I recommend using a framework that can perform on the web and native applications. I enjoyed writing a SwiftUI application for months but decided to stop since I didn't want to develop just for iOS/macOS/etc. React Native and Flutter are the two frameworks that come to mind.
JavaScript sucks but we need it.
javascript is best
go away
no u
js is efficient enough for websites but there's better options when it comes to writing applications that require good performance
which basically nobody cares anymore
literally every single app these days is bloated af no matter what language is written in
true
but i dont have an apple
people just gave up along the way and decided to rely on modern cpus instead
"eh whatever, modern pcs will run it"
You don't need an apple.
no?
so much ram available now that it basically doesn't matter unless you have a massive memory leak
i thought swiftui was apple and web only
SwiftUI is for Apple's platforms only.
i wouldnt imagine apple being so kind as to make their proprietary software available to all operating systems
literally 30 bucks for 8gb of ram now whereas like 4mb of RAM 30 years ago was hundreds
30 years ago*
I was just using SwiftUI as an example of developing for native apps.
my first pc had 256mb ram
good old windows xp
I'm not old enough to experience that 
actually it wasnt my first pc
we had a family pc when i was a kid
running windows 98
idk what specs it was, i wasnt old enough to know these things
My dad had me "build" (basically just shove the GPU and ram in and call it a build) a PC when I was like 6 or 7 with him, and it had like 512mb of ram with windows vista
i was at an age where i tried to copy a game's desktop shortcut into a floppy disk and paste it in another computer and expect it to run
does vista even run on 512mb?
lmao
I legit did this too 😂
xD
We had 2 computers in our classroom in elementary school running Windows 95 and I remember trying to copy a game over to the other one with a floppy 
Or it might have been NT...
Can't remember
You know the way school PCs are
wouldn't surprise me if it was NT
went on a family trip to visit cousins, aunts, etc... spent the whole day playing warcraft on their windows 95 pc
One of my earliest memories was coloring in Thomas the Tank Engine on Paint on my Dad's old PC 
xD
i played aoe1 for the first time on my step-sister's pc, loved it so much i asked her to make a copy and send it to me
she sent me the original cd
When games could fit on a CD...
broadcastEval runs inside a different file
you cant use relative paths
I seeee, thanks a lot 
use absolute paths with process.cwd()
will look into it
I would never even think of the problem's core if you didn't tell me 😂
np :)
Damn I remember when the internet got popular using AOL as platform with our ISDM modem
Like 16,17 or 18y ago
Dunno anymore
Remember when phones you could flip were cool and snake on a mobile phone was latest shit
And you was fucking afraid of accidentally opening the phone browser causing a bill from your provider thicker than any book
And tbh even without all the technologies, smartphones etc. it was a great time
I wanna say somehow better than today in a lot of cases
Tim actually knows what I’m speaking about since he’s at a similar age
it doesnt show the reason :P should i change role.delete(reason=reason) to something else?
How would I run the function makeChannel in voiceStateUpdate since message isn't a parameter? Is it possible?
voiceStateUpdate: https://sourceb.in/Y8ex7sPJi8
makeChannel: https://sourceb.in/dYMiYfQ7kW
Full file: https://srcb.in/N51aebSrnQ
Just refractor
function makeChannel(member){
var server = member.guild;
var name = member.displayName();
server.createChannel(name, "voice");
}
wdym?
oh wait
mb
thx
wait actually displayName isnt a function. im using discord.js v12
if (test.length > 0) {
newState.disconnect();
makeChannel(newState.member);
} else {
test.push(oldState.member.id);
}
displayName is a property, not a function
ah
update to v13
v12 is already deprecated

v12 was probably the most short-lived djs version
why are we still here just to suffer
trust me its worth it
slash commands
message content is getting locked down under privelaged intents
nah man i'll wait for a couple months to prepare to migrate a giant code base
otherwise i might commit
right click to make UwU messages, how can't you not commit. lol
UwU
Add this:
if reason is None:
reason = "your reason here"
await ctx.send(reason)
And like there aint some reason except ban and kick commands I guess
im on v13 actually lol i forgot that my package.json said v13 idk why i said v12
Will I need the message intent in order to fetch message IDs to delete?
I don't need to know the content of the messages, I just need to have their IDs so I can delete them
also are embeds different on v13 lol. i think the last version i used was v11 a long time ago lmao and i used this:
const helpEmbed = new Discord.MessageEmbed()
.setColor('#10D365')
.setTitle('Help')
.setDescription('Ranked Bridge')
.addFields(
{ name: '=elo', value: 'Displays your ELO' },
{ name: '=idk', value: 'placeholder ig' },
)
.setTimestamp()
.setFooter('Made by Eltik');
message.channel.send(helpEmbed);
but get this error:
https://srcb.in/2E3DOoiXSm
message.channel.send({embed: helpEmbed})
ah alr thx
How do you even listen to the event anyhow if you’re missing the intent?
still get the same error
Through a slash command
message.channel.send({embed: helpEmbed});
all g
message.channel.send({embeds: [helpEmbed] });
Yeah but those messages are webhooks
Ah, forgot v13 changed it to an array
Oh I see I’m talking about something different
Yeah, I meant if a user sends a certain slash command, my bot fetches the message IDs, then deletes them
What message ID
Wasn't sure if I needed the intent for that or not since I don't need the content of the messages themselves
embeds gives a diff error now
https://srcb.in/TzJ4rKyX5d
ill double check my code but dont think its an issue with the embed im sending. line 49 directs to the message.channel.send
EDIT:
im dumb i didnt put the embed in an array
Just previous message IDs prior to the slash command, it's a clear command
Thought you’re generally speaking about receiving message events
I'm pretty sure you'll get message ID and channel ID
Alright
I guess if it breaks whenever the intent comes out I'll fix it haha
If it ain't broke don't fix it
lol
I soon won't use it anymore either
trash library
good in terms of functionality but not good in library
Depends on ur needs
don't feel like changing all my code every time a new version comes out
I have a small sized bot which is an API lookup & ID converter tool in addition to my web tool and djs it the perfect structure for this small scale project
for a small definitely
for a large and for a stable codebase something else will probably be better
At least I wanna mention the fantastic docs again
their docs are kinda cute
Imagine getting into JS after dealing >10y with PHP only
I see some decent new ones but it's uncertain if they'll be discontinued in a year or so
motivation and life often changes
RestCord and DiscordPHP
Didn’t need one as I coded it myself
sorry mr your own library
But I wanted to move to a more dynamic code language
:l im not talking abt that but tnx . the discord api has a problem ig
How about Clojure
It's completely dynamic
Never heard of that, too
i find js (and maybe python) best for bots because of their chilled out and non strict syntax
should learn it :)
coding your own lib can help you understand Discord
Wth is clojure
Functional programming language
but it sucks to maintain atm since the api is making rapid changes
jesus lisp does use a lot of parentheses
i don't have a lisp
(select (:title :author :year)
(from :books)
(where (:and (:>= :year 1995)
(:< :year 2010)))
(order-by (:desc :year)))
⇒ ((:title "Practical Common Lisp"
:author "Peter Seibel"
:year 2005)
(:title "ANSI Common Lisp"
:author "Paul Graham"
:year 1995))
This looks so weird
Oof oh god
Looks a little bit like SQL syntax
(reduce #'-
(reverse (list 1 2 3)))
⇒ 0
(mapcar #'string-downcase
(list "Hello" "world!"))
=> ("hello" "world!")
Functional apparently
I dont see how this is functional

That example was for interacting with sql stuff
Everything except for #'- and function input (numbers and strings) is a function
what is #'-
Metadata reader
🤔
idek know what makes a dynamic lang or what it means by dynamic
Does it mean it can be OOP or functional?
To be dynamic means to allow variables/symbols to have multiple types.
Im using unnecessary parentheses, too for calculations, shorthand statements etc. and people are complaint about it if I show code examples but I like it, makes things easier to see in my opinion but that shit above… eww
Like a schemaless database.
I have grown to like golang
But seriously, I recommend you at least try it out
I would but nah
I have had enough of learning new languages
go is probably going to be the last one I learn for a while
Alright
Or else you can just do await role.delete()
Ah, lisp, the parentheses language
i did tnx 
Anyway I’m too old to move on learning new things lol
No problem
but lisp is old :(
Tooooo old
After so many years of backend dev only and at least some frontend projects it was pain to move to JS
Can’t deal with such a pain again 
As the time I can spend nowadays is far less than what I could spend like 10-15y ago
Things are changing…
I dislike parehtneses
see i dislike it so much I can't spell it

Parenz

ascii boobies
If it comforts you, it's closer to ascii buttcheeks than boobies
OwO intensify
Does someone publish some boilerplate template of discord bot to npm before?
I think I saw some
Hello.
Hello
How to make when someone vote my bot it dms him ?
oh my god what the fuck is that
also discordphp is fucking based
fuck restcord
person who made discordphp is a living chad
Just ask
i want help with my bot's auto moderation
i need somebody to help me
i dont remember half of the code
it got deleted by mistake
@long crow
Can u hepl
How old do you need to be to male your bot verified
woah
thats kinda funny question
any age is ok
Like you can be 13 ?
yes
im same age
Ty so much
come to dm
pls
pls
come to dm
Ok
hey, does anyone have an idea if reuploading a currently existing bot is okay with the owner’s permission? the existing bot was deleted and so was the owner’s account btw.
No, you will need parent consent for 13
Found it
An Update on Verifications for Users Under 16
Recently, users under 16 began receiving errors during the Stripe verification step of verifying their bots. We promptly contacted our partners at Stripe to learn more about the error, and learned that Stripe will be unable to verify the identities of any further individuals under 16 years old due to legal concerns.
As a result, we are taking a similar step, and will no longer be able to independently verify users under 16 without the assistance of a parent, legal guardian, or other trusted sponsor.
This only impacts users who are not verified yet. Any user who is already verified will not have to re-verify and their verification will remain valid, regardless of age.
We've crafted a detailed FAQ with a whole lot more detail to answer some of the following questions:
- I haven't verified my bot yet, and I'm under 16. What does this mean for me?
- I've already verified my bot, and I was under 16 at the time. Does this affect my bot at all?
- How can my parent or legal guardian help me get verified?
- How can a friend or co-developer help me get verified?
- Can I submit a friend, parent, or legal guardian's ID for verification using my own account?
- What if I can't find anyone to help me get verified?
- My friend was able to get verified and they're under 16. Why can't I get verified?
- My parent or legal guardian has concerns about the verification process. Where can they get answers?
If you have any of those questions and more, please visit the Help Center article available here: https://support.discord.com/hc/articles/1500006788822
We've also crafted an article for parents and other potential sponsors: https://support.discord.com/hc/articles/1500006788922
And of course, you can always send any additional questions you have to https://dis.gd/contact, or you can ask in #verification-help for additional clarification. I'll be around as much as I can to personally address any of your concerns as well.
@earnest phoenix @earnest phoenix
@long crow hey, do you have any idea if this is allowed? i can also forward screenshots of permission from the owner if I need to.
Should be fine as long the code is not 100% copy paste from other codes on the internet
Cant help. About to go out
alright. the bot does the same functions but i completely remade it. the only command i didn’t remake was the randomly sending “i like fire trucks and moster trucks” command since i didn’t really know how the original owner did it and they just sent me the code for it.
hey slashdiv
?
my friend got accepted in like 2 weeks but they did it when you could get a badge
2 weeks?
yep
i though it was something like email verify and done
+16
have your parent do it for you. discord makes an exception for that.
Ok
like they have to use their info. they also let friends do that too. your account just has to own the bot.
anyone can help? I am trying to make this into a cog but it keeps providing error message for user.
class MyClient(discord.Client):
async def on_ready(self):
print('Logged on as {0}!'.format(self.user))
async def on_message(self, message):
print('Message from {0.author}: {0.content}'.format(message))
I tried to play it in main.py or with a cog using:
class MyClient(commands.Cog): ##USED WITH BOTH commands.Cog and discord.Client and none worked
def __init__(self, client):
self.client = client
async def on_ready(self):
print('Logged on as {0}!'.format(self.user))
async def on_message(self, message):
print('Message from {0.author}: {0.content}'.format(message))
def setup(client):
client.add_cog(MyClient(client))
But keep getting error like:
'MyClient' object has no attribute 'user' discord.py
The self here refers to the instance of MyClient which indeed has user attribute.
But Cog objects by default don't have user attribute, but it does hold reference to a Client (see your self.client = client line) object which has user attribute. You wanna refer to that instead.
mk i'll give this a shot
Also, you need the listener decorator to actually register those callbacks.
the listeners i already had i just forgot to type those in.
so something like this?
import discord
from discord import client
from discord.ext import commands
class MyClient(commands.Cog):
def __init__(self, client):
self.client = client
@commands.Cog.listener()
async def on_ready(self):
print('Logged in as {0}!'.format(self.client))
@commands.Cog.listener()
async def on_message(self, message):
print('Message from {0.author}: {0.content}'.format(message))
def setup(client):
client.add_cog(MyClient(client))
This application has grown inorganically so we are unable to process your verification request at this time.
whats that
That'd at least get rid of the AttributeError, but I'm not sure if the Client object implements formatting methods. You likely wanna refer to its user attribute.
from discord import client is redundant though, it's not used anywhere in the code.
yeah i kinda just had that copied there hadn't cleaned that.
but yeah didn't give bot's name which sucks so I guess i can manual fix that then computer fixing it
Logged in as <discord.ext.commands.bot.Bot object at 0x0000022D9B4C73A0>!
xD
That's why I said you might wanna refer to the user attribute of the self.client.
It's of self bot😐
?
wut you talking about
The code look like that it's a self bot
Status
Its not
That command is used in self bots only
What
I also have a self bot
Cool
I used this type of coding
Okay
Not in this is but, it's in my alt id
I highly doubt this is a self bot
:/
when you admittedly opened saying you have a self bot
:)
In my alt id, not this one
Let them be stupid
doesn't matter lol
Hey guess what
And working on mod mail
What??
there you go
I care
I know, what it feels when everyone ignores you
@earnest phoenix can we become frnds?
*everyone ignored him
Please dont ping me
I don't ignore anyone😋
Whyy?
Use the block button
Looking at the ugly block thing every time they talk is more annoying then a ping
How do you got the translator role?
I have blocked all the channel, now I never get a ping message
Move to #general for discussions not related to development
is ts good for backend or commonjs?
Up to you
because benchmarks are so awful
Isn't the choice clear then?
You're asking why people use JS?
And they're transpiled to JS?
There's no speed difference
ok thanks
It because of typeguard, intellisense etc
Js is a loose type
For e.g i can do client.something_not_exist, to attach something on client
It will accept it
Ts will go mad at you when you do that
yea
...
a
seriously?
Well obviously its not going to work, you are sending it a token of some sort
oh fuck
it changed
on v13
can i get a help
I don't think it was ever a string
What exactly is your issue
it disable codeline below it
yes
Well, python works based off indentations iirc
Make sure its indented properly that might fix it I don't really remember
How can I use the domain without the port on express?
do you I have to set the port to 80 and how do I do the configs with ngix
Usually you use nginx as a reverse proxy
set port of your app to whatever you want, ex. 4000, then set the port of the nginx server to 80
So as example I run my express server on port 4000. How can I tell nginx that it should forward all requests on the domain on that express server?
proxy_pass
location / {
proxy_pass http://localhost:4000/
}
Yeah, found it a guide. And do I have to have multiply nginx files for passing them to different ports based on the subdomain?
you need multiple server blocks, one for each domain
doesnt matter how your files are, as long as the blocks are included in the main nginx.conf
Ah okay, so I have to specify the subdomain in nginx file, right?
Ah, found it, have to define it on the root property
Thx, a last unrelated question, when I create a local redis server will it use my bandwith, when I do requests on it?
Okay makes sense
omg working with marked custom extensions is so annoying 😫
2021-08-18T10:27:21.568699+00:00 app[Worker.1]: (node:4) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'tag' of null
2021-08-18T10:27:21.568709+00:00 app[Worker.1]: at Object.execute (/app/events/messageDelete.js:11:38)
2021-08-18T10:27:21.568711+00:00 app[Worker.1]: at Client.<anonymous> (/app/index.js:55:44)
2021-08-18T10:27:21.568711+00:00 app[Worker.1]: at Client.emit (events.js:400:28)
2021-08-18T10:27:21.568699+00:00 app[Worker.1]: (node:4) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'tag' of null
2021-08-18T10:27:21.568709+00:00 app[Worker.1]: at Object.execute (/app/events/messageDelete.js:11:38)
2021-08-18T10:27:21.568711+00:00 app[Worker.1]: at Client.<anonymous> (/app/index.js:55:44)
2021-08-18T10:27:21.568711+00:00 app[Worker.1]: at Client.emit (events.js:400:28)
const Discord = require('discord.js')
const snipes = new Discord.Collection()
const config = require('../config.json')
module.exports = {
name: 'messageDelete',
async execute(client, message, messageDelete) {
if (message.author == client.user) return;
snipes.set(message.channel.id, message)
const DeletedLog = new Discord.MessageEmbed()
.setTitle("Deleted Message")
.setDescription(`**User:** ${message.author.tag}\n**Content:** \`\`\`${message.content}\`\`\``)
.setColor('RED')
.setThumbnail(message.author.displayAvatarURL({dynamic: true}))
const bot = client.user.username;
await message.guild.channels.cache.get(config.log)?.createWebhook(bot, {
avatar: client.user.displayAvatarURL({ format: 'png', dynamic: true, size: 128 })
})
.then(webhook => Promise.all([webhook.send({ embeds: [DeletedLog] }), webhook]))
.then(([_, webhook]) => webhook.delete())
.catch(() => {});
return;
}
}
Anyone help other events working tf
Anyone have experience with custom marked extensions?
name: "ref",
level: "inline",
start: (src) => src.indexOf("[["),
tokenizer: (src) => {
/* Extracts the text */
},
Shouldn't the src in the tokenizer function be the text AFTER the index returned by the start function??
the src in the tokenizer is always the full text
not all messages have authors
you are receiving a message with a null author
so you have to check for that and return if author is not available
apparently its just used to check whether or not the tokenizer should run
if index returns -1, the text is ignored, otherwise the tokenizer is run
Marked will use this function to ensure that it does not skip over any text that should be part of the custom token.
// Hint to Marked.js to stop and check for a match
Do they add bot in their server for aprroval?
Yes
Which server?
It's private
Any one of the @ bot reviewers
How do I made an image apear in an HTML page with a link to something?
Like https://imigure.com/videosmth and it would show a video/image on the site
<img src="url">
<a href="link"><img src="src" /></a>
ah thanks
Do they invite us for help?
No
How will i give demo then -_-
Its a server owner by Veld as I expect, and the only people there are bot reviwers and maybe other staff members.
u dont
They test based on your help command
You can do demo with gif
Coz i didnt updated help command, will update after bot gets approved
Update it
They need it for verification
update it now.. With a link to it while its not aprooved with still work probably
Just that it wil be 404 page untill they aproove it
(link to bots vote paging it what I meant btw)
I added commands in the detailed desc. Within page
help command would be the best 👍
U mean i need to add, pls vote me <link>
You don't need to
but if thats whats in the update u can
just that the link will be invalid untill they aproove the bot
And ofc i will add when its aprooved
Copy the command list of the description to a command
Okh
Also it's "approved" :)
it is?....
Typos sucks on Android
since when...
Am confused, wait i google
I forgot grammer over the summer probably
relatable
Sometime happens
Style u know
understandable
Kekw

Cya
just updated to v13, i'm getting this error when starting the bot
Hi! Please download / update your Node.JS into version 16.6 or above to use discord.js v13 🙂
lol
But it's messageDletete event so it should have
technically messageDelete doesnt even have a full message
is eris sharder compatible for djs13?
it depends on the message being cached to even work
And messageUpdate
and messages from webhooks for example dont have authors
they have webhookId instead
if(!message.author)
kk
@quartz kindle message.member.user.tag is this right ?
kk
Okay
what am I doing wrong here?
https://sourceb.in/aWQ1fKHoEU
did it send any errors?
No
It's just the variable "thumbsUp" and "thumbsDwn" is 0 as a result
even when it is not supposed to.
Okay so hmmm that means In the tokenizer function I should just parse all occurances.. why is it designed that way???
What am I doing wrong here?
https://sourceb.in/aWQ1fKHoEU
No error.
It's just the variable "thumbsUp" and "thumbsDwn" is 0 as a result after the end of the event.
even when it is not supposed to be.
in v12, it worked perfectly.
How do nanoid guarantees to always give a unique id? What the algorithm is based on?
can someone help me with discord.py iam making a code for clear command which basically deletes messages and i have made if and else situation where if the author has manage message permission the bot will execute the command and send an embed with "deleted messages" but when the author does'nt the bot is supposed to send another embed but its not sending it code:
@client.command()
@commands.has_permissions(manage_messages=True)
async def clear(ctx, amount=5):
if ctx.message.author.guild_permissions.manage_messages:
await ctx.channel.purge(limit=amount)
embed = discord.Embed(description = ('The messages were removed !') , color=0xED4245)
message = await ctx.send(embed = embed , delete_after=5) #save embed as "message"
await message.add_reaction("✅")
else:
em = discord.Embed(description = ('You need manage messages permissions to do this!') , color=0xED4245)
jama = await ctx.send(embed = embed ,delete_after=5)
await jama.add_reaction("❎")
What am I doing wrong here?
https://sourceb.in/aWQ1fKHoEU
No error.
It's just the variable "thumbsUp" and "thumbsDwn" is 0 as a result after the end of the event.
even when it is not supposed to be.
uhh
I tryed doing .setImage() to set smth like a banner on the embed
but says .setImage is not defined
ping in replise
what are ur expected results
did u fill in the parameter
help pls
still facing this issue
What that means?
2021-08-18T12:20:29.164035+00:00 app[Worker.1]: (node:4) TimeoutOverflowWarning: 6000000000 does not fit into a 32-bit signed integer.
2021-08-18T12:20:29.164037+00:00 app[Worker.1]: Timeout duration was set to 1.
did any errors occur?
and also can u turn the msg into a code markdown
yea, with a string link in '
no errors
the bot is supposed to send embed but it sends a message in console
"discord.ext.commands.errors.MissingPermissions: You are missing Manage Messages permission(s) to run this command."
how
in the place of py u can put any language extention.
||(Ex: js, css, py, html, c, ect)||
so um.. How do u put a banner/image on an embed?
with setImage()
setImage(url=?)?
it needs to be a direct link to the image
fax
ur welcome
i think u didnt giv the manage messages permission to the bot
lol
the bot is admin
Iam getting this instead of a embed
how am i going to read that lmao
you are missing manage message permission
thats what i was trying to type lmao

iam doin this intentionally
i want the bot to send a message that you are missin permission
but the bot is not sending the embed i coded
how can i add cookies to my website which uses discord oauth on nodejs express i want people to be logged in if they logged in before
about message deletion, does editing the message refresh the 2 week-old limit?
or does it consider only creation date?
try it
edit a message after 1minute
pls turn it to code markdown im having a hard time reading it
if the time refreshed
k
generate a hash/token and save it using passport in server and/or using cookies on browser
how are you removing the bot's permission to test it?
in the roles or in the channel permissions?
iam trying it from alt account
still, in the roles or in the channel permissions?
Iam trying to use the commnd from alt
thanks i will try it
roles
do you know it tim?
i dont think it does, but no idea
and i think the limit only applies to bulkdeletes
you dont have any channel-specific permissions in your server?
channel permission overwrites
its not about permission
let me explain you
i made a command which purges messages
what that mean ?
so if someone with manage message perms tried it the bot will delete the messages and send a embed and if someone who does'nt have manage message perms tries it the bot is again supposed to send a embed
so i wanted to test it
it is about permissions
you are checking for ctx.message.author.guild_permissions.manage_messages, which only takes into account permissions from roles, it does not consider channel-specific permissions like permission overwrites. manage-messages can be turned on or off in channel overwrites
thats why i opened a alt account
thats why im asking if there is any channel permission overwrite, you code is not taking it into account
You're calling that function in a different scope, where the stringTools variable declared isn't available
That error is originated from your eval.js file, may you show us the code of it?
that shouldnt matter, its in a closure
i tried to do it in administrator
but it did'nt work aswell
administrator still doesnt take channel permissions into account lol
i just did
iam messing up
also if you're checking permissions inside the code, you should probably remove the decorator
ie, remove this @commands.has_permissions(manage_messages=True)
so if i'll do this will the bot send the embed?
just check it out
tim is goated 😎
iam not really good at coding
i started discord.py
like 3-4 days ago
so i have some doubts
can you tell me what to do next
im not even a py developer lol
i never used discord.py
go read docs, check some tutorials
Q
link please
Just for that joke I'll go back to eating my cookies
hotel? trivago
python? shivaco
sori
shivago is Go user
Aka shivagogo is crazy
shivagogopowerrangers
shivaco
lol
he said he was gonna get his laptop lol, stop being annoying
There’s a difference between helping and doing your job 
|| fast no jutsu||
lol
he wants to do if has permission do something else do something else
bruh
i mean
let me explain
i saw this code on
stack overflow
it was like this
Must be a lot 
He’s probably downloading the whole site content 

Why bother with DMing someone when you can post it in a channel where there’s more people available to help
Don't ask me
[...] there’s more people available to
help
to enjoy, not to help
True
is there any way i can install node and run commands on netlify?
👍
print("hello world")
if(true) false else true;
console.log("Hello world")
So is it like rpg code hello world?
Yes
Ok any others?
process.exit()
<?php echo "Hello world";```
while(true) console.log(true)
Hey hey! Close the tags!
no
Devil
Like?
It looks hotter if you don't
How do I write it?
Check if a number is even
Hotter… lmao
Beautiful
if(true) like()
Error you did number === 1 twice
The first one should be number === 0
a code and show
rpg()
Didn’t make it 
application complete?
I'm not good with Japanese/Korean/Chinese/Vietnamese
okok
Nobody will write code for u unless you pay him
while(true)
if(main_character.alive)
main_character.friends.kill()
if(rpg) return rpg()
Yeah you just gotta wait like 5 business days now and you should get an email
👍
damn ur a chad
might want to do some machine learning for that task
already did it tho

hello...
So uhh... I am trying to do this: js people[peoples]
Peoples is this: ```js
const peoples = people[Math.floor(Math.random() * people.length)];
And people is a json. like so:```json
[
"Smug",
"Channel",
"a Loser",
"a Gay person",
"your mommy",
"ur online gf"
]```
fixed
it returns undefined..
const msg = await message.channel.send("react one")
await msg.react("✅")
await msg.react("❌")
const filter = (reaction, user) => {
return ['✅', '❌'].includes(reaction.emoji.name) && user.id === message.author.id;
};
message.awaitReactions({ filter, max: 1, time: 60000, errors: ['time'] })
.then(collected => {
const reaction = collected.first();
if (reaction.emoji.name === '✅') {
message.reply('Tested! You reacted with the tick emoji');
}
if (reaction.emoji.name === "❌") {
message.reply('Tested! You reacted with the cross emoji');
}
})
.catch(() => {
message.reply('Times up!');
});
this is my code
and the err is nothing but its not working
I reacted to both the reaction but no work
Not even an AI could understand the amount of brain power required to create that function
someone ans mine too ;-;
pretty sure you're not awaiting the correct message
msg not message
const msg = await message.channel.send("react one") thats what the varible msg contains
um wait lemme give the full code
no
um k
;-; wdym
if I change msg to message then ofc its gonna give error
;-;
ok lemme try first
I think you're a little confused
you're adding reactions to another message
but you're collecting reactions on another message
I tried changing it but msg is taken as object and not a function there
Hmm.. The tokenizer function is called even when the start function returns -1!!!
This.. says that user.bot is undefined..
if that's the case the reactions should fail
where are you getting this from
const Discord = require('discord.js')
module.exports = {
name: "test",
description: "a test cmd",
run: async ( client, message, args, prefix ) => {
const msg = await message.channel.send("react one")
await msg.react("✅")
await msg.react("❌")
const filter = (reaction, user) => {
return ['✅', '❌'].includes(reaction.emoji.name) && user.id === message.author.id;
};
msg.awaitReactions({ filter, max: 1, time: 60000, errors: ['time'] })
.then(collected => {
if (collected.first().reaction.emoji.name === '✅') {
message.reply('Tested! You reacted with the tick emoji');
}
if (collected.first().reaction.emoji.name === "❌") {
message.reply('Tested! You reacted with the cross emoji');
}
})
.catch(() => {
message.reply('Times up!');
});
}
}``` @split hazel this may be easier for u to see what r the variable name and how I required them
that code is a lot different to the one above
rlly?
mhmm
;-; but I copied from the same file I wrote the prev one
so that's correct can you add console.log(reaction.emoji.name) after .then(collected
to see if it's picking the reactions up
ok
no idea then
when tim has no idea all hope is lost
i never used marked
nope its not picking
Just log the mentions and/or args[0].
get() requires an user ID in this case
And you will see the issue
i keep getting unknown interaction. I think it's because my bot's taking too long to respond to a command and i can't do anything about it. how do i make interaction wait longer?
respond with a deferred message
alr
How can a package with 20K stars have such poor documentation 😭
aaah its not picking the reaction idk why
I tried it with the same message but it didnt work
maybe my trying is wrong? uhm lemme try again
12
you need to send a deferred response event
start: (src) => src.indexOf("[["),
tokenizer: (src) => {
const match = src.match(/(?<=\[\[).+?(?=\]])/);
if (match && match.index) return {
type: "ref",
raw: `[[${match[0]}]]`,
text: match[0].trim()
};
return undefined;
},
... what??
Alright, so I think I know what's happening, marked is removing the first n characters, where n is the length of the raw text
but why is it doing it from the start??
are you sure it's not working did you restart your code where you put your log?
after the .then(collected one
ok I understood my mistake one
but now it gives the error ID of undefined
const Discord = require('discord.js')
module.exports = {
name: "test",
description: "a test cmd",
run: async ( client, message, args, prefix ) => {
const msg = await message.channel.send("react one")
await msg.react("✅")
await msg.react("❌")
msg.awaitReactions(response => response.emoji.name == '✅' && response.author.id == message.author.id || response.emoji.name == '❌' && response.author.id == message.author.id, {
max: 1,
time: 60000,
errors: ['time'],
})
.then(collected => {
if (collected.first().reaction.emoji.name === '✅') {
message.reply('Tested! You reacted with the tick emoji');
}
if (collected.first().reaction.emoji.name === "❌") {
message.reply('Tested! You reacted with the cross emoji');
}
})
.catch(() => {
message.reply('Times up!');
});
}
}``` at the response.author.id
it says id of undefined but.. reponse.author.id should be there right?
message.author isn't always cached
oh sorry I thought it wast the owner thing
what is target
your code completely changes after a minute
whats up
oh nvm the target was not defined so I changed it to message.author.id one
Does discord/erlpack support node.js v16?
oh right there r target still left lemme change
i
'd imagine so why wouldnt it
I can’t install it and I read somewhere it doesn’t
major node versions are fairly backwards compatible
what error does it throw
i have had people tell me "sqlite isnt compatible with node x" but with a bit of tinkering i got it to work
is that the whole error?
Ok
thats the type of err I used to get when I tried installing quick.db without python ;-;
from what i can gather there's a problem building erlpack
yeah its the libraries problem i think
theres c++ errors in there
which means its a lib problem
Is there a way to fix them?
Do you have buildtools installed?
looks like they do
getting more technical node 16 probably had some nodegyp update
and its not properly linking the required libraries
you'd have to wait on them to fix it unless you want to try go manual
i dont have much nodegyp config experience
and very typical of discord to ignore the c++ warnings lmao
Due to how my code was built i just did this now it works thanks
const bindRreply = () => (interaction.replied || interaction.deferred ? interaction.editReply : interaction.reply).bind(interaction)
await interaction.deferReply()
guys thx for ur help! I did it!
actually @stable eagle
i was thinking about making a pr to fix it but people already did it
you might want to try installing the pull requests
Hmm
npm install discord/erlpack#pull/41/head
try that
@stable eagle
but yeah as i thought they just had to upgrade the c++ version in the nodegyp config
It worked
and when discord officially releases a fix for it you should move back to discords branch
are there the new interactive buttons in discord.py ?
how do you sort the descending order in mongodb? (js)
honestly erlpack is not even worth it
you get like 10% better compression at the cost of being 3x slower
Small botum data = big p.....
So i know you can make slash commands in discord.js v12, but how do you make a slash command that only the sender can see?
like the .reply slash commands in v13 but for v12
you're looking for ephemerals
Why not just update to v13
Ephemeral flags on the message ^^
I assume v12 allows you to specify flags when responding to slash commands
yeah, but for v12
no idea, only worked out yesterday that slash commands work on v12
Perhaps you should just update to v13 and not have to come up with janky solutions for a non updated library version 
ah
v12 is already obsolete
v12 is already in coma
but janky is best
just a few more months and it's ded
As much as I dislike using djs now, if you’re gonna use it you might as well update to the most recent stable release
how do u add tags again ;-; i dont think ive ever worked with them
tags?
tags?
I think he meant flags
*flags
but really, UPDATE to v13
I'm not joking when I say it IS in coma and about to die
remember how it was with v11 -> v12
fine ill start switching this weekend
It would take you a few minutes to switch most likely
that quick?
v12 is still on api v8 which won't be deprecated for a while
v9 is still "new"
There’s not many breaking changes
If your code uses methods or is class based .but beginners most use same code ,so it is much work
ill probally switch in a month or so when a bunch of stacked overflow questions/answers are updated
That's not the way to go about things
If you rely on stackoverflow to answer everything then you should probably think outside the box more
You should learn to read the docs and make comprehensive design and coding decisions on your own
i rely on it for reminders
The djs docs are really nice
i forget a ton of stuff and after finding the answer on stacked overflow i can remember without having to read the whole thing again
I wish fabricmc had good docs like djs
anyway, cyall
The overhaul for the detritus docs is looking quite nice from what I’ve seen so far
reject managed libs. Embrace modular and cacheless
I cache n o t h i n g
Then do not use libs based on cache
Detritus isn’t based on caching

Is it?
Press x to doubt
There’s caching options, but I’ve disabled them
whats your guild count and memory usage
Like 30 guilds and something around 100mb ram usage
I use d.js guild count 6.4k and 2gb ram is needed
Oh my god why
Most of it from nodejs itself
Node internals only take 30MB max
Not sure about that
I can guarantee you. I made a lavalink rewrite in node and idle occupies 70MB. Most coming from require cache
I was told it’s normal for node itself to take anywhere from 40-80mb
Not normal
Deno uses only 2mb for internal stuff
Node uses 17 mb ram
On a console.log("hello"); script
I could have a problem with a memory leak or something as well
Not sure
Haven’t looked into it in a while
Currently rewriting for slash commands exclusively
So then probably won’t take as much ram
What library are you using
CloudStorm and SnowTransfer (forks)
Wrapping those into a discord.js-like layer I made
https://github.com/AmandaDiscord just browse the git I guess
Anyone know if this error will give dependancy conflict or not? I'm skeptical seeing the red word
I think you'll have to install 0.5.0 since it deduped prism-media, but installed 0.6.0
Yeah, the latest version for opus is 0.6.0, but I can revert it back to 0.5.3, little skeptical seeing that red word
Probably just hates seeing a different minor ver
Is that from process.memoryusage()?
The process uses ~100mb on my VPS whenever I use top
that's the way to get real memory usage
