#development
1 messages · Page 1280 of 1
I shouldn't have my limited data wasted, again, for something I'm unaware of 🙃
Ads
This is dev section 🤔
Hey can users vote using the bot or they still need to use the site?
Like a vote command that votes for the bot.
They still need to use the site
ads any fucking day
@misty sigil You think you can answer that?
I literally 👏 cannot put 👏 ads on my website 👏 because 👏 Google Ads 👏 just doesn't wanna work for me
then don’t put shit on your site

Nah I mean the discord bot list site
just don't monetize ur site if you aren't capeable of it
Not my site
Hey can users vote using the bot or they still need to use the site?
Like a vote command that votes for the bot.
@dark axle no
@dark axle see my messages
time to closed source the botum because i can't afford keeping it up without monetization but i can atleast earn from lawsuits from people copy pasting my copyrighted code
bot for money
Don't monetize anything if you aren't capable of applying common sense
^
Ah Thanks

"copyrighted code"
el mayo
Do you really just slap a license on it and call it copyrighting it
yes
nobody gaf about copyrighted code anyways
Apart from really annoying people ig
just have a closed source bot 
yea, I close source the good stuff
My shit is closed source anyway lmao
and open source the meh
and close source the shit
hi affax
I was going to rewrite my bot and put it on GitHub once my website is done
Or I’ll steal it
I wouldn’t open source my current bot cuz I don’t want people stealing it
Eh it's for transparency purposes for my team
imagine me open sourcing my bots/games
lmao
I work so much to make them good
lmao i remember about the pfp affax
bro
around 10-20+ people have stolen it
some of them have been permabanned from Discord
nobody can steal my pfp because my pfp is Jeremy Clarkson
10-20?
or I think that’s how it works
more like 100
halp
ohh
happens lol
thanks OwO
gotchu
@hazy sparrow whats your lanugae
js
not discord js?
yes d.js
@hazy sparrow args is undefined
make sure its being assigned correctly
looking now :)
@earnest phoenix What is this error from? are you attempting to login to an online service? Can you verify in your debugger that the variables that store the credentials that you are using actually have the correct values?
@hazy sparrow What is this method for? are you 100% sure that args is being supplied when the method is called? (perhaps step through the execution of the function call in your debugger?
alr what if i defined args in the new8ball.js? will it work then?
I'm not entirely sure what you mean, I don't know what your project structure looks like. Do you have your code in a repo somewhere that I can look at? (or can you put the relevant code in a gist?)
@earnest phoenix What is this error from? are you attempting to login to an online service? Can you verify in your debugger that the variables that store the credentials that you are using actually have the correct values?
@azure fable sorry for late. i need translate. token is always changing discord team. reason: 1000 loging. but my bot is true. if changing my token, my bot shutdown and opening 2-3 days
@azure fable thx for help
What is better discord.js or discord.py?
I use js (JavaScript)
then use discord.js
@earnest phoenix I am having trouble understanding what you said.
My recommendation is to make sure that your discord token is correct.
if changing my token, my bot shutdown and opening 2-3 days
Are you saying that when you update your token, the bot breaks?
eh?
answer is undefined
lemme show code brb
okok
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
change (line 51)
const answer = answers[Math.floor(Math.random() * answers.lenght)]
to
const answer = answers[Math.floor(Math.random() * answers.length)]
misspelled length again :P
I actually used make exactly this mistake a lot lmfao
question, what is happening here?
const prefix = "bow".toLowerCase
fk me
not sure if that is remotely connected to the issue you just mentioned
but I think prefix should be a method with this assignment
which I don't think is what you want
but I think prefix should be a method with this assignment
@azure fable eh?
today's new feature, now the moderators who help run the bot can reconnect individual shards if they are having problems 🙂
maybe just
const prefix = "bow"
I say that its a method, because you do "bow".toLowerCase, not "bow".toLowerCase()
so you're not actually calling the method
yeah lemme try just "bow"
const prefix = "bow".toLowerCase
toLowerCase is not an argument, it's a method
yeah I think that is more along the lines of what you want
yea
you can just replace the commas with blank spaces
oh so .replace() will do?
yes
Why the .split at the end?
const args = message.content.toLowerCase().slice(prefix.length).trim().split(/ +/);
thanks
@hazy sparrow Why do you split apart the string they give as a message? That is why you have the commas
shouldn't happen
hmm
can you try just
const args = message.content.toLowerCase().slice(prefix.length).trim()
and show us the outpue
ohhh
(you have to disable your length check tho)
ok lemme try that
That should just cut off leading and trailing whitespace, I believe
works that you so much guys
what works?
happy to help o7
without the .split()?
I can explain
but earlier it output without spaces
¯_(ツ)_/¯
Yeah, I imagine that was caused by something else
that he'd since fixed, and probably forgot about, idk
lol
.remove(args[0])
you mean like removing an element from a list?
and that will remove the element from the array and return it
Happy to help o7
would you rather have ads or your bandwith being used to serve data as a cdn?
@compact oriole oh god, not that thing that turns your browser into a bittorrent client to serve cdn is it
i wouldnt trust that thing as far as i could spit, and they usually pay you in credit for using their cdn yourself to host your own content, so its like some reciprocal bs
cloudflare is better. period
😄
it still answers even tho i told it to not if the arguments is less or equal to 2?
it thinks your question is 8ball
you're slicing at the wrong position
you could've also concluded that yourself if you had just read the output
bow pro the args variable is a string, not a list
55555555555555555555555555b
@hazy sparrow
Windows defender
not the channel for that
lol
it thinks your question is 8ball
@earnest phoenix but still i code it to see if theres 2 arguments not 1
lol
@hazy sparrow if you want to check if there are 2 arguments, then you have to turn the string into a list. to do that you have to .split() the entire message content string, remove the first element of the list (which is the command) and then check the length of the created list
let message = "command arg1 arg2";
let args = message.split();
args.shift();
if (args.length >= 2) {
lorem ipsum
}
Fuck slow internet
@hazy sparrow if you want to check if there are 2 arguments, then you have to turn the string into a list. to do that you have to .split() the entire message content string, remove the first element of the list (which is the command) and then check the length of the created list
@earnest phoenix ah
I get it now
YourStringHere.substr(1).split(/\s+/);
substr(1) can be adjusted to your prefix length, few adjustemnts. /\s+/ is for newlines, spaces and all that defines as such. 😄
or that yes
Kk
You'd call it as such, result[0] where 0 (can be as many inputs as you want to detect up to.
^ Worded that wrong but it should make sense.
@earnest phoenix What you cant write a simple file loader? 😂
i just don't like the way you do it in js
that's all
i'm not saying it's complicated but i don't like it
Seems like you dont know how to do it efficiently
because i never made a bot in discord.js
i just watch here how people do it
js commands take a command-per-file style while py ones have a module style
is that a thing
Well unless...
You can accompish the same with Python via bot.add_command
i had no idea, i saw all the people here do it in a message event and then split the string into arguments
but in that case wtf
most people are lazy to build a proper command handler
...which means you can easily break it too
your arguments are supposed to be parsed, not extracted from, for example, a mentions collection
wooow that changed my whole perspective on d.js
@earnest phoenix I am having trouble understanding what you said.
My recommendation is to make sure that your discord token is correct.
Are you saying that when you update your token, the bot breaks?
@azure fable yes
@earnest phoenix Oh, are you hitting the 1000 logins per day limit?
If yes, why do you have to login that many times?
Cuz logins are cool
Make sure that you aren't calling client.login(<token>) inside of any loops or events
that should just happen once when you start up your bot
message.guild.members.get(args[0]); TypeError: message.guild.members.get is not a function, i think i need to add cache somewher
its js
o
oo
ok
sec
in that case, message.guild.members is a GuildMemberManager https://discord.js.org/#/docs/main/stable/class/GuildMemberManager
and has no get method
message.guild.members.cahce?
yes
:|
so I wanna make my own lib for a bot in js, does anyone has any recommendation, tip or smth on how to do one? I don't wanna use the dhit that discord.js is
Collection [Map] { '453103897012338688' => GuildMember {....
how do i make it so it is just
GuildMember { guild: Guild {......
Get comfortable with making api calls
so I wanna make my own lib for a bot in js, does anyone has any recommendation, tip or smth on how to do one? I don't wanna use the dhit that discord.js is
@tight plinth discord.js is great with amazing documentation. If you want to make your own, you will need to establish a web socket connection with discord and make loads of API calls
Discord.js makes it all easier
discord.js caching cough
Just cache it yourself
Yeah, you'll want to implement that too
O yeah
If you want to make your own, you will need to establish a web socket connection with discord and make loads of API calls
@pure sapphire mk
And rate limits and API errors are a thing, so you'd have to make handlers for that
not a problem
the gateway flow is a pain in the ass
but yeah discord api is not the best
Haven't had an issue with it yet for small bots
https://s.gus.host/flowchart.svg the gateway flowchart
Discord.js documentation? Great. Discord API documentation? Took me 3 hours to set up oauth for the first time because it confused me
oauth isn't a concept that's exclusive to discord
you can take oauth docs from any site and apply it to discord
yea
But discords documentation on it isn't great
what isn't great
i understood everything from oauth docs
it took me 10 minutes to bootstrap a basic login page
Yes I understand it now but when I was first doing it forever ago it confused me
probably because you were working with oauth in general for the first time
I ended up reading a guide to oauth
@tight plinth discord.js isn't the only library available for NodeJS/Javascript. You have many other choices such as Eris and other smaller/less well known libraries to interact with discord's api
@fluid basin ik
though some might be unmaintained and you will need update/maintain it yourself
and doing that all by yourself isn't a great idea unfortunately
well time to try to find one of these small and unknown libs
means also you need to implement new discord apis yourself
I can try to find some for you
Copy websocket handling and make your own API call methods ftw
any language constraints?
js if possible
Wut
how recent do you want it to be? within the past year? @tight plinth
the more recent, the better
https://github.com/towasty/DiscordWrapper
https://github.com/nodecord/nodecord
https://github.com/DasWolke/CloudStorm
https://github.com/auguwu/Wumpcord
These are what I found within 2020
DiscordWrapper is a useful NodeJS wrapper/library which allows you to interact with Discord API. - towasty/DiscordWrapper
A node.js wrapper for the Discord API. Contribute to nodecord/nodecord development by creating an account on GitHub.
you can search for older ones
lol imagine not being able to remove embeds on mobile 
cant tell you how much of the api they cover, could figure that out yourself
also these might not be very stable
nodecord seems to be maintained by @sick cloud
and wumpcord is by @vital lark iirc
hmmm
hacktoberfest™️?
?
anyone have any idea why i get discord.errors.HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body In embed.image.url: Not a well formed URL. when trying to add an image to an embed
o/
ive tried with urls like https://i.havesexwith.me/6g4rnq.png
and urls without the file extension
does embed.image.url even exists? I'm not sure
it used to work a few months ago
does embed.image.url even exists? I'm not sure
@tight plinth it does
does anyone know if you can code a bot to post in an announcement channel and then have it share it?
I gotta go but ping me with options
api request
messages endpoint has a POST /crosspost method iirc
/channels/:id/messages/crosspost
can bots even publish announcement's
Yeah
Guys, I finished the music bot, everything worked perfectly, but after I added the DBL module(This is what would display the number of servers on the site of this server), I started writing error 429, after reading I realized what it means, I'm already waiting for the fourth day, how long can I wait? can this be fixed somehow
they speak it in #general-int probably 🙂
Guys, I finished the music bot, everything worked perfectly, but after I added the DBL module(This is what would display the number of servers on the site of this server), I started writing error 429, after reading I realized what it means, I'm already waiting for the fourth day, how long can I wait? can this be fixed somehow
@silent cloud have you tried making a postman request directly to the dbl api to ensure it's just one request?
429 makes me think you've got it in a loop or something
the dbl module has nothing to do with youtube's 429s @silent cloud
I didn't say youtube
are the 429 from the dbl module?
@silent cloud have you tried making a postman request directly to the dbl api to ensure it's just one request?
@faint prism yep, tried
can I show us the error plz
are the 429 from the dbl module?
@tight plinth from HTTP
can I show us the error plz
@tight plinth
show error
...
can you send the code
the reason was DBL module, but now it causes everything
That not code problem 100%
120%
it worked, but after DBL stopped
yup it would be hard to help without any information
such as more detailed errors or code
@silent cloud can you show your code?
show only the dbl part
Thats happening when i try to use *play command
show only the dbl part
@quartz kindle i deleted it...
and the problem persists?
Yep
wait so the problem is actually the play command, not dbl?
so its a youtube problem
dbl was not the reason
429 are rate limit errors, and are unique to whatever service you're connecting to. dbl does not have anything to do with youtube
http requests are not global, they are per service
you are being limited by a specific thing, not by everything
http is not global
there is one specific website that is limiting you
if it happens in the play command, 99% chance its youtube
show your .catch() lines in your play command
damn Tim getting right to the point
How to get my mongoose link
it starts with mongodb://
but i can't figure it out
I wanna use it for https://www.npmjs.com/package/discord-xp this package
are you using atlas or hosting your own
Atlas
@silent cloud send code around line 150 in index.js
let err = Error('Status code: ' + res.statusCode);
@faint prism I use atlas
stream.emit('redirect', url);
}
return;
// Check for rate limiting.
}
else if (retryStatusCodes.has(res.statusCode)) {
if (!retryRequest({ retryAfter: parseInt(res.headers['retry-after'], 10) })) {
let err = Error('Status code: ' + res.statusCode);
stream.emit('error', err);
}
return;
}
else if (res.statusCode < 200 || 400 <= res.statusCode) {
let err = Error('Status code: ' + res.statusCode);
if (res.statusCode >= 500) {
onRequestError(err, res.statusCode);
}
else {```
Bro that line just catching an error
is this from your code or is this from the module?
From module
Why my wtf
aren't they just rate limited?
they are
so what's the problem
It write at /node_modules/...
Yes I did that
your error handling code is eating the error message @silent cloud thats why you dont know whats going on
you need to fix your error handling to see actually useful errors
so what's the problem
@pale vessel Guys, I finished the music bot, everything worked perfectly, but after I added the DBL module(This is what would display the number of servers on the site of this server), I started writing error 429, after reading I realized what it means, I'm already waiting for the fourth day, how long can I wait? can this be fixed somehow
the dbl module has nothing to do with this
the dbl module has nothing to do with this
@pale vessel that happened after installing of this
just a coincidence
K
Someone knows why?
But it says +srv
@delicate shore that's just the protocol. Use the part after it. Kinda like how HTTP:// is the protocol
what do you mean by "does not work"?
just a coincidence
@pale vessel hmmm? Why
Rly?
But wtf, so what i need to do ._.
Api working, google log 0 error 21 working commands
@silent cloud your error handling code is swallowing the error, so you are seeing useless/incomplete error messages
show your catch() lines in your play command
||write your own code||
show your play command
Someone knows why?
@glacial void we really cant help you if you are not giving any information
we cant help if you refuse to be helped
Ah another day another case like this
yea... it's sad
also there are some people whose bot is 90% made by this server because they ask everything here
So many Devs willing to help, but so many skids beginners not wanting to share their code for the debug process
Different people learn differently
A lot of people also don't get that practice makes you better
aka you need to make your own stuff
and you need to code yourself
Well true u cant learn alot if ur getting spoonfeeded
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
we cant help if you refuse to be helped
@quartz kindle, im just say gl wtf
Hell, so far half of my website backend I made with Timo is just him giving me directions and judging my preferences

juts a small thing, why are there so many empty lines?
like it becomes quickly super annoying
but that shouldn't affect it :P

does your bot reply the error to the chat?
get in where
Luca will DM you on bot approval
so you should allow dms from people in same guild
usually there is no reason not to
if you scan messages for scams
I just like living on the edge :P
does your bot reply the error to the chat?
@quartz kindle yes
this? return message.reply(error.message).catch(console.error);
hey @faint prism can u help me further
if you don't mind can we take this to dm's please
I'd prefer to keep it here
Ok so i am getting an error saying invalid Mongo DB link
Ok so i am getting an error saying invalid Mongo DB link
@delicate shore Did you copy it directly from the box and paste into the code?
Is that Russian I see?
Is that Russian I see?
@slender thistle yep hi
You need to replace some parts with your login creds
@silent cloud have you tried running your bot in your own pc?
ohh
@silent cloud have you tried running your bot in your own pc?
@quartz kindle yes, same
Like the <password> part
same error?
there was no <password>
mongo "mongodb+srv://IHIDETHIS/<dbname>" --username IHIDETHIS
this is the one i pasted
then theres your answer, you are being limited by youtube
what api
mongo "mongodb+srv://IHIDETHIS/<dbname>" --username IHIDETHIS
@delicate shoremongodb+srv://<username>:<password>@IHIDETHIS/<dbname>?retryWrites=true&w=majority
Google youtube apis...
ytdl does not use youtube api key
it uses web scrapping
you are being limited by IP
mongodb+srv://<username>:<password>@IHIDETHIS/<dbname>?retryWrites=true&w=majority
my username is with spaces so i enter that?
And what is @IHIDETHIS is that ip adress
Well pizdec
Lol
you cant do anything
yes
wait or change IP address, use proxy, etc
unless u change ur ip
you are using ytdl-core
ytdl-core does not use your api key
so it doesnt show up in your youtube api
K ty.
And what is @IHIDETHIS is that ip adress
@delicate shore I thought you did that lol. It's the cluster's domain "cluster2.kxh2a.mongodb.net" for example. dont copy that, you'll need yours from the connection string in atlas
I have a Cpanel sub account, how do I make the .tech GitHub domain thing link to it?
set the correct nameservers in your registrar panel and add the domain under addon domains in cP
@faint prism Hey there
Sorry :(
But i wanted to ask my DB's Name is BLAC SHEEP
So first is it case sensitive
second do i need to add a _ joining them as it's a url
hmm. Not sure, I've never considered putting a space in a database name
You can try these three options:
BLAC%20SHEEP BLAC SHEEP BLAC\ SHEEP BLAC_SHEEP
oh wait
you have to encode them
yes
DB naming convention is ALL_CAPS_AND_UNDERSCORES for MySQL
depends on db
Well typically from what I've seen
and I guess Redis is different too
¯_(ツ)_/¯
but for these "traditional" databases it is all caps
redis is recommended for caching tho, not storing data on the disk.
I should practice what I preach
lmaoo
@faint prism OMG it worked Thank you so much 
Can I also shift sqlite to mongo DB so that I can later establish dashboard on my website
does MySQL work on repl.it PHP Web Server repls
Can I also shift sqlite to mongo DB so that I can later establish dashboard on my website
@delicate shore use Callum's abc.db
Can Anyone Guide Me On How To Post The Server Count
Can Anyone Guide Me On How To Post The Server Count
@strange tree that's spoonfeeding also #topgg-api
Literally says "guide me"
It's not spoonfeeding unless we share an entire solution
"that's spoonfeeding"
do i look like i care
🙃
You should if you're attempting to mini-mod ||incorrectly||
So mind shutting up if you don't care
so im trying to setup modmail for my bot and everything is working good except the initial first message the user send to the bot isnt being sent so the user would have to message the bot a second time for the message to be sent to the modmail channel. im new to this so im kinda of confused on why its not working.
if isinstance(message.channel, DMChannel):
if message.author != client.user:
channel = discord.utils.get(guild.channels, name=f"{message.author.id}")
if channel is None:
await message.channel.send("Welcome to Modmail!")
await category.create_text_channel(name=f"{message.author.id}", overwrites=overwrites)
elif channel is not None:
await channel.send(f"Message recieved from {message.author.name}#{message.author.discriminator}, content: {message.content}")
Can Anyone Guide Me On How To Post The Server Count:n_sed:
@strange tree the #topgg-api part is right though. They will be pretty helpful there 🙂
What's category in that snippet
Sent The Same Message Yesterday
@strange tree https://discordbots.org/api/docs#intro
@glacial void we really cant help you if you are not giving any information
@obtuse niche ok only wait please
👍
Sometimes
But is it like fun-Ish?
@drifting wedge they have three extra shitpost channels #mod-logs #moderators and #265156361791209475
How can i use name cheap domains in repl.it
where do i add the record?
namecheap should have DNS records tab
ok
We don't have access to send messages in bot hell anymore
Lol
who does?
So modlog and mod chat only
You don't know that ?
who does?
@pale vessel admins only
@slender thistle uhh i accidentally selected CNAME earlier am i fucked
ohh my bot need 10 server again to verify
Delete it and create an A record
ok
Delete it and create an A record
@slender thistle when i select it it asks for a host and an answer
do i put the special long string repl.it gives?
Yeah
Yeah
@slender thistle I’m using the GitHub student get tech
iirc @ works for the host
yay it works 
except that the custom domain doesn't support HTTPS but that's fine for now I'll add encryption before deploying
it will
I'm in need of assistance by someone if possible please.
I'm working on an ExpressJS Webserver to handle database requests, but for some reason, it's not wanting to send data to the endpoint.
Server.js
//Webserver Handler
const express = require('express');
const bodyParser = require("body-parser");
const app = express();
var jsonParser = bodyParser.json();
var router = express.Router();
const sql = require("sqlite3").verbose();
let database = new sql.Database('./user-data.db', sql.OPEN_READWRITE || sql.OPEN_CREATE);
database.run(`CREATE TABLE IF NOT EXISTS user(discord_id TEXT, prefix TEXT, isPremium TEXT, token TEXT)`);
router.use(function(req, res, next) {
if(!req.headers.authorization) return res.json({ code: 401, response: "You must provide an authorization key" });
if(req.headers.authorization !== config.credentials.server_auth) return res.json({ code: 401, response: "Incorrect authorization key" });
console.log(`[Server][${req.route.path}] A request has been made to the service.`);
next;
})
app.get('/get-user', [router, jsonParser], (req, res) => { res.send("OK"); require("./Endpoints/get-user.js")(req, res, database, unirest) });
app.listen(3000, console.log(`[Server] Server running on port 3000`));
test.js This is ran to send a test request
const unirest = require("unirest");
unirest.get(`http://localhost:3000/get-user`)
.header("Authorization", "ABC123")
.end(function(result) {
console.log(result.body);
})
Why discord why you give weirdo code blocks
It passes through the router, as it logs the "A request has been made to the service."
does MySQL work on repl.it PHP Web Server repls
I get the errorUndefined function mysqli_connect()when trying to do smth
try using pdo
code
Maybe u can try PDO
hey how can i restrict my discord server to send messages in certain text channel
Yep
pdo?
Wait you can install modules for PHP 
The PHP Data Objects (PDO) extension defines a lightweight, consistent interface for accessing databases in PHP
so I can install mysql through the CLI?
hey how can i restrict my discord server to send messages in certain text channel
@narrow cloak any help please
The PHP Data Objects (PDO) extension defines a lightweight, consistent interface for accessing databases in PHP
ohhh, cool :)
don't you need composer for those
php extensions are not like node modules
they need to be included at compile time, or dynamically linked from a php config file
its something repl.it itself should do, or give you access to
its not something the end user does
@narrow cloak any help please
@narrow cloak https://discordjs.guide/popular-topics/common-questions.html#how-do-i-send-a-message-to-a-certain-channel
I like how that is listed under "Common questions"
php does have something called "composer" tho, which is like npm in node, lets you install user-created libraries written in php
but mysqli is a php extension, not a composer library
Hm
@earnest phoenix just use PDO
Tim, how i can change IP or use proxy on hosting...
Why would you want to do that
wait or change IP address, use proxy, etc
@quartz kindle .
because hes rate limited by youtube
you cant change your IP address, unless you buy a new server, you can however use proxies
You can use a proxy/vpn
i believe ytdl itself has a guide on proxies
However, the network speed will be dramatically reduced
and YouTube will bean you if you do weirdass shit
why didn't php just update their old mysql instead of creating a new one called mysqli
jeez
because they think they are better
Anyone know a place where i can hire a dev
not here
...
what kind of auto-correct changes shit to fuck
Anyone able to assist on my issue please?
https://discordapp.com/channels/264445053596991498/272764566411149314/760508807104299019
like fiverr or freelancer
...
what kind of auto-correct changesshittofuck
@earnest phoenix it knows you're usually salty i guess
Ah freelancer good idea
why didn't php just update their old mysql instead of creating a new one called mysqli
too many breaking changes i guess
since when?
php8 i think
everyone needs lambda
oh cool
7.4
last one i used was 7.2
same
anyway fuck php
haha
php is basically javascript but like...different but syntax is super same...idk I'm not an experienced web developer
i use php sometimes since it's just easy to use
i use php because i still have a regular webhosting server with all the usual crap
i want to move out of it tho
(u => { print "no $u"})
hmm
how dark
My favorite language is pseudocode
like C dark?
@faint prism so python :)
Pretty much
like koa/ts dark
C isn't dark ;/
too sugary for me
koa is weird af

i looked at the docs
its express-js
didnt like what i saw
php is just...
express legit a staple in server
my next nodejs server will probably run on something like low+0http
ive used php for the other dashboard
but fuck that crap
80% of the time i had no idea what i was doing
xD
true
i know php before js
that helped
but made me always use semicolons lol
i like semicolons anyway
koa looks hella promising but im still learning how all of it works
i use semis because of php as well haha
thanks for informing me of its existance
it comes shipped with all the interfaces needed
now its just logic on my part
still trying to figure out how cookies work tbh
np affax xd
You could also just get_user(bot.owner_id)
@slender thistle I am looking to display the bot owner username on a embedded message for my bot's owner info command. Do I use:
async def owner(ctx): owner=await get_user(bot.owner_id) await ctx.send(f"{owner.username}")?
(Plus, indentation is wrong on purpose)
@earnest phoenix pinging us won't make us help you
@earnest phoenix So, if I didn't ping you, then you wouldn't see my message as it would of been overrided by several other messages as you didn't get notified about it cuz I didn't ping you.
That logic reminds me of Randy from My Name Is Earl lol
applicationinfo has an owner property
@slender thistle But does it have an username attribute for the owner property?
@earnest phoenix owner.name
owner property is a User object
and that has name, discriminator, etc.
In jsv12 if we have to restrict a command to a specific perms group we use member.hasPermission('Perms')
But what will be the line of code if I want to restrict a command to a role??
check if the member has the role?
yes
and that has name, discriminator, etc.
@slender thistle Proof?
I was making the ban command and its my private bot I want only people with the Staff role to use it
Proof?
@earnest phoenix you know there is documentation, right?
In jsv12 if we have to restrict a command to a specific perms group we use
member.hasPermission('Perms')
But what will be the line of code if I want to restrict a command to arole??
@mint hamlet@commands.has_roles()
@earnest phoenix you know there is documentation, right?
@vital lark Proof?
@earnest phoenix Thanks
t-that's python
I'm joking guys
You have to get the IDs or names first, lol
sec
when doing dispatcher.end(), can I stop triggering the finish event?
use the once function in dispatcher
it'll call it once and delete it from the emitters list
when doing
dispatcher.end(), can I stop triggering thefinishevent?
@rocky hearth Stop running the program and it will stop.
Proof?
Jk
but guild.owner is a member
I'm doing bot.owner
but
Yeah members are subclasses of User
I'm doing bot.owner
it's beautiful
like how you can use message stuff on context
See my screenshot @earnest phoenix
Suck my bum
interesting
Thx
¯\_(ツ)_/¯
You're the one fucking around for no valid reason, I gave you what you needed to achieve what you asked for.
it'll call it once and delete it from the emitters list
@vital lark But still it would trigger the finish event atleast once. I just only want to trigger the finish event when the song is finished playing.
Not when I end it manually
I'll get back to my gaming session, bye
@pale vessel what do you use for aeon dns?
I thought you were using Google public dns API but there's no way to get the JSON for some weird reason
i use google's public dns
Howum the fuckum
got that right
mhmm
Thanks flaze, I knew there was a Google public dns thingy but didn't know what exactly
Ily :3
ily too no homo
Full homo /s
Full homo /not s
How do I make it so I can change my bot's prefix in discord.py?
Use a database
Ok, which database is recommended?
Well I use mongodb
Ok, I'll use mongodb
I think the py wrapper is pymongo
Is it possible to use only a .JSON file as a database?
Ok
yes its possible
Never ever
Is it possible to use only a .JSON file as a database?
@earnest phoenix yes, with atomic file writing but i wouldn't recommend it
Proof?
Lol
Lol
a package like https://www.npmjs.com/package/jsoning does that
Mine corrupted in 3 days
I used to have one
json database is just shit
Would corrupt in less than 1m 😩
you can use a json as a database, but its not recommended for many reasons
oh wow https://www.npmjs.com/package/jsoning has 12 downloads
definitely is good and reliable
the problem is with fs lol, not json

the problem is not fs lol
lol
storing with fs
If it was FS then all my things would be 
is the problem, mongodb stores using json
fs is just an interface for the system's own fopen and similar io functions, all databases use it
yea exactly
How do I make my own database?
Is it possible to use a python file as a database?

Wtfff
but just because its possible doesnt mean you should
Wtg
file endings basically mean nothing
So I could even use a .txt file as a database or even a .PNG file????
yes
all files are the same, its just binary data. the only difference is how you read it and how you structure the data in it
You could use a .get_shwifty
Ok
wait
cant even blame me for this one cuz the declarations are from d.js
what did you type-cast msg as
oh
<client>.user.setActivity('<activity>', { type: 'WATCHING' });
huh weird
cuz aparently message.id is type of never
is it correct
it could be the type for shitboard but idk
why do you need to cast it tho?
<client>.user.setActivity('<activity>', { type: 'WATCHING' }); please
what about it
wait
i was casting to check if it was type error
string is not assignable to type never
message.id is string
its shitboard that is never
lmao
im an idiot
you shitboard
lmao
is the problem, mongodb stores using json
@digital ibex they use bson actually
how do i put a timestamp into an embed in discord.py
please help help
With?








