#development
1 messages · Page 1530 of 1
No, you'd just check guild.available
Oh right
How exactly would I do that within the reduce function?
Actually I was probably wrong since a number + null returns zero implicitly
Hm
It only seems to return null for memberCount though
Wdym?, it’s not that it’s just not giving him anything
I wasn't talking to you
1
@earnest phoenix You should convert the argument to a number before sending it off to the database. It might not do conversions for you
Also check if the number is NaN and if the user actually has that amount of money
and make sure it's not negative
So i used js {name:"Users Handling 👤", value: '\`\`\`' + message. client.guilds.cache.reduce((total, guild) => total + guild.memberCount, 0) + '', inline:true}, but it says NaN (not a number)
How do i fix this?
wait
lemme just take a screenshot
filter over the Collection to see if one of the guilds has a memberCount which is NaN
if there is at least 1, that's the issue
Either you're concatenating at the wrong spot, or one of the guilds is unavailable
hm
The concatenation looks correct
I'm getting the same problem
hm
Scroll up a bit and see
Filter by available guilds
const fetchedMessages = await starChannel.messages.fetch({ limit: 100 });
const stars = fetchedMessages.find(m => m.embeds[0].footer.text.startsWith(settings.emoji) && m.embeds[0].footer.text.endsWith(message.id));
i have been trying to fix this but without success m.embeds[0] comes out as undefined
Cannot read property 'footer' of undefined
I don't use sharding yet
Not all messages has an embed
doesn't matter if you're sharded or not. Guilds can be unavailable
so how do i take out the unavailable guilds?
so u think that's what it is causing it?
guilds.cache.filter(g => g.available).reduce
k
Check if <Message>.embeds[0] isn't undefined then proceeded through to check for whatever you're going for
You can use ?. or in other words optional chaining if you're using Node.js v14 or higher
wait, i'm confused? Where do i put it? my code is here
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
i am using v14 yes
where you have the reduce, put a filter before the .reduce
k
message.client.guilds.cache.filter.reduce((total, guild) => total + guild.memberCount, 0)
There, what do i put in the paratheeses
filter is a function. Do it similarly to how I showed you
k
message.client.guilds.cache.filter(g => g.available).reduce((total, guild) => total + guild.memberCount, 0)
``` like this?
Yes
k

Since that guild is unavailable, those members would not be considered in the count
oh
Nothing you can do about it unless the guild becomes available again, but user count is not something users care about
k
user cache count isn't representative of actual user count depending on the intents you have enabled
Meaning it can't login
Then it's not online
Use the debug and warn events to see what's going on in the background
case 'active-20k':
var timeout = 10000//3600000
let active20 = await db.fetch(`active20_${message.author.id}`)
if(active20 !== null && timeout - (Date.now() - active20) > 0){
let time_to_active20 = ms(timeout - (Date.now() - active20));
const active20Time = new Discord.MessageEmbed()
.setDescription(`You get 20$ every hour, it will auto give it to you in: ${time_to_active20.minutes}m ${time_to_active20.seconds}s`)
.setColor("RED")
message.channel.send(active20Time)
}
else{
db.add(`money_${message.member.id}`,random_money)
setTimeout(function() {
setInterval(() => {
var random_money = 20
db.add(`money_${message.member.id}`,random_money)
}, time_to_active20);
}, time_to_active20);
}
db.set(`active20_${message.author.id}`, Date.now())
break;
i have this command, i want it to give the user the money even after i restarted the bot, and that he wont need to type the command again
maybe I should, cuz the logs don't say a thing
store the expected dates something should occur in a database and on bot restart, reinitiate the timeouts
"and that he won't need to type the command again" giving coins on interval?
Yea you could save the dates or timeouts in a database and set the intervals again on restart, if the timeouts are not infinite, you gotta both set the date and timeout to get the left time from the last restart, but to do that you gotta listen to some events on process, to set the left time to the database
Such as uncaughtException, exit, SIGINT and SIGTERM
Or just immediately set them in the database
Then just on load, DateToFire - Date.now()
storing the date as a number is easiest
On timer completion, remove the date
@earnest phoenix breaks here const Discord = require('discord.js');
this happened to me after not touching the code for a long time
it was working until I restarted the bot
So, the code doesn't run at all? 
You should probably install discord.js
bro
are you kidding?
the bot is in 90+ servers
was running with no problems
until i restarted the bot casually
It didn't uninstall by itself
stuff happens :)
Imagine if the bot uninstalled itself, hilarious 
rm -rf /
Somebody here being familiar with C#? Need a conversation of a few lines of code to JS, PHP or whatever...
rm -rf / --no-preserve-root
anyways, it's running on heroku
Or whatever that flag was
Your heroku dyno hours must have ended
Because free dyno hours gives you only around 559 hours or something
Around 23-27 days
Technically you can last all month if you provide card details since it's still "free" so long as you only have 1 dyno running
didn't end
Are you sure?
yes,
Because if it didn't, the program should run and not die at that line
That's what it means
which is not the case
that means u ran out of dyno hours
Quota exceeded means your free dyno hours ended
you should invest in a vps
that's what I meant
anyways, I'm restarting the dynos
now it's working
wtf
maybe a server-side bug
gtav money glitch
Reasons why you shouldn't use Heroku for your bot:
- Bots are not what the platform is designed for. Heroku is designed to provide web servers (like Django, Flask, etc). This is why they give you a domain name and open a port on their local emulator.
- Heroku's environment is heavily containerized, making it significantly underpowered for a standard use case.
- Heroku's environment is volatile. In order to handle the insane amount of users trying to use it for their own applications, Heroku will dispose your environment every time your application dies unless you pay.
- And due to a lot of other issues....
how do you check if the bot is in a certain guild using guild ids?
Use <Collection>.has() on <Client>.guilds.cache
.cache property returns a Collection object
a Collection object has a has() method
Bruh, I’ve asked this fifty times no ones helping me godamit
It’s not giving The user its money
Now I have to wait really long again
how can i show only the error line in the error stack?
???
There's always going to be more to an error than just the line and summary.
ik but i have a code for that, i just want the error line
@earnest phoenix for the give command, change user_${people.user.id}_coins to user.coins_${people.user.id}
because in the bal command you are fetching user.coins_${people.user.id} and in the give command you are fetching user_${people.user.id}_coins
Alrighty
why would you change them to add?
whats it showing
Wdym?
show what your code looks like now
@quartz kindle hey yo, you're there?
why did you remove the , coins at the end
Oh yea my bad LOL
eco.add(`user.coins_${people.user.id}`, coins)
maybe

delete your json.sqilte file and try it again, maybe something is wrong with it @earnest phoenix ?
@quartz kindle You're familiar with C# or know somebody who is?
Just need a few lines of code as conversation
i think cry uses it
It added nothing to bal
Alr
@zenith terrace wtf
Wtf is that
Alr
pink invaded your file
also thats quick.db for you
also
change message.author to message.member
otherwise you're doing message.author.user.id
which is invalid
Um @zenith terrace where do I put the stuff inside it?
what?
Ok
wat
Like you’re saying to me to delete the file but won’t it effect the commands since it’s the storage for them?
Like the economy commands
quick.db creates a new file
Ohhh Alr
you lose the data thats in it
that might be the other reason why it wont add anything
or show
ye
yeye
Bal or give?
yeyeye
Lol
its in your bal code
ok
yeyeyeye
eye
and eye for an eye
Let’s try it bois
what
@client.command() # pages command
async def test(ctx):
embed = discord.Embed(color=discord.Color.blue())
embed.add_field(name='Page 1', value='this is page 1')
mesg = await ctx.send(embed=embed)
await mesg.add_reaction('◀')
await mesg.add_reaction('▶')
await mesg.add_reaction('🧺')
def check(msg):
return msg.author == ctx.author
react = client.wait_for('reaction_add', check=check)
So i want to do an if statement, do i do :
if react.emoji
# OR
if react.reaction
@quartz kindle @zenith terrace
eeee, try doing the give command first maybe?
It says it has given me the coins but I can’t see the bal now LOL
@earnest phoenix also its member, not members
Oh my bad
it might have something to do with the reason why it shows null
it should honestly work now unless i'm missing something, maybe try asking in the plexi dev server again
Hi
What’s null?
Uh no idea
Uhhh try
if(bank === null) bank = 0
Instead of “”
@earnest phoenix
And see if it works
Which line?
oh yea that might work but idk 
Lol
if (!bank) bank = 0;
or you could use a one line ternary statement
Lol
This should work
The other one should have worked but that prob a weird issue
But uh what line LOL?
where the bank line is
Ohh
def check(reaction, msg):
return msg.author == reaction.message.author
react = await client.wait_for('reaction_add', check=check)
if react.emoji == '▶':
await mesg.remove_reaction("▶")
embed = discord.Embed(color=discord.Color.blue())
embed.add_field(name='Page 2', value='this is page 2')
await mesg.edit(embed=embed)
Error :
File "c:\Users\K I N G\Desktop\Discord bots\a bot\bot.py", line 35, in check
return msg.author == reaction.message.author
AttributeError: 'Member' object has no attribute 'author'
I honestly havent used quick.db in a long time to remember that ur code could be helpful lol @halcyon kite
Lol
Nope didn’t work
Ooof
@slender thistle ey, we got a py user here
Hm
oh wait
What could the problem be?
Huh um lol
True
yes
Lol
I dont know py that well but try reaction.message.member
Um so what should I do guys?
Wait so
Ur quick.Db think
replace user with people
well idk then 
Alr
that was my only suggestion
And I guess member is author
@halcyon kite so umm people.coins_?
lol

Wtf
I’m confused what did you mean to say LOL?
Nono
Awnser this
Anyone good with discord.py?
I swear I forgot the name
`?
Yes
So my
ctx.guild.get_member(userId)
Why does this return None, even though the member is in the guild?
Let coins = eco.fetch(coins_${user.Id} )
Forgot to put backslash
But u know
That’s how Db should work
Hm, so uppercase L?
Alr Alr
I’llretype
lol
DiscordAPIError: Cannot send an empty message
Let coins = eco.fetch(\ coins_{user.id} \)
There
That took so long on mobile
Bruh
Backslash
` this goes where backslash is @earnest phoenix
Replace ur coin fetch with This code
let coins = eco.fetch(`coins_{user.id}`)
np :3
@earnest phoenix use what Alina put
For coins
Bc this is will work
Ur Db prob works but it will only display null
Uhhh
message.guild.memberCount
I think
yes for djs
the status is for all servers, not just one
you cant have different status for each server
or can you 
How can I check if a user is in a guild in discord.js?
evil

tim thank god you're here
try fetching it as a guild member
if it errors, the user is not in the guild
wait let me try and word my question
guild.members.cache.get(id);?
await guild.members.fetch(id)
guild.memberCount has the number of members of each server. you need to add them together to get the total
I'm making a website
the main feature of the website is uploading files, having them read and "validated", and then store the files
I'm using express
what i need to know is:
- Can i read files as they're sent to me through express without having to physically write the file to the disk (to then write them to disk after being validated)
- Can i then write a file somewhere then store an ID and get it from a directory to be sent as a download
the file format is .cgp which holds text
also my vps is down so i cant run any tests
yes and yes
sounds like pog
client.user.cache.size
users not user
the only thing that i dont have a grasp on is how to read the file as it comes in
what does a backend receive a file as over http
probably multipart-formdata
how can i read it without external stuff
Nevermind, I wasn't fully read up on intents
1 shard per server 
Can someone help me with setting up the carlbot moderation and automod?
no
no we're not
You may want to ask in the bot's support server.
restart the bot each time it joins/leaves a server to reshard
it doesnt look like express offers a way to do it without middlewares
but it does have its one middleware
night
@pure lion gnight cutie
cant you technically shard the fuck out of the bot and have a shard take care of each guild?
thats a terrible way to do things
im well aware, but its doable, no?
yes it is
no dont
hi Erwin
hello
hows it goin
nO
drunk, so good
no invite?
invite for what?
drinking
smh yall drunks
Okay so I have a bot in visual studio code and to have it online 24/7 I tried using heroku but I wasn't aware that localhost database wouldn't work with it so unsure what to do next 
as of now it's online commands that don't require postgres works
its not fully doable
how come?
with 100 guilds and 100 shards you will likely have a bunch of shard with 1-3 guilds and others with 0
nooooooooooo
got nuff' ram
why do you want 1 shard per guild?
for shits n giggles
^^
ah ok good reason
aight, back to coding gainst my will
you can move to a VPS but it requires somewhat more configuration
ohh that's actually quite clever
yea it's a terrible idea in practice
good bye hf
per guild presence 

shards can have their own independent presences
since presence is websocket onlx
only
and sharding allows you to establish multiple different websocket connections
fun concept in theory
pain in the ass in practice
so i tried 45 shards on a bot with ~40 servers
not gonna wait for them all to connect, but up to shard 15 this was the guild distribution
is that the chrome js console
wait can you shard as a self bot
no
if i'm allowed to ask
kinda
oh electron?
oh okay
nwjs
setInterval and periodically update it
lmao dblstats has a shard ranker and your bot would probably be top 100 lmao
lmao
tbf you're never going to find the golden ratio, there's always going to be one shard with two or more guilds clumped together because of guild creation date
ye
you might be able to do it if you increase shards to stupid numbers
1000 shards for 100 guilds has much lower chances of getting duplicates
same with 10000
is a bot with 10000 shards basically a DOS attempt?
discord just might refuse the connection
there is probbaly a max of around 2500 shards
or something
would take 10 days to connect 10k shards
LOL
becuse of 1k per day limit
there is 1k per day?
ye
on identify ya
if you're a large bot your limit gets increased to 2k iirc
people who test in prod are gonna be sad
yea makes me sad
85% of this guild
I would say more like 10% of this server but 90% of the devs
i don't test in prod often
but when i do everything is fucking broken
because 90% of devs dont have a big enough user base to warrant undisturbed uptime
there is no userbase too small
it would be easier if there was something to mock the API (rest+gateway)
isnt there something like that already?
just selfhost discord api smh /s
just make your own application called bisbord
this one seems pretty recent
i made an e2e testing thing but its quite different from mocking an API
i tried the whole creating mock guilds but that would just become difficult to maintain
this seems neat
@quartz kindle are you ok? https://million.is-a.computer/files/SUrfHUAQFUHjE31z.png
so true
xDDD
lmao

For shards do you recommend having the amount set to "auto" or is manually setting it better?
auto would be fine since it sets it to the recommended amount of shards determined by the client
auto will be approximately 1000 guilds per shard
there are pros and cons for having more or less guilds per shard
I have like 7 shards right now in 7k servers
Some people said I should have more shards since music is sometimes laggy apparently but idk
more guilds per shard:
- faster startup times
- less disconnections
- less network overhead
- less memory if using the sharding manager
less guilds per shard:
- more redundancy
- failures affect less guilds
- less downtime except for full restarts
i have 4 shards for 7k servers rn
Is yours the AstroBot
ye
yup
Hmm I guess 7 should be fine for me then
jesus christ
it only hits home how big bots are when you look at how many users are using it
thats a shit ton of people
Wow lol
@earnest phoenix u're still here?
yup
cool u're familiar with C#?
yeah
sure
CheckKey() is creating an UDP socket to the host
It transmitted a hash of a Steam ID, called BEGUID
just need the conversation of the socket connection to the host
I'm not sure if the hash is transmitted encoded, as bytes or whatever
byte[] receive_buffer = new byte[1024];
Just need the response string response = Encoding.ASCII.GetString(receive_buffer, 0, recv).Remove(0, 4);
byte[] send_buffer = Encoding.ASCII.GetBytes(CreateRequestString(key));
I'm not sure how the string is send exactly
The var is called buffer... is it a buffer in bytes or not?
ah ok
then it's just sent over the socket
is there a socket port defined I don't see?
ty
Hello, my bot suddenly stopped working today, I start it and after a time I get an error : janv. 17 00:55:38 pokpok.fr nodejs-example[1400]: Bot couldn't start! Error: Something took too long to do. janv. 17 00:55:38 pokpok.fr nodejs-example[1400]: at /home/damien/bot-discord/node_modules/discord.js/src/client/ClientManager.js:40:57 janv. 17 00:55:38 pokpok.fr nodejs-example[1400]: at Timeout._onTimeout (/home/damien/bot-discord/node_modules/discord.js/src/client/Client.js:436:7) janv. 17 00:55:38 pokpok.fr nodejs-example[1400]: at listOnTimeout (internal/timers.js:554:17) janv. 17 00:55:38 pokpok.fr nodejs-example[1400]: at processTimers (internal/timers.js:497:7)
Any idea?
Do you remember what you changed before it caused that
setInterval and use setPresence inside of the callback
@odd stratus I didn't change anything
"Something took too long to do." Does your bot connect to a database or anything 🤔
This is all I found https://support.glitch.com/t/discord-js-something-took-too-long-to-do-error/8302
client.setInterval
🤦♂️
🤔
@odd stratus I have 2 tokens, one for the bot, and one for beta tests (the same bot but only on a private discord room). And it looks like bot can connect with beta token, but not the public token (after 5 minutes of waiting I get the "too long" error).
how large is your bot
^ And where is the bot being hosted? Glitch?
on my own server
,
it is working fine since months
large ?
how many servers
Can you check the Discord developer portal to make sure your bot hasn't been flagged or anything?
I don't know, more than 100
but it uses very low resources
have you tried this?
I already and I found that token has been reseted (looks like it's what happens when bot connects to service too much times in a day)
I'll try "debug" now
token is already regenerated, it is fine
I haven't a login error
(with a wrong token I get a login error)
sadly, not much more info : https://wtools.io/paste-code/b3m0
error comes from discord.js/ClientManager, I feel confident that something changed somewhere, but not on my side 🤔
Remove node_modules and reinstall everything then
If its coming from discord.js's file
that seems to be something with heartbeating or somthin
And this is the log of the server using my beta token (it works fine here) : https://wtools.io/paste-code/b3m1
you can see the magical line : "Server is listening on port 8026"
I'll try, I need a smoke pause first, I'm bored with this 😄
But if it's working with another token...
No need to reinstall anything
Well if its just an issue with the main bot you might need to contact Discord
I don't see exactly why it works on one bot but not another
yes, same code, I just change a boolean "IS_BETA: boolean = ..." so it uses another token
how can i make it like go to the next line when its full?
<div style="display: flex; justify-content: left;">
<div style="height: 80px; width: 80px; padding: 10px; margin-left: 10px; border-left: #00ff4c 5px solid; background-color: #23292e;">
<img src="https://imgur.com/WRyF1TO.png" width="60px" style="margin-left: -2.5px;">
</div>
<div style="height: 80px; width: 80px; padding: 10px; margin-left: 10px; border-left: #00ff4c 5px solid; background-color: #23292e;">
<img src="https://imgur.com/WRyF1TO.png" width="60px" style="margin-left: -2.5px;">
</div>
</div>```
for this*
flex-wrap property iirc
ty safe!
flexbox is epic isn't it
member count doesnt work
const promises = [
message.client.shard.fetchClientValues('guilds.cache.size'),
message.client.shard.broadcastEval('this.guilds.cache.reduce((acc, guild) => acc + guild.memberCount, 0)'),
];
return Promise.all(promises)
.then(results => {
const totalGuilds = results[0].reduce((acc, guildCount) => acc + guildCount, 0);
const totalMembers = results[1].reduce((acc, memberCount) => acc + memberCount, 0);
message.client.user.setActivity(`a.help | ${totalGuilds} servers`, {
type: 'WATCHING',
})
return message.channel.send(`Server count: ${totalGuilds}\nMember count: ${totalMembers}`);
})
.catch(console.error);
```
I am kinda bored and not sure what to code next. Anyone know some cool framework or api i could have fun with?
js
making an api or framework would be fun.
how about a discord.js clone
to be honest that would be too hard for me I am learning things 

the basics of api's are pretty simple.
react.js :)
oh yea react
Yeah I am already doing that xd
ok 
@misty sigil @odd stratus Looks like it was an API version issue. I was on 11.6, updated on 12.5 and bot looks like it's starting ("Server is listening on port 8026"). I can't test it actually cause I first need to migrate some parts of my code...
d.js 11?
rrriiiiiiiiight
Djs 11 has been deprecated for a long time, generally best to not expect reliability from deprecated stuff.
yes... I didn't care of NPM updates since a long time
still need to migrate my code and do a real test... It's 4 AM here 😑 ^^
ha i was fixing something for 4 hours, realising it was an easy fix
oof
lol
I'm not a js dev buy I'm pretty sure you can find the answer by googling "how to remove element from array js"
i did that
And what did you find?
some methods but their not what i'm looking for
I just wanna remove something without the position
k
how hard is it to scroll a bit down
I think a set or list would be a better option. Arrays are pretty inefficient when it comes to finding specific elements
I don't think that's what i want. i just want the bot to find an element and remove it. Like i'm making a command. then i use args for the user to specify what to remove
yeah pretty sure one of those 9 solutions works
i'd say Array.filter is the most flexible one
Worst case scenario you have to loop through the entire array to find one element.
oof
pretty sure filter works fine.
uhh so i tried js premiumServers.splice(guildid, 1) but doesn't remove anythign
heres how i defined things
that's not how it works
const premiumServers = [ '779410338336210954' ];
const guildid = args.join(' ')
premiumServers.splice(guildid, 1)```
oh
What solution do i use?
premiumServers.splice(premiumServers.indexOf(guildid), 1)
the easier solution would be Array.filter i think
splice takes an index, not a string
just look through the link that was posted, they specify which ones work for values
i might be able to help, might not, since i dont know what your question is about, no idea :p
Wait i send u Ss
My bot again and again
Say like that
i am in voice channel
After my bot says
U must be in voice channel
Now solve it please
i cant solve this, i dont have enough info.
alright I have a big brain question
I need to check if files with the same name are different
without caching the buffer
and they have the same name
+ file.ext
- file.ext
+ file.ext``` I need to check if the files are the same or not the same
are you using node?
indeed I am
you can use statSync from fs
it returns a Stats object
that has a size property
yup
const check = fs.statSync(file).size;
if (check === lastFile) return;
else lastFile = check;``` looks like this should work
ty
Hey, guys! Woo, do you use the discordjs client?
Or, at least, does anyone here actually use the 'sweepMessageInterval' options attribute on the client?
Are there any cons to its usage?
See example for wait_for with 'reaction_add'. It returns a tuple of member/message (can't remember the exact order)
Is bot cache fully ready at the time of getting the member? Are you using the guild_members intent?
What does your condition check look like
I didn't realize that I had to apply for members intent. That's my bad
Ah
Damn intents
😫 Help plz
?
You could also use a hash of the file bytes
Let the sizes ever be the same
idk how to get hash
I asked you what your condition check looks like, you can't expect me to be able to help you if you can't answer a simple question @sudden olive
All langs have a function for that (or a lib)
Just search "[lang name] sha256 hash"
Yes
Are you sure you're calling it from the correct place? Try ./
Ok
generating a hash would require you going over the buffer
you're not caching the buffer though so
Make sure you're calling it from the right directory
realistically you are never gonna take a screenshot with the same size as anther screenshot unless you take a screenshot of the same thing, then why would you want it uploaded
Well, yeah, but like, instead of saving the buffer you'd save a 64-char string
That's what I meant
j
Btw, nice keyboard
Thnx
i creating Play.js command when i got this error
Wich error?
that error
if(message.content.startsWith(prefix + ['cc', 'ok'])) {
console.log('works boysssss')
}
why it no work

unless you cant use an array oor i formatted it wrong
pretty sure you use ['thing, 'thing]
oof
It'll concat into "prefixcc,ok"
Iterate over the array
you can use array.some()
if (['cc', 'ok'].some(x => content.startsWith(prefix + x)))
hM


i dont really need it as a command lol
im just trying to see if discord supports this
since i dont feel like creating aliases
Supports what?

Like, it's not about discord but about coding itself
getting info from a array to implement into a command
well discord.js is the lib im partially coding into
You're only constrained by js itself
Friendly tip: spend some more time and make a command manager
Aliases are nice
i like overcomplicating things lol
command aliases are kinda poggers
i made a 300 line eval command and a 110 line ping command
yes but one day you might code useful things
im making a bot that gives soap suggestion
that is wildly practical
lol
woo is supposed to be helping >:(
welp brb
i gotta finish this bot so i can start finished soap bot so i can implement the league api
have fun
also
p.s: in this instance content would be undefined because it isnt mentioned anywhere else
can anybody help me with this. What might be the problem?
pretty sure you meant message.content doe
Aka example
can you send like
the error
i cant tell hwere it is
and im not reading threw all of that

> shadyantra-api@0.3.0 dev D:\shadyantra-api-master
> ts-node --files src/index.ts
D:\shadyantra-api-master\node_modules\typescript\lib\typescript.js:53240
function getBaseConstraintOfType(type) {
^
RangeError: Maximum call stack size exceeded
at getBaseConstraintOfType (D:\shadyantra-api-master\node_modules\typescript\lib\typescript.js:53240:41)
at getTypeFacts (D:\shadyantra-api-master\node_modules\typescript\lib\typescript.js:62711:37)
at getTypeFacts (D:\shadyantra-api-master\node_modules\typescript\lib\typescript.js:62711:24)
at getTypeFacts (D:\shadyantra-api-master\node_modules\typescript\lib\typescript.js:62711:24)
at getTypeFacts (D:\shadyantra-api-master\node_modules\typescript\lib\typescript.js:62711:24)
at getTypeFacts (D:\shadyantra-api-master\node_modules\typescript\lib\typescript.js:62711:24)
at getTypeFacts (D:\shadyantra-api-master\node_modules\typescript\lib\typescript.js:62711:24)
at getTypeFacts (D:\shadyantra-api-master\node_modules\typescript\lib\typescript.js:62711:24)
at getTypeFacts (D:\shadyantra-api-master\node_modules\typescript\lib\typescript.js:62711:24)
at getTypeFacts (D:\shadyantra-api-master\node_modules\typescript\lib\typescript.js:62711:24)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! shadyantra-api@0.3.0 dev: `ts-node --files src/index.ts`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the shadyantra-api@0.3.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\sshukla\AppData\Roaming\npm-cache\_logs\2021-01-17T06_07_47_585Z-debug.log```
it is coming from ts
my project works fine on my machine, but not on my frnds machine
Use git
can diff node version might be issue for ts
Probably
I'm on, 1.15 and he is on 1.12
Perhaps this can help? https://github.com/millsp/ts-toolbelt/issues/154#issuecomment-739419344
I'm amazed the ratelimiter in dblpy hasn't worked for like 3 years
And no one noticed
Very well maintained lib
i blame the maintainer.
stares at shiv

yes u
@opal plank Francis apparently stole the request method from d.py
But I guess he didn't bother with the ratelimiter
Can't blame him, neither did I until now
no!
hehe
whyyy
i pushed changes to dblapi.js because no one codding it >:(
Are you sure you can maintain dblpy though? 
hi does anyone know how you can get a list of all roles that the ctx.author has on a server discord.py
ctx.author.roles
make sure ctx.guild isn't None (the command is ran in a server)
dblapi is depreacted though, thats why nobody uses it

its now node-sdk
Are you familiar with Sphinx, discord.py, typing annotations, PEP 8?
I hate being consistent with the docstrings
limit: int[Optional]
The number of results you want to lookup. Defaults to 50. Max 500.
offset: int[Optional]
The amount of bots to skip. Defaults to 0.
I'm such an idiot 
hello sir I wanted to tell you that I cannot code my bot and start it I suck in development I need help to do it I am on such no pc but do not want and I am autistic et I’m fresh
I’m fresh
I’m French
How to use CSS in text
hi
@wanton knoll in your long description?
i need help to do bot with dashboard
@drowsy grail @earnest phoenix
In this
that's a discord codeblock
because that isn't valid css...
can you come in dm@earnest phoenix
cant help in dms
How to make it vaild
and idk how to make a bot dashboard anyways
send valid code???
also #development is not a place to ask for help with codeblocks
i have new bot for SABOTEURS LIST @earnest phoenix
...ok than #general ?
bruh this works only on desktop
he IS on desktop
yep
Wow this is scam
yea
yea right
can some one help me !!!
But I can see color messages
how da fuck are they gonna keep a textarea box in sync with the styling on every keystroke
only py and js supports on mobiles
you can SEE color messages but not send them
Uff
1234567890 haha only py and js supports on mobiles
i forgot we're in #development
lol yea
"a"
who cares
Yeah

if py and js work on mobile what does this appear to you
Well, it's not exactly a dev discussion
I'm not doing typing annotations for this shit
what does this refer to
Rule 5
Sorry
just use function.bind() 😃
List[Dict[str, Any]] 
uh
@flat pelican there's nothing wrong with the type
ik discord.py and typing annotations

@sharp python embeds?
can i maybe find a person here to teach me how to make economy commands?
you will only find someone who links you to a tutorial
you can use any database the flow inside the commands / events is the same
thx
query = ""
for key, value in opts['colors'].items():
query += f"&{key}={value:x}"
q = query.lstrip("&")
This is probably the only efficient way I could find to make query params from a dictionary
I don't think using a boolean in this case will improve the performance?
or apparently it does...?
Eh. The difference isn't that significant in any case
how to check if there's an emoji in the message content?
Custom or default?
custom
like if i want to do <emojicreate :emoji:, how would i make the bot fetch guild emojis to get the :emoji:?
I'm trying to create an event that triggers every 2 weeks and lasts for 2 days. I'm using Js, can someone give me an idea of how i would be able to do that?
Hi, my message event is taking around 5s after a message is sent and it happens on my VPS and on my local machine, and I don't know why, can anyone help me (using discord.js-light)?
Here's an example
how long does it take the raw event to come in?
hi







