#development
1 messages · Page 1826 of 1
slash command
you get creative when you're facing the issue yourself
When 'GUILD_VOICE_STATES' become privileged, that be an explosion
i cant even think of 50 commands let alone 200
what type of commands were they
and 50 being, them weird commands like hello
and it'll say hello back
Technically I have more than 80 commands as of now, which some of it is subcommands under 1 main. most part is weeb stuff
guilded is going to release their api to public soon. also, the message intent doesn't really affect me now unless I'm doing moderation stuff that require to delete other's message
r the msg intents out yet or?? no
nope
Isn't it 9 months till that happens?
As long the bot does not involve reading other's message. You are safe
Which I think 99% here do with old message command
I only have the deploy command that still using normal command. I think on it to fully move to slashies later
they realized no one uses shitty slash commands so they're now forcing it lol
At least I have no fear of ppl accusing I'm spying on there chat now. Lol
your message data is collected by the bot to give you the best user experience
i aint gonna move to / command anytime soon
Why
yes
It's better for the user
You get an easy to use UI for interacting with the bot
No more !help <command>
well, imagine remembering the prefix for each bot
even I sometime forgot what my arguments look like
i forgor
Is it possible to check if the bot can send a message in DM channel without hitting the error with djs?
it is u just need to log the message in console
What should I do with the message in the console?
How do I check the memory usage of my bot on a linux VPS? (I'm hosting on Oracle btw, if that helps)
Nvm, got it
Hey anybody know about pyarmor?
I can't find anything in the docs about that but I saw smth similar with Dank Memer support
Try asking the big brains of djs support
I tried to check this before
Theres no way to do this, even if you did try once then cache it it might change in between
Just send the user the message and if it fails send a message in the channel
You HAVE to send a message, you can only catch it
icic
I love pm2
message.author.send("anime").catch(_ => message.channel.send("not a weeb"));
I used pyarmor
I used it and it worked but it requires its own modules which are in the same folder as the file and i want the file alone
then can you help i wanna share that file to someone but dont want the code to be revealed
Yeah sadly discord doesn't provide functionality for checking if you can send a dm to someone afaik
pm2 is just a ez access handler there is no use of it but i use pm2 because i am lazi to open a terminal lol
sus
^^
ok so you're sharing code with someone without revealing the code?
I just use it to run my bot as a service on my VPS, the resource monitoring/dashboard is just a plus
we dont have waffle in ma countri
I want to do that but not able to that is why i seek help
Docker gang 
Let the bot send but add a catch, if it's triggered you know they have dms disabled
How i can add my bot 24/7 it's music bot
You can apply on the website.
Anybody wanna help me with a logic/math problem? I'm using node-canvas, which allows me to place images onto other images. I'm tying to place images (example forest image) in the center of the grey rectangle. the grey rectangle's coordinates never change,but the image dimensions vary greatly. I think I can handle the math for properly sizing the image, but where I get lost is on how exactly I place the image so that it's always in the center https://cdn.tanners.space/N7Jg
cease
Because Canvas' behavior is to place images from the top-left of the image (0,0)
so centering the image in the gray rectangle
ye
U told ti me??
did you have no luck with finding a midway in the coordinates?
I can find the midway easily, the issue is that when you insert the image, it inserts the image from the top-left corner
So if I insert it at the middle coords, the top left of the forest picture will be in tye center instead of what I want: tye center of the forest image to be in the center of the rectangle
can't you then find the middle point between the coordinate and the corresponding middle point?
yes
try (box width - image width)/2
same for height
In which website I can add my bot 24/7
For hosting?
I hosted it on replit but sometime it goes offline so I want to make it 24/7 online
Get a vps
does anyone know how to get steam ids from usernames in a bot
You mean by Steam URL or vanity name?
i want to input red and get blue
You gonna resolve it using the Steam API, get the Steam ID 64 as response and can work with
You can’t resolve the "personaname" aka. nickname.
But…
You can resolve the Steam URL and vanity URL like I said
A bot for that already exists… just to say

i want to add it to my bot so people dont have to use steam id to find their stats
Yeah makes sense but searching for the Steam nickname is not supported via the Steam API and you will never know if the result is the right Steam account since tons of results will be available usually searching for a nickname
how can I see total downloads of a npm package?
But as I said you can fetch convert any form of Steam IDs to the ID you need to work with as well as the URL to the account
That’s pretty much anything you can do to get a 100% save result
And I can guarantee you that since I wrote a bot doing that 
download statistics for NPM packages
lol it was a good time for me to ask
It was indeed 
could someone explain the difference between Interaction.defer, Interaction.followUp, and Interaction.reply in Discord.js v13?
Theres an example how the bot works if that helps you
If so we can talk about how to later on
You need to lookup and convert a Steam ID or URL, BattlEye ID or Bohemia player ID? Were providing a responsive tool for you: https://converter.tools.dedns.org/ The tool will convert any Steam URL, Steam ID, BattlEye ID or Bohemia player ID. (incl. Steam Vanity URL, Steam ID 3, Steam ID 64) Each ...
i think thats too few request bc 1 server its in has 600 members and another one is 4800
Oh okay yeah just wanted to show you an example how it works and what you can use and fetch by the Steam API
For example if people are pasting their profile URL you can use regex to get the Steam ID 64 of it
(as long as it’s not vanity URL of course)
ok
thank you
steam.getUserSummary('76561198146931523').then(summary => {
console.log(summary);
/**
PlayerSummary {
avatar: {
small: 'https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/7f/7fdf55394eb5765ef6f7be3b1d9f834fa9c824e8.jpg',
medium: 'https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/7f/7fdf55394eb5765ef6f7be3b1d9f834fa9c824e8_medium.jpg',
large: 'https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/7f/7fdf55394eb5765ef6f7be3b1d9f834fa9c824e8_full.jpg'
},
steamID: '76561198146931523',
url: 'http://steamcommunity.com/id/DimGG/',
created: 1406393110,
lastLogOff: 1517725233,
nickname: 'Dim',
primaryGroupID: '103582791457347196',
personaState: 1,
personaStateFlags: 0,
commentPermission: 1,
visibilityState: 3
}
*/
});
i want to do the reverse of this basically so i input this DimGG and receive this 76561198146931523 then use the SteamID64 Dec to search using TRN api
That’s possible since DimGG is the Vanity URL in this example NOT the accounts nickname
You can build and request the vanity URL and will get the Steam ID 64 as response
But you cannot search for the personaname (nickname) in your example
oh god my physics teacher says RBG instead of RGB
Stop using your phone while being in school 
Red black grey
for js, hw cn I empty an object and replace with new data to the same object.
Redsus blasted Grey
umm
obj = {stuff}???
Is the object a constant?
r u sure? i got it to work
Stop using your phone while driving 😉
yes
Why will you use const for an object you need to change
lmao shhh I’m actually doing rn
Don't do that!
Maybe they want to have the same reference every time
?
Creating a new object means creating a new reference to that object
for(const key of Object.keys(stuff)) {
newStuff[key] = stuff[key];
delete stuff[key];
}```
for in exdee
var flazepe = { is: "a weeb" }
flazepe = { is: "still a weeb" }
i dont see what's wrong here
flazepe now points to a new object
const obj = {
a: 1, b: 2
}
const objRef = obj
const dataToReplace = {
b: 5, c: 0
}
// Now I want obj to be dataToReplace but objRef should still refer to obj. So it have same content as obj even after replace
Hope that makes sense.
You'll have to clone the object in this case
delete every property inside objRef and then Object.assign(objRef, dataToReplace);
If you hit me later on the day let’s say in 7-9 h I’m at home again being able to send you some example code
(#development message)
That will clear the data of obj too
you have to clone the object
Object.assign({}, objRef, dataToReplace);
yes that what I want,
how do I delete all properties?
@rocky hearth
Discord slash commands taking past an entire hour to show up on a bot makes me want to strangle the devs.
same
"New command idea, too bad I have to wait an entire year to test it"
Why not test first using guild commands?
beta bots with guild commands only: 
Once you're done push them globally
That's what dank memer does
I tried doing guild command but it wouldn't appear either.
Lemmie try one more time to make sure.
It should work fine with guild commands
you have to refresh the channel
It's a mess
i have the same problem too
It will not show up, like wtf? Lol
Refresh the client
I have trust me >_<
Uninstall and reinstall Discord
Hmm, kick the bot and then invite it again
Hmm
are you sure you gave it the interactions perm
not perm but flag idk how it's called
switching to another channel and back should do it
scope
yeah scope
10x zoom
application.commands
yes, and admin
did you give it bot 
cache
ok dont bully im a nube lol but im printing to console but i want to define id
define what
id in the template string
id is undefined
i guess
id exists in that scope
Put that code inside the then callback
but not outside of it
Furthermore, notice how a class can practically implement as many interfaces as needed (there is a limit of 65,535 due to JVM Limitation).
dang but i want to have my class implements 65536 interfaces
There are slash comands (even not in dev!). You can use discord-buttons.
Disbutt
Dis 
Dis but nah
if I fs.writeFileSync() and if the file already exists, does it gets ovewritten?
yes by default
hey what can be the best way of storing images.
I need to store 1 image per server. and i need to access them frequently for welcome cmd
the best way is to let your operating system handle it
store it using the file system and assign a specific file name
basically just throw the images inside a folder with each image being assigned an ID
@fossil vault
okk thanks
storing the image in your database can be quite inefficient
yeah and would take much space as well
so, what do you mean by adding the script
I mean speaking of the slash commands
I haven't watched any tutorials yet
Ok, I mean whatever really XD
when it comes out I'll ask
since im on java with my bot, im not that much of a help with js, sorry
Oh, ok
and depends on the lib youre using, if it supports interactions yet
we'll see
I have a similar setup i guess
it won't be too difficult to change
depending on how you want to go about things
as easy as possible 
if you want to respond to a user via an interaction you'd have to regex a few things
if you just want the bot to send a plain message you'll be fine
by that I mean slash commands
okk
discord calls them all interactions
and it isn't too much different other than discord handles the arg splitting and processing for you
Yee
I mean
I am pretty sure that there will be a lot of guides about that too
once the change hits live
so I think I'll manage
to understand it better then
yeah depending on the bot it most likely won't be that difficult to change
if you have some feature interactions do not support you have to wait for discord to add them
they're adding tons of things such as text input etc
which could be used as a follow up message
I mean not really, only text input I have is with the clear command really
then it's pretty easy
write a line = get embed
what is the difference in these two statements?
fs.mkdirSync("./temp/src", { recursive: true })
// and
await fs.promises.mkdir("./temp/src", { recursive: true })
Which is better?
second
First one blocks the event loop, even if it's for a short amount of time it's a bad practice
and event loop blocked = your whole program gets stuck
Thanks man this works perfectly
Now I just need to figure out how to scale the image properly lol
Shouldnt be too hard
hmm yes
i wanto check if a folder exists or not
but there is only fs.existsSync not fs.promises.exists.
if the folder not exist, I want to create it.
fs.existsSync also checks for folders afaik
yes, but that method blocks the event loop
would it better to just make the dirs with
fs.promises.mkdir("./temp/src", {recursive:true})
no matter if th ey exists or not
Yeah use stat
you know if you looked at the docs before asking here you would've found all the answers a long time ago
stat returns metadata about the file so it can basically be used to check
the docs even say to use it instead of .exists
I do, aware of that method. I just want to go with better approches
only use blocking sync methods if you're either doing it once in the lifetime of the program or making a quick and dirty script
that's my way of going about it
or if your program in general doesn't have any async tasks
isnt fs.stat is for files? I want to check for the folders
Is (message.guild).fetchInvites() not a valid function?
works on dirs too
just checked
Im trying to use it, but it crashes the bot with the error: TypeError: guild.fetchInvites is not a function
maybe the message was sent in DMs?
Nope
it should work
what library version are you on
and can you console log message.guild
just to make sure
const guild = "7736727265252626894"
probably
I am currently on main
"discord.js": "github:discordjs/discord.js"
run npm view discord.js version
12.5.3
But this isnt the one im on
This is discord.js
wait
This is the version I Am on
^
can not providing intent be an issue?
I asked in the discordjs discord, and apparently it switched to <guild>.invites.fetch()
:/
Guess the docs arent 100% done
by default the docs are on v12
I set the docs to master
you have to manually switch them to v13
use discord.js@dev not discordjs/discord.js
I am
yes
Ok awesome
but u shown this?
THats my package... Not exactly sure why it displays that
how can i delete used keys
god help me
How to setup the webhooks of top.gg that it'll send a message whenever someone voted my bot?
Guild#invites.fetch()
Yeah im using that
Did the inviteCreate event change?
nvm
hey
you have to write the file again after deleting
Is there a way to change the number of columns in a css grid based on the width of the device? Btw I'm using React so @media is not possible
pretty sure it didnt
In v13
hey! How do i get my twitch refresh, access tokens, expiry stamps etc. I have checked the docs and i only got like the client id. Should i really send a get request to get that info?
I may have an alternative:
flex with wrap and make all the children width: (1 / no of columns)%;
aha. Thanks!
@media is still possible with react tho
let CPU = Number(Math.round((await new Promise(async r => {
let start = [process.hrtime(),process.cpuUsage()];
await new Promise(r => setTimeout(() => r(),100));
let elap = [process.hrtime(start[0]),process.cpuUsage(start[1])];
r(100.0 * ((elap[1].user / 1000) + (elap[1].system / 1000)) / (elap[0][0] * 1000 + elap[0][1] / 1000000));
}))+'e2')+'e-2')
how to put this working right when I enable shard process
it will show the cpu of the current process only
if you want all processes, you need to broadcastEval and add the results
Honestly, I don't know how exactly can you give clues?
Thank you
not usually but this case is hard with me 😦
how so? what have you tried?
const CPU = await bot.shard.broadcastEval(`Number(Math.round((await new Promise(async r => {
let start = [process.hrtime(),process.cpuUsage()];
await new Promise(r => setTimeout(() => r(),100));
let elap = [process.hrtime(start[0]),process.cpuUsage(start[1])];
r(100.0 * ((elap[1].user / 1000) + (elap[1].system / 1000)) / (elap[0][0] * 1000 + elap[0][1] / 1000000));
}))+'e2')+'e-2')`);```
idk how to do so
just copy pass
*paste
CPU: ${CPU}
just this
and what was the result?
are you using a json database BRO
i'm trying it now i can change it later
Brazil Romania Olympic team

@rustic nova
SyntaxError: Unexpected token 'new'
can a package be created only in ts and published to npm? (not compiling the project)
Then only ts projects can run them, is it possible?
or npm packages must be written in js?
hey, does anyone know why i am getting a connect ECONNREFUSED 127.0.0.1:80 error when trying to post to get my twitch keys?
I just spent 30 minutes on a codewars kata that could be done in 1 line
Check if _str_ ends with _ending_
function solution(str, ending){
// super easy
let doesItEndWith = str.endsWith(ending);
// but how about we
doesItEndWith = ending === "" ? /* bruh momento */ true : false;
// do it the real way
for (let i = 0, a = str.split(""), v = ending.split(""); i < ending.length; i++) {
if (a.pop() === v.pop()) {
doesItEndWith = true;
} else {
doesItEndWith = false;
break;
}
}
return doesItEndWith;
}

pretty sure you can
the package doesnt even need to work
wdym
you can publish broken code to npm
you can even publish non js code
so the package does need to be in, js.
I got it
no it doesnt
people actually did
I was thinking, if the package could get auto compiled by the user.
npm has had malware libs more than once
no no no don't publish a ts-only package
just make an install script
but that makes it so people who use JS cannot use your TS package
couldnt the package get merge with the user code?
just compile it and .npmignore the typescript source files
add typescript as a dependency and put an install script that compiles it
so how do I create a package in ts. And hv the compiled code published to npm. and the ts code to github?
it it the same file as .gitignore, but for npm?
it's the same format yes
and make sure the package.json points to the compiled code
and not something like ts-node
hi.
if(message.guild.id === supportServerID) {
const supportYe = new Discord.MessageEmbed()
.setTitle('Premium Status')
.setDescription('This is the support server. It is obviusly premium')
.setFooter('Thanks for being here. :)')
return message.channel.send(supportYe)
}
if(message.guild.id === premiumStatus) {
const embedYAP = new Discord.MessageEmbed()
.setTitle('Premium Status')
.setDescription('This server is premium!')
.setFooter('Thanks for supporting us!')
.setColor('GREEN')
message.channel.send(embedYAP)
}
if(message.guild.id !== premiumStatus) {
const embedNOPE = new Discord.MessageEmbed()
.setTitle('Premium Status')
.setDescription('This server is not premium.')
.setFooter('Wanna make it premium? Support us by buying it on patreon! (Run ++support-us command to get the link!)')
message.channel.send(embedNOPE);
}```
So this should work, and I get all the stats from config, and it mostly works, I mean the support server says what it has to, the non premium servers say that its not premium, but then premium servers say its not premium as well....
I tryed all =.
I did =. == , and ===.
what is premiumStatus?
const config = require('../../../config,json')
const premiumStatus = config.premiumServers;```
why is it config,json instead of config.json?
Then is json its
"premmiumServers" : [
"id",
"id",
"",
""
]```
you're comparing an ID to an array
thats not how it works
😐
meaning it should be
if(message.guild.id === 'one id') {
// stuff
}
if(message.guild.id === 'other id') {
// more stuff
}``` ?
thats one option, but very inefficient
to find if one item exists inside an array, use array.includes()
so..
if(message.guild.id === array.includes(premiumStatus)) {
}```
and you call yourself a professional bot developer 🤡
oh alright thanks
@cinder patio you missed his typo of professional 
why do people brag about user count?
two thirds more and I'll reach ya
why is your bot a girl
well, we're kuuhaku
hey: ```js
canvas@2.8.0 install /root/monopolyhaskill/node_modules/canvas
node-pre-gyp install --fallback-to-build
sh: 1: node-pre-gyp: Permission denied
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! canvas@2.8.0 install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the canvas@2.8.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.```why do i get this canvas error when trying to rebuild my npm packages on my vps.
if I'm sora she's shiro
where is that from again?
no game no life
try with sudo
oh wait
is that heroku?
no
no
which host?
ok then, try with sudo
Galaxygate
sudo npm rebuild?
no not really
?
you have a root account, so you shouldnt need sudo
or did you create a new user account?
with sudo it install tho
.addOptions is not a function
nope, still running on root
that makes no sense
yeah i don't know either tbh
its a msg menu tho?
show the code so we know why isn't it a function
a minimal error message doesn't say much
const {MessageEmbed,MessageActionRow,MessageSelectMenu} = require("discord.js")
module.exports = {
name: "help",
alias: ["commands","cmds"],
run:async(msg,args,client,cache)=>{
const prefix = cache.jsonFiles.get("config.json").prefix
const color = cache.jsonFiles.get("colors.json").default
const emb = new MessageEmbed()
emb.setColor(color)
if (!args.length) {
const categories = cache.functions.get("getCateg.js")(cache,prefix)
const slct = new MessageSelectMenu()
slct.setPlaceholder("Command Categories")
slct.setCustomId("slct-categ")
console.log(categories)
for (const categ of categories) {
const name = categ.name
const cmds = categ.value
console.log(slct.constructor.name)
slct.addOptions([{
value: name.toLowerCase(),
label: name,
description: "test"
}])
emb.addField(name,cmds.join("\n"),true)
}
const row = new MessageActionRow().addOptions(slct)
msg.channel.send({
embeds: [emb],
components: [row]
})
}
}
}
@lyric mountain
if you had shown the full error, you could see the line number from where it came from
also, you should probably handle errors in your commands
your command is async
run: async () => {}
so in your command handler, assuming you do something like command = commands.get(name)
command.run().catch()
or await command.run() inside a try catch
Nothing happens
does ts doesnt like npm symlinks?
Oh
You're doing that
I thought you'd be using something like link-module-alias
I haven't had any issues using yarn link with typescript really
now the project to which I hv to link it to, I ran yarn link local-jsonbase
What exactly is the issue
my both projects are in ts
An error of some sorts would be helpful
i did
I see
Well I don't really have an idea thenn
I've never ran into an issue using yarn link with a Typescript project
Any issues I had was solved by compiling with declarations on
ooh yes, it is "declaration:: true and not "typings": true.
Sorry, its fixed now
how to make docs for a package created by ts
using typedoc I guess
"repository": {
"type": "git",
"url": "https://github.com/whatever/testing.git"
}
// and
"repository": "github:whatever/testing"
Are they both same thing? in package.json
hey yall, i really don't know what happened lmao bot randomly went offline and when i restarted my bot, it doesn't say "bot is online" anymore, no errors
i regenerated token
look, "no errors" is subjective
if the bot isn't working properly then there ARE errors
bro lmao bot just was online for days now i see him offline
yes, that means errors
so, what are you getting on console? or isn't it even running?
so the console is empty?
yes
that means the code isn't even starting then
you said you regenned the token, did you also change it on the code?
👋
var user = message.mentions.members.first() || message.guild.members.cache.get(args[0]) || bot.users.cache.get(args[0]);
${bot.users.cache.get(user.id).joinedAt}
This is returning undefined. 👀
You could use a guild member if that's what you want
Since the user is in the bot's cache.. it's undefined.
.. but in the command, I want the user to do !userinfo <user ID> and the user id is from the bot's cache.
That's not possible, right?
what's the precision of discord's unix timestamp?
Then you can't get the time the user joined the guild because that doesn't make sense for a user
But you can get the time the user created their account
Yeah.. that makes sense.
ah nvm, it's to the second
I'll switch it to message.guild.members.cache.get(args[0]), instead.
Did I do something wrong?
if (!args[0]) {
var member = message.author;
} else {
var member = message.mentions.members.first() || message.guild.members.cache.get(args[0]);
const embedError = new MessageEmbed()
.setColor(red)
if (!member) {
embedError.setDescription(noUser);
return await message.channel.send(embedError);
};
};
const embed = new MessageEmbed()
.setColor(black)
.setThumbnail(member.user.displayAvatarURL({ dynamic: true, size: 4096, format: 'png' }))
.setTitle(`${member.user.username}'s User Information`)
.addField(`**These are information about ${member.user.username}**:`, [
`**・Username:** ${member.user.username}#${member.user.discriminator}`,
`**・ID:** ${member.id}`,
`**・Current Nickname:** ${member.user.toString()}`,
`**・Current Status:** ${status[member.user.presence.status]}`,
`**・Currently Playing:** ${member.user.presence.game || "Nothing"}`,
`**・Bot:** ${member.user.bot ? "True" : "False"}`,
`**・Joined At:** ${member.joinedAt}`,
`**・Created At:** ${member.user.createdAt}`
])
return message.channel.send(embed);
This is not sending.
any error?
Nope.
well, I see 1
don't use var
We can add console log codes to every part of a line.
Mhm. 👍
add a console.log right before "const embed = new MessageEmbed()"
to see if it's reaching there
add console.log in those places too
Let me check.
I did !userinfo only.
It logged inside the !args[0].
.. and reached the embed.. but before not after.
You are re initializing the same variable twice
did you change from var to let already?
That is not an issue.
Wait..
I figured the issue.
It's working with args but doesn't work for no args.
👀
^
Should I make it message.member?
Yes.
yes
message.author already returns a user object
While message.member returns the guildMember object?
Yes
And here you are trying to access the user object from the variable called member. Which means it (member variable) should return a member object which contains a user object
oo special border
👀
👍 👍 👍
what does it require to create a doc website for my package which looks like discord.js/docs
is there any tool for that, or it is made by themselves?
entirely custom-made
but there's https://readthedocs.org/
Read the Docs simplifies technical documentation by automating building, versioning, and hosting for you. Build up-to-date documentation for the web, print, and offline use on every version control push automatically.
and github wiki
Wait..
I realised the bot is not showing any errors at all?
I executed an unknown function, it gave no errors.
Hi, i have a problem about 403 forbidden error... Can anyone to help me please?
Is any vps under 2$ 
There probably is, yeah
yeah it's like one google search away
if you can raise that by $5, there's contabo
how 4 changed to 5 lol
I'm bad at remembering prices
how much MB do you need?

this is the cheapest I know without sacrificing reliability
there ARE cheaper vps, but they're iffy
thats a very low price
I only got 250rs in month
1/2 MB for a bot????
he asked for MB lul
You can ask your friends, than you can share a server
They can't
They have own bots
Rupees
Currency of India
I see
thats 3$, when I saw it right
like, going too cheap means sacrificing reliability, security or performance
its 3.36$
I use my Card avd get linode account
I make 1 servers in india
500ms+ ping comes in bot

unless you deal with music having a high ms isn't that bad
I also have aws
But can't work good
Ny brot can't take large ram still pm2 monitor show 500+ mb in AWS
When your Bot is less than 10 Guilds, it should use more than 70mb Ram
Ny bot in almost 400
I used linode now
Buy work speed is to slow

is there any other documentation tool, other that typedoc, for ts?
My bot isn't showing any errors even purpose errors, how can I fix this?
If I do that with discord bot. How would I than host the bot on heroku, by linking the repository to heroku?
bcoz in my repository I would only hv ts files.
what is the problem?
that is a good thing right?
No.
Suppose a command does this.
message.channel.send(thisIsAVariable).
.. but I didn't define thisIsAVariable at all.
It's supposed to error.. but it doesn't.
can someone test this: https://discord.com/oauth2/authorize?client_id=870575843183824926&permissions=8&scope=applications.commands bot (not a public bot yet, not properly hosted for 24/7 yet!)
its WiP
No, sorry
its a URL shortener + it can fetch "Whois" information from a domain name (information about web host stuff)
This is not the place to ask for that
You'll probably get muted if you ask again, just so u know
So how exactly can you feed your Typescript-based Node.js project into Heroku’s belly, along with static files?
so heroku can, compile ts. Someone told me it couldn't bcoz it has vry limited resources
I'm getting this, whenever i try to watch
but doing tsc works fine
I'm making a password strength checker. I have a strength score between 0 and 10 and a colored slider that displays the score based on how red it is. I want to make it "redder" based on the score but don't know how. How do I do this (preferably with hsl)?
light red to dark red??
green to dark red
if you want to keep it easy just assign each strength a color manually
Why bother using watch mode? You're going to redeploy and it'll restart anyway?
kinda easy
but does it have to be hsl?
like, full green means 0, full red means 10 right?
why would 0 be full green

red = 255 - (score * 255 / 10)
green = score * 255 / 10
p o w e r
it'll transition smoothly from red to green
although I'd recommend 0 to 100
to make it smoother
10 will only have 10 steps
reducing your password from 28 characters on your microsoft account to 10 for your cubemania account is power
@lyric mountain ok but how do i use red and green in my code
...rgb
ye
but imma use hex hehe
no it is not on heroku, but on my local machine.
that error has no context with the previous message
can you do tree and show the structure ?
or like the left bar in vsc
hi i have a command that locks 3 channels sending a message in all 3 channels ..my problem is bot is locking only the first channel thought bot has admin-permissions
my code: https://sourceb.in/3sAyakGFU2
seems legit
but anyway, you need to loop over the array
i have a dank server so iam doing this for that server
idk what exactly is the problem
iam still a learner
Okay do I made a pretty similar file structure and if I transpile it with tsc it goes well no errors nothing
forgive me if you dont like this
tsc works fine, but tsc -w not
it's not about liking but...don't split a for loop like that
ok, first thing that popped from the code
that loop can be converted to for...of
the reason for the first print is this:
you can't return inside a loop
I mean, you can, but it won't go to the next iteration
ohh ill check that thanks for the help :p
this is also unnecessary since .includes() already return a boolean
simplified version
so you are making changes?
Rust
Who here is familiar with thirtyfour? (Specifically, its sync version)
nope, I just copied the code and created a new scratch in intellij
Lemme see the result once so i can see what am i doing wrong
it helps finding bugs
can i see the result?
the whole code? just follow the prints
everyone decided to ignore
Probably no one here knows about it
remove the await from channels.cache.get()
add the await to updateOverwrite() and to channel.send()
Hello guys, how can I adapt my bot's commands as slash commands? So what I mean is to adapt the commands I already have to slash commands, not in addition to the main file.
what lib?
anyone know of a fast way to code leader board updating
realtime?
idealy
then your only solution is using websockets
So I'm experiencing a weird problem
so when I just do args it shows the complete args though when do .join it only shows the first letter of the args
const [ message ] = args
const [ message ] = args.join(" 👏 ")
//args
const args = interaction.options.data.map((x) => x.value);
4.3.5
Doing const [something] = text is the same as const something = text[0]
So that just grabs/destructures the first element
In this case the first letter since it's a string
It worked on args (without join, so an array) since args only have one element and it's that text
ohh
If it's just one value then you need to use args[0].split(spaceOrWhatever).join("clap")
What are you slicing
pizza
Why are all react libraries so bloated 😭
Because they're "React" libraries 
I'm looking for a react lib which allows you to create static sites with react
react-static has 71 dependencies and is 1.5 MB unpacked, and I need this for a lib myself
cant u just return an html file then?
Because React is minimalistic.
I solved that by excluding the lib folder in tsconfig.
Pheeww! 😓
for tsconfig, is allowJs by default true?
How does the last one even work
const [p, i, z, z, a] = "pizza";
liar
destructuring
yuh
p, *_ = "pizza"
wack
INSERT INTO pizza (id, text) VALUES (0, 'p');
INSERT INTO pizza (id, text) VALUES (0, 'i');
INSERT INTO pizza (id, text) VALUES (0, 'z');
INSERT INTO pizza (id, text) VALUES (0, 'z');
INSERT INTO pizza (id, text) VALUES (0, 'a');
SELECT FIRST 1 p.text FROM pizza p ORDER BY p.id;
i have a few concerns

js frameworks are so boring
あらあら~
Next.js is 30 MB 😫
Me and My Team are having issues making slash commands work. Can someone help?
yea we can help with no code and errors
I'm creating an API on the same host as my bot, the API will transfer information to my website and some users that are part of my partner system, but I'm having trouble identifying if my bot is online or offline. . Can someone help me ?
???
read the godamn website name
you're just asking for help
at least put some code and errors
Fix that. You used MY GOD’S name.
My fucking team asked me to ask here.
????
😆
well we are here to help you
you are just asking for help, and not giving us code nor errors
How can I send data from the discord bot to my website?
I want to show stats about my bot in my bot's website but idk how to do this.
either make a shared database that both processes can read from
or put a small webserver inside the bot that the website can send requests to
you are a crazy dude
Are you 12
L
Are ya 10?
That sentence couldn't have come from someone who's above 12 years of age
i didnt actually realise you were talking about databases earlier
y git doesnt hv any interface to work with mouse clicks.
y it requires us to use the terminal. bcoz its 2021.5 now
there's github-desktop if you're using github as the git server
i use vsc, instead of that
then y are you complaining
it is there, but is very limited.
We cant visualise anything
then use github desktop
imagine creating a new branch by dragging out a commit from a source branch
who needs that tho
git is made so that people can easily create their own git UIs
there is github-desktop, there is gitkraken, etc
just pick one
command line git is always gonna be faster tho
faster execution yes
faster workflow yes, if you know what you're doing
but for inexperienced users, learning the git cli can be quite time consuming
i personally use github-desktop
i quite like it
well for a long time I used GitHub as storage rather than version control
i use the side-by-side code diff comparison a lot
vsc has a plugin
yes, but its not as good in my experience
i tried it for a while
plus i like the separation between code and git
i like doing it in different softwares
jetbrains users: 
ask ur question
im basically trying to parse formdata
through fast-gateway
but its not working
its not forwarding formdata
i tried a couple of multipart packages, that didnt work as well
it needs a middleware so
@rustic nova
yup
i use restana
discord.js
djs currently only has slash commands on the dev branch
there's an faq in their server about it
OK thanks
i'll break you
mind helping me out?
Oh fuck not again 
For?
to handle his bars
I'm making a documentation generator and I can't decide what templating engine to use
Oh
I mean, there aren't any good ones to be honest
thanks Tim I was confused
you just want a templater and nothing more?
Yeah sorta
i havent used any, but the one i liked the most from a first look was the razor syntax
And I feel like I want to use React and there's react-static buuut it's so big and I don't want a dependency which is like 2MB unzipped
<p>How are you @model.name? Today is a sunny day on the planet Gunsmoke.</p>
<ul class="@(model.active ? 'highlight' : '')">
@model.forEach(function(m){
<li>@m.name</li>
})
</ul>
oooo
👀
but theres a js implementation called vash
Razor pages are hell never teach anyone that dogshit framework.
Hi
better than react.
help me how to add bot to my sever
literally click the invite button in the bot's website/page
anyone got a idea how to install youtube-dl on heroku?
just don't make a music bot in heroku
i am there
can't quite understand how to add it as a buildback
tnx
ffmpeg was easy to add
vash was last updated 3 years ago
I wonder if just using react and react-dom will work
For what exactly?
a documentation generator
I don't see why not.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
This video i am watching says get your module for you server. What is this?
It actually does 
Volt! Hey!
Can you help me?
With?
sounds like the portuguese conjugation of the verb "to expand"
@earnest phoenix ^
"ExpandoObject!"
Object expands
eu expando (i expand)
^
What video? What module?
Discord.js Bot Tutorial #12
Hey guys how's it going. In this video, I show you how you can make some basic moderation commands. Please leave a like if you enjoyed the video, share it with your friends, and subscribe. Thanks for watching the video and Peace.
On this channel, I make coding tutorials just like this discord.js bot tutorial that I ...
Wait, nevermind
I see the issue
imagine 9 months from now the amount of people complaining their bots stopped working
That will be chaos..... In the discord.js support server
but this time, it wont be limited to discord.js
it will be in all lib support servers
lmao
a massive wave of angry turkish people
well but it only affects verified bots, so it wont be that bad
xD
if this is for the wrong channel please correct me but i’m using replit to code my bot and now in the console its saying “discord.errors.HTTPException: 429 Too Many Requests (error code: 0): You are being blocked from accessing our API temporarily due to exceeding our rate limits frequently. Please read our docs at https://discord.com/developers/docs/topics/rate-limits to prevent this moving forward.” what does this mean?
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
The error is self-explanatory, you've exceeded Discord's endpoint ratelimits too frequently aka too often, leading to you getting blocked from accessing the API and making any requests to it, meaning you have to wait until they've unblocked you from the API
^^ btw im pretty sure 429 is a few seconds
so its not that big of a deal and im sure ur library should handle 429, or ur jus doin some weird stuff
ah okay thanku
= - assign a variable to a new value
== - check if a x is equal to y (without checking type)
=== - check if x is equal to y (with checking type)
does this not look wrong to you?
there is no ====
i like to use !=??
The video said to use that...
I dont know hwo to fix.
oh no
BackOnTrack
tfw you learn how to make a discord bot only from a yt video
whoops accidently done de tts
can u remove the embed pls just <link>
???
edit ur message to <https://www.youtube.com/watch?v=VMO7nRv250Y>
#development message this
where did you see that?
there is no ====
also, for future reference, your error says exactly where and what the problem is
this is the where:
file: index.js
line: 194
@quartz kindle there no error in my console but it dont kick
then you need to learn how to debug
thats the problem with these videos, they show you exactly what to do, without explaining the basics, so if anything goes not according to the video, you are left with zero information on how to deal with it
the only option you have is to review the video and see if you did anything wrong
like the ==== thing
other than that, you 'd have to learn the language basics first
what rules did i break in the first place again?
lmao
can someone asnwer this question cuz i’m wondering lol so if there is a 6 letter string with only uppercase letters and numbers how many different combinations are there
?
how
if its only uppercase and numbers?
idk but it just doesnt seem right
oh yeah
whoops
no 9 numbers?
Map<keyType, valueType>
er, i definitely knew that







