#development
1 messages Β· Page 1715 of 1
iidk how to coode
and my bot develop
lazy af
to do a site
so i did one
honestly looks good af
lazy you say
then learn
for someone who cant code
you're really calling a dev lazy?
"in other languages" how do you change the language?
he literally said
im lazy af to do site
u do it
set a max width to the text
spaces wont help you due to mobile mode
what options does weebly give you?
NVM
there has to be an option for setting the width of a block of text
tim
for spread operator, you cant put the first index into a variable right?
we should do rest parameter and use destructuring assignment instead, right?
ty guys
rest and spread are not linked in any way
except by the use of ... in their syntax
Spread will take an array or object and spread it, all of it.
rest takes the rest of the array elements not assigned during destructuring, and make an array out of them.
ty
i fixed
only problem is google translate with other languages
ohhhh, thanks

you're using gtranslate to translate to japanese?
oof
if so, forget about it
unless you want someone who know japanese to read "let's harass a door and eat water"
although why is the original written in jap?
test
Hello, how can i make prototype in typescript please, my code:
import {Guild, Message} from "discord.js";
Message.prototype.createGuild = function () {
return console.log('yes')
}
Basically it's a bad idea to interfere in other prototypes
depends
discord.js's structures are made to be extensible, this is the "official" way to extend them
Discord.Structures.extend("Message", M => class extends M {
createGuild() {
console.log(this.content);
}
})
Tysm
I get that error
TS2339: Property 'createGuild' does not exist on type 'Message'.
in ts you have to extend the interfaces as well
interface Message extends Discord.Message {
createGuild()
}
``` something like that idk ts
You can use something like that
in the middle interface declared in global .d.ts file
Assignment may be somewhere
Hi
// Only change code below this line
const bicycle = {
gear: 2,
setGear(newGear) {
this.gear = newGear;
}
};
// Only change code above this line
bicycle.setGear(3);
console.log(bicycle.gear);
// This doesn't work.
const { setGear, gear } = bicycle;
setGear(14);
console.log(gear);
you call setGear separatly, without context
TypeError: Cannot set property 'gear' of undefined
if you extract method you should use setGear.call(bicycle, 14) or don't do it(extracting)
Also you extracted gear to separate const, it contains copy of value not reference bc its primitive
Fck
hi guys, i was trying to set an <iframe> into my bot top.gg page, but it show an empty embed, someone know why?
<iframe src = "https://amidiscord.xyz/"></iframe>
no spaces, I think
same thing :/
Mb iframe expect hardcoded width and height idk
something like ```html
<iframe src="https://amidiscord.xyz" width="100%" height="300"></iframe>
yeah mb
100% mb replace with pixels, relative units might not work
same thing, nothing show up :/
If it exist u can write props and styles right there for testing
in another site works? localhost for ex
ye it works
u did it?
Did what
nvm
module.exports = {
name: 'reactionrole',
description: "Sets up a reaction role message!",
async execute(message, args, Discord, client) {
const channel = 'YOUR_CHANNEL';
const yellowTeamRole = message.guild.roles.cache.find(role => role.name === "YOUR_ROLE");
const blueTeamRole = message.guild.roles.cache.find(role => role.name === "YOUR_ROLE");
const yellowTeamEmoji = 'YOUR_EMOJI';
const blueTeamEmoji = 'YOUR_EMOJI';
let embed = new Discord.MessageEmbed()
.setColor('#e42643')
.setTitle('Choose a team to play on!')
.setDescription('Choosing a team will allow you to interact with your teammates!\n\n'
+ `${yellowTeamEmoji} for yellow team\n`
+ `${blueTeamEmoji} for blue team`);
let messageEmbed = await message.channel.send(embed);
messageEmbed.react(yellowTeamEmoji);
messageEmbed.react(blueTeamEmoji);
client.on('messageReactionAdd', async (reaction, user) => {
if (reaction.message.partial) await reaction.message.fetch();
if (reaction.partial) await reaction.fetch();
if (user.bot) return;
if (!reaction.message.guild) return;
if (reaction.message.channel.id == channel) {
if (reaction.emoji.name === yellowTeamEmoji) {
await reaction.message.guild.members.cache.get(user.id).roles.add(yellowTeamRole);
}
if (reaction.emoji.name === blueTeamEmoji) {
await reaction.message.guild.members.cache.get(user.id).roles.add(blueTeamRole);
}
} else {
return;
}
});

client.on('messageReactionRemove', async (reaction, user) => {
if (reaction.message.partial) await reaction.message.fetch();
if (reaction.partial) await reaction.fetch();
if (user.bot) return;
if (!reaction.message.guild) return;
if (reaction.message.channel.id == channel) {
if (reaction.emoji.name === yellowTeamEmoji) {
await reaction.message.guild.members.cache.get(user.id).roles.remove(yellowTeamRole);
}
if (reaction.emoji.name === blueTeamEmoji) {
await reaction.message.guild.members.cache.get(user.id).roles.remove(blueTeamRole);
}
} else {
return;
}
});
}
}

no db
thats for single server
you probably use something like quick.db for more then one
I'm not sure. Does client.on('messageReactionAdd' ... executes on each reaction change?
no
Wrong, i mean on each message reactionrole
async execute(message, args, Discord, client) execute each time when anybody type reactionrole?
@quiet pawn
yea
It just seems a little wrong for me to add event listener to client on each command
Mb better register 1 event listener, define Set<Channel> and add channel here, then check exisiting
Mb i'm wrong
?
i use that code
lol
make sure your async execute(message, args, Discord, client) is in right order
Show all code
@still sky
Do you import or define Converter? I see you only use it
He say Is Not Defined
https://i.callumdev.pw/bskfn.png
How can I have the bulkDelete ignore the "Botname is thinking..." interaction message.
One message removed from a suspended account.
well you could fetch the messages first, filter them, then bulkdelete them
what would I filter it by?
bot id and message content
Does the interaction response have the same ID as the bot? or...
should be a regular message object yes
the author should be the id of the application that responds to it
if the application you're using is your bot application, then yes
.map(x => x) 
sometimes that's just needed π€·ββοΈ
Why?
Looks like when u use .shift() to const messages assigns first item in that array
cuz .shift() returns first item, not array
I am thinking of making an Economy Bot type thing! Can I have some name and profile picture suggestions?
Why are youtube tutorials being recommended in Get Started
The only way for me to get started it Stackoverflow
Youtube tutorials are the worst way imaginable for learning anything to do with programming
YouTube tutorials aren't horrible, they're just outdated and kinda slow for the most part
But some people prefer to learn by seeing
Youtube tutorials teach you one specific thing
And that limits you, to that one specific thing
But that can help too
I got started in programming from YT, so I'd say they're okay. But yes, there are definitely better ways of learning
It doesn't give you any knowledge of the library, or explain it well at all.
Go watch brakeys and come back to see if it teaches you anything
If you're looking at a tutorial for a Discord bot chances are you don't know the actual language enough, and have to read the basics of asyncio and what not.
For discord bots i learned to make them with a yt tutorial
Did you not try to read the documentation?
Which probably means you don't understand a lot if you find the documentation hard to read.. no offence.
You should definitely get used to reading docs, just copying from a YouTube tutorial won't get you far
If you're actually planning to develop a bot and not just some.. on_message ping commands, you're much better off learning through the docs. If you don't understand the docs, learn the language.
Who said I coppied from yt tutorials? I am a fast learner thing.. when i finished the setting up the bot thing and scrolling on google I understood some thinks
What people tend to do is whizz through the tutorials and by the end of it not understand a single thing. This is because later tutorials have complex stuff which you would learn by learning the basics first.
I made a Mod Mail and a bot that copies you so far... And all by myself and some peeks at stackoverflow
I understand some stuff
A bot that copies you is very simplistic.
imho yt good for reviewing and point of entry
then inevitably you have to read docs
Well I started like 2 days ago
Have you had any prior experience with JS?
The point is, YouTube tutorials won't teach you everything you need to know
Yea ^
js?
javascript
Uhhh i use python
That's even better. I don't code in JS either, I code in Python.
I was just using JS as a reference, since that's the language that the videos were using.
I have some small prior experience
One message removed from a suspended account.
@mental raven I can provide you some good resources for learning, as well as a "what you should know" list if you're interested.
pins has a ton of resources too
One message removed from a suspended account.
One message removed from a suspended account.
All I know is I cannot read the discord.py docs they are too much for my brain
One message removed from a suspended account.
ok
learning to read docs is a process.
One message removed from a suspended account.
^ d.py docs
- Primitive data types
- Operators
- Data structures
- Importing
- Variables, namespace and scope
- String formatting
- OOP
- Control flow
- Exception handling
- Function definitions
- Classes, objects, attributes and methods
- Console usage, interpreters and environments
- Decorators
Useful to know:
- Asyncio basics
- What is blocking?
- Logging
- knowing how to read docs properly
^ what you should know
and
https://docs.python.org/3/tutorial/ (official tutorial)
http://python.swaroopch.com/ (useful book)
https://automatetheboringstuff.com/ (for complete beginners to programming)
http://greenteapress.com/wp/think-python-2e/ (another decent book)
See also:
http://www.codeabbey.com/ (exercises for beginners)
https://realpython.com/ (good articles on specific topics)
https://learnxinyminutes.com/docs/python3/ (cheatsheet)
Collection of programming problems to practice solving, learn to program and code, and win certificates
Good resources for learning Python.
(Sorry for the spam)
Thats a lot of dmg
programming isnt supposed to be easy
im years in and i still learn stuff daily
It's actually really difficult lol. It took a very long time to get my head around class inheritance, polymorphism and overwriting methods.
Unity isn't a language, you mean C#?
(I think Unity uses C#)
Either that or C++
its c# im 99% sure
Yeah
Unity uses C#
Python is a lot more beginner friendly in terms of syntax
But a little modified
I would like to say thank youguys for help me today
C++ is just.. pain
unity c# isn't really c#
bro
if you know unity then there's a package on C#
for Discord
I would suggest learning the basics first, especially everything in the list above before starting with bots.
then let your brain keep hurting
isnt c# docs pretty much the same formatting as py docs?
(I never rode the C# docs either)
I suggest switching to JS since you know C# they have the same syntax
On the other hand python is from a hell different planet
Unity C# is easy to learn beacuse there is a youtuber that explains everything you need to know its like the docs but instead of reading them you listen to them
maybe even TS might be easier.
What is TS?
^^
Never heard of that
js but better
its js, but with types.
Take js away from me
but that isn't really... learning
well, proper learning
Have you heard of Brakeys?
i've seen some unity tuts pop up in my recommended
Brackeys unity tutorials are okay, but again, doesn't teach you everything you need to know
heck, ive used some for some quick dirty stuff.
He makes free tutorials that are like those paid courses
Yeah I've heard typing on JS is dogshit
Bruh I came here to get suggestions for the name of my bot and instead i am getting my head hurt by all the messages
Please don't compare a youtube video with docs, they're nothing alike π
ah, suggestions for names isnt really a dev topic.
One message removed from a suspended account.
yeah we use ts now
One message removed from a suspended account.
well it's part of development
How do y'all get this bot dev role π
One message removed from a suspended account.
Makes sense
my bot is only in.. one server
Ok ill be going to bed bye
Intellisense is pretty lazy
oh we werent meant to send the team money through paypal? I feel scammed
you had to pay because its you
Something I want to mention though. All the resources I've provided are sourced from the official discord.py server, which I'd suggest you join as there are plenty of people there that would be happy to help.
You are expected to know all the basics of Python, including the ysk stuff although that's pretty lenient. Just know that if you don't show that you know enough they'll tell you to go away 
you're also typed
A jump to link in #starboard would be nice 
hello im looking for a bot coder, i can't code so i need help just dm me if you can code my bot
-needdev
@wide trench
You seem to be asking for something you don't have experience for or something that hasn't been done yet, but really need for your bot/server.
You can hire developers from Fiverr or Freelancer to code the things you need for your bot/server.
then your probably not going to find a developer
Nobody is going to code you a bot for free
Go to GitHub and copy someone else's bot
ima just keep looking
out of topic, but how the heck were you expecting to hire someone without paying them?
shi
please dont look here. this servers not for that.
And you need to be more appreciative of people's time
you know its a job right? π
;-;
"please fix my roof for free"
It doesn't take 5 minutes to develop a bot
π
Anyways, what were you looking for? What kind of bot?
i want to check if args[0] is egal has an command, but itβs not work (i have no error): if(args[0] === options.client.commands.get(args[0]))
I'm curious
if only food, housing, electricity, water and clothing were free we wouldnt need it 
js?
ye
if(!args[0]){ return }
oh
if its what i assume, as a command handler
yes
string !== object
you need to check with has()
if(options....has(args[0])) {do stuff}
remember to check if args[0] is a thing before
get() retrieves the object
has() checks if it exists
I want my money back
if(args[0] === options.client.commands.get(x => x.help.name === args[0]))
still donβt work
cuz thats not how it works
read what i said
if you want THAT< you must use filter() or find()
though its fairly uncommon to have the command name be different than the help.name
usually you map ur commands with name/object
btw how's args[0] gonna be equal to it's command ?

cuz a map is a compination of ususaly a string/object for command handlers
you map them by their name, usually
Stuff on fiverr is pretty cheap.
commands.set('command', command)
Can't say that it's going to be good code though
commands.has('command') //true
commands.has('something') //false
commands.get('command') // command object
@near stratus
json is fine as long as you arent constantly modifying it
It's pretty dog
i'll bite you million
There's a tag on discord.py as to why let me find it
i mean, it says "something that required data storage" so it seems like its anything.
...
JSON is JavaScript Object Notation, a serialization format for data.
Advantages of JSON are:
- It is a common data exchange format and has been around for a long time, so many languages will support JSON either in their standard library or with minimal dependencies.
- It provides a common format that can be used to shift data between languages, programs or machines.
- It has a lightweight syntax so minimal space is wasted.
- The syntax can be pretty printed to be made more human-readable.
Disadvantages of JSON are:
- Some languages do not have direct parallels to JSON objects, making them difficult to manage in said languages.
- There may be considerable processing overhead serializing and deserializing to/from JSON.
json is fine, as far as database goes, yeah, nah
- The syntax can be pretty printed to be made more human-readable.
this should be a con lol
It is a con
your data should not be easily accessible and easily readable
but its under advantages
Oh
lol
I forgot what pro/con mean


I suppose it's dependent on what data
Reminder to self: never again run a java program without a max ram option
But yeah. 80% of the time it's people who don't have SQL knowledge
Reminder to self: never again run a java program
Or don't know enough about their programming language to implement database functionality
Noted
java π³
the bot developing community is extremely oversaturated
but it's oversaturated with underqualified developers
highly skilled devs are a rarity
faang
Β£7.50 *
$ would be more
Still really cheap
hey i do fiverr :(
in case you didn't see https://nodejs.medium.com/node-js-16-available-now-7f5099a97e70
it's a good enough side hustle
Python is getting some really cool pattern recognition stuff π
Enmap [Map] {
'help' => {
help: {
name: 'help',
category: 'General',
usage: 'help | help <command_name>',
botPerms: '`Envoyer des messages` et `Envoyer des images',
userPerms: '`Aucune permission(s) requise(s)',
utilite: 'Affiche la liste des commandes disponibles'
},
run: [AsyncFunction]
}
}```
how can i get the `category:` ? please, i canβt do it
If u use something like dbm in the shadows where it takes less than a hour, go for it. The avregare paycheck for a dev is 11$/h
most of my clients come with similar ideas
so more times than not i have a boilerplate ready
i.e. a pokemeow selfbot
Easy money at that point
?
But its not really worth it otherwise
i juste use .filter
you should not use enmap
uh
for commands I mean
why?
eh, i could argue with that
double the memory usage
i.e. a scenario where you're under 18
correct
which package i should use
ok
@umbral zealot this is enmap, right?
well, yeah, if you under 18, you could do it, but its still contractual work otherwise, usually if you want a stopgap (as in, you cant find a job) it should do, though i've worked as Uber Eats before on a bike and the paycheck is much bigger. BUT, if you working due to legal issues (as in, you cant work as a dev, or in general, without being 18) then it might backfire both at you and your clients
Ain't you allowed to work part time when you're 15+ ?
||At least where I'm from||
its 13+ here in the UK
oh never been to UK
it varies per country, the only definition we said here is -18, how far down it goes is up to discussion
but some might see becoming a developer as a backdoor to work
i've found working at fiverr/other freelancing platforms heaven
i've been wanting to make my own money since i was 15 and discovered fiverr at 17 and honestly i enjoy it
i don't have to do physical work and i work from home
which is perfect when you're a high schooler
a physical job gives you good experience
Hey yβall I quit JavaScript for like 7 months and I forgot how to make an http request, I donβt want to receive anything back just simply make the requests
Any help
I'm 16 and I'm hearing Fiverrr word for the first time here
node or web js
node
use axios
ew
don't use axios
node-fetch
fetch() or axios
its boat
no erwin
REST*
node-fetch is all you need since it's the lowest level you can go for wrapping web requests
ba0dum-ts
everything else is bloat
Lmfao
use request and see the deprecated warn go brrrrrrrrrrr
How would I do it though?
fetch('https://google.com')
google node-fetch
I have both axios and node-fetch
you'll see tons of docs
their npm is self explanatory
XMLHttpRequest should help
ewwww
bruh
welcome to server side

node doesn't provide xhr api
@opal plank do you have a cs degree or did you just learn shit over time?
xhr is web js only (natively)
Thats for pure web js
I assume over time
the latter
dam, it should be good joke
latter means second, right?
Yes, it is.
matter means last
ok
for a command 
But I guess I'm too late lol.
latter(later, final)
Yea some tutorials use enmap instead of collections.
why?????
so in my case (evend if is enmap), how can i get category?
Enmap [Map] {
'help' => {
help: {
name: 'help',
category: 'General',
usage: 'help | help <command_name>',
botPerms: '`Envoyer des messages` et `Envoyer des images',
userPerms: '`Aucune permission(s) requise(s)',
utilite: 'Affiche la liste des commandes disponibles'
},
run: [AsyncFunction]
}
}```
map.get('help').help.category
One of the many reasons why youtube tutorials are not good
Which 80% dont
more like 90
Yeah more like 90, they're using a tutorial for a reason
imagine not using conditional cahining or checking for returns of get()
:dissapointed*
@opal plank today I got a new chair, you should too
Who needs tutorial
just copy someone's code from GitHub
well I know that its gonna be there
im at my bed, no chair can ever get this comfy, thanks, i'll pass
if anything I should use assertions
it wasn't a question
Outdated tutorials exist, people use them and then helpers in help channels need to deal with it
me neither, fuck chairs. Bed dev is the shit
So all node-fetch is is fetch(`url`)
bad* dev
yes
me_irl
you can pass options, but yeah
until you burn your thighs with your laptop
you asked for something to just make a request, so make sure you use method; POST
yourenmap.get('help', 'help.category')
you make it sound like my laptop is here and not on the table
Though they're right, you should not store commands in enmap
So you use a table
if by table you mean another computer, yes
LOLLLLLLLLL
do any of them have a good gpu
wooooooow imma clap my head
1 is the server (monitor--less), and ontop of it theres my main monitor(for the laptop), the actual laptop is underneath it, on the other pc
fetch(`url`; { method: βPOSTβ})
Like that?
whats the use of a server if your power is shit?
should be right, yeah
wont it just die
not ;
Pls support my bots music ???
,
Alright
use commas not seimicolons
remove semicolon
wait you are hosting yourself
that the wrong '
Yeye my bad
no, i use a proper cluster for it
you used β
I meant a , not a ;
wtf
@solemn latch free ban for u
hello
module.exports = {
name: 'test',
description: "this is a test command!",
execute(msg, args){
msg.channel.send('826859079162920961')
}
}
@eternal cradle please dont post ads 
can anyone help here. im trying to make it link a channel in discord
@solemn latch soory men
fetch(`url`, { method: 'POST'}).catch(error => {} is good right
<# >
module.exports = {
name: 'test',
description: "this is a test command!",
execute(msg, args){
msg.channel.send('[#826859079162920961](/guild/264445053596991498/channel/826859079162920961/)')
}
}β
omg
@eternal cradle Not gonna be verified with those perms 
im so stupid
i have [object Object]
its been a long night
ty so much
my bot defaults to admin perms 
have a nice SLEEP
well not defaults
you should commit /rm
@opal plank support add server
hmm
Uhhhh that should give you the Category
And I can pass arguments in the url using like ${} right
Unless the output you sent isn't exactly right.
didnt you literally get warned by the mods not to advertise?
bruh
God itβs been a while since I did js
ewwwww coffee
that's why java's logo is a hot cup of coffee
fetch('https://the.url', { method: 'POST', body: 'poop=5' })
your cpu will run at those temps 
@opal plank how do you feel knowing that my code is better than most of your bot's commands code?
how do you feel knowing i'll bite you very soon?
you always threaten
never bite
im starting to wonder if its just an empty threat
i have log and itβs returned :
help: {
name: 'help',
category: 'General',
usage: 'help | help <command_name>',
botPerms: '`Envoyer des messages` et `Envoyer des images',
userPerms: '`Aucune permission(s) requise(s)',
utilite: 'Affiche la liste des commandes disponibles'
},
run: [AsyncFunction]
}```
... with my EXACT code?
no
So you did something different
And expected the same result?
Why not do exactly like I said? With the path as a second argument?
no
No idea, lol
lmao
moment when you remember mods dont care about invite link
so im free to advertise my bot? 

bad erwin
When i log : const command = options.client.commands.filter((x) => x.help.name === args[0]); const a = args[0]; console.log(command.get(a, a.category))
he returned
help: {
name: 'help',
category: 'General',
usage: 'help | help <command_name>',
botPerms: '`Envoyer des messages` et `Envoyer des images',
userPerms: '`Aucune permission(s) requise(s)',
utilite: 'Affiche la liste des commandes disponibles'
},
run: [AsyncFunction]
}```
but i want only category
why this question
cuz usually you dont use strings for permissions
Yeah ok
left
The path must be a string
It must point to the location in the object
In this case 'help.category'
yeah
im back
module.exports = {
name: 'welcome',
description: "this is a welcome command!",
execute(msg, args){
msg.channel.send("Welcome to the server! Thanks for joining! Please take our [#822136993878245416](/guild/264445053596991498/channel/822136993878245416/) We use this feedback to better the server for you. You must take the leap of faith in [#822292684193398854](/guild/264445053596991498/channel/822292684193398854/) to gain access to the rest of the server. If you need anything ping Freshy in [#834063761626366013](/guild/264445053596991498/channel/834063761626366013/) ")
}
}
how can i space the text out into not so long a paragraaph
id like to add maybe some lines inbetween each few sentenaces nad have them display in a list format
\n
you have to wrap your num in a BigInt
BigInt is a built-in object whose constructor returns a bigint primitive β also called a BigInt value, or sometimes just a BigInt β to represent whole numbers larger than 253 - 1 (Number.MAX_SAFE_INTEGER), which is the largest number JavaScript can represent with a number primitive (or Number value). BigInt values can be used for arbitrarily la...
there should be a bitshift example somewhere in there
i wonder if it's because bigint has a bunch of assertions for fool-proofing
Discord glitched tf out?
I'm making an api, and i'd like to apply a rate limit system. Anyone know how I can limit the number of requests per minute to 10 using nodejs?
yeah, seems like some serversa re ging down
Cool
Welcome to Discord's home for real-time and historical data on system performance.
is your bot(s) offline too? it seems my bot randomly disconnected and became offline
yea, even huge bots like Mudae, Dyno etc are off, there is like 30k+ downtime reports already

perhaps my library sends that for unavailables as well
discord-rose?
yes
GUILD_UNAVAILABLE
but also on GUILD_DELETE just do if (guild.unavailable) return
anyways, anybody knows what counts towards those requests?
Global Rate Limit
All bots can make up to 50 requests per second to our API.
is it like every single message/edit/reaction?
smh bad library
ur gonna want to return if the guild was unavailable before
LMFAO
nice log style bro
ty it might be stolen from someone somewhere

lmao
perhaps
ok shower time
you think this is bad?
nope that a bit different
need to fix it lmao
can i steal it
ig ill do it after math homework
no load
i started getting ws ratelimited so i had to shut down my bots
why would u kekw
because it is so cool π

lmao
Ikr
YouTube bot seems unaffected somehow
Now I'm not gonna make it delete entry from database on guild leave ππ
Some are unaffected
We're continuing recovery steps, and expect additional turbulence as we correct cluster configuration.
https://discordstatus.com/incidents/gl4j21rcfq3d
Cluster 4 is going crazy, apparently
lmao
thats super easy to avoid
detritus is actually really cool berry
I use Discord.js 
seems like i stole a believer
For now

no I still prefer discord-rose
okay but they cant do websockets correctly π
discord-no-cache >>>>>> discord-rose > detritus > discord.js-light > eris > discord.js
no
Discord-no-cache?
don't
its gone
Isnt that the same as discord.js-light
im dmcaing your repo too
its barebones as shit
how its my own code
i have the license to discord-no-cache
and im taking down ur repo
because i want it to stop existing
kek
lmao
singlehandely the worst code i've written that i still use
but its pog
s
i mean
if you want discord no cache, just make one yourself with only websocket and nothing else
i gay
thats basically what it is
well thats what it is
then make your own
i made my own too at some point
there is also
renamed it
there was I thought
nope
--yolo
it used your rest manager
too many
lmao
discord-rose pretty pog
discord-tag was kinda cool idk
const Client = require("discord-tag");
let client = new Client()
// Add a prefix
.addPrefix("!")
// Set a log function
.setLog(console.log)
// Add a command
.addCommand("commandname", "command response")
// Add a command using a function
.addCommand("commandname2", (message, send) => {
send("Yada");
})
// Add a command that deletes the invoking message
.addCommand("commandname3", "command response", true)
// Log in and start the bot
.login(YOUR_BOT_TOKEN);```
gobi
looks cool
bai mill
bai
early versions of djsl had 3 different command handlers
one of them was a "route" mode, similar do webservers
client.on("/mycommand", (...) => { ... })
kinda how like interactions are now lmao?
discord tag 
were there like paramaters and stuff
like client.on("/mycommand/poop") = !mycommand poop
dont use
nope xd
noice
i didnt even know djsl had a built in command handler tbh lmao
ah
i removed all of that crap
kubernetes example when
im working on a super easy to use kubernete integration on rose idk why but i thought it'd be cool
yes
when djs v13 comes out do you think djsl will just be done
it was supposed to but too many new things coming before next is ready
right
possibly theres gonna be a v14 if next is not ready by then
idk how far along they've gone with it
i want to make my own lib eventually but i cant until i finish this crap im doing
it doesnt even seem they've started yet
i heard they're working on different repos or something idk
i see prs
Was wandering if someone new js and would fill me in on a way to fetch a github repo and read a specified file as a command
such as I make a repo with a file called update > make patchnotes > user send !patchnotes > gets file text > reads the patchnotes
Is that possible?
I understand someone will say use a link, but i would like it to be able to send the repo text contents as a discord embed/message
possible yes
use an http library like node-fetch and request the raw url for that file
if you know which repo and file it is, you can hard code it so that you dont need to type the url in the command
idk you tell me lol
I heard they were working on djs rewrite in another repo
or at least I think thats what I heard
-_-
https://github.com/discordjs/discord.js-next/tree/master/packages @slim heart this should be the rewrite
ik this is simple, but how do i do this
I rlly want to make this cmd
With the actual ms
which command?
i use js
mine's not djs but the real ping part is only 3 lines
https://cdn.discordapp.com/attachments/381887113391505410/834220914967052298/unknown.png how can i create an invite like that with a bot?
What do you mean? Do you want to create the invitation embed? Do you want to create an invite to a guild?
i want to create an invite with the embed
when i click on it i can play youtube video on a voice chat
just putting an invite url in chat will make it
no i mean, a bot sent me an invite, and when i click on it i can play games in a voice chat
directly on discord
and the channel icon is like a 
yes
That's likely a discord server invite link for the channel itself since you can do that. Like when they click "join" the first channel they see is that one.
and it was probably just the bots channel for the games they have from it.

new feature of discord?
Its only for discord community servers
Was released in the latest update
Ah there you go.
how i can get that
haha

they need a minimum amount of people to be available iirc
only servers with 800 members can use it or something along those lines
though i think thats cuz of the requirement for community server
but i get 100k and i don't found
hmmmm
@opal plank can i dm you?
what for?
to see what the link do
How I can edit a webhook message? π
okay ty
what IOS is needed to view slash commands from bots, this one person i talk to says he cant see any slash commands on the iphone 6 on IOS 14.4
hey can someone tell me what i did wrong
The message parameter you passed in is not a real message instance
Try to log it and see what it returns
oh nvm fixed it like a boss
Alright
Yo can i dm you
uh sure
^
send me friend request
I did
message me now
would have been 10x easier to discuss it here
someone rate my website and report bugs to me
https://legend-js.ml
I want image attachment link to through link
Like : https://cdn.discordapp.com/attachments/201745454147305473/445755758051721217/The_Camping_Episode_024.jpg
When i send this type link to run cmd
Message.attachment.first() is only for uploading attachments
how can i know how many members does my vc have
i tried message.guild.members.cache.filter(g => g.voiceChannelID === channel.id).size but it doesn't work
I want uploading attachments link through link
Like i send specific channel this https://cdn.discordapp.com/attachments/201745454147305473/445755758051721217/The_Camping_Episode_024.jpg to run my cmd
By any chance does anyone know anything about base 64
I don't know how I should decode it first time working with it

either 12 or 14 iirc
can't believe i took 1hr and 20 mins just to get this right
It's Node 14 and above.
show us the code
I am changing to discord.js v12 and i don't remember this new function
Someone knows how is it?
thanks :)
Cannot Read Property Of 'id'
Update discord.js
Yeah it is
discord js not supporting stage vc?
In Master, in stable nope
Anyone experience with chargebee?
?
Anyone experience with chargebee?
one time is enough buddy
Can someone tell me why this isn't working
whats the error
Doesn't show an error just doesn't work
wait?
How do i check if it's being registered?
@orchid lodge console.log a message whenever that message is sent
thanks. how do i know once it is reviewed?
DM?
should b message.channel.send(LoveEmbed)
ty
u defined loveembed wrong
It's not defined wrong, they have a typo
@orchid lodge it's LoveEmbed not loveEmbed
i fixed that
Some bots redirect to their site and do nice, eye-pleasing things with their animated click patterns, I don't know how to do this. How can I help you?
how can i update ?
i am at repl.it
idk repl.it
ohh it's in discord.js
they're running djs v11 which has been deprecated for a long time
and finally broke with stage channels
const imageUrl = message.content.split(' ').slice(1);
const embed = new Discord.MessageEmbed()
.setImage(imageUrl)
.setColor(0xFF8AFF)
.setDescription("test")
.setThumbnail(message.author.avatarURL)
.setFooter('test', client.user.avatarURL);
message.channel.send(embed);
}```
```DiscordAPIError: Invalid Form Body```
color is a hex string afaik
.avatarURL()
read this line ```const imageUrl = message.content.split(' ').slice(1);
what about it
imageUrl
!test link
For example - If someone types !image http://imgur.com/xxxxxx.jpg
then the bot should reply back with the image without link. Any help? Thank you.
embed reply
you are passing an arrayimageUrl to setImage() which requires string
In js, is there anyway to essentially create a timeout but be able to cancel it?
Without becoming a race condition nightmare
you talking about setTimeout?
Just go in json file and update your djs no.
setTimeout returns a number which can be used to cancel its respective timeout clearTimeout
const timeoutid = setTimeout()
clearTimeout(timeoutid)
embed.image.url: Could not interpret "['https://media.discordapp.net/attachments/815951481823297569/834345130353360916/Capture.PNG?width=400&height=188']" as string.
What is the latest version of djs
12.5.2


