#development
1 messages ยท Page 1840 of 1
Lots of server owners just give all bots and moderators admin permissions by default. You're fighting a losing battle. The ones who know what they're doing don't need a bot that does that. No offence or anything ๐
I learned my lesson wit hthat
I had a poppin discord server one time
Someone pissed someone off and it disappeared
Yeah I've seen it happen before too. Lots of times. But never on a server I manage.
User: "Hey I have a nice bot, can you add it please?"
Admin: "Sure, just gimme the link"
Also Admin: doesn't check invite perms and gives perm 8
Bot: fckin nukes the server
Admin: "ThEy HaCkEd My SeRvEr DiScOrD sHiT wOrSt SiTe EvEr"

as my old teacher said, NO amount of security will prevent a dumb user from doing dumb shit
it's like people who get their account "hacked" from nowhere
except they click sketchy links and use dodgy clients
As one of people in charge of product development at Microsoft said once in a webinar I watched, "it's not a question of if you get hacked, but when".
lul
Still manno, Its a challenge for me, I am shit at most programming and just want to do things, I used to have a buddy to program these types of things with but he kinda died in a car crash so its just me now
It was his idea before
And now I want to make it
It's a good idea to maybe check how many people on the server have certain permissions like "manage server" or "manage channels" permissions for sure. But apart from getting them to change their moderators and bots permissions, the reality is there's nothing much more you can do. Sorry to hear about your friend.
Still see it as a challenge
I like your bot idea btw
I know it will be quite useless
Good job on it
I will do it
Not useless for people who don't know any better ๐คทโโ๏ธ
With my balls of glory and fury
And tbh, when I see 20% of the servers my bot is in it has admin permissions, I cry a little inside.
Still had Wick as anti nuke on a server of mine for safety, Even though I know precisely how to set up all perms, Just in case something goes wrong or someone in a high position gets mad at me or some shit, Always wanted to make sure
Only bots I grant admin are like Dyno, And my own,
I don't like Mee6
It mentions you so fucking much it gets so damn annoying
I have mee6 blocked
These are actual stats. My bot never asks for administrator permissions.
oof
That's server owners being lazy / not knowing how to do perms.
Yeah
They just make a "Bot" role with all the perms and stick it on all the bots.
Makes sense
Does it tho? ๐
I don't make community servers since I quit that shit a while ago, But I do make servers for groups like in game servers, For example on one group, And it is quite common for spies and shit or just insiders to just having experience with perms from before is very usefull, Nothing can really go wrong in my servers, Other than the occasional dumbass who decides to post gore in general but yeah
Oh why ofc
Less work
I stopped making discord servers after I realized I was never going to be successful in growing em
If you make an anti-nuke bot though, you need to have a disclaimer somewhere saying you can only make recommendations and if people don't follow your recommendations you can't guarantee their server isn't nukeable.
Because at the end of the day it's up to them.
I made one which was very active and pretty gucci, Just couldn't be bothered anymore, I just lost interest, \
Yeah
I made 1 active server and someone blew it up cause a mod made another mod mad
Permissions aren't very friendly to begin with for users
This is true but it's easy enough to find best practices online.
Maybe, but for users (and even me), it's a nightmare
Understanding hierarchies of roles, categories, channels, and text/voice/stage/etc.
How they get applied and in what order
And the way Discord applies permissions to new and existing roles is even more frustrating
I myself still struggle with it
So everyone just wants to throw administrator and never have to think about it
and users really shouldn't have to think about it
Yeah so those checks are the best an anti-nuke bot can do.
When installing an npm package gloabally, and then trying to use its CLI, this happens: zsh: command not found: slappey
I manage this server with 400 members and I'm so reluctant to fixing some channel permissions because it's just so tedious and may accidently expose channels I don't want for a second
The average user doesn't want to go through all the permissions of bots to make sure they can't nuke the server. They're too trusting of the idea that "Oh it's a program it can't be used maliciously!"
So they just give it administrator and forget about it
restart the terminal
or make sure you have node on the path
Yeah but even if the dev isn't malicious, what happens if the bot's host gets hacked or the token gets compromised? The dev might still be completely innocent and their bot might still be able to nuke the server.
how do I do make sure
can you run node or npm
Yeah ๐คทโโ๏ธ
Pinged @everyone thousands of times before it was shut down
without doing weird stuff
as if anyone would fall for that (nitro scam)
unfortunately they do this a lot since people actually fall for them
wait free nitro where
node 17
new feature in node 17
you've got const Client twice
I wonder why you are getting this error
Fuck wrong emote
I apparently no longer have that emote since i left that server
sad
names (identifiers) are case sensitive.
(JS)
How can I make my bot to only work if a person has a role?
You don't need to create the client two times either.
Why are you declaring two clients anyway
So you may be new to JavaScript.
@sudden geyser I want to upgrade to v13
Do you know JavaScript well
Thats not how you do it
if (!<Member>.hasRole('idk if this is a function in any lib')) return
Not yet
Then let's start there
thx
yw
P sure that doesnt work
hasRole isn't a thing
why is it not a thing
Hasn't been for many versions
Agreed
Why isnt hasRole an actual function
I want it now
it was
so what can I use instead?
You have to go through the RoleManager iirc
Present, not past
<Member>.roles.has or smth
ever since they moved to cache managers they just ask you to use collection.has()
actually no
O
member.roles
How about start here: https://developer.mozilla.org/en-US/docs/Web/JavaScript
JavaScript (JS) is a lightweight, interpreted, or just-in-time compiled programming language with first-class functions. While it is most well-known as the scripting language for Web pages, many non-browser environments also use it, such as Node.js, Apache CouchDB and Adobe Acrobat. JavaScript is a prototype-based, multi-paradigm, single-threade...
Yea
dont worry guys, node 18 is out: js String.ptrototype.addRole = function() { return message.guild.members.addRole(this) }
idk if <Members>.addRole is a thing
btw
Its not
why is it not a thing?
||Yay node is finally of age!||
but if it isnt node 18 is broken
so rude man
divided by 2
u just a node hater
bc apparently if it has good function, it is bloatware
go back to assembly
what's really wack is mutating the prototype
I have no fucking clue what that means, thank you
it means that X.prototype.y = z
String.prototype.send = function(...args) {
const channel = client.channels.cache.get(this) || client.users.cache.get(this);
if(channel) { channel.send(...args); }
}
"7346587364853672355".send("hi");
:^)
No
why not?
That is actually useful
because he missed semi colon. gettin me angry ๐
Makes life easy
JS doesn't need semi colons so ha
nerd
Yes
Typically it doesn't
If you were to make an async function about something tho
then you need it
that fucks shit up for some reason
no bro it needs semicolons so much it automatically inserts them for you if you forgot to include them
so you're wrong
No
destroyed and facts and logic
Why are you questioning everything around you?
Like shouldnt you be questioning other things that are more important?
You do have a point
I dont think shitposts on a discord server is important to question
What is classified as important
I dunno, the climate crisis for example?
your classification as important could be different than flazepe's
it could be, or we could have a mutual agreement on what could be classified as important, and unimportant
right
If I value it as important to me then it is important
i forgot i can have a different view point on whats important or not than you
that is true
im not sure i quite understand what to value as important or unimportant yet
I've never had a case where that was necessary, though I've heard about it. A more trivial case would be:
let a = "b"
[1, 2, 3].forEach((c) => console.log(c));
Woo, hoo!
javascript
Also yea
based js
Not using a semi colon on a async function causes issues for me
it's because it's really doing "b"[1, 2, 3]
in most cases
how
Cause its doing exactly what klay said
(async => ())()something
it pulls it onto the same line
and makes shit weird
tf
then use them
I do
Ily
prettier at least does
I don't remember to do it all the time
so what I miss prettier does for me
when I started programming I had this 300 line eslint file
When I started programming I didn't use a linter
I think linters are fine, but I prefer to default to what the language gives me (e.g. Rust's clippy)
when i started programming, i did shitty decisions
we all did
I used vsc
do you use emacs now
now i used webstorm
Actually I dont use webstorm anymore
cause I dont program in js/ts anymore
Im swapping to the golang
Literally has Go in its name, ofc
yea so
anyways
what should i make a guide on next? i already did basic get api and command line tool
How to breathe would be good
"how to prototype pollute in JS"
i dont even know what a prototype is
who knows what anything in js is tbh
so i made my own erlpack in js and its only 15% slower than discord's c++ erlpack (running in js), not bad for a first run
Noice
Invent the next json i dare u
aka JSON5
Anyone here use wavelink?
JSON5 is amazing
erl is a bit smaller than json, but the performance diff is not worth it
wtf is a json2+3
json+zlib is pretty much the best combo
Json5?
jason 5
Or json101
are u cheating on me with someone called jason 5???
like maroon 5???
hey if you're still around and still interested, im pretty much doing this right now
sus
when both Tim are smart
I finished a game of csgo with someone called tim on my team, and he didnt do well
anyways, fr what should i make a guide on?
how to breathe is on the table ngl
how to use brain is also a good one
how to play Rush E on a piano would be a good one
Ahh a man of culture
+1
My brain isnt that sophisticated, lets pass that to the piano player tim
Yall see context menus in the API just now? ๐
I've been wanting something to be able to bookmark messages for so long...
Like a bot or something like that?
(node.js v16.6)
~1760 GUILD_CREATE packets:
json: ~41.2mb ~600ms
json+z1: ~7.9mb ~800ms
json+z2: ~6.7mb ~650ms
etf: ~39.8mb ~1250ms
etf+z1: ~7.6mb ~1400ms
etf+z2: ~6.2mb ~1300ms
z1 = packet compression
z2 = zlib-stream (synchronous)
@rose warren are u using linux? if so, ill make you something similar
No. Guess what OS i use? 
It must be Windows Iโm sure
๐
No he is deffo using Solaris
I have some dozens of laying around need some?
Sure
Damn my MacBook has a hardware issue and Apple refused the warranty shit
My username is based off....
Absolutely nothing
I dont code assembly
Yeah my next mac will be purchased from the UK or Ireland. There's 4 years of warranty there under the consumer rights laws.
I could have used ICodeInJavascript but 1 long and 2 js? lame
Ireland ๐ฎ๐ช
Every product in Ireland have 4 yr warranty?
We're hella off topic
i was born in ireland, but was happier there ngl 
p sure
Sorey
They need to swap the mainboard and Touch ID chip which will cost ~ 1000 bucks
But selling it on eBay with that issue actually wonโt result in much money I get
Itโs just 2 years old
But a good idea tho
@rose warren Is the source for your rpc open?
I just wanted to ask if someone knew how to use wavelink
No because the process also does other things like local db backups
hecc
how does that stop it from being open source though
I guess bc sensitive data
Because I can't be bothered to clean it up to share
cringe
I keep getting German ads wtf
So I want my bot to now have like music features how do I do that?
Depends, there are a few ways to do so
e.g. a library
Wavelink but idk how to use it
xD
aka be more specific
^ This is also useful
Yeah I might look it up but I code on node
For js it's called lavalink
If you use Discord.js, there's a voice library that comes separately
So pretty much it's a different library
Lavalink is the program itself
Wavelink is the library/wrapper
@pale vessel u know how to use wavelink with discord.py?
There's lots of libraries for JS too, like Erela.js and Shoukaku (based wrapper)
Visual Studio Code.
I prefer vsc if you are new you can use repl
Nah, I use shoukaku
New name Into my dictionary ๐
What are the advantages in coding in visual studio?
None?
Try it out you will find out
Ok I will set it up later
Keep in mind that Visual Studio is not the same as Visual Studio Code.
I know I used both of them
There are (probably) no advantages.
But I like visual studio code better since I used it in a Friday night funkin mod. Don't ask
if (message.author.Client) return;
^
TypeError: Cannot read property 'Client' of null
I don't think client is required
You should start by learning JavaScript.
I did
No required
Not you.
Yea i am working on it but i want to fix that
That won't fix the problem
If you want your client instance just access the property for it (message.client)
You sound like you know what you're talking about
I will try
I'm not the best but at least I tried to help
Np bro
Not working
what isn't working about it
It log the messages from Client users
Wait i will try something
Let me check something in replit
how
Searched it, couldnt find it
Only a few german companies
Maybe I should turn off my german vpn
Search in Python Package Index
cant be bothered
i have a giveaway command, but if the bot crashes/restart it wont end them, like it will just keep going after i turn the bot on (database: quick.db)
You gotta check em on startup
Really you want them to start again on startup tbh
yes if the giveaway end time ended when the bot restated, but if the giveaway end time was not suppose to end it will just keep on doing the giveaway (wont stop the timer)
What?
If the timer is up during which the bot is offline
just check the giveaways on startup
Fucking internet
and end the ones that should end
Check if the end time is less than the current time
idk how
Same
is it possible to add a bot to a server without needing to manually invite it?
Right click menu rolled out quite fast.. Have not fully read the docs
https://discord.com/developers/docs/interactions/application-commands#message-commands I guess this is their solution for message intent on moderation part? 
What
Basically like this, right click on someone message to evaluate the content
don't quote on me for that though, I have not fully understand on it
Probably the only use case I have tho 
Maybe inspect card? Idk, I don't see too much opportunity for that
same
It still too new, have not fully discover it, and of course, djs with it slow pace.. kekw
idk whats the use for context menus 
discord.js@13.0.1-dev has it
I need to do refactor(s) again for it on some codes, kekw
context menus rnt in mobile tho 
right click -> kick/ban is too hard, lets do it with bots instead
typing ban/kick commands is too hard, lets do it with context menus instead
right click -> app -> kick/ban is too hard...
we've come full circle
just delete the server, easy
tasker integration soon โข๏ธ
Taskede

I don't see much use for context menu as now, unless I want some cringe command like right click this x member - send "hug" text with cringe anime hugging
I think they could be very useful
Just right click and perform some special action
It's just up to people to find a use for it (else poof)
might be useful for others. Right now, it does not much useful for my use case
maybe when we get dialogs
For example, instead of running /sanction <user> [reason] [options] or whatever, you can just right click the offender and bring up a dialog for more details
can someone help make a slash command handler
Your library probably offers guides or an official API to using slash commands
Maybe for a game like almost amongus, right click this user for others to vote s/he innocent or not
well, make credit with my name if you make one, kekw
The issue is how to win as imposter
It's not like you can kill anyone without other people seeing
Since you can't even know who's in the channel
just by changing how bigints are read from the buffer, etf's decoding time went from 1800ms to 1200ms lol
send help
I also like to optimize things to obscurity
I like when things can run on my low end hardware
ill make channels as like areas lul 
is it possible to respond to an interaction in discordgo with just nothing so it doesnt say interaction failed?
i tried to do InteractionResponsePong but it didnt work
no that isnt possible
u could either send a reply that isnt ephemeral then delete it quickly 
Can't you ACK it?
doesnt work
Just Discord things apparently
do i need to send any data along with the ACK
I don't remember unfortunately
Sec
Integrate your service with Discord โ whether it's a bot or a game or whatever your wildest imagination can come up with.
Unsurprisingly enough this is the only thing that can help somewhat
Other than that you're shit outta luck
yea im doing that
Then yeah I reckon you'll have to make do with that
whats "ACK"?
so i have added markdown to my dbl, but the problem is, since my frontend takes the description of the bot, converts it to html:
from markdown to html
**hello**
<strong>hello</strong>
and it sets it as a html element, which is dangerous because users can type something like
hehe ur website is ruined<l>
because it treats the text as html, not a string
short for ACKNOWLEDGEMENT
Yeah 6-7 are for message components
why does it exist if i cant use it
wait it might work for components
nvm i dont think it does
wdym if you can't use it
whats the best way to detect when someone boost the server
You mean 6 and 7?
ah
Integrate your service with Discord โ whether it's a bot or a game or whatever your wildest imagination can come up with.
i dont like the interactions api
Who does?
can i cancel a deferred response
Any reason why interactionCreate would not be receiving guild specific commands?
hmm i can but then it doesnt show who ran the command
im just not receiving them at all, quite frustrating
any code?
well, I just have a console.log(1) at the very top of the interactionCreate event and run the commnad, global commands work fine, guild commands do not
yes can you show any code for how you register them
I just created them with the api before v13 even released ๐คทโโ๏ธ
Is this against discord tos? the bot watches the status of my bot. Is that against tos?
no
Ok
wait how do u even tell if a bot is offline 
<User>.presence.status === "offline" (discord.js)
How can I convert a number to as many bits as I want?
Example: 20 => 000000000000000000000000000000000000010100
alright im having issues, how do i go about deleting the last message my bot sent in a channel using only channel ID
i can get the lastmessageID of the message in a channel but i cant get the content
when i do client.channels.cache.get(id).lastMessage.content it only gives me my message
the rest are null
Is this how I log and trace the rate limit and see how many requests remaining?
!e client.on('rateLimit', (info) => {
console.log( `Rate limit hit ${info.timeDifference ? info.timeDifference : info.timeout ? info.timeout: 'Unknown timeout '}`)
})```
ok so apparently this is a problem in djs v13, so if you're going to check what type of channel your slash commands are used in, make sure to check if there actually is a channel with the interaction first
I was already checking if the interaction was a command before checking the channel type
ok
Are you checking for dm?
Use .inGuild() or check .member property
And dm become DM now
don't even think they can
Yes,If you edit every sec,recommended is 1 min
no they can't
bruh
tf
global commands appear everywhere
guild commands obv in the guild they're registered
yes
depends on the interaction
wdym
my commands are completely fine in dms
I have 2 commands
most of my commands r guild based
that require you to be in a guild
for eg. settings
since i dont have to offer per guild prefixes anymore, i dont need guilds
So when it's edited, it's not against tos?
I store other settings
lol
yeah sure, depends on the bot purpose
In which interval do you edit?
does it count as a bug or someth
I use replit
bc i feel like slash commands rnt supposed to be in dms
i have a tamagotchi bot, so it only interacts with user, independent from guilds
why? 
that didn't answer the question
since uknow there commands? 
let him Google what interval is
Yes idk what that means
e.g. mod mail and reports could be good in DMs
but i mean with emphemeral (?) messages this could move to guilds to be fair
I don't get it?
true
since only you see the messages so
yeah
imagine using ephemerals in dms :dog_kek:
but they are gone once discord reloaded, something to keep maybe in mind
It will edit the text when the bot is offline
who are you so advanced in the field of science ?

im using emphemerals for error messages to keep the chat cleaner
i mostly use ephemeral messages to keep chat cleaner 
except for some cases,
like ban warn etc.
same
is This against tos? The bot will track the status.. i just wanna know if it's against tos
I need to take a bath now brb 
should be fine, just dont spam the api i guess
yes
ok
but i guess most wrappers handles ratelimiting before you hit the limit
djs v13 doesnt anymore
well
i think ive remembered something that djs community says that v13 doesn't handles the ratelimits anymore
wdym by that?
like if you got ratelimited
stop the action or something?
it sends the request after the ratelimit cooldown is over
i have a question, in djsv13, can i use ephemerals also without interactions? like, with a โnormalโ command
yes
it resends the request
after the cooldown is over
so like if ur ratelimited for 10s
it sends it after 10 seconds again
when its no longer ratelimited
lol
dont think djs v13 do that anymore
at first glance id say no, but im not sure
i remembered me getting ratelimited, it didnt queued the req
dont ask why/how i got ratelimited but 
no
they can only be used in slash commands
article says so too
while (true) {
event.getChannel().sendMessage("To the ratelimit and back!").queue();
}

yeah im at the beach rn i cant read it lol
you can only send ephemerals with interactions for eg.
slash commands, btns, context menus
what does that do
no like in terms of ratelimiting
i mean it would spam ton of messages

its the java wrapper of discord
in my purge cmd
How would it be if I don't want it to delete pinned messages?
make discord sad
this too
but in my very first beginnings of learning JS and coding a discord bot i forgot to check if the author is a bot... well my chat was full pretty fast

smooth brain moment
bet the bot had a lot of levels/j
levels? :o
how do u find out the biggest Guild ur bots in
You want a code?
i mean i just wanna know how
or code
something like that
if its the name of the server
the inv link anything
you could compare the membercount of each guild
I can write it for you.. but I hope you could understand how I did it.. since I'm not only going to spoonfeed.
if u can do that for me
Let me write it...
that just takes rlly long
discord.js?
Yes.
okay good
Please understand the code afterwards.
let orderedMap = bot.guilds.cache.sort((a, b) => b.memberCount - a.memberCount);
let i = 0; // Start of for loop.
let msg = ""; // Starts as empty string to start adding the servers' name, member count (which you will see below)
for (const key of orderedMap.keys()) { // Start of for loop
if (i >= 30) break; // Showing Top 30 servers.
let guild = orderedMap.get(key);
msg += guild.name + " - " + guild.memberCount + "###"; // How you organise the list.
i++;
};
msg.split("###")
i dont understand what tf this is
Read the comments?
What??
Woops.
// try this
const guildWithMaxMembers = client.guilds.cache.reduce(
(guildWithMaxMembers, guild) =>
guildWithMaxMembers.memberCount < guild.memberCount ? guild : guildWithMaxMembers,
client.guilds.cache.first()
)
okay i will in a min
That returns the object.
This is the list.. depending on the user on what he wants. ๐คทโโ๏ธ
he does want the guild with max members right?
Pricesely.
By the way.. I have a question. Writing it down...
I have this leaderboard command which takes from all the document in my MongoDB database and loops around them making it a leaderboard.. now is there a way to try getting the leaderboard for the specific server the command is executed in only not the global one?
I believe I have to try fetching, do some code to get the users who has a document in the server the command is executed in.. and check if the user has a document then add him to the list?
https://sourceb.in/zLHskSoVy5
I guess you have to make separate table for each server
I would be saving the user data along with guild Id. So I could fetch all the docs having a specific, guildId
than it would go normal, as u r doing with the global leaderboard, just that, it would filter out the docs u dont need at first place
name: "HamoodiHajjiri",
userID: "528256079101034506",
lb: "all",
money: 10586811,
bank: 20
That is how I do it? (Ignore "name")
not perfect for all situation but works for me
How's the leaderboard for a specific server not global then?
do u want the user data to be same, in all guilds? If the user is in multiple guilds?
Suppose I have 10 users.. 3 users in that server has a economy document, so it will show the leaderboard for that 3 users.
for that i think you have to make different table for each server or parse threw all members in that spacific server put the data into the list and then sort it out each time when someone runs the command
Damn..
I only do global leaderboards xD
Can't I loop through all the users in the server, check if each user has a document, if so, add his ID to the array, then descend the array from the greater coins to low?
.. or is that rate limit/API abuse?
save the guildId too, in that doc.
then fetch all the docs, that has the guildId the command is ran in.
Thats how, I would do it
๐
What about this?
that would require to access the database multiple times.
I don't think?
would be very slow.
Yeah.. would be.
For each user having a document, if do, then add his id to the array, yeah, too slow.
@drowsy crag
L
mods please delete this scam link before some use it
Probably 10 people clicked already. ๐
lol
VPN? ๐ ๐คฃ
nah
.. they do get your IP, afaik?
they're likely recording whatever you type in username/password, so im sending them garbage
they cant do anything with my ip
๐
whats next? sign into steam using your discord?
Sign into discord using your steam. ๐
fill that DB
You can't do much with a private ip ,maybe track
all websites track your ip anyway
True.
use threading with python and send them packets of data with wrong id and password xD
xD
i believe someone here already did
300 response / sec
I know some dumbass developers like to use their IP for an advantage, they usually tell you (try this website), if I don't like it, they use my IP and start threatening, this is why I use a VPN.
using your ip as a threat is not worth anything
what's the difference?
/\n+/ and /[\n]+/
its an empty threat
Regex.
its like trying to scare you with a rubber knife
they both are
Uhm...
I need to figure out what \n was again, I know it makes a new line. ๐
OH.
"/[\n]+/" this is regex probably
that regex is for replacing multiple new lines with a single one
but what [ and ] is for?
/\n+/
.. basically finds a new line in a string.
they seem to match the same thing
Not only that most non third world ISPs can handle that shit anyway
let string = "Hello there.\nI am HamoodiHajjiri";
let reg1 = /\n+/;
let reg2 = /[\n]+/;
console.log(string.match(reg1)); // [" "]
console.log(string.match(reg2)); // [" "]
Weird.
they both are doing the same thing, yes! why?
u use [ ] for checking multiple patterns like [A-Za-z1-0] something like this i guess so
[ ] means a set of characters.
so here, i dont need one. right?
After further testing.. no.
try it out using different inputs that you are excepting from user
You wanna use global and multiline as flag to let the regex donโt stop after the first match
/โฆ/gm
I want a regex, to match multiple new lines, not a single one. How do I do that
Did you read what I wrote above your message?
/\\n/gm
@warm swan speak here
but i need to match this: 1/4
head to unicode dictionaries
not related to top.gg api, nothing to do with any webhooks or sorts
oh okay okay, my bad
I advice you to take revise on html for creating descriptions
like <a> and basic headers
else markdown will also do the trick
oh
wdym set the dots?
He means a HTML li
<ul>
<li>item</>
<li>item</>
</ul>
Hello people, I am trying to make a ban command but I can't figure out how to find out if a person has a higher role or not. Can anyone help? I've tried searching on google and this is what they recommended, didn't work
message.channel.send(Error4);```
member is a const for ```const member = message.mentions.users.first();```
and Error4 is an embed
Thanks in advance!
i never coded in html
* item
* item
* subitem
mhm
then use markdown
what does
<ul>
<li>item</>
<li>item</>
</ul>
``` do?
it is much easier.
Well yes or markdown
creats lists
but i won't use lists anymore
is there a eval command in the server?
wdym?
wdym?
just pass it ๐
mk
is a command to check a code
how do i set links?
the bot creator do :p
oof
i made it well dam confusng
I just made mine *
i know
im just lazy
:/
cause i made changeprefix commands
which makes me literally forget
i have that too
that wont be a problem anymore when you move to slash commands
mhm
:^)
but slash commands ain't on discord.py yet officially
how can i regexp that 1/4 to work with any number
:<
btw can someone help? xd
i will try to use the code that @boreal iron sent
rip
am using third-party libraries
like dislash.py,
but their slash commands don't even work
so-
only buttons do.
oof
cant you just use their dev version?
:/
member.manageable will return a boolean telling you if your bot can manage them or not. This applies for all moderation tasks.
why would i do that
alr ty
better than using third party libs
eh i'll have to make some changes and prepare for some instability tho
i'll take my chances then try dev versions, maybe after its beta o'll try
nah i got this
using <> can be confusing at times
nah dw
what about the other buttons?
liek text links?
do <a href="yourlink"> your text here </a>
a empty circle
oh
<a href="yourlink"> your text here </a> this also helps
50% not 50px
i use px sorry
border-radius: 50% is better practice. It'll always be round no matter how big the element is.
mhm
with regex, I want to select more than one repeating A
"helloAthereAAworldAAA" - I only want to select AA and AAA here.
literally makes no sense why you would want to downgrade tho
Eww Tim go away with your magical converter
if you alr know html what for learn markdown on the same thing :/
wut
its literally a pic from google images

XD
Me too
nice
i went through the trouble of searching for it
is it really hard
took a whole minute
:^)
..
lmao
๐
Youโre here and responding which means youโre bored anyways, arenโt you?
wdym empty?
wait
im in bed, just woke up
i used the link script
dont feel like getting up yet
holy crap
lol
perks of being unemployed
Yeah woke up 15 mins ago bc you knowโฆ something wanna gets out my body 
technically i think asking google to search for u is more efficient
then searching google manually
<button style = "border-radius: 50%;"> hi </button>
you'll miss out a whole bunch of details
ew poopoo
do i gotta change the button style?
the style element must be added
Wrong chat 
for the circly part
How lol
you need to learn css
A bed with an integrated WC + smart fridgeโฆ
Damn I would never stand up again
dayum
if html isn't ur thing
you cant style with markdown alone
mhm
you need css for styling
yeah
but you need to learn slowly
html is quite easy ngl
@warm swan if you are still lost, you can try w3schools or other docs about html
they have a pretty rich doc
Is this a spam?
setInterval(() => {
bot.user.setActivity(`I have around ${bot.guilds.cache.reduce((x, y) => x + y.memberCount, 1)} Members. Lmao!`, { type: 'LISTENING' });
}, 60*1000);```
:/
i don't code in js so eh
i am trying not to get confused
py reeeeeeeeeeeeee
can't reach that page
anyone else?
Every 60s should be ok
really?
@warm swan
It's too often in my personal opinion but... Technically...
:/
What if I make it every 6s?
Bc I am not using api, so should it ratelimit me?
Save the last guild size in a var and check if (current guild size !== last size) then update the presence, if not return
6s will get you rate limited
lol
also, why is the reduce starting at 1 :^)
should start it at 0?
Nothing usually starts by null, yes
Well... Members also doesn't mean anything either but... ๐
mhm
that sets the title page
but uhhh
not nessary...
cause top.gg alr has a title for u :/
unless its an iframe
My bot has over 1 million members across the servers it's in but only about 100k people with bot profiles. Members is a pointless statistic. They don't all use your bot.
if you're learning about html, this is important: doctype, html, head, body and script, those only apply to full web pages, not to top.gg
top.gg takes your html code and puts it inside an existing page
sigh'
the existing page already has those, so dont put them yourself









