#development
1 messages · Page 1157 of 1
i thought it is js
maybe
fuck
for my bot
cool
how do you make a button
i think its JS, but he's loading it in java at least the console part
style a or use <button> with js
<button>yes</button>
there are more attributes
sir, may i offer you this magical thing called https://google.com
Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for.
He is loading JSON in java
<button> is wack, use <a>
@earnest phoenix the js is being interpreted in java
how do i put the link in
no
the module is supposed to be in js
aka all of the docs are in js
how do i put the link in
@timber plume
sir, may i offer you this magical thing called https://google.com/
Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for.

or the guide is to the minimum
button there
i asked the wrong place 
use javascript
some mods and hacked clients expose javascript apis since it's easier to work with than a full java environment (and people are stupid)
the syntax looks for to me in JS
<button onclick="location.href = 'somewhere.com'">
my dudes, that is js, the js is being interpreted into java from the mod
im not sure he CAN compile js in java though
my dudes, that is js, the js is being interpreted into java from the mod
@earnest phoenix
yeah thats what i mean
yes
imagine using pbt
imagine bitching about which build i use

foudn some sort of module
inside of this module
that has a settings feature
let me see if that works

aight
i dont think that the mod supports full ES6 syntax which is why it's breaking
very fast ™️
stable => goes down every outtage
canary => full of new bs rn, gotta update every 10 minutes
ptb => nobody uses, stays up a lot of times theres an outtage
Lol
development :^)
haha imagine thinking discord devs are competent
that could be the case too cry
@karmic compass try this var a = () => {console.log('test')}
put this high up in your module export
as high as possible actually
why?
arrow functions are es6 syntax
var
i mean
oh i've alr been using it
arrow functions?
its probably nothing wrong with js
or json
its prob just the thing im using
might just have in the file at the very top const thingEnabled = true and the user can turn it true/false
require() should resolve just fine
manually
yeah
i did it in another thing and it worked
its probably just with this thing
it looked as if nothing was wrong in my main file
its in json doe
you can export just the same
i maen
export object
it looked as if the error was in the colon, not anywhere else
oh let me view that
its an alternative for require()
newer even
and much better since you can name your exports and export multiple files at once
declare the object with your config and then export it in the bottom. then on your index, import it
Hey
instead of ```js
//config.json
{
"a": 1
}
//index
const a = require('./config.json')
do
```js
//config.mjs
export config {
"a": 1,
}
//index.js
import config from 'config.js'
Good morning fellow developers
config.mjs?
mjs is a delcared extension for es6
oh
hmm
mjs?
do i have to have the thing installed?
mjs is es6 stuff
how to fix this ???
no1 told me to do const mongoose = require("mongoose");
thats really odd
@viral iris your code is
try
var a = { "a":1};
export a as config;
see if that throws your linter offguard again
so remove the space and it will work
const mongoose = require("mongoose ");
@earnest phoenix which file?
isn't export like
"peak or declaration" thing
exports.config = config;
something like this?
nah
exports.<Name> = <Object>;
hmmm
you just require the file
without compiler, nah
require() isnt working for him somehow
offering a different solution
nono
import
its the colon
all wrong with the colon
atleast the error says so
oh and btw do i have to change my file to mjs
{
"welcomer": true
}
``` is valid
from js to mjs or
depends on your compiler
just store it in json lol
wait
{
"guildWelcomeOn":true
} in json
const misterConfig = require('./misterSettings.json')
e
the only problem is with the semicoon

colon*
do a console.log(misterConfig) right after the require
just to make sure its that whats error ing
since the only way i can functionably run the file is with
minecraft
i have to make it in another js file
brb
oh ok ty

obj['owo'] 
ULTIMATE BRUH MOMENT
funny thing is
i removed all uses of it in the other file
and it sitll gave me an error
then i removed require and it worked
nada
hmmm
its likely that require() is breaking it then
not specifically that json
that function
you can just use fs
guys what type of embed use discord?
huh?
fs got deleted lmfao
wait brb ping me for answers
eeeeeey
owo.owo mate
oh
use let {owo} =
hmmm
@.everyone hey will this work?
i'm not sure if the mod is going to provide fs lol
ok
im out of options
just load the config in the file dude, fuck it
require()? No
import ? No
fs? No
fuck it, just append on the index
wtf is append mean
if variables dont work on your code, throw the code and the machine away
if variables dont work on your code, throw the code and the machine away
@opal plank lmao
just gonna add a few notes for any users that come into contact with this garbage and bing bang boom
just take out the config, fuck it, it's an autocracy your users aren't allowed to have an opinion
fair

where, my eng isnt so good
guils
im not native speaker either, dont worry
just pointing out for ya to fix it, not kink shaming your grammar
I know, thank you 

you're only a professional coder if you've said that you speak more than one language and stated that one of them is a programming language
i speak in js and java
primary language: windows command prompt
if (true) reply('Haha, can related!')
message.reply('My first lang was js too :D')
i just regretted posting that much cringe
i was born and my mom began teaching me discord.js, i now fluently speak in the node module "english"
nowadays im just racist
fairly racist actually
i use Typescript
||if you didnt get the joke, Typescript is basically racist JS, since you have to declare the type of the variables||
I used to speak fluent linux prompt
now im trying to learn more about js, node etc so I can really do something interesting
almost a year doing shitty ass scripts with Bash at school
So whats that make C#? @opal plank
Did someone mention dotnet? 🙂
A Nazi

not only is it racist, its like 10 steps further
I tried to get into C# before, having to declare variable types was one of the many things that threw me off from it
You can use var
but you see, in typed languages, you don't get dumb people thinking that the language will automatically fill properties with whatever they're thinking of ie. user.NicknAMeFrOMMyGuiLD

i love it when people make up their own properties and then wonder why it doesn't work
also C# intellisense is amazingly fantastic
VS ^ yeah
Is. Along a dashboard hard?
never heard of kite and VSC intellisense is limited, omnisharp sucks ass
Is making a dashboard
Is. Along a dashboard hard?
@drifting wedge that is like asking "is writing a book hard", a book about what? what genre? what language?
your question needs to be specific
making a dashboard requires full stack knowledge, see https://github.com/kamranahmedse/developer-roadmap
Please tell me you have a conversation on hand of this
#development message
there've been multiple people here thinking that d.js will magically fill their own made up properties

I mean I’m using python
How
@solemn latch people who never took cs
see the roadmap i sent you 0Exe, most of the things listed there are required for making a secure and an efficient dashboard

is mcdonalds important?
Do you think users will use your dashboard if you make one?
But like is it really important
Or can I grow my bot without it?
I’ll prob make one in the future
No.
Most bots don't have a dashboard
Many do have a website, but thats also commonly optional.
chances are you won't even be able to grow your bot because oversatuation of generic bots 
Yep
I hit 44 servers today 
chances are you won't even be able to grow your bot because oversatuation of generic bots
@earnest phoenix well I mean it depends
My bot has been like added to 26 servers so far
So it’s pretty good
Only like 1 and a half Weeks
if your bot isn't anime themed and doesn't provide tiddies for kids whose moms blocked pornhub, good luck growing
Lmao
Well my bot is@really good@lol
So i finally send the bot verification
Bot market is so oversaturated rn.
the bot dev badge is coming soon I guess, my simple bot is already in 81 true servers
also, guild count is mostly irrelevant, what's relevant is interaction and participation with your bot
a 2k guild bot is worth jackshit if no one's using it
its used
True true
its a minecraft bot and its used in minecraft discords so people can have some stuff popping, i mean its regularly used
discord is promoting already established huge bots and kicking off smaller independent bots
k
remember that drama with the bots tab in guild settings
e
really? why
discord straight up promoted a specific selection of bots, mee6 and a few others without any notice that other bots exist
they're, or at least were, promoting mee6 on their own website
that isn't fair in every aspect
they're giving exposure to already huge bots but then ignoring smaller bots
though with this bot verification thing in place, they might be building their own bot marketplace
like they did with server discovery
Which will be shit compared to something like DBL, like you said, they'll only show off large bots
like DBL doesn't already
DBL is targeted at big bots who have money to spend
@earnest phoenix Alright, so I want to add a LeaveGuildHandler and purge uncommon guild users from my DB when my bot leaves a guild, and also on startup for the bot.
I'm aware that if I attempt to use client.GetUser(userId) it can return null if they are not online for a large guild. Is AlwaysDownloadUsers = true in the config all I need? I need to be careful implementing this one
that's what i was thinking
yes, that will cache all users in the guild auger, but your memory usage is going jump up a lot
AlwaysDownloadUsers downloads all users in the guild regardless of what you want to do with them
it starts downloading as soon as the guild is available
Right, I've got memory to spare. But, can I call a downloadAll for just the scope of the purge function? Just so the GC can maybe clean up afterwards
yes, but it'll take time to finish
for context, i ran a 2.5k guild bot which was in here, discord api & discord bots (3 very large guilds) on d.net with all members cached at around 150-300mb ram depending on how many guilds were cached at the time
Well for the guildLeave event, I only need to download all users for that guild
And on the ready event, I want to also run the purge function, which would iterate through every guild
also, once your bot leaves the guild you no longer have access to it, you can't interact with it and all you have left is the cache
Hm
So, I suppose my approach would have to be:
DownloadAllUsers
if user exists in db that is no longer in the fully download cache
delete user from db
Seems resource (memory) heavy
is your goal to check if the user is in the guild?
I want to remove user records that the bot no longer shares a mutual guild with
oh, yeah, you have to download all users in all guilds then
Essentially so I can clean up junk data
How many servers that I own can I have my bot in?
if it was guild specific, you could fall back onto a REST request
It’s not verified yet
I’m not
But like I own a server with like 1000 ppl so I have it there
And a support server
whoops
that is some slow code
not using that one variable
Fine, I can rewrite it to a proper iteration lol
also i don't think that's going to do anything since like i mentioned above, d.net clears the user cache before it returns the guild to you in the event
empty, not null
gotcha
nah, I can work around it
I'd probably implement my own api lib helper if I needed to do something custom, which i don't need to do for this
why i can't delete or edit ?
you don't have permission
that's my repo ????????????
I wouldn't modify from the web page either lol
do you have a branch selected
do you have a branch selected
@earnest phoenix idk wdym
literally what i asked
try cloning the repo, modifying the file, commit, push commit
you just need to have a branch selected
lol
it even tells you that when you hover over it
Apparently that's eluding him
nvm fixed it
lol
@earnest phoenix do I need to DownloadAll in the config if this is available?
If not, I'll just do this on a as-needed basis
no, the option in the config does just that
keep in mind that it's a blocking method
Sweet, that might make this whole operation a have a bit lighter of a footprint
Who's Minn?
I have a little problem with understanding things at this time
?
thanks!
with picking a proper hosting service? sure we can help you
heroku ISNT a bot hosting platform
goes into the discord.js server and asks
lmao
@viral iris biggest issue you should be fixing rn is getting out of glitch, your bot might be terminated if you using glitch for hosting bots
what does this mean
don't use json as a database
what should i use instead
any proper database, you can do some research, i personally work with sqlite for small scale, there's a ton of other databases out there though, ie. mongodb for nosql
what does this mean
@worthy glacier Means your JSON file has been corrupted because there is a syntax error somewhere in it
Use a proper database instead of serializing an bunch of objects
ok got it
any difference i should know selecting between cloud providers for mongodb?
besides region
I mean, just whatever is free and preferably near you for lowest latency
@earnest phoenix Looks like it may work, any thoughts?
I added the deletionList just for debugging.
slow
just check for IsBot directly in the foreach loop
or, FirstOrDefault*
you're effectively doubling the memory that's used to store the guild members
I mean, I don't even need to check for bots, since my db will not include them
i guess you're doing it to prevent extra calls
but the sorting overhead for the .Where may not be worth it
also i told you this before, DownloadUsersAsync is blocking
since it's an entire extra iteration
you probably want to run each guild in its own task so it can execute in parallel
Nah, I'd need to store a guild a user is in for the user record
and since the socketGuild the handler passes contains an empty user list there isn't a way rn for me to not just go through every guild ||what a terrible sentence. lmk if you need me to clarify||
yeah i got it, id suggest falling back onto REST to see if the user is in the guild or not but that's arguably more expensive than going through all members in all guilds in cache
I'll rewrite it to spawn off it's own task for each guild. But other than that, lgtm. Ty btw
Actually, I can't spawn off their own threads
Again, since I'm not keeping a user's guild in their record
Because of that, I need to have a big list of every user in every guild and just go through that...
Maybe I should consider storing a user's guild in their record lol
For example, if I’m to add modules
Do I have to write a help command for all the modules?
Or can I like make one help command and pull from db? Also, how do I make an image, like the level system picture!
?*
I'm sure you can override the default help command for your lib.
Mine just reads from a text file
I've been having trouble getting named links to show up
I thought the format was text but every time my bot sends it it doesn't get converted
@worthy glacier read the error
no im on v12
that doesnt seem to work either
client.on("message", A7O => {
if (A7O.content === "69spam") {
setInterval(() => {
A7O.channel.send("A7O");
}, 1000);
}
}); am code a ba kar det bo spam
no
Spam Code

what's the error now
it still says "bot not defined" when i do console.log(bot.users.cache.get(user.id);
yes, this "bot is undefined" problem is unrelated to "a replacement for bot.users.get"
show the code where the error occurs
use message.client instead of bot
you can't use bot because it isn't provided as an argument to the execute function
add cache if you're on v12
ok thank you
is there a reason for fetching discord users to take unnecessarily long?
API down or ratelimit handler waiting for ratelimits to reset
TypeError [INVALID_TYPE]: Supplied overwrites is not an Array or Collection of Permission Overwrites.
message.channel.overwritePermissions(message.channel.id, {
SEND_MESSAGES: false
})```
xwait
tf
why did i overright permissioons for channel
I want to overwrite it for everyone
howtf do i do it for everyone
I am
how can i filter
is this incorrect
let modLog = message.guild.channels.cache.get(r => r.name == message.settings.modLogChannel)
thanks
Recommend using ID instead of name
Ah
.cache.filter() instead of .cache.get()
Or that
find is probably better for your case
message.channel.send(giveaway).then(message => {
message.react("🎉")
message.react("🗑️")
})
const filter = (reaction, user) => {
return reaction.emoji.name === '🗑️' || user.id === 743582307545382932;
};
const collector = message.createReactionCollector(filter, { time: 5000 });
collector.on('collect', (reaction, user) => {
console.log(`Collected ${reaction.emoji.name} from ${user.tag}`);
message.delete({ timeout: 0 })
.then(msg => console.log(`Deleted message from ${msg.author.username} after 5 seconds`))
.catch(console.error)
});
break;
its not deleting the message when i react with \🗑️
its not deleting the message when i react with \🗑️
723081690792067143
guess what
THATS your id
not 743582307545382932
you put your filter with someone else's id
can i make it that the user that send it is the only one that could delete that?
you need id to match btw
also dont put message author id there
i'll break cuz you obfuscated your original parameter @tardy hornet
so how do i make it that it will delete the message?
no now its should work?
this
let message = a;
function(message) {
console.log(message) //this message isnt tied to the message up there cuz you obfuscated it
}
``` @tardy hornet
i put that instead of something ?
either that or clone the original to something non blocked
message.channel.send(giveaway).then(message => { message.react("🎉") message.react("🗑️") }) const filter = (reaction, user) => { return reaction.emoji.name === '🗑️' || user.id === 743582307545382932; }; const collector = message.createReactionCollector(filter, { time: 5000 }); collector.on('collect', (reaction, user) => { console.log(`Collected ${reaction.emoji.name} from ${user.tag}`); message.delete({ timeout: 0 }) .then(msg => console.log(`Deleted message from ${msg.author.username} after 5 seconds`)) .catch(console.error) }); break;its not deleting the message when i react with \🗑️
@tardy hornet message is getting defined twice wtf
Your command handler uses message and inside the .then you also use message use smth like msg inside the .then
this should be &&
or not
that won't even work since you're comparing a string to a number using ===
Please explain further?
ok
i put the code into my computer and it worked
Ok
and the "hosting site" is glitch?
Do js devs just hate making standalone functions or something? I see so much lambda
How i can get all GuildId in my database using Mongoose
You have given us nothing to work with
You select the collection and document and list it all
const mongoose = require("mongoose");
const guildSchema = mongoose.Schema({
guildId:String,
autorole: {
"roleId":String, "enable":Boolean
},
warn: [
{"userId":String, "times":Number, "reason":String}
]
})
module.exports = mongoose.model("Guild", guildSchema);
This is the model
i want to get all guildid
what do you mean? Join them jn an array?
ye
const ids = [id, id]
Is that a string?
yes
Do you mean programmatically or manually?
Oh it's 1 string
Map {
'701141875628834906' => { logs: undefined },
'264445053596991498' => { logs: undefined },
'739395982206435408' => { logs: undefined },
'702171250843189278' => { logs: undefined },
'714780705208401942' => { logs: undefined },
'738159964727541851' => { logs: undefined },
'733706979029024888' => { logs: undefined },
'716406704350167042' => { logs: undefined },
'728842019795107840' => { logs: undefined },
'728310017333395517' => { logs: undefined },
'697244506881392713' => { logs: undefined },
'724408456185905164' => { logs: undefined },
'584256963907682304' => { logs: undefined }
}
Map {
'701141875628834906' => { logs: undefined },
'264445053596991498' => { logs: undefined },
'739395982206435408' => { logs: undefined },
'702171250843189278' => { logs: undefined },
'714780705208401942' => { logs: undefined },
'738159964727541851' => { logs: undefined },
'733706979029024888' => { logs: undefined },
'716406704350167042' => { logs: undefined },
'728842019795107840' => { logs: undefined },
'728310017333395517' => { logs: undefined },
'697244506881392713' => { logs: undefined },
'724408456185905164' => { logs: undefined },
'584256963907682304' => { logs: undefined }
}
this will happend
yes
guild.map(async(g) => {
await bot.log.set(g.guildId, {
logs: g.log
});
console.log(bot.log)
})
this was the code
output is up there
You'll have to do [...map.keys()] to get an array though, map.keys() returns an iterator
what does sync and async mean
You'll have to do
[...map.keys()]to get an array though, map.keys() returns an iterator
@cinder patio i still didnt get it
wdym ?
do anyone know why my glitch is not opening
it says internal server error
but opens in incognito window
@weak rain glitch suck now
Stop using Glitch, & get a VPS or what not
i have a host]
Which host? @weak rain
u know anything about websites
Oh, I use Magicnethosting.com (which I DON'T suggest), & GalaxyGate.net (which I suggest)
message.guild.channels.delete();
how would i use this command correctly to delete the channel that the message triggering this line was sent in
to delete the channel
message.channel.delete()?
idk what i missed when checking docs but channel create and delete wasnt there
maybe it will help
thx
What's your d.js version?
shivaco it worked 😄
eyy nice
is their any other site where we can make websites
yes
where
but they will gives u subdomains
i need free
some sites
u need to pay
You need to pay the other guys where you bought the custom domain
try this
if i import project from glitch will that work
u mean from glitch project ?
hm
idk u have to commit and push files to github then netlify will auto change the site
hm ok
Anyone know how to hide use name?
u can't

এন
huh ?
No
bengali
pls english
ask bengali only in #memes-and-media
u can't
@earnest phoenix no
-nobeng

What?
I am Hide my profile picture

but how to hide use name
Please tall me
You can't
wait
Also your english is a little bad
or ,
@weak rain thank you
@earnest phoenix http://lmgtfy.com/?q=How+to+hide+my+discord+username
For all those people who find it more convenient to bother you with their question rather than search it for themselves.
Also your english is a little bad
@earnest phoenix lol
And you're not supposed to ask those kinds of questipns in #development
lol
google it by ur self
100000 IQ
development ain't for LOLing around too
unless you are LOLing about development stuff

he said 2 lol times
i said 2nd lol
for
And you're not supposed to ask those kinds of questipns in #development
@earnest phoenix this
xD
@earnest phoenix pls give a name that we can talk normaly
for example
hey thunder
hey code913
hey fuckboi69
we're getting #general now
ok then
imma wait for QA
can you generate png images
wdym ?
@weak rain bengali?
@earnest phoenix #general
you can talk Bengali in #memes-and-media @earnest phoenix
@earnest phoenix maybe i saw my friend made a photoshop sofware with c++

Is there any npm thingy for generating png images
idk google it
pnggenerator
I wanna make cool profile card
canvas, jimp, imagemagick
how to disable user mention?

@earnest phoenix why the f are you asking those questions in here
Sorry
goto #memes-and-media if you wanna hide names someone might help
@sterile thicket wdym ?
How do I make my bot @ a user but the user won't be mentioned
allowedMentions in client options or allowedMentions on the send method
refer allowedMentions, not disableMentions (this one just adds a zero width space and nothing else)
for example send("content", { allowedMentions: { users: [] } }); can't ping any member or roles
kk, thanks
that's that i use for my noembed commands
Flaz
sup
Wrong channel
People can develop without uploading their work :l
I'm making a command that creates a new channel then sends a message in that channel, how would i find the id of a channel that i just made with a custom name
const args = message.content.slice(PREFIX.length).trim().split(/ +/g);
const command = args.shift().toLocaleLowerCase();
if(command === 'new') {
message.guild.channels.create('ticket-' + message.author.username, {
permissionOverwrites: [
{
id: '736325193689071667',
deny: ['VIEW_CHANNEL'],
},
{
id: message.guild.id,
deny: ['VIEW_CHANNEL'],
},
{
id: message.author.id,
allow: ['VIEW_CHANNEL'],
},
],
});
message.channel.send('Your ticket has been created')
const Embed = new Discord.MessageEmbed()
.setColor(0xe44f28)
.setTitle(':palm_tree: Thank you for creating a ticket :palm_tree:')
.setDescription('Please state what you need help with and our Staff will be right with your shortly.')
.setThumbnail('https://media.discordapp.net/attachments/743405345812250674/743506547639844874/WINTERFALL_TRANSPARENT_icon.png?width=751&height=677')
client.channels.get().send(Embed)```
Await the creation of the channel and then do <channel>.send
the channel will use a different name per command, so i cant just use that, is there a way to find the id of the newest channel?
message.channel.send(`Deleted __${args[1]}__ messages.`).then(msg => message.delete({timeout: 2000}));
why is not deleting the message?
sorry im not sure what awaiting is
so i use await then i use the same way i made the name to find that channel?
Yes that
so what do i put in promise?
// option 1
let created = await message.guild.channels.create(...)
await created.send(...)
// option 2
message.guild.channels.create(...).then(created => {
created.send(...)
})
option 1 requires an async function
imma take notes about that
client.on("message", async message => { ...
my head hurts lmao
why ?
no like the whole code sent
Ah
im quite new to js so i dont know much
the await keyword lets you wait for things to complete and then continue
but the await keyword requires a special context known as an "async function"
all you need to do to create this context, is to add the async keyword to where the function starts
async(message)
all functions that return a Promise require awaiting in one way or another, unless you dont need the return value, but even then its better to await so you dont get unhandled errors
if you head over to the docs, you can see which ones return a Promise
for example
@quartz kindle are u a teacher who teach ppl in university ?
cuz u explain things so good
if you check the docs for channel create, you see this
you scroll down, and you will see this
that means the create function returns a Promise that contains the created channel
which is kinda the same thing as let createdChannel = message.guild.channels.create({options here})
but since its a Promise, you need to add the await keyword to it
let createdChannel = await message.guild.channels.create({options here})
so i do client.on('message', async message =>{
yes
this will make everything inside this code block behave asynchronously, and this enable the usage of the await keyword
asynchronous means the code can do many things at the same time
so it will still respond to other commands while its waiting for the channel to be created
so then i use await created.send(Embed) to send the embed to the new channel?
yes
let created = await message.guild.channels.create(...) do i use this line when i create my channel as a replacement or after its made?
created.send(embed);
console.log("This is working in one time")
////
await created.send(embed);
console.log("This will work after the bot sent the embed")
@cosmic robin you use the same code as you already have
you just add the await keyword before it
and assign the result to a variable
How can i add Tic tac Toe game to my bot?, i made bot in js
someone has code Pls ping me
we won't spoonfeed

I do have ckde
Of dank memer
Just search up the tic tac toe code on https://github.com/MrBoombastic/Dank-Memer
@earnest phoenix
Thanks a lot!
Lmfao that's not my code
Just see their code
And figure smth out
Should I make my own npm package bois?
API down or ratelimit handler waiting for ratelimits to reset
@slender thistle but this seems to never end
Weird
like it could be fetching for 10 minutes until it finally gets a response
Are you sure your library isn't fucking itself up by any chance?
this only applies to /users/:userId, everything else seems to be fine
perhaps
i'll maybe check if /users/:userId has a queue and/or fetch using node-fetch myself
wait dank memer is a open source bot ?
no
No
99% of dbl certified bots (aka the biggest discord bots rn) are private source
dankmemer used to be open source
Dank memer has his code available with a license
okay what is this, i fetched yesterday night and went to bed because it took too long, 2 HOURS and 46 minutes HOW
how to make a disocrd.js bot say the current time?
I need a code to hug someone both using id and ping
what language
@next horizon
Whoops, sorry you had the same nickname :|
what language
@sacred pewter
let userId = (msg.mentions.members.first()) ? msg.mentions.members.first().id : args[0] //If a guildmembers has been mentioned get his id else default to first arg
@sacred pewter
that wont work, will it? also don't spoonfeed
you need to use the ternary operator
Why wont this work?
if there are no mentions first will return undefined, using id on it will throw an error
Good point,
thats an O(n) lookup btw, bad code
store the result of first in a variable to prevent looping over it again
also again avoid spoonfeeding
yoo
i just need youtube video info module
I'll use it to get a picture of the video.
channel.get('744497498881654784').send(Embed); can anyone help me correct this code, im sure im just missing something obvious
do you have any suggestions I could not find
there's this magical thing, https://google.com
Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for.
cry i did
https://www.npmjs.com/package/ I've checked all the modules..
ytsr?
Yes, its on npm
You should have found it if you looked trough ALL modules
you just dont know how to use google
@earnest phoenix not works
dark mode
all wants video id
It should be in the first couple
lmao
what kinda criminal r u
im trying to get video id + thumbnail
channel.get('744497498881654784').send(Embed);
can anyone help me correct this code, im sure im just missing something obvious
@earnest phoenix https://www.npmjs.com/package/ytsr
send full of code bruh
send full of code bruh
No
It isnt hard
@wary flame ytdl-core gives thumbnail? you know?
no one is going to write code for you
This isnt ytdl-core
unless you pay them that is
This is ytsr
i just asked bro
sad
it does





