#development
1 messages Β· Page 1547 of 1
it says you have unlimited process types and they are always on
Will buy u about 5 VPSs
im paying $3/mo for mine
I've only used contabo, so I can only recommend it
im on galaxygate
tim using heroku confirmed
arghh
thats not what i came here to resolve lmao
lmaoo
he fought against heroku to get his price down to $3/month 
oooo finally
Finally contabo has a logo lul
finally contabo no longer looks like a scam website from 2005
Lul can't disagree
The cloud logo means Contabo Cloud Computing
huh?
Which is A E S T H E T I C
i'm surprised you guys aint using AWS?
helppp
await await await await blablabla.send("timtimtim")``` @quartz kindle
Aws can be a bit overkill sometimes
And it's not the cheapest of the dudes
isn't there a free micro tier?
iyakkkkkk
how do i do the how to see how many servers bot is in?
Free is never good
on glitch.com 
Imagine swastika
how do i do the how to see how many servers bot is in?
Get the size of the guild collection
i have google's free tier but i dont run anything important on it
how do i do that π³
What lang?
because google and aws have horrendous disks
js
client.guilds.cache.size() i guess
oh
Don't quote me on that tho
hi, does anyone know how to make bot responding to another whitelisted bot when using @commands.command() decorator? i'm using discordpy
I might be mistaken since I'm not a djs bot dev
@quartz kindle ey, instead of await a bunch of times
return return return return tim.send("bla bla bla")```
i'll quote you
Noooo
huehuehue
multiple awaits work tho
returns do not, sadly
That reminds me of that English phrase
Buffalo buffalo buffalo Buffalo buffalo buffalo
For those who doubt:
https://en.m.wikipedia.org/wiki/Buffalo_buffalo_Buffalo_buffalo_buffalo_buffalo_Buffalo_buffalo
"Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo" is a grammatically correct sentence in English, often presented as an example of how homonyms and homophones can be used to create complicated linguistic constructs through lexical ambiguity. It has been discussed in literature in various forms since 1967, when it appeared in Dmit...
100% grammatically correct
English is a meme
english is not a language
its 3 languages wearing a trench coat pretending to be one
It's js
i go slep nao kthxbye
Kthxbye
How do I check if a person has a specific role via ID in Python inside of a command?
Wikipedia articles are satisfying.
role_id in member._roles
I got it already
welp
Who were u replying to with that?
He was replying to your message. Not a big deal about him pinging you
And its best not to randomly put things not related to the conversation
np
@slender thistle Did anyone ask anything the delete in the logs?
Maybe
Ah
Would recommend tagging the person who asked next time, as they seem to have deleted their message
Why the underscore?
it's for internal use tbh
Ya, it's a dict, ain't it
d.js has that too, they're just an array of IDs instead of objects

How do i fix the status of my bot? My bot is in 77 guilds but the status of the bot is 76
It is interval
Sounds like a cache issue
Should i update mydiscord.js package?
I assume its alreadu v12,but if it isnt, make sure to update. But i dont think thats related to ur error
you're probably using the same string you declared when you had 76 guilds
instead of updating it
hi
How do I adjust the different positions between the handphone and the PC? because I coded css on the PC and when I saw it on the handphone the results were messy and didn't fit on the PC
I thought I gave that guy the link to docs for creating roles
You can make a separate css file for mobile screens and do something like this
<link rel="stylesheet" media="screen and (min-device-width: 800px)" href="style_mobile.css" />
Media queries are one way
Yeah
Or that
I find that way to be more neat, but yeah, media queries inside of your already existing css can also work
Preferences I guess π

pong
be sure to also add a viewport meta tag
<meta name="viewport" content="minimum-scale=1, initial-scale=1, width=device-width, shrink-to-fit=no" /> works the best for me
You can also simulate a phone screen in the inspect element menu, at the top left there's a button that looks like a phone/tablet
Or ctrl-shift-M
I need some help please can anyone help me???
-ask2ask
Don't ask to ask.
Just ask your question, it wastes time if you say "i need help" or "can someone help me?" instead of just saying what the problem is. Save your time and other people's time and just ask the question.
Please read https://dontasktoask.com/ for an explanation on why this is an issue.
ping
Why is this error showing ???
Your bot grew suspiciously fast
What can I do??
what is there to help, wait a month or so and let it organically grow
You can't do much other than wait
Hoe many times the problem solve???
I'm sorry?
The error is over the one month
no it's not
Ooo ok no problem
Patience is key π
If you have any questions related to verification, don't hesitate to ask on discord.gg/discord-developers
Just wait
Ok
isn't inorganic growth having too many guilds from the same user
just click on join
I have only 10 Server
You cant verify your bot if you only have 10 servers
then you wouldn't be able to verify 
My bot hit the 100 server
what happened to 90 of them
If you asked so I share the bot link then check
But again, you need to move to https://discord.gg/discord-developers for issues regarding verification
100
but as marco said, ask in discord-developers
Ok
I already join the Server
There are I already asked
But not reply
people did reply
said the same thing as i did
you have too many guilds that are owned by the same user
third time you're being told now
I have only 10 Server
using css, yes.
yes that's fine
cleraly noy, to get to verification you need 75+
i made mine spin 
how?
do you mean 10 as in 10 servers are owned by the same person^?
thats 15% of all of your guilds being owned by 1 user, thats sus
prob a bit more
just wait a month for that to go away
So what can I do
You could filter the colors to be able to choose a different color. can't Remember how i did it once
wait for a month
One Month is already complete
Wait yeah i did was ${<client>.guilds.cache.size} while on 76 guilds how do i update it??
that wont untrigger it
Every 1m??
it takes time to get rid of that
just remake the string everytime @earnest phoenix
couple days iirc
He would still need to get rid of the inorganic guilds though, no?
theres nothing to be done for that one apart from letting it do its thing
as cry suggested, leaving severs that are owned by the same person might help, but there isnt much that can be done for suspicious growth
suspicious != inorganic
yeah, my bad
Yeah, I just assumed that it might re-trigger if it's still just in the same guilds
orange logo through css for example
just with filters
Quick question, I'm doing some funky web scrapping shanigans.
So I'm using .replace(/\s+/g, '-') to replace all to - for URL purposes.
Additionally, after the fact, I'm checking the item in the URL for special characters and replacing them to - as needed as the URL uses the - character for quite literally everything special.
Lets say item 1 is named miyuka's I will .replace the ' to - for it to become miyuka-s but another item would be named some' thing making it become some--thing causing the URL to not like it since it's looking for some-thing.
What would be the easiest way to kinda prevent the -- since I by default replace spaces with a single -
Apologies if the way I explained is a tad confusing 
I'd probably loop through the string, check if two - appear after each other, and remove one of them. Might be ineffective though, dunno
Hmmm, that could possibly work.
Can't you regex again to replace 2 or more occurences of - with single -? Or would that be slow
I'll give it a try, wasn't really thinking about that.
if (url.includes('--')) {
url = url.replace('--', '-')
}
Basically just do this 
why?
why not encodeURIComponent() ?
I'd have to look into it. I'm more on the basic side on JS atm so not familiar with that.
The encodeURIComponent() function encodes a
URI by replacing each instance of certain characters by one, two, three,
or four escape sequences representing the UTF-8 encoding of the
character (will only be four escape sequences for characters composed of two "surrogate"
characters).
thx
no preblomo
Oh I see. So I can define the characters I would be replacing and do a encodeURIComponent(whateverHere).replace()
Nah, just encode technically
I suppose I am ya.
I see. I'll play around with it.
you didnt specify what exactly you are trying to do with URL, so im assuming its encoding
I mean idm sharing code.
i just need to see some example of that in practice
whats your source and whats the desired output
for example, that miyuka's thing
It wont make 100% sense but.
url = 'https://www.ge-tracker.com/item/' + itemStuff.itemData[indexOfItem[x]].item.name.replace(/\s+/g, '-').toLocaleLowerCase()
Ignore the incredibly ugly array thing after the URL but it's just grabbing the name of an item in a json array I have saved.
So an example URL after everything would be https://www.ge-tracker.com/item/twisted-bow and the item name is twisted bow
this is stuff for parameters, if you're adding paths, then you'd want to continue using replace()
why doesn't the logo color change?? aaaaaaaaa
post your css
^
uhh
you're having trouble with greedy?
Greedy?
let me get a regex rq for you, this should be a good remember for me
Ah sure.
aight
afaik, this is because your bot is in server that has a same owner, i've got it too when i want to verify, sorry if you already got the answer
and that would be the URL that they want
see how it can be rather annoying since the end - wouldn't be accepted.
Oo but I have 10 server only
oh, and your bot is in that servers? yes you can't
You can't verify your bot if it's only in 10 servers. You owning 10 servers out of a hundred means 10% of the servers is yours, which Discord has a problem with.
.strip gang
uh, he got that verification page so i think he mean he have 10 server that is the bot in, idk Β―_(γ)_/Β―
bruh reply not working
You've certainly giving me some tools to mess with and some better insite on this. As a beginner in JS, I've chosen a weird path to get better at it 
ah sure.
slice(0, -1)
that, yes
Black d'hide chaps wouls be Black-d-hide-chaps.
Black platelegs (g) - the (g) would be Black-platelegs-g on the site
Black dart(p++) would be Black-dart-p-2 since ++ = 2 for whatever reason
I picked out some more odd ones in my list
I mean, true I didn't because I did get that on my own using if's
then that should be fine, here
but those would be the only exeptions on my list
for regex i the rest are just spaces = -
message.channel.send(args.join(' ').replace(/[ *'*]/gm, '-'));
thats all there is to it
[] is a capture group
- is greedy, so it can pull as many as possible
ya I use [] for some of my stuff.
g is global, so it wont stop at first search
m is multiline tag, so it runs on all lines you provide
Basically what I've used b4 I asked here
if (url.includes('(p)')) {
url = url.replace(/\(/g, "-").replace(/\)/g, "")
}
else if (url.includes('(u)')) {
url = url.replace(/\(|\)/g, "")
}
else if (url.includes('\' ')) {
url = url.replace(/\'/g, "")
}
else if (url.includes('\'')) {
url = url.replace(/\'/g, "-")
}
else if (url.includes('(p+)')) {
url = url.replace(/\(|\)/g, "-").replace('+', "1")
}
else if (url.includes('(p++)')) {
url = url.replace(/\(|\)/g, "-").replace('++', "2")
}
its a basic regex, but should do the job fine
check for certain ways the item is named
also, bad
me
what if theres (u) and (p+)?
The the way the game works is there are these.
(p), (p+), (p++)
(u) is just that no ++ because poison is p and + or ++ is its power
i mean, if it falls under one of those, since you have an ELSE, it wouldnt fall on others
so if it has multiple, it wont fall on the others
it'll fall on one first, and then not be checked on others
so idk if thats how you do it or what shape the data comes with
ah i see what u mean
also iirc indexOf() is the most performant
let me check rq
hmmm i didnt test includes
nvm then, i dont have data to say if its faster or not
It's certainly possible that it is.
But to go off of what you said above, I just realistically check ++ first bec if it exists it'll skip the +
the way I have it it'll check + first if ++ is what im checking for so it does extra stuff
ya exactly.
It's just (p) and (u) by itself
but p is the execption since p has + and ++
for some things
then else if should work, just make sure you dont use else if if you have multiples, otherwise it'll stop at the first one it finds and not run the rest
i'd probably run a slice and switch tbh
I'm always checking a single item with the code I'm working with because it's a page system if a user searches an item and multiples are found with the word they type
what about this?
let str = 'test';
let ending = str.slice(str.indexOf('('), str.length);
switch(ending) {
case '(p)': {
//struff
} break;
case '(p+)': {
//stuffs
} break;
//etc
}
rather than all those checks
i see.
let me just check this rq
sure.
#development message won't do?
Totally missed that my b
message.channel.send(args.join(' ').replace(/[ *'*]/gm, '-'));
let ending = args
.join(' ')
.slice(args.join(' ').indexOf('('), args.join(' ').length);
switch (ending) {
case '(p)':
{
message.channel.send('String ends with (p)');
}
break;
case '(p+)':
{
message.channel.send('String ends with (p+)');
}
break;
//etc
}
probably the most performant
I appreciate the information
no preblomo
why do you join the args like 5 times
they would have a string
join it once and store it in a variable

@cinder patio i explained here how it works
ikik

sometimes regex is just the way to go
You know you're dead inside when you leave TODO's like these https://i.imgur.com/7fnvg6E.png

oh dear. I hate refactoring
sometimes bonking people for overusing regex is just the way to go
it's not overusing in this case
it's making your code more simpler
and less performant
not really
avoid using regex whenever possible
the bigger the string you provide, the worse it gets
rule of the thumb: avoid regex unless necessary
its powerful tool but its also really shit
I agree
@pale vessel
indexOf vs regex
and thats inputting a very small string
is that correct?
if(message.content.startsWith(";verifyrole")){
if(message.member.hasPermission("ADMINISTRATOR")){
let verifyrole = message.role.id.first()
if(!verifyrole) message.channel.send("Try sending the command again, but tell me which role ID to set as Verify role!")
else {
message.channel.send("I set the verified role!")
}
}
}```
message.role.id.first() that's not correct
you want that to be a role ID, right?
yes
Well do you have a command handler? If you don't, then it'd be better to use mentions instead of ids
you can get the id from the mention
ehm
what is a command handler? π€£
oh I forgot that
I can make mention
with <@...>
Lol no. Role mentions would be a terrible idea. Imagine having to at a role and every user be mentioned just to set it as a verification role
actually yeah
the administrator will set the verified role in a staff channel if they know their work
Always assume the end user is retarded
thats true
and if they want a verification role, members will note have it
bcs they just created it
Perhaps they didn't just create it
you gotta account for "what if"
really, the best way to go about things is to make a filter function which filters over if the ID equals what the user passed or if the role name includes what the user passed
You could accept role mentions as well and just replace the < and the & and the >
But you shouldn't encourage role mentions because admins will always have permissions to mention every member in that role and there is no way to suppress that mention from their end
You could also use slash commands when they come out officially for discord.js
wew
You just send the code ._. , because I don't know how to correct the code. one more thing, what is the code for a menu with a three-line symbol?
You just send the code ._.
I don't spoonfeed
You will never become an expert if you have people do it for you either 
uhh
That would be #menu-trigger
can not. I tried changing the color, but the color didn't change
db: mysql
error: (node:26356) UnhandledPromiseRejectionWarning: Error: Operand should contain 1 column(s)
query: SELECT (total_paid_cents, user_id) FROM donators WHERE patron_id=?
followed by an array with the patron id for the prepped statement
any help appreciated, pls ping if you can help ty
Oh, for the button one? That's .menu-bar and you have to use !important
background-color
oh found my issue nvm π³
okay wait
dammit i am using a tokenizer for cutom command
still can not. aaaaaaaa. can you give me the code ._.
What did you try?
change the menu button color
I meant your css
you can't know
I have never made domain based API
Like if someone does api.pgamerx.com?content=Hello+boi
Then it returns a response saying your content was Hello boi
How can I make something like that, where do I start learning
that isn't a valid url in the first place
a domain is just a pointer to an ip
they exist because we memorize words better than numbers
find a webserver for your language and start with the docs
how do i check if a message has reactions?
message.reactions?
Although depending on what language you're using and lib that might be completely different.
don't ask to ask, just ask
How to change the color of the menu button whose symbol is three lines. pleaseeeeee aaaaaaaaa
fetchusers.lb.sort((a, b) => {
return a.level - b.level;
});;
``` It is not sorting the array
ah okay wait trying
huh
It does sort it actually
wait whaaat since when
It sorts it and return a new array
welp it should work fine then
that's the thing i'll never understand
instead of creating a copy it sorts the origin
I mean, makes sense if you work with big amounts of data?
It's probably to avoid stackoverflows
user mentions can be either <@ or <@!
because discord is weird
so you have to check for both mention types
isn't <@! for members who has nickname
Hello
it used to be, but then someone proved it wrong when mobile started sending <@! also for those who didnt have nicknames
so now i dont even know
LOL
your code needs to check for both
Hmm Iβll try to add !
Wdym, check for both?
<@ and <@!
if a === "<@" || a === "<@!"
or maybe a try except
How to get friends <@&510453552418783242> I know?
use regex
what does try except have to do with this?
try:
<@
except:
<@!
something
idk
no?
try except is for catching errors
How to get friends <@&510453552418783242> I know?
there are no errors here
What the shit
i dont think you can right now:
https://top.gg/certification
show what you did
I removed the ! And then tried and then tried after with !
I want to get approval from my bot DΔ±scord
show code
how many servers is your bot in?
is your bot even receiving messages?
put a console.log(message.content) before the if
108
did you get a DM from discord?
verification server limit is 250 iirc
Yes
Isn't 100
I Already Filled In The Form
then wait
Approval granted
Approved Developer Role
Ok
does your bot have this?
Yes
then you already have everything you can get
Ok
iβm going to say the same thing here i said in general
you guys know what really sucks? when you bot isnβt verified because of a growth flag and is at the max guilds and is on the front page and has 2k people trying to invite it
Tim are you aware of this character? \x1Bc
cant say i am
what the shite is that
it clears the, node terminal when logged
there's more fun characters, try out carriage return
so whatβs the most fun character
i use the EOT char as a string delimiter lul
there's one referred to as the bell iirc
makes windows prompt noises when logged
only in windows that is
tf is an ACK character
probably something you would send to acknowledge a transmission
with old modems and serial connections
...
Ah. That would make sense. Depends on if it takes less data to send that than some other arbitrary symbol
do someone know how I can send command errors to a webhook that sends that in a channel?
you should probably not log errors to discord but rather to something like sentry
but if you really want to, just catch the error and send to the webhook
ok, thanks!
You can send messages from any shard to any channel, just some libs might hate you because they want the channel to be cached and only the shard that is assigned to that guild gets it sent from Discord.
A webhook isn't exactly necessary
Correct
i prefer webhooks
your bot doesnβt get ratelimited if something sets off a chain reaction
Webhooks are cool in their own regard, but I prefer standard rest methods
Just have good logic 
Also, pretty sure Discord doesn't like it if you try to bypass rate limits via webhooks
I forget what exactly they do if they even do anything. All I know is someone told me they do something
Also, message buckets are per channel
just donβt spam the webhook lol
just dont spam rest message create lol
Lmao. We out here
A good reason to use webhooks is that they don't require any authorization other than a webhook id and a webhook token. You can only listen to errors in your master process and use a webhook to send them to a channel instead of using one of your shards to send to a specific channel.
I mean, if it's supposed to send command error you'd better hope it doesn't happen too often :)
hey
const data4 = fs.readFileSync("./cases4.json", "utf8")
if(data4 == "Enabled"){
const myArray = [
"vase","cat","dog","duck","aww","meme","dankmeme","facepalm","hpmeme","wholesome","art","deadinside"
];
message.delete();
const randomItem = myArray[Math.floor(Math.random()*myArray.length)]
const pingperson1 = message.author.id
pingperson1.setNickname(`${randomItem}`)
``` TypeError: pingperson1.setNickname is not a function
bascially just trying to change the nickname of all people sending a message
id is a string
string.setNickname lmfao
still better than using .broadcastEval to send a message
You don't need to broadcast any eval
you can call the rest manager's methods and it'll work. Or just use a lib that isn't shit
you can't do that using discord.js and that's the most mainstream lib out there, I'm saying that for discord.js
You can call discord.js' rest manager's methods
how?
iirc, it's very jank internally and it uses a Proxy. Let me try to find an old commit from when I used v12
Without having a client instance, there isn't a documented way of doing it
it worked btw!
But i tried deleting all incoming messages, so i set message.delete() in the message handler
but it does not delete anything?
client.api.channels[channelID].messages.post(Discord.APIMessage.create({ id: channelID, client: client }, content).resolveData())
client.api.channels is not ArrayLike btw. It's a Proxy
But in your master process which spawns all the shards you don't have access to client
then you can use a modular rest interface like Snowtransfer or make the request payload manually
ah i see what my problem was: DiscordAPIError: Missing Permissions
Shards should be catching the errors, not the master
shards should be catching the errors and sending them back to the master
Perhaps for your method when it comes down to sending through a webhook, but there is no need to do that when the shards can just send to channel directly
const randomItem = myArray[Math.floor(Math.random()*myArray.length)]
message.member.setNickname(randomItem)
DiscordAPIError: Missing Permissions
any help?
Your client needs to have a role higher than the member you're trying to manage and also manage nickname permissions
my bot has administrator rights for anyone wondering
i am the owner of the server, is that why it's erroring?
Yeah. Can't set nick for guild owner iirc
aha thanks!
hwo can i convert a Map to a object?
use a foreach loop and make a new object from it
const map = new Map();
map.set("A", 1);
console.log(Object.fromEntries(map));
or that
if(data4 == "Enabled"){
if(message.member.id === !client.user.id){
message.delete()
.then(message.channel.send("CHAOS BITCHESSS! WITH THIS MODE ON THE BEAST WILL RULE THESE CHANNELS :smiling_imp: :rage: "))
}
const myArray = [
"vase","cat","dog","duck","aww","meme","dancing queen","gayboy","i suck dick","i am a retard","asshole","fucker", "dumbass"
];
const randomItem = myArray[Math.floor(Math.random()*myArray.length)]
if(message.member.id === !client.user.id){
message.member.setNickname(randomItem)
}```why is my bot not deleting my message, nor changing my nickname?
you are comparing message.member.id to false
uhh
oowh it should be !==
right
mhm
in ts, I want to have a object that has keys of type Name and values to be Name[]
type Name: 'a' | 'b';
const moves:{[key: Name]: Name[]} = {};
I tried that, but it didnt work
you should use a type iirc
Name is string
y though?
try [key in Name]
there's no index.html in that folder. You need index.html
That's how web servers usually work
I can't make an index.html file for you
Right-click, "New", "File", name it index.html, save
Well you need to have content in it of course
hmm, it did work. But now its asking to define all of the keys in Name. π
Look, move your files from provider/ to the root
and then rename home.html to index.html
that should do it
hmm.. you can also use Record<Name, Name[]>
like, not in the provider folder
y'know, like... not in a folder >.<
like this , but directly at the top level
dude no
just fucking move the files
it's not hard
From the provider folder
to NOT in the provider folder
remove. the. files. from. the. provider. folder.
yes
Finally!
yes.
yeah ok so you're one step closer
now figure out the rest. looks like a CSS issue
what
Yeah ok sure
you move the files, you might have some relative paths to change
You did all this and you can`t figure out how to use paths? C'mon.
Can I hv something similiar to Record but that dont ask to define all the keys in Name. Rather some of them
So you basically shoveled code from a tutorial to your editor and you have no idea how any of this works.
Partial<Record<Name, Name[]>> possibly?
Maybe you should consider actually doing a real web dev tutorial to learn how all this works
π u r my fav guy.
Where did you get this site "template"?
how do i find a channel by name?
who says it's a template>
channels.cache.find(c=> c.name=='name')
did not work
channels is undefined
bruh
π¨
It isn't, it was taken directly from https://chipbot.gg
kekw

what flze said
CF8 made it
then define it, dont copy paste lol
LOL
yes, thats implied in what Basant said (if you know a minimum of javascript)
bruh
i didn't copy paste it.
it worked already but i made a typo.
where did you get the html?
So Tim i am working on a Giveaway bot and it needs SERVER MEMBERS INTENT in order to work, my bot is already verified will it be able to work or should i call discord admins for help or another verifying process
Don't even ask anymore lmao
you know what
how the fuck do people even get that html
you would have to save the site
then edit it
Yes, there are services for that
if your bot is verified but does not have access to the server members intent, then you need to contact discord
what are you gonna use the intent for?
you know when the bot chooses the winners?
yes, but are you gonna select the winners from all members? or only members who react to the giveaway message?
I've noticed it runs on errors if i don't have it enabled
only them who reacted
then you dont need the intent
i am currently using a package called discord-giveaways
idk if u have any clue of it
ew
very nicen't
if the error coming from the package?
yes
can you show the error?
look into the package's source code, if they use guild.members.cache.get() then they're incompatible with intents (and quite honestly badly designed)
oh okay
what about a starboard would i need the intent too?
since it looks for reactions
also not
oh okay
you'd need the reaction intent but its not privileged
the only thing you need the guild members intent for is if you want to list all guild members, or if you want to do something when a member joins/leaves/changes
oh damn so no welcome
yes, no welcomes
also I've noticed that the userinfo doesn't show the online offline or anything like that
that has to do with the intent too?
what does priviledged means exactly?
means you need to apply for them when verifying your bot
and explain why you need them
and be separately approved for them
oh okay
and if your bot is already verified, you need to contact discord for them
yeah i'll need to contact them then
they are only allowing it for bots who have good use cases for them
i dont think they are accepting welcomes and status commands
they do
and the xp stuff too?
xp stuff doesnt require them
well i guess you can try then
i've seen people being denied tho
I'll give it a try
yah it depends
made a good welcoming system and i don't wanna throw it
Hello guys do i enable requires oauth2 code grant ?
no
unless you need it
Where?
ok thanks
I just want to know who cloned it
PepegaBlind
This site: https://chipbot.gg/ that you blatantly copied π
NO
Oh my
you copied someone elses site
Omegalul

Right
"Template" sure man
lul everything is the same
For React Reducer: Can I read values from the state?
function reducer(state, action) {
// I want to log the state content from here. Is it possible?
}
well yes, you literally have the state as an argument there...
just log it
state is an object
hi need some help
what are u trying to extract?
with?
Well, how do we know?
like, what's the desired result?
```if (message.content.startsWith(${prefix}ping)) {
message.channel.send("Pinging...").then(m =>{
var ping = m.createdTimestamp - message.createdTimestamp;
let embed = new Discord.MessageEmbed()
.setColor("RANDOM")
.setTitle("Ping Info")
.setDescription('Gives the ping of the bot')
.addField(Your ping is ${ping}ms π )
.addField(Websocket heartbeat π³: ${client.ws.ping}ms.)
m.edit(embed)
});```
don't use message creation times for ping
ok
i think maest o us do tho
also, it's saying undefined because fields have 2 args
you haven't provided 2 args
.addField is required a second parameter
'your ping is', ${thing}ms
but that won't give the ping of bot -> gateway, only discord's messages ping
well, I mean, noone will notice the difference actually
ok
how did you find it 3 days ago when you literally asked this yesterday https://i.imgur.com/GoUvf5i.png

LMFAOOOOOOOOOOOO
view page source code -> ctrl + C
time to copy and paste mee6
yes
ctrl c ctrl v
ππππππππππ functioning dashboard ππππππππππ

any suggestions for user-info command
what else can be added?
other than
id name nick roles etc
roles might give u some headache because the sheer amount of roles some people like to create
yes
see the docs, u might find some more properties for GuildMember
can u share site of the docs
discord.js right?
just remember you're limited to 25 fields per embed and 2048 (1024 for fields) characters maximum
ok
don't remember the exact number, but you also have a global char limit per ember
ok
tysm
my member wont work anymore if you do the users display name
message.guild.members.cache.find(c => c.displayName.toLowerCase() === args.join(" ").toLowerCase())
I dont really know why
Do you have the GUILD_MEMBERS intent enabled?
@umbral zealot did C3z4r#7339 share anything from where they got my website? Or do you think that they cloned it themselves
They left this server so I can't threaten them with a DMCA directly 
it wont work if the member you're looking for is not cached
"if you do the users display name" made it sound like it works if they didn't use displayName
So displayName didn't work but γβπππΎβγ did?
match?
wouldnt it be better to use fuzzy match? specially when there are names similar to urs, where its impossible to type?
but yes, you could use string.includes() if you wanted to
message.guild.members.cache.find(c => c.displayName.toLowerCase().includes(args.join(" ").toLowerCase()))```
=== is perfect match
includes() will try to match what you provided
if you were to search Not Er it would match me for example
that will match the first thing that includes tho
like if you search for "a" it will return the first user with "a" in their names
even if its something like "uhgoeurhgouehoeuhoua"
filter() would be the proper method, no?
if you want proper fuzzy search that accounts for similarity
do filter + levenshtein
levenshtein distance, a popular string similarity comparison algorithm
it accounts for string length and character substitution count
correct
i prefer something a bit more complex though
i use fuse
though fuse is a bit harder to get into based on what you sent
fuse uses the bitap algorithm which itself uses levenshtein apparently
assumed as much
but as far as lib goes, i'd much rather go for fuse
its really powerful
though, at the same time, its use case
comparing their sizes, urs would be the better options if you wanted something simple to not bloat the app
second is fuse

1.3gb node_modules folder

actually, im curious
wew
thats quite a big module folder

what do you do with so much pasta
spaguetti code 
cmon, that was a good pun

why did nobody giggle?
Sans rapidly approaching
message.content === `<@${client.user.id}>` || message.content === `<@!${client.user.id}>`
Check for <@! as well
On PC its usually ! yeah
there's actually no pattern on whether it has ! or not, ig they're slowly migrating to <@!> for compatibility issues
It's <@! if the member has a nickname
^^
/<!?{ID}>/ should work or smth
The exclamation mark in the <@!userID> means they have a nickname set in that server.
If you want it dynamic you can use template literals with || or new RegExp()
dpy has client.user.mention, is that not a thing in js?
well, discord.js
that's not what it's for though
You can do <Client>.user.toString()
client.user.toString() yeah
kewl
even so it still needs to check for <@!
there's Message.raw_mentions where it returns the ids, so you can check if the id is in the list instead. While mention property is mostly used to mention(?)
<@! Is for discord desktop mentions
Man
the thing is that they want to check if the message only includes a mention
You can literally use <Collection>.has() on <Message>.mentions
To check for the mentions
So content being entirely a mention?
right
K
Well they could use RegExp() constructor and pass in ^<@!?${<Client>.user.id}>$ to easily check for it using <RegExp>.test(), but whatever
Yea
Someone can tell me a good free host?
Check the pins, but if you're looking for a cheap one I recommend GlaxyGate
There's no "good" free host
good !== free
Contabo is another good almost freeβ’ host
I know, i just one a cool host for free
I use that too
Library of Code is one free though
libs aren't free, you just borrow them
Leaving your pc on 24/7 can also be free, depending on who pays the bills :)

Any idea what the member count a bot is expected to be across 75 guilds?
anywhere between 75 and infinity
One message removed from a suspended account.
it costs more than a decent vps tbh
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
I am making a leadboard command using mongodb and it is not show the usernames
One message removed from a suspended account.
bruh
Can you show your code?
const lead = require('../../models/thank')
const Discord = require('discord.js');
module.exports = {
name: 'thanklead',
run: async (client, message, args) => {
lead.find()
let data = await lead.find({ guildID: message.guild.id })
console.log(data)
data = data.sort((a, b) => b.received - a.received)
const lb = data.map(e => `${e.position}. **${e.username}#${e.discriminator}**\nThanks: \`${data}\``);
const embed = new Discord.MessageEmbed()
.setTitle('Thank\'s Leaderboard')
.setColor('#FF0000')
.setDescription(lb)
for (let i = 0; i < 5; i++) { if (!data[i]) break; embed.addField(data[i].userId, data[i].received)}
message.channel.send(embed)
}
}```
you actually do?
One message removed from a suspended account.
lmao



I don't spoonfeed


