#development
1 messages ยท Page 1023 of 1
@earnest phoenix
client = discord.Client()
if you are using discord py
if
he/she is using js i think
^
ready.js
lol
Yeah, it's this code that should display users its watching over, just comes back with error.
@finite bough That code should work for this correct? https://gyazo.com/9de1f530741daa70f56be945d9c12188
Mmm?
hmm
Error return?
Mmm
await message.guild.edit(name = "name") didnt work
soul any idea ?
the problem is not down there
the problem is invite doesnt exist
await message.guild.edit(name = "name") didnt work
@elfin flower show your full code
ye
Could you not spam like that
but not work
so do that
your doing it in the wrong place @blazing ravine
the bot doesnt have manage server perms
if(!inviter == ) return member.guild.channels.cache.get(wChan).send("๐ฅI can't find who Invited " + `${member.user}`); im using this
๐
but not work
the error is invite doesnt exist,
your doing the check if inviter exists.
but the problem is invite doesnt exist
hm
also, your perfoming the check after the error
how to return the error ?
Yes
my error this
client needs to be defined before client.on events are added
= const inviter = bot.users.cache.get(invite.inviter.id);
this is undefinned
when some1 created invite
with colldown
work only for forever invites
but i trying to make when giving error undefinned i want to return with console.log or msg.channel.send
ye
your solution to the error you put on the next line

how is your soltuion ever going to run
i put but didnt work]
if the error happens before it
nope
"verify your id"
what does it mean?
i got 75 servers and i want to verify it but it says "verify your id"
that file must be huge
your solution is on 1530
which will never work
idk how
a measure of size
ok
a byte is 8 bits
8bit
a bit is a 0 or a 1
Do I locate the pic i want the icon to change into with a string?
I feel like most the devs here use js
๐ค
any time a python question is asked it feels like it no one responds
because js people are louder lmao
they write more guides, more content, advocate more, scream louder online, etc
js is better
Ehhhhh
better is subjective
:D
I've used the most popular languages in js, python and java and I can tell you it isn't just as simple as saying "Yeah this is objectively better"
js is the best for the same reason america is the best
all others are faster, smarter, more powerful, do a lot of things better, but js is best just because
Idk about more powerful I think we displayed our power quite well in ww2
if anyone ever thinks a programming language is objectively better, they are goofballs.
its just a tool, like any other
uh
Tbh js community just feels more immature, but I haven't taken a look at the official d.py server in months now
thats cool
Ye?
wat
how would i handle a command fired from outside? express with a local server?
Where is outside
or local execution without re-login
a question randomly popped up in my head lol
Ok this is time for me to learn :3
how do i break a loop without putting break in the loop
Uh
return
you can return
an if statement, technically
but break is literally made for that, so why wouldnt you wanna use it?
Lets say i have my discord bot on. All handlers and jazz handled properly.
though i'd need to execute a code using that bot instance, but externally. Lets say i have another bot, and when i type command on bot B, it needs to be executed on bot A instance. I could login on bot B as A, execute, then close, but that'd be useless gateway connections
okay
express listening to a webhook?
how would i pass something cross clients, that'd be my question
I have no clue but I want to learn so I'm sticking around
@opal plank you want bot B to receive messages from the gateway and bot A to reply?
basically the goal is to have Bot A and Bot B. Bot B sends messages thru Bot A(to prevent ahving to relogin)
2 separate bots, on separate guilds
the execution must be done externally of discord
indeed(though im using different applciations, only one is discord, the other isnt discord related)
Event emitter and llisterner might be my only option. No, Bot B is completely separate from discord. Bot A(discord) is idle
Bot B(logged onto another IRC app) recieves command, then emit events to Bot A, bot A then can send message onto a specific channel on discord
so something like an IRC <> Discord bridge
kinda yeah
because both events will be emitted locally, i thought i could do something locally aswell
you can have bot B connect to bot A via some sort of IPC, message broker or websocket
or if you dont need any logic from bot A, you can have bot B send the response via webhook
there needs to be no logic involved, i just gotta send an event and then listen on bot A
bot B job is just to fire the event to bot a(where code will be executed)
so IPC i guess
Inter Process Communication?
yes
Can you elaborate? I wanna learn
hopefully it doesnt require port fowarding, cuz that fucks me up
IPC is a connection between two or more processes, it can be unidirectional or bidirectional
so the processes can send messages to each other
How do I set one up Tim?
ipc connections are typically done via unix/windows sockets when on the same machine, or via tcp/websockets if using remote machines
there are also fully featured messaging systems called message brokers, such as zeromq and rabbitmq
the difference is that message brokers feature multiple ways of controlling and ensuring delivery, such as holding on to a message and retrying later in case the target does offline
message brokers usually run in their own contained server, like a database or sorts
Okay, so if I wanted to make my two bots(A and B) log to the same db through bot A, I would use one of those?
Basically what I'm asking is what data can be sent?
if you just need database access you dont need that
unless your database cannot handle multiple connections
๐ค
Bad example, what would I need it for?
direct process to process communication
a okay
use mongodb
for example
It was an example [shiemi]
oh mb
// bot1.js
bot2.send("bla")
// bot2.js
bot1.on("message", message => {
console.log(message) // bla
})
IPC is used in many different ways, for example, discord sharding managers use it to communicate with shards
node has its own internal IPC system that communicates with child processes and worker processes
More on shards, could it be used to transfer more data between them?
this is actually super handy, i can set the types of events aswell
thought it was going to be a simple fire event
Dam
it can send JSON which is going to be more than useful
you can send text or binary, for example stringified json
What if I were to start sharding now? (31 servers)
you would be increasing your resource usage for no reason
It's pointless
Okay just curious
isnt 1000 the recommended ?
2k
1500
long way to go before then
You can't join more than 2500 without sharding
you would be increasing your resource usage for no reason
tim, how does this happen? confusion
sharding is using multiple processes to run your bot
When you shard the bot is split in to separate processes(?)
there are multiple ways to shard
discord.js gives you two options out of the box: sharding manager and internal sharding
the typical way is using the sharding manager, which creates a child process for each shard
so if you have 4 shards, you have 4 child processes
each child process is a full independent instance of node.js, which takes up a minimum of 50mb memory
minimum? what happens if its below 50mb?
a guy i know is swapping his bot to eris, i belive eris has the ability to have multiple shards per process
๐ฟ this is a good thing for more learning I'ma sit here and take it all in
i think the dank memer bot dev said they have 3 or 4 shards per process, and they use eris
Bruhhhhh
deno lib iirc
then you have internal sharding, which instead of creating child processes, it creates websocket connections inside the same process, so you have a single process handling multiple connections to discord. its much more efficient, but since node is single threaded you are limited to only fully utilizing 1 cpu core, so if you have multiple cores, you'd be losing out in performance
discord.js also offers an experimental worker mode with the sharding manager
oh, does eris do internal sharding?
yes
oh, is there a way to make it not internal shard or something?
im not sure if eris offers other sharding solutions, but there are 3rd party sharders
theres only one way to shard with eris, so i'd have to change the code myself, right?
such as eris-sharder
worker mode uses node.js's new worker processes, which is a mix of both, it creates worker processes instead of child processes, and worker processes can share memory with its parent process, so they are like threads instead of fully independent processes. they can take advantage of multiple cpu cores without creating fully independent node.js instances
๐ฟ ๐
oh
which creates clusters and splits the shards evenly amongst them
much more efficient since it utilises multiple cores
I'm learning so much here school is a lie drop out and do bot Dev lolololol
hopefully worker mode is done before i need sharding ๐ค
the most efficient possible sharding setup is to mix internal sharding with workers and/or children, but that requires manual configuration of shards, no js library does that out of the box
They're turning into weebs @opal plank
Well move to general or shitpost if it's offtopic
im not going into a prolonged discussion with this
Still
just wanted an awnser
I'm learning so much here school is a lie drop out and do bot Dev lolololol
how stupid do u have to be to say that..
though separate processes can be unreliable at times
prone to crashing and random freezing if you fuck something up
i dont even know what mod im talking to anymore
Tbf I wasn't explained anything of that sort in college and I'm going for degree in Comp Sci
and with those untypeable chars ima just have to tag @ mods when i need something
how stupid do u have to be to say that..
This stupid apparently
(/s)
Usernames
right click > mention
๐ค
HM
I actually made a custom lib built up on Cyber's Nakamura that combines internal + worker threads
i made one that works with pm2 cluster mode lol
im having a bit of a problem with my dashboard, u can press enter and things r gonna save, so i press enter (when nothing is provided in the input bit) it says the prefix is . how can i make a minimum character limit thing on the input thing with js or if html, html
Aight I'm gonna go learn how to interact with APIs and shit and make my own lib
This is not a bad idea at all
good luck, it will drive you insane
ngl it was pretty easy
Sorry forgot to mention from scratch
but it's probably trash lol
it should say 'The prefix for server is prefix' any ideas?
Fuck it I'm gonna make my own coding language too

not FROM scratch, WITH SCRATCH, make a xScratch Lib
make the operating system first
Lol
Does anybody know what the 10005 discord gateway error means, I keep getting it randomly and I don't see it in the docs anywhere
THAT will drive you nuts
make the operating system first
Not before I make a pc from scratch, transistor by transistor
Integrate your service with Discord โ whether it's a bot or a game or whatever your wildest imagination can come up with.
@cinder patio
10005 Unknown integration
wrong person
lol
What does that even mean
its a rest error, from an http request
No I'm talking about the error
try tracing it, see which request it came from
heheh this IPC will help me more than i thought
it should also give you the path of the request
Whaaat I'm sure it came from the websocket, I'll look into it tomorrow
server with cluster module?
*eats popcorn*
dude that'll let me recode half of my current shit @quartz kindle
ty so much for that
lol np
Thx too Tim, I've learned so much here lol
which reminds me, i need to finish my ipc library
I'm starting to think Tim created the stack overflow or whatever that was... God of coding bruh
So i was looking into oauth2 documents, but i saw something that i couldn't figure out... It needs a redirect_uri which i have no idea what it's supposed to be... Other things are clear, any ideas
Lol
Alright tomorrow I'm going to write a coding language
Because who needs simplicity
It's gonna be h-script, and be based off the number 8
And the letter h
@earnest phoenix redirect_uri is the url the visitor should be redirected to after logging in, ie: back to your website
I already have the syntax planned out
@quartz kindle oh i get it... Thanks tim
client.on('message', async msg => {
if (msg.content.startsWith(`-transcript`)) {
msg.channel.send(`WORKS`)
//
//var CHmsgfetch = await msg.channel.messages.fetch()
//var ticketChnMsgs = (CHmsgfetch.map(m => ({ author: m.author.tag, content: m.content })).reverse())
//fs.writeFile('node_modules/ticket.txt', JSON.stringify(ticketChnMsgs, null, '\n'), (err) => {
//if (err) throw err;
//})
// msg.channel.send(new Discord.MessageAttachment('ticket.txt', 'ticket.txt'))
}
})
Trying to help someone but uh...
It's not sending works to the channel
Does client refer to the actual client used to connect to Discord? What library are they using?
Djs
writeFile is async
I'm in pain rn I want this to be over lma9
Ik it's commented out rn
We're just trying to get it to send a message
No errors, no nothing
"works" doesnt work?
Doesn't send /shrug
is the bot online?
is your computer turned on?
is your fridge running?
lmao
there's an esolang dedicated to gucci gang esketit
Why
lmao
Nvm it's an esolang I don't get to ask why
i dare you to write a bot in Chef
...what is chef?
COW looks pretty cool ngl https://esolangs.org/wiki/COW
MOod
wtf am i looking at
lmao
Nah fuck this I'm writing a bot in hnary
im going to modify js to set arrays indexes to start by default at the last digit of the timestamp of when the instance goes on
arrays start at 9
cuz fuck lua and everything else
Your lord*
Hey, I'm trying to make a rich embed with multiple fields, but whenever I try doing so, the description shows as undefined. Is there something that I'm missing?
I believe you need to end your variable with ; no?
At the end of each field?
the last one
It still gives the error
Oh
your field
Your fields have 2 values
Name and Value
they both have to be filled out
You can only set the description once
So how come I see bots with multiple fields in them?
you can have multiple fields
Fields are added as (<string>, <string>)
just not multiple descriptions
Ahh okay
set can only be used once
add can be used multiple times
.addField accepts 3 arguments: name (field name), value (value of the field), and inline (a boolean arg that should be self-explanatory)
(I don't use discord.js I just know a little so I might get something wrong)
Since this is the first time I'm experimenting with message embeds
ALTHOUGH this is how I did my fields
is that djs?
const embed = new Discord.MessageEmbed()
.addField('field title', 'description of field')
.setThumbnail(message.author.avatarURL())
.setColor(0xffffff)
.setFooter('footer');
``` this is how I make embeds
yeah p much the same I just do my fields differently because that's just how I learned :P
same
this is how it's done in discord.py
hey guys, how u doing
I have a question
basically can i make my bot send a message in a specific channel after 15 mins of inactivity using discord.py?
on_message event with asyncio.sleep or discord.py tasks even
Keeping your program alive on glitch?
Would anyone happen to know how I can check if a certain column (using WHERE) exists in MySQL using python's mysql-connector?
Yikes, those message things so people look at your servers suck
lol not my prob, my client asks for sth and i provide
Ye
not my business why he/she wants it
yes its possible, and quite easy to make
define an object/struct/dictionary or something
add a channel to it, as a key, with a timestamp as a value
on every message you receive, check the channel it comes from, if it matches a key, update its timestamp
then run a timer somewhere that sends a message if said timestamp was not updated for 15 min
or you can store the timer itself in the object/dict
and reset it on every message
A hint: discord.py tasks might be handy
yes
@quartz kindle plz Can you help me in dm ๐ or say if you are busy
i might need a task here fir the timer
can i use on_message with a discord.py task or only events?
Do you need multiple channels or just one?
one
I have carefully read your source and, unfortunately, it does not quite seem to be answering my question. As thus I assume I have poorly formulated it and will proceed to reformulate it.
I'd like a way to either execute IF statements within the MySQL query or a way to get a list of all the columns existing within a table. Hope I've formulated it better this time and I haven't missed something in the link you sent.
Oh yeah something lke SHOW COLUMNS FROM table,
how is that returned when using the mysql-connector-python as an array?
@earnest phoenix .cancel() and .start() the task on sent message, the task having a decorator tasks.loop(minutes=15, count=1)
should return as an array of objects/dicts/tuples or something similar
each row contains column name, type, attributes, etc
Does mysql-connector not use tuples for returned data compared to sqlite3?
i keep forgetting about tuples, they dont exist in js lul
Just a blind guess without reading the docs tbh, just assumed that mysql-connector would utilize tuples for... consistency, I guess?
And probably differences in performance compared to lists
how can i change discord.py to one.py
Uhhh what
@earnest phoenix .cancel() and .start() the task on sent message, the task having a decorator
tasks.loop(minutes=15, count=1)
@slender thistle .how do and where do i use cancel() and .start()?
how can i change discord.py to one.py
@wise verge
In the on_message event

You create a task with that decorator outside of the event and then cancel/start it on each message sent
@tasks.loop(minutes=15, count=1)
async def eee():
send message
async def on_message(message):
some stuff here
eee.cancel()
eee.start()```
oh
owhh
try editing it
does anyone know a command to send a dm to a user? like (insert bot command) --> sends dm to user with info
What library?
@earnest phoenix
client.on("debug",console.log)
@quartz kindle this will fix my error ? Explain a little plz ^^'
@slender thistle js
Isnt it just user.send
it might be ill check
message.author.send?
Author is just a User
@tasks.loop(minutes=15, count=1)
async def eee():
send message
async def on_message(message):
some stuff here
eee.cancel()
eee.start()```
@slender thistle what do i put in the message thing in on_message? and what stuff below that?
If you guys get errors using JSON then just look at it and remove everything from the with statemt except loading it up
yea it was message.author.send/msg.author.send
in the message thing?
how I add a role in v12?
The some stuff here is replaced with a check for the needed channel
in the message thing?
@slender thistleasync def on_message(message), themessageinside the paranthesis
It's an argument that contains the message object, you don't do anything about it
You use it in the event itself
so i put it in as message?
It doesn't really make a difference what you call it, it's a variable that you'll use
But yes, you should leave it if you don't want errors
Things and stuff
I'd put a check there for the channel ID and if channels match, "restart" the task
i put that in the eee async
the eee is a task that should send the message
To handle the actual run of it is done in on_message
I mean, you won't have access to the message in the task
yes
@earnest phoenix this is to see why its taking so long
Okay
https://github.com/discordjs/discord.js#optional-packages
do i just need to add these dependencies to my package.json to take advantage of them?
install them with npm
or if you're using an app hosting service that auto-installs for you, then yeah add them to package.json
how do i make my bot send a message to a specific channel in discord.py?
message.channel.send()
?
last thing and i think my thing is finished here
Or channel.send ๐ค
bot.get_channel and call .send on the returned channel
make sure you handle cases where None is returned instead
ok
after i get the channel id, how do i send sth to it?
plz
@earnest phoenix did he stutter? no advertising
You sent the same link multiple times after my warning
And you're still doing it, bye
imo just mute at this point lol
-b 708869402564755486 Ad spam in #development
Banned Blake#8313 (@lucid crane)
Anyway, are you saving the returned channel in a variable?
yes
just noticed
What's your d.py version
@slender thistle latest version i believe, updated a few weeks ago
IDs are integers
ok
Just remove the quotes
like this?
don't forget to await bruh.send
yes
Also, unnecessary int()
ok
123 = int
"123" = string
yes
yuh
Yeah, but that's unnecessary in this case
^
i was running my bot on a server
and i got this error when I tried to run the code
^
Error: /home/cloud_user/DominationBot/node_modules/better-sqlite3/build/Release/better_sqlite3.node: invalid ELF header```
js?
where is that e at?
need more code
throw e just means it errors, its not enough to debug it
invalid ELF header
did you copy your node_modules folder from your computer to your server?
any suggestions on why it isnt working?
no should I?
no
I've found that bcrypt compiled on OSX will not quite work on Linux. In other words, if you check in the bcrypt compiled on your local OSX workstation, and try to run the node app on your linux servers, you will see the error above.
Solution: npm install bcrypt on Linux, check that in, solved.
Probably the best way to deal with this is exclude your node_modules in .gitignore... and npm install remotely.
https://stackoverflow.com/questions/15809611/bcrypt-invalid-elf-header-when-running-node-app
you should always install you dependencies from npm
i reinstalled it
invalid ELF is related to wrongly build binaries
yeah prob dependency missing
are you using sqlite directly or a wrapper such as quickdb?
well I use github priv repos to transfer files and clone the repo onto the server
im using enmap
wrapper
do you have node_modules in your git repo?
tried it and it doesnt work
package-lock.json package.json shouldn't be in your gitignore
but what if I have to reinstall the packages
package.json contains your packages, you need it to auto install/reinstall them
wdym
same error
try removing package-lock.json and package.json from gitignore and checking in the package files into the git repo
just checked enmap docs
okay
they dont bundle sqlite
you need to install sqlite separately
so try npm rebuild better-sqlite3
i installed better-sqlite-pool
wait
just got a bunch of errors
when I tried installing better-sqlite3
show log
in the directory?
or whatever the equivalent for amazon linuxes is
@earnest phoenix add a check for the cancel start stuff
@earnest phoenix add a check for the cancel start stuff
@slender thistle wym?
this is what the amazon docs say to use
sudo yum groupinstall "Development Tools"
should be the rough equivalent to apt install build-essential on ubuntu
im sorry im kinda new to development, like idk the terms well and stuff
so what do you mean by check?
an if to check only for one channel ID
https://serverfault.com/questions/204893/aws-ec2-and-build-essential told me to use yum install make glibc-devel gcc patch
should I do both
wait
Development Tools should include all of those
@slender thistle like this?
wait why do i have start in the first one
lemme remove that
Parentheses not important but yes
Hey so I'm trying to to do a command handler for the first time instead of dumping my entire code on 1 folder and I've been having issues on getting it to work.
I'm trying to get a rich embed message setup on a different folder and I keep getting errors of not responding at all.
Though if I keep the code on the main folder then it works
@slender thistle no progress 
ok
@quartz kindle it worked thanks
@slender thistle all the code i got
Someone forgot an event decorator on on_message
wait why is my count 2
Someone forgot an event decorator on on_message
@slender thistle wdym?
OHHH
@client.event
Aye
@quartz kindle I was following along a tutorial
ReferenceError: MessageEmbed is not defined
I also keep getting this error popping up
The 1st screenshot which is under a section of the command file has it
@cursive laurel you can do ```js
let command = bot.commands.get(args[0]);
if(command) { command.execute(msg,args); }
that replaces the switch case
and inside the command file you dont need any switch case
just directly create and send the embed
Okay
verify is the only command file I have at the moment
Oh there's restart method for tasks
How can we add the modules (e. g. The verified thing) to the command collection?
What do you mean?
I mean when you create an extra module in another file. How do you add this to the bot.commands
Collection?
Ah, what language are you using, and what is bot.commands specifically? Is it an array? A map? A type of "collection" from a library (such as Discord.js)?
Yes exactly
The discord js "Collection" type
I saw some fancy stuff using fs to fetch all files
You can use the .set(K, V) method. The K is usually the command name and the V is the data on that command (such as an object or class representing the command). If your commands are stored in separate files, you can use the fs module's readdir method to read the directory where you store your commands and load them.
If it doesn't make sense, check out this guide: https://discordjs.guide/command-handling/#dynamically-reading-command-files
Omg thanks for the link! That's exactly what I was looking for. Actually a pretty clean way of how the library is handling commands๐
It's not the library. It's how Node.js and you are handling it.
Yeah but isn't the Collection something specific that comes from the library? Actually just an object, right?
Yes that part is. However, any form of storage could do. You could even go with an plain old object or Map
I don't know too much about Maps. Aren't they similar to objects but with some special way of setting and getting properties?
Collections are just an extension of map.
https://discordjs.guide/additional-info/collections.html#array-like-methods
Very similar with several differences. A Discord.js Collection is like a Map (it extends it in fact) with a few more features as well. You can see some of the key differences (along with some more props/methods you have) here https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map
yo im new at bot dev can someone give me a hand on a project?
im pretty sure its very simple stuff
Are you having issues with something not working in your code, or just want someone to contribute to your project
im trying to understand how to do something with Message Mention
is this normal 
im tiring to make a code that warns people that mentions someone in particular
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'str' object has no attribute 'guild'
```py @client.command(pass_context=True) async def mute(ctx, member): role = get(member.guild.roles, name='Muted') await member.add_roles(role) await ctx.send("Role added")
oh god
Henriq what library are you using, and what have you tried already
Probably need to get the user?
mmm
Use a type annotation discord.Member
i think im only using discord.js
@client.command(pass_context=True)
async def mute(ctx, discord.Member):
role = get(member.guild.roles, name='Muted')
await member.add_roles(role)
await ctx.send("Role added")
like that?
Does anyone know of a way to get the last x messages efficiently in discord4j?
or did you mean on
await.add_roles(role)
type annotation for the argument member
member : discord.Member
not "replace the member argument"
sweet, that worked
henriq have you tried using <Message>.mentions to get a list of mentioned members/users/roles/etc.?
thank yall my dudes. sorry for being a lil dumb
You're trying to get the mentioned member in a message and warn them, correct? If so, you can check the message mentions and get a collection of members mentioned (https://discord.js.org/#/docs/main/stable/class/MessageMentions?scrollTo=members). Each message has a .mentions property. Although, it may cause issues if more than one member is mentioned.
can u join testing 1 it would be ester to explain if you don t mind
Hey could someone check this and see where the mistake in my html is (it's not working in website)
Sorry, I don't like speaking.
No prob
ok then thank you anyways
Dw I have it
when ur html don't work lol
Yaa I missed the div class lol
tru lol
does anyone know how to make transcripts using discord.py html
Someone knows how can i separate the color of a website in 2 pieces?
Something like this https://i.imgur.com/5lbUQ2w.png
how do i make the bot ban everyone lol
Thats called api abuse which is against ToS
lol
Yikes
How do i make my bot steal all server invites to post it on a website so people raid their servers?
||clearly a joke||
You've been reported to discord
lmao
Jokes are not allowed
๐
how do i make my bot leak everyones home address and IP
Yikes what did I walk into ๐คฆ๐ปโโ๏ธ
Tell them to use tiktok aparently
lol
Either ask a serious question else its probably a good idea to keep the channel on topic.
So emm..
Someone knows how can i separate the color of a website in 2 pieces?
Something like this https://i.imgur.com/5lbUQ2w.png
After around 10, I start taking those rules less seriously.
None of the mods care at this point
/s
You can define the background color of each div
Or row
Or span.
Or whatever your using
oh thxs
oP
ok
The best way I found to learn about css stuff.
Just inspect stuff on webpages you see on how to do it
@ember lodge use display: flex to have multiple divs next to each other
Your discord name is hard to mention therefore you get a lovely easy to mention one.
Thank you
there's a bunch of css frameworks that help a lot with this
@humble gyro my nickname remove plz
no
don't ping me for stupid shit like that
@earnest phoenix change ur tag
You don't need nitro to change the username part
tag saying nope
i mean tag tag #
You don't need to change the tag. To change your username, you don't need Nitro
Also, move to #general with this
yeah ty
How do you check ping?
(on discord.py)
@!โWhat does it mean?
what
<@!ID>
<@silentid>
Also check for <@ID>

Because sometimes it doesn't have !
Or you could use the dedicated .mentions property on a messaage.
How do you check ping?
(on discord.py)
Latency or message mentions
Latency
Websocket latency: client.latency
API response time: calculate time between sending requests and receiving a response
P.S. import time and time.time()
Sorry, I want to get User's latency.
User's latency? I don't think that's possible on Discord
like the timestamp difference?
like the timestamp difference?
Oh, I'll use it. Thank you.
Wanted to ask using CSS how would I make the buttons transparent similar to this (also is there a way to change colour of the title as well, second is mine cos image doesn't blend well)
opacity:
is e.code not an integer?
as far as I know e.code has to be an integer
all discord errors are integers
oh wait
you think making it a string
oh
Yeah, and you're comparing a number with a string. Also you never actually return'd in the if statement so it'll log anyway.
hahaha
wow I went on a mission to strict my code
and totally missed thaty
it was probably == before
anyone know SQL syntax rather well or postgres?
well, gonna ask either way if someone's lurking
say i have this object
let foo = {name: 'test', location:'somewhere'}```
Now i have a postgres jsonb table
its contains an array of objects inside like foo above.
To query filter it i can do ``filter->>'name'`` to find the proper row that its contained, however:
```js
//in the table
[{name:'bob', location:'bar'}, {a:1, b:2}, {n:1, m:4}]```
lets say i want to replace ``{a:1, b:2}`` obj in that table with the ``foo`` mentioned above(order doesnt matter)
the only non destructive way i see to get that would be using operator ``#-`` with the index of that object.
however im not seeing a way in SQL to get index of that object to define it to be deleted without destroying the array and checking individually
or returning the obj to js and then resending it after its been parsed on the code(instead of using SQL query)
any tips?
any better alternative to heroku and glitch without paying any cents?
no
not that we know of
Anyone here?
as you can see
Ok so
I want a code for the bot to change its role color after 5 mins
Is it possible? @pale vessel
no
we dont do spoonfeeding
yes but no
Why?
that's rainbow role
even every 5 minutes, it's not allowed
rainbow role bad
You mean that code doesn't exist or something?
it does
I want it pls
not happening
it means you'll get flagged by internal flags and get your bot banned
api spam/abuse
Thank you
bruh
bruh wtf
the iq here is really low isnt it?
that's 5 secs too
๐ฉ kill me
nah i misread
-_-
@wide sage help the noobs api abuse and get their tokens revoked? and spoonfeeding code?
ah yes, helping.
amazing
should tag a mod for that one
"helping"
the level of sass
Don't worry my bot will be banned not me
@reef mantle not like you link your account, right?
if you're linked to several bots doing api abuse you'll be banned too
sometimes i just wanna take a sip of coffee and hope to die out of nowhere
:'(
@wide sage come on
spoonfeeding api abuse code, not cool
bro i'm not doing this shit
Wait guys
@craggy pine read above pls
spoonfeeding doesn't necessarily mean the same code as youre using
i'll just let someone take care of that, fuck it
Is coding a DM bot ok if it's used in only one server?
Is coding a DM bot ok if it's used in only one server?
@reef mantle anyone?
-_-
I meant is it legal to make it?
Ok thanx
actually what you cant do is anonymous dms and mass dms
?
@wide sage rainbow roles r yikes (,:
api abuse, dm bot, spoonfeeding
b abusing discord api
pick one
please don't spoonfeed users or encourage abusing the api
if you continue you will be muted
no it doesn't
and it's against the rules
so read #rules-and-info
well even if it hElPed you, it's still not an etiquette we support and would appreciate if you refrain

spoonfeeding helps who? teaches people to copy paste code, thats it
well its at the least better if you manage to figure out what the code and each line does
thats what docs snippets are for
https://discordjs.guide for a complete guide
https://discord.js.org/#/docs/main/stable/general/welcome this for a what each thing does
stop arguing
spoonfeeding is not allowed as stated in the rules, periodt
breaking the tos is also not allowed, periodt
stop encouraging or helping people to do so
^^
@reef mantle also stop asking for something that's against discord api and abuses it, there is that rule for a reason, you were asked to stop but wouldn't until someone spoonfed you
If you need more explanation, check out discord's developer guidelines
https://discord.com/developers/docs/legal
Integrate your service with Discord โ whether it's a bot or a game or whatever your wildest imagination can come up with.
Even if you "not ask" it is still against Discord developer guidelines

meaning you'll eventually gotem bannum
we don't handle bot verification? discord does it ?
or are u talking about top.gg approval
takes 2-4 weeks rn
f
@wide sage nice, now ads (,:
bruh
nope
not ads
he can learn from there
learn from the DOCS
not advertisement exactly
where you are suppose to
How much time does discord bot verification take?
https://discordjs.guide/
https://discord.js.org/#/docs/main/stable/general/welcome
There, thats your learning material. Why would you bring up other servers when both sites provide ample explanation and code examples?
@gusty oracle 2-3 weeks
Thanks.....2-3 weeks from?
from.....when you apply?
that's nice!
Oh how do you apply lmao?
Disc
you'd get a message from discord
aye @reef mantle try these https://discordapp.com/channels/264445053596991498/272764566411149314/729205671211434035
@gusty oracle Discord takes usually a couple weeks, almost a month to get. you can apply in the portal https://discord.com/developers/applications once your bot reaches 75 servers



