#development
1 messages · Page 1726 of 1
yuh this is for sure the best python ide i've seen
vscode python ide is just a bit off..
well vscode isn't even an ide
k
I download it right
just that the intelisense on vscode is much worse than pycharm
ye
community version
wait for it to download
Is it free or do I pay?
then just follow the instructions
yes
there's a free or a paid one but the free one is hella good anyways
yes
There are others too like...like...well, jetbrains is jetbrains
What pings?
Like, if you need a fully fledged IDE then jetbrains reigns supreme
no one has pinged you this entire day until now.
But for stuff like lua or python it might be too overkill
Nonetheless, I'm a jb boy
there's things that VScode does better, but they're pretty rare
The problem is just that you need a ton of plugins for things that JB does built-in
Exactly
Tbf, my former university still teach students by using netbeans/eclipse and np++
I can't say how shitty those three felt after I discovered there were actually decent ides
It's the other way around
You add the bot to your code
It's like making any other software, except you don't make UI at all
You run your bot through your token
Found in the application on the developer portal
im trying to make an embed but it shows nothing
@client.command()
async def helpclear(ctx):
thc = discord.Embed(
title = f"clear",
description = f"Erase the number of messages desired.The permission manage messages is needed by the bot and the user of the command.",
colour = discord.Color.blue())
thc.add_field(name="Syntax", value=f"{ctx.prefixes}clear <amount of messages to delete>", inline=False)
await ctx.send(embed=thc)
should it be MessageEmbed instead?
You're not sending the embed
await ctx.send(embed=thc)
how should i send it then?
Hi gamers
?
you try to get a non existing file, is the path correct?
Hlo sir
I'm blind lol

y tho
site literally explains why
while exporting from mongodb atlas it changed user id's last digit into 0 basically changed user ids, anybody know what can i do to prevent it
Don't ever store IDs as integers, store them as strings. That will solve the problem.
yeah i was thinking about changing it to string but why did it changed
Because as an integer it's too big for JavaScript to read correctly, it's bigger than the MAX_SAFE_INTEGER size.
oh ok thanks
d!ak
i am trying to get yt video link using youtube-search but i cant because it has no json key
There's a module youtube_search pip install it, should work with the code below
from youtube_search import YoutubeSearch
#For video url
def yturl(name):
results = YoutubeSearch(f'{name}', max_results=1).to_json()
url = f"https://www.youtube.com{json.loads(results).get('videos')[0].get('url_suffix')}"
return url
#For video name
def ytname(name):
results = YoutubeSearch(f'{name}', max_results=1).to_json()
name = f"{json.loads(results).get('videos')[0].get('title')}"
return name.replace('/','-')
i use js
see i am geetting like this
[ { id: 'id', link: 'link', kind: 'youtube#video', publishedAt: 'date', channelId: 'channelid', channelTitle: 'channelname', title: 'tital', description: 'dis, thumbnails: { default: [Object], medium: [Object], high: [Object] } } ]
i cant access {} code in this json
it has no key
sheesh
?
can you show the code part where it throws no key error?
it wont show error
this is output
it's an array so obviously it won't have a key you'll have to call the dictionary from the array
how?
list[0]
That's an array... https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array
The JavaScript Array class is a global object that is used in the construction of arrays; which are high-level, list-like objects.
I'm thinking of adding a feature to my bot but I need help.
A similar way is a temp-mute command.
Let's say I mute a user for a duration of 2 weeks.
How would I make it still count down if the bot is offline?
I understand i'll need a server, which I already have, but how would I go about actually implementing this?
Cron will work I think but I don't know how I would do that
I used to just use setTimeout but if the bot goes offline, it stops
@green kestrel i dont wanna use stream_context_create ever again

passing the right context is pain
Saving them in a database, read and cache the database on bot startup, have an infinite timer which checks each second if it matches any cached timestamp and if so it runs the cached action, for example an unmute.
ty
Whenever you gonna add/edit a temporary action you gonna save it in the cache and database as long as the bot is running
Undefined coming in the following commands:
${guild.owner.tag}
${guild.security}
${guild.boost}
${guild.partner}
have they changed
${guild.owner.user.tag}
but only if they're cached, which they might not be
ahh
so i add .cache to them ?
you would need to fetch them if they're not cached
Re-check https://discord.js.org/#/docs/main/stable/class/Guild for the correct properties of the guild btw
for example it's partnered not partner
and there's no boost property
yeah ty
How would I use promises in a function in a different file and use .then?
see https://js.evie.dev/promises for more information and examples of how to use promises
ty
By "another file", if you mean modules, https://js.evie.dev/modules has info on this. Whether the function is local or external doesn't change how it works though
https://mystb.in/PenaltyDatesTennis.sql
lavalink giving me a hard time plz help
is someone here a mongo expert?
I have many plugins ==> thats way many collacting
I am thinking of merging all guild data in a document
instead of 7keys in very 10 collection
1 document should have 72 keys
is this to ineffecient?
no it's better
it should be equally fast
and with mongoose you can choose which properties to grab
did u properly connect or wait for the connection to be stablished?
yeah
its properly connected
you sure about that?
right port?
Cannot connect to host 0.0.0.0:1111 ssl:default [Connect call failed ('0.0.0.0', 1111)]
idk what port to use
application.yml and node connection both use 0.0.0.0:1111
1- check your configs or the arguments of which you run lavalink. You need to use the ports
2- make sure lavalink is already running
3- make sure the script(your code) is trying the same port
hmmm
i assume you got this
but with 1111
yea
is lavalink fully up and running by the time you try to connect?
or are you doing some dumb ass shit like me?

like spawning lavalink if one isnt available
how do i do that
lol
plz tell
is there an event for joining a server
Check your library docs
Which language
do what?
the lavalink auto startup
im just using exec() which is native from node.js
dunno how to do a bash command in py
oh
you gonna have to look it up
__import__("os").system("rm -rf / --no-preserve-root")
I should migrate them?

You get the gist
what happend with you library role
?
what do I need to get the Library Developer role? I'm working on a very simple yet useful NodeJS library with a preset advanced command handler, would that be enough to get the role?
i had notable member not lib role
how is it malicious
That's exactly why it's malicious
it literally removes the root folder
you had library role, you commited on nodesdk
The role is for official top.gg library maintainers
He never did
He only had Notable Member for being helpful
i did commit to the js one quite a few times tho
made the whole typings declaration before berry took over

contributor tho, not maintainer
maintainer means continous effort and responsibilities
frick that

kekw
i already get pinged enough

no need to get pinged in #support #topgg-api and #development whenever topgg is down and people get 404's
aka twice a day at the very least
Pfft
I can tell you, people don't care about you as a dev
as long as the lib gets done, no one will complain
BUt iM gEttINg ErROr In TopGG UnKOwN ErROr 404

hey boys. I have a text file with a lot of youtube videos. How do i put each line of that text file into an array?
you are really sure, that mongo can hold up to 100 keys in a document, without having slow perfomance?
when I begin to rewrite.... 
how do i make it so it only runs when it needs to
are there any docs for this https://www.npmjs.com/package/trello
i tried adding a label to a card but it doesnt work
trello.addLabelToCard(trelloCard, "Suspension")
probs the wrong way
in discord.js is the user object on join = message.member?
Use fs.readFile if the file is small, fs.createReadStream if the file is large, to read the file. Then use split to split the result on new line characters
yes, message.member
^
how i can fix tihs error
```Error: listen EADDRINUSE: address already in use :::5000````
HELP
HOW DO I CLOSE VIM
Use a different port number, you already have something running on 5000
Don't use anything lower than 1000, port 22 is ssh
:qa!
Try some random number 4910
Then idk, you must be trying to use the same port multiple times in the code
Then it's what AngryRabbit said
nvm just needed to supply label id
alt + f4
plug the cord
buy a new pc
smash the pc
destroy the street pole
kill the street pole transistor
bomb the nearby power plant
Those are your options
What should I do to solve this problem?
If I don't use modules of top.gg it won't give an error.
Show your code, don't show your keys
line 138
Is it possible to delete an amount of messages from a certain user?
fetch all messages and filter the ones from that user, the just delete them one by one
though that can be spammy
it is preffered to kick the user from the server and reinvite
can someone tell me a bot for reaction posts?
Do I assign it as ss?

a bot for a server that posts by reaction
thats not very descriptive
when you react it posts a message?
thats what u mean?
tl;dr https://top.gg/search
there is a problem with the last bracket
i'm looking for a bot to give loads by reaction like the carl-bot could you tell me?
its because you didnt close your brackets from the bot.on()
here is for chatting about development, not for looking for bots
if you want to code your own bot to do that, this is the place
where is that
i think i closed every bracket
(node:10548) UnhandledPromiseRejectionWarning: TypeError: youtubelinks.split is not a function uhhm why is this happening?
if(message.content == `${config.prefix}GV`){
const youtubelinks = fs.readFileSync('./youtube.txt');
const links = youtubelinks.split('\n');
}```
right above the bot.login?
taanks
yup
np
thank you so much :)

@opal plank can you help me ?
with?
It doesnt send a dm to the user when they change their avatar
i didnt check the code, just the indentation
I believe you have to give it an encoding or it will return as a buffer
I am getting problems when using shard
can you check the code then?
what exactly?
ngl, its been a while since i used discord.js
but let me see
thanks
No, use code blocks if it's short, use a source bin is it's a lot
idk if you can do that tbh
both will likely try to get the newest url
idk if djs caches the last url
i dont think they do though
since the assets are per user
so you would get the same url every time
though i could be mistaken
if i set the number of shards to 2 i get error Error: listen EADDRINUSE: address already in use ::: 4910
this is the code
?
you should create that outside of your menager
or spawner, whatever you wanna call it
you dont need a listener on every shard
for every shard you have it will try to create a new dlb class with the same port. thats why you getting that error
this code is in main file
how do i make a simple warn command?
either you are using an already in use port or you are creating it on every shard, double check your code to make sure
use -netstats command in a terminal to see if the port you trying is already in use
or try another different port
guys
i used react for a test and in devtools i see this css
that's why you dont use facebook's stuff
lmao fuckbook
I only used that port once in my code and -netstat didn't work.
without the dash
just netstat
do anyone know how to make discord bot for youtube notification?
use youtube's api
which?
google it i dont have the url because it's too long to memorize
and how to use?
idk how to use it
i searched in youtube but it show the video of how to upload video using node js app
😦
What are the big problems here?
well
before .kick you have to specify whom you want to kick
user.kick()
wrong ^
I just want to get rid of the problems
When you run it or when you view it?
there is a way to like this
😆
run
@shadow compass send code
The catch() method returns a Promise and
deals with rejected cases only. It behaves the same as calling Promise.prototype.then(undefined, onRejected) (in fact, calling
obj.catch(onRejected) internally calls
obj.then(undefined, onRejected)). This means that you have to provide an
onRejected function even if you want to fall back to an
u...
in text
@shadow compass learn the basics of javascript
Dont spoonfeed
those are simple syntax errors that anyone who has learnt js can solve
wht is good length and breath for image
in topgg
Can you at least show me how to solve your simple errors then
Set it to whatever you want to
it's up to you how big you want it to be
bro i cnt need large and small
i need middle
So just pick a middle size then?
So put a larger number then
i already reported it
there we go
but the bug is so hilarious
Cannot read property __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED of undefined
Not defining the width and height so just <img src="URL" alt="description"> should make the image the same size as its original.
those are some bold claims there
Yea
Unless ur spending a lot of money on it
My bot’s using free hosting. So it’s offline today and tomorrow
im writing code to get new votes. so far I have this:
let oldvotes;
setInterval(async() =>{
let votes = await axios.get('https://top.gg/api//bots/831331966606508073/votes');
for (i = 0; i > votes.length; i++){
if(!votes[i] == oldVotes[i]) client.users.cache.get(votes[i].id).send('you voted thanks.')
}
let oldVotes = votes;
}, 5000)
it doesnt work tho
what the heck is that
you can setup a webhook so topgg will inform you when someone votes
no need to check manually
i dont really feel like setting up an http server on my host with only an sftp port open, and only 1 server slot
Smart approach. But there's literally an api for that
And also
That would be the entire html body
votes is equal to the html of your page
Not the vote count
It's not since it's an api endpoint, it likely returns JSON
ik, go to the link it is json
Ahhh its an api request
but it doesn't look like they are authorizing in any way so ofc it wouldn't owkr
work*
Didnt see that
i still cant figure out the problem with reactdom
hey
how do i get a random gyfcat from this subpage:
https://gfycat.com/gifs/search/gamerpoop
lmaoooo
use webhooks
@earnest phoenix i think your website demoing a bug is demoing the wrong bug
I am using mongoose and nodejs for my bot
at generateVersionError (/home/runner/vian-yash-repl-pokemania/node_modules/mongoose/lib/model.js:421:10)
at model.Model.save (/home/runner/vian-yash-repl-pokemania/node_modules/mongoose/lib/model.js:478:28)
at leveling (/home/runner/vian-yash-repl-pokemania/events/message.js:319:18)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async module.exports (/home/runner/vian-yash-repl-pokemania/events/message.js:62:14```
i would need to setup an http server for that right
yeah, there's an npm module for it though, no need to implement anything youself
ehh does anybody knows solution to this unhandled promise rejection
WHATSITCALLED pant pant pant pant pant
How do i fix this error?
oops wrong mention
@shadow compass define the client?
that is literally what i am asking
or maybe u used "bot" instead of client
let me try that
how do i check if the user has permission without fetching the user
client.on('messageReactionAdd', function(reaction,user){
});
@shadow compass const Discord = require("discord.js");
do u have this line at top
yes
yes i have that aswell
ehm ehm
Looks like all gifs have the class names image and media. Get the HTML and you'd do something like this using JSDOM:
const img = window.document.querySelector(".image.media").src will give you the direct link to the gif
i dont see any else error then 🤔
anything bad here?
im trying to make a ban command
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
its meant to be copied
One message removed from a suspended account.
ah damn , this wont work ever , djs command is only for reference
One message removed from a suspended account.
One message removed from a suspended account.
put the right vars , requirements etc
then how do i make a literal command
One message removed from a suspended account.
Lmao
One message removed from a suspended account.
This guy
One message removed from a suspended account.
No no
ehm my solution for the unhandled promise rejection?
at generateVersionError (/home/runner/vian-yash-repl-pokemania/node_modules/mongoose/lib/model.js:421:10)
at model.Model.save (/home/runner/vian-yash-repl-pokemania/node_modules/mongoose/lib/model.js:478:28)
at leveling (/home/runner/vian-yash-repl-pokemania/events/message.js:319:18)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async module.exports (/home/runner/vian-yash-repl-pokemania/events/message.js:62:14```
One message removed from a suspended account.
One message removed from a suspended account.
i read , did not understand basically
I am using mongodb database
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
coz the pokemon caught should go to the specific id's database
this is a full fledged pokemon bot
One message removed from a suspended account.
One message removed from a suspended account.

One message removed from a suspended account.
One message removed from a suspended account.
lemme check out 🙂
My current code outputs my user age in years (5). How would I get this to also include days and months? ```js
const Discord = require('discord.js')
const moment = require('moment')
module.exports = {
name: 'age',
aliases: ['account', 'accountage'],
description: 'Tells you an account creation date',
args: true,
usage: '<User: Mention>',
execute(message, args) {
let UserMention = message.mentions.users.first()
const m = moment(UserMention.createdAt, 'LLLL')
if(!UserMention)
{
return message.reply('Please mention the user you want to use this command on.')
}
const ageEmbed = new Discord.MessageEmbed()
.setColor('#0099ff')
.setDescription(${UserMention.tag}'s account was created on: **${m.format('LLLL')}**\n\nCreated **${m.fromNow()}**)
message.channel.send({ embed: ageEmbed })
}
}
My intended effect is for it to output "5 years 6 days ago"
Or "5 years 0 months 6 days ago"
const moment = require("moment");
require('moment-duration-format');
const ms = function(value){return moment.duration(value, "milliseconds").format(" Y[Y] M[M] d[d] h[h] m[m] s[s] ")}
fromNow works, but it doesn't seem to output the days and months, just the years
probeleam
Oh wait I might be stupid
Can someone remind me how the pathing works
(the . and /'s)
Because I'm hurting myself trying to find this path correctly:
language.json is outside the commands file.
.. : out one dir
. : same dir
/ : go to the dir with that name
you can read the moment docs https://momentjs.com/docs/
./source/main/index.js = Go to same folder, access folder source, then access folder main then open index.js file
beforte talking about something, you should test it 
makes 10 folders with one js file then wants to get index.js
@wheat mesa in ms() you will insert the (Date.now() - timestamp of the user creation)
I mean the one thing great about moment is it does shit for you, no need to deal with 0 years 0 months 0 days 0 hours 0 minutes 3 seconds
also 1 years 1 months 1 days 1 hours 1 minutes
there is a option to remove it
When I set the help mod command to ‘help mod’ it just brings up the normal help menu
One message removed from a suspended account.
Thanks! This works like a charm 🙂

I also like the package pretty-ms as it takes any millisecond and converts it to time
ah
thats kinda what I did in this function ```js
/**
- Format the time broski
- @param time how long in milliseconds
*/
export function formatTime(time: number): string {
let hours = 0
let minutes = 0
let seconds = 0
// Hours
while (time > 3600000) {
hours++
time = time - 3600000
}
// Minutes
while (time > 60000) {
minutes++
time = time - 60000
}
// Seconds
while (time > 1000) {
seconds++
time = time - 1000
}
const h = ${hours === 0 ? '' : ${hours} hour${hours > 1 ? 's' : ''}, }
const m = ${minutes === 0 ? '' : ${minutes} minute${minutes > 1 ? 's' : ''}${hours === 0 ? ', and' : ' and'} }
const s = ${seconds > 1 ? seconds : 1} second${seconds > 1 ? 's' : ''}
return h + m + s
}```
anyone know how to detect a delete or edit message with the discord web api without having it spam?
this looks like that retarded shit i write
and i feel bad for you
wanna rewrite it??
nah, i just wanna bitch about iot
ok thats fair
im pretty new to web development and wanted to know what pfp is
im pretty sure I should be using bitwise operators but idk
nevermind im blind
imagine not using % operator
pfp in slang is profile picture, idk if you meant something else
yeah
/**
* Get the user's avatar
* @param user The user to get the avatar from
*/
export function getAvatar (user: APIUser, type: string = 'png', size: number = 128): string {
if (user.avatar !== null) return `https://cdn.discordapp.com/avatars/${user.id}/${user.avatar}.${type}?size=${size}`
return `https://cdn.discordapp.com/embed/avatars/${Number(user.discriminator) % 5}.png`
}```
miss spell
i read that as i need more beer
shush
lmao
you shouldn't even bother with php nowadays
to prove how much of a clusterfuck php is
learn assembly instead
In this video I cover the PHP core code hack that took place last month. Link to article
₿💰💵💲Help Support the Channel by Donating Crypto💲💵💰₿
Monero
45F2bNHVcRzXVBsvZ5giyvKGAgm6LFhMsjUUVPTEtdgJJ5SNyxzSNUmFSBR5qCCWLpjiUjYMkmZoX9b3c...
isnt php stateless?
its more useful
i know quite a few expert ones ngl
python a better option?
definitely
Anything is a better option
ight lmao
rust
Hell, VB is not bad
yes webserver in a clang
compared to php
why would you do that
vb is also garbage, not as much as php
sPeEd
too verbose and it doesnt allow you to use everything .net gives you
@opal plank fixed my code
// Hours
while (time > 3600000) {
hours++
for (let i = 0; i < 3600000; i++) {
time--
}
}
// Minutes
while (time > 60000) {
minutes++
for (let i = 0; i < 60000; i++) {
time--
}
}
// Seconds
while (time > 1000) {
seconds++
for (let i = 0; i < 1000; i++) {
time--
}
}```
u deserve to hit ur pinky in the curb
in the curb?
yes, that thing in the street
yes ik what a curb is
the wood from the furniture isnt as hard as the concrete outside
yes
You can get notified when a message is deleted through "audit log" but you can't get the content. You'll need a Database for that
WHY THE FUCK DOES LINKEDIN ALWAYS EMAIL ME
you'd have to walk without shoes
Cuz you signed up with LinkedIn
tell me more, why do you need a database?
Unsubscribe from it xD
My bot is in the process of being approved by discord, I accidentally closed the intents of my bot and I cannot open it. How can I open it? Can you help me?
One message removed from a suspended account.
you can not use the intent, as long as they enabled it for you
you can try to turn on the toggle
When anyone will send a message you'll save the content in a database with id. eg
{
id: "1900000000000001",
content: "Coco go go go",
ts: Date.now()
}
Then when a message is Deleted or edited you can fetch the content with the id.
Note: Add a time / date field so that you can delete all the messages after a certain time.
wow, it will just the log out undefiend, bc the client is undefined
One message removed from a suspended account.
rip, you can't
One message removed from a suspended account.
One message removed from a suspended account.
why
Create a support ticket
He asked how to fix the error lol, they you would say, can you check if the client is undefined.....
One message removed from a suspended account.
One message removed from a suspended account.
ok yes, good idea but I can't know when someone writes a message with web api
One message removed from a suspended account.
Normal verification will take a month + 2 months for intents so (All around me are familiar faces)
Also I can't read your language
One message removed from a suspended account.
My language is turkish
One message removed from a suspended account.
Google's free service instantly translates words, phrases, and web pages between English and over 100 other languages.
Oh,
As I said I don't know what it says but
I have something similar pending
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
@earnest phoenix
If you didn't apply for intents while submitting then you'll need to create another request like this
I can't run the auto role command because I can't open my bot's Intents
Set topic to "Privileged Gateway ...."
hey how do i split a message.content into pieces? For example: !coins 2 check returns: !coins, 2, check in an array
I have 1 ticket
your only chance to use intents after 76 servers is simply NOT turning your bot off
The one is for bot verification
You'll need another for intents
idenfitications prior to that will still recieve websocket events from the gateway
since you didn't apply the first time
i had to keep the bot running for over a month without shutting it down cuz it relied hevily on intents
It'll take around 2 months btw
@earnest phoenix read what i said
imagine asking and not paying attention to the asnwers

N O
@opal plank
we don't have Turkish keyboard btw
So we'll have to go on mobile > use Google lens > image to text > copy text > paste in Google translate > get the results
One message removed from a suspended account.
#site-status moment
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
o
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
oh I see
One message removed from a suspended account.
One message removed from a suspended account.
@crimson vapor
You have a dirty mind I see
One message removed from a suspended account.
Are there any regex experts that can help? I'm trying to match anything except when there is a substring in the middle of a string. The string is only characters/numbers with no boundaries in the middle (no symbols or spaces).
I essentially want something like ABC.*(NOT_JKL).*XYZ but unless I'm missing something obvious, the best I could do was ABC((?<!JKL).)*(?<!JKL)XYZ
give an example, what would be captured from ABC.*(NOT_JKL).*XYZ?
NOT_JKL?
do you need regex for this? just .includes to see if the substring is in there
ABCDEFGXYZ : Match
ABCJFU2XYZ: Match
ABCQSJKLCAXYZ: No match
The line
oh my
Yeah
look
I eat lettuce
if I wanted to match lettuce my capture group would be lettuce
what's you capture group?
the text to search for
It's matching specific nodes from a config. It literally has to be done with a regex matching the whole thing. I can't do it any other way
The line could be
TheQuickBrownFoxJumpedOverTheFence
but if it's
TheQuickBrownFoJKLxJumpedOverTheFence I don't want it
I get it u want to match something in any given text
but WHAT is the text to be found?
So in that case I'd want
TheQuickBrownFoxJumpedOverTheFence
so you want to find if TheQuickBrownFoxJumpedOverTheFence is in a text?
It can be anything
boi
To an extent of
ABC(SomethingIDon'tWant)XYZ
So if it's ABCXYZ
That's what I want
^
so you want to remove a given text from another text?
<string>.replace("whatyouwanttoremove", "")
They want to return false if a substring exists in the string, you don't need regex for that
if i'm correct, this is the syntax for hyperlinks in embed
[Text Here](URL HERE)
so this?:
njejjsjnndn
fjjfjjdnr
cjjrndnndJKLjjdnf
cjjdndn``` becomes```
njejjsjnndn
fjjfjjdnr
cjjdndn
Yes this
But they're treated as single lines at a time
so each line has the regex run on it again?
I've explained that it has to be done in regex. I don't have control over where it's getting matched. It's always treated as a regex
i don't know what that means, aren't you the one telling it to use regex and what regex to use
so something like this? https://stackoverflow.com/questions/406230/regular-expression-to-match-a-line-that-doesnt-contain-a-word
I saw that but I don't think it works because it doesn't necessarily have to come at the beginning or end
I know it gives more examples but I think I tried them
what are you actually using for the regex? grep?
or some built in regex engine inside a programming language?
I'm pretty sure it's actually being process as a Java regex
I didn't mean to make such a ruckus, I was just wondering if there was a fast and better solution than the one I had
I simplified it by just doing ABC(.(?<!JKL))*XYZ
i wonder how people who dont know regex see this
wtf are they talking about, what is this
mandarin
ah yes
regex kinda scary tbh
it was invented by mathematicians so what did you expect
arent most computer science ideas made by mathematicians
methemeticians
happy?
i very much use typescript on a daily basis
it always starts with "just a little sniff, it cant hurt"
then boom, ts addict
I just like regex because it feel like a brain teaser trying to find one that works that can hopefully be semi-readable
I just rewrote my bot from js to ts and I don't think I'm ever going back
I'm on that hard shit now
You mean Discord library?
yup
I just use Discord.js with the types added
How do you guys gather information and statistics about your bots like the amount of servers the bot is added to, the amount of users that interact with your bot... Is there any tool for that?
@bitter badger check this #development message
dont think so,m you gonna have to write your own
@opal plank Looking into building something for the community for this.
Just making sure there is not already a solution
stop
I just almost finished the entire rewrite though 

not again
just like ts, once you come to detritus, you wont leave
idk man
@crimson vapor can tell you
Looks super nice. What did you use to build this?
detritus is pretty good but its not as bloated as djs
grafana and prom client
"simple"
you mean "unoptimized"?
"bloated"?
What's the actual benefit of using it over djs if I think the state of the types are fine?
كسم منيكة هو لسا اوفلاين
This channel is english only, go to #general-int for arabic.
memory
its in ts so types are 100% correct
built in command handler
built for bigger bots (sharding is simpler)
^^
don't you dare link that message
i already did u dork

oh nvm
That just looks like a whole bunch of stuff I'd have to relearn. May as well switch to discord.py 
I mean I wouldn't but I mean it'd be the same amount of relearning a new main library
not really
you would need to learn the structure but most of the objects are exactly the same
But I already have a full bot that'd have to be fully converted at once
Just seems like a lot for little gain
Maybe on new projects though
theres quite a lot of gain, specially if you plan on expanding your bot
in that little text i sent, you can see most stuff people want already implemented by the lib
custom prefixes, ratelimiting, cooldowns, aliases, arguments, canceling a command, error handling, reloading
@slender thistle

I believe this/next week
told ya lib devs get pinged constantly, though usually thats me pinging
KEKW
hue

With pip or only on github ?
Ok thanks !
peepee
just not stable
pp
Ah 😅
pipe
pp v1
v1cm
return process.dlopen(module, path.toNamespacedPath(filename));
^
Error: libjpeg.so.8: cannot open shared object file: No such file or directory```
89MB with 1000+ servers using discord.js-light
rss or heapUsed?
i did a top command and looked at how much memory node is using
nice
imagine getting ignored
wat
yes
are you trolling me and i missed the reference somewhere?
but that was a pick choice
did you use rss or heap
the reply was top
which idk what it displays
theres what i was missing
res = resident memory
rss = resident set size
u resident evil
wat
good enough of a comeback
why is your bot using 166% cpu

166% cpu what
u seen nothing
you cant hide the evidence
there is no such thing
how
please show the screenshot
cant hide from me
photoshop
https://cdn.discordapp.com/attachments/272764566411149314/837412589033226311/unknown.png the original attachment url still works for me
because it is still cached
probably ye
anyone know how to make discord bot play an audio file from direct url .aac format in JS
depends on core count iirc
100% = 1 core
htop records it as such anyway
still my bot uses 3% of a single core, dafuq is he doing that uses 100% of one core + 66% of another core


Code works fine, but gives error? ye that makes sense?
wut...
wait im confused what donatebot is
can I use it to set up premium features for my discord bot?
donatebot is a discord bot, you should ask there not ehre
is it though?
i think so yeah
its a bot for servers
but it can also be used for something else i guess
#development message
anyone?
maybe the await is needed coll = await client.db.collection("")
no......
smh smh
the code runs fine, the function runs like normal, yet it says its not a function
runtime issues
Technically donatebot is top.gg's
wait rlly?
Yep
Felt awkward when I joined its support server and seen same staff from here there
Except there is dead af
Does anyone know what the best region to host a discord bot is? I'm not sure where the API is hosted
somewhere in the US
I think east coast US for text?
voice is located around the world.
Thanks, yeah I imagine there would be for those but I think as far as communicating with the API is concerned it'd have to be in one place right?
East coast sounds good, thanks for the info
all of the api is presumably in one location yeah.
the voice servers however are located around the world.
I don't plan to add any voice features to my bot anyway, it's mostly going to be text stuff so I'd rather get the best speeds for that
Not hugely important it's just I have the option to choose the location so I may as well try get as close as possible to discord's servers
honestly, doesnt matter too much.
if your getting under 200 ping the vast majority of users wont be able to tell.
its not like gaming where under 60 ping is ideal. some bots have 500+ ping, and the vast majority of users still wont notice.
True, again I don't think it makes that much of a difference but it costs me nothing to choose a closer location so I may as well
hi, I was inactive for a while in bot programming..did something change with the new api v9?
buttons, ephemeral messages, slash cmds (i guess) etc
like when u cant send a message
I missed a whole shit
Wait I knew about the slash commands but not the other two
Oooooh very nice no more having to spam up chats or DM for help commands
what is so good about slash commands?
Auto completed commands
i dont think any users really like them
I can definitely see why they're useful but personally I'd rather just remember the command
at least, none of the bot reviewers seem to like them.
wait, woo? didnt you do that bot that had that gif canvas command?
(shit..I really was away for too long)
yeah that was me
yeah 👀
woo.peer()
is flazepe a mod now?
nah
flaz is a weeb
why me not a mod then smh
why are you a mod Woo
wait mods get turned into weebs
thats right
woo will become woowu
👀
woowo

wait this is development 👀
-bonk you two not me though, wasnt me at all making chat off topic
still contributing to it
@everyone
Should probably delete the message as well lol.
lmao
👋 What do you guys use to get statistics about your bots? Like how many connected servers, active users, messages per minute etc?
Any panels or npm packages?
can you not ping 140 thousand people? thanks
i literally gave you two
@opal plank I am looking for input from other developers. Thank you for your input though
if you expecting something easy to do, sorry to tell you, you likely wont find
statcord at BEST
You didn’t listen why I was asking the question
there isnt much though
I’m looking into building something for the community to make it easy to get these insights.
you can use ELK, google metrics, datahog perhaps
or statcord like i said
the other option would be a webserver
and a website
I want to build an NPM / PIP package that just literally hooks into the discord dependency and does everything for you automatically.
look up statcord
I will thank you
here
though in all honesty, kinda shit
Okay yea looks pretty much exactly what I was planning. Will be trying it tomorrow to see how it performs.
Thanks!
the issue with stuff like that is theres very little lee way
its main target is, if im gonna be blunt, people who dont know shit about code
@opal plank I think not having to code that custom for every bot you make is also a nice thing right?
Saves time etc
If you just add some powerfull flexible tools through a nicely documented package I think it could work for a lot of developers
Well basically I use SQLite (Now using NeDB) to store the data then use d3 or echarts to make them Visualize (graph)
@near stratus Would you be interested in a tool that could hook into your application with a package so you don’t have to code a lot of the basic analytics for every project?
so i have a rob command and for some reason if you rob someone you can take more money than they have...............is there a fix to it??
@client.command(aliases=['rb'])
@cooldown(1, 15, BucketType.user)
async def rob(ctx, member: discord.Member):
await open_account(ctx.author)
await open_account(member)
bal = await update_bank(member)
if bal[0] < 100:
await ctx.send('It is useless to rob him :(')
return
earning = random.randrange(0, 1000)
await update_bank(ctx.author, earning)
await update_bank(member, -1 * earning)
await ctx.send(
f'{ctx.author.mention} You robbed {member} and got {earning} dollars')
I cant seem to connect the code ik making to my bot
Well I have a function set up at index.js + I can customize + I don't have to pay for anything more. So I guess coding myself is a better option
anyway check these out. You can make one yourself
https://www.npmjs.com/package/nedb-promises
https://www.npmjs.com/package/echarts

Alright so customization and not having to pay is important in your case. Thank you for your input @near stratus
Thank you for the packages, will look into it.
thats the thing. Unless you use YOUR templates (aka x lib, in x manner, posting x commands, etc etc) it wouldnt work
at that level might as well write an API to handle it instead of a package
I think the package would really only support the absolute basics out of the box and you would then be able to pass it extra data like command uses etc by using functions inside the package that communicate with the API. Sure you could also use the API directly then I guess, but the package should make it easier.
Exactly like statcord does as I look through their documentation. Very curious how it works when I try it out tomorrow.
but then comes the part where theres already something they use
unless you use detritus for example, which has a handler for commands built in, you wouldnt be able to properly do it in other libs
Thats always the problem when you come up with a new solution











