#development
1 messages ยท Page 169 of 1
currently working on this, the nuclear option against people pasting screenshots of code on the D++ discord
its called Yeet and it'll Yeet the images and mute repeat offenders
i dont know if i want to make it a public bot yet, as it will potentially eat TONS of resources
add a nuke bomb gif
hya im trying to make a bot for my own server can someone help me please
that's.... really vague. what library are you using?
sure, what knowledge do you already have about bots
i already have most of it done its just for a game server stats and all that im having an issue is with the OAuth2 as the bot wont join from the links that it makes
this is the worst captcha i have ever gazed my eyes upon
its a government website as well ๐
might as well just not have one at all
save the attackers a few seconds
Anyone worked on the new Modals here yet?
Trying to get a ChannelSelectMenu in the modal but having odd issues and cannot find much documentation about adding other inputs than just text inputs, this is my current approach:
const channelInput = new ChannelSelectMenuBuilder()
.setCustomId("channelInput")
.setPlaceholder("Select a channel, preferably a good-lookin' one")
.setMinValues(1)
.setMaxValues(1)
.setChannelTypes(ChannelType.GuildText);
Does anyone know a good transition between the image above and the footer
i know that the footer needs to be moved to the top lmao. But still idk this transition between footer and image is looking hella bad.
its not bad tbh
just reduce the size of the white space
and increase the spacing of the footer elements
for example push the middle column more to the right, to give the left column more space
reduce the font size of the lft column
and bring the image closer, ideally you would aim for equal distance from text to image and from text to page end
got the code-screenshot-deleting-bot working ๐
https://github.com/brainboxdotcc/yeet
Because unless it something they recently added, it only accepts text input.
Yup, figured it out, the documentation itself stated otherwise and said that channels were supported however that wasnโt the case. Ended up putting in a PR at Discord.JS earlier on.
I think it's a to-do to add support for other things in the modal thing, but knowing discord it'll probably come out in like 5 years.
what is this for
Thanks heaps guys , appreciate it ๐ค๐ป๐ค๐ป
it deletes screenshots of code
why
but it can be configured to delete images with any specific content in
because, screenshots of code are against our rules on our server
they're supposed to paste the code itself not a screenshot of it
screenshots aren't searchable, are unfriendly for those with a screen readers etc
plus they often lack context
inb4 wall of text
for programming help a wall of text is far more useful... you can't paste a screenshot into your editor to replicate a programming problem...
I mean you can always use the scrollback
i mean, isn't that also the same for pasted code text?
no
what if someone pasted a code and said "why this not work"
you can copy and paste it
but they do that with screenshots too
and you're even less able to help with a screenshot
oh and then there's mobile users where the screenshot is beyond useless
and the people who take photos of their monitor with their phone
the interesting thing though is the words it detects in images are configurable, so you could for example block images with racist memes
it's pattern matching, not AI
means it's much easier for a server admin to control and set up and ready to go quicker without a long training phase
fairs
I have an doubt my freind account geted ban
He needed to apply
For approving the bot what do?
He can apply with this discird account
Do you mean "approving" the bot on top.gg or on discord
Because these are two different things and since you're asking on this server, I assume it's the first one
Bro gotit
should I make a vote perk 1.25x xp or something
idk what else to add that isnt totally unfair
I mean, it's not exactly "unfair" if it's available for everyone is it?
well, skill issue 
no but I dont like op vote rewards
It depends a bit on your approach. Such a bonus is not much, but it is always something in exchange for a vote, but will it be so profitable to vote for a bot?
It should be worth it but not a big advantage
thing is, if you give too little there'll be no incentive to vote
Yea, you need to find balance
I dont have any global features is the thing
everything is bound to servers
wait
I have an idea
what if I make a vote shop where u can decide on which server to claim reward
for my bot I give a sum of currency + a stack of vote
then I could add more
with 7 stacks u can exchange for an exclusive currency, which can be used in the shop
my economy is very work in progress currently
I dont even have a shop yet lmao
yeah I think im gonna make a vote shop
I'd not worry much about people banned from topgg, it's a consequence for their actions
if they want they can appeal for an unban
later on if you add your bot to more lists you can integrate with them, if there's an api at all
if they get banned from them too, well, they're forcing the bar
Personally, I'm a fan of expanding the bot's functions rather than completely blocking it behind a vote wall
Same for pay walls
yea
how to add no prefix in discord bot js
Looks like you already did
const args
previously
oh okay, just delete the question ๐
I cant answer that sorry ๐
its ok
no prefix is arguably a terrible idea depending on your intention
especially if one of the commands happens to be a commonly said word
can u tell me how to add cooldown on every cmd
on js
store the timestamp of the last time a command was used by that user
then compare with the timestamp of when they try to use it again
if it's less tha X millis show an error message
im fixing a diff dev's stuff and he's using postgres with user password "password"
how do i create a user without getting "peer authentication failed"
well, ur getting auth error because either the user or the pass dont match
or they're using an ssh key for authentication
password best password
mate ๐ญ
firewall is turned off on the server
careful not to enable it before doing ufw allow ssh
duh
i need to make an acc with a password that won't error
I copy pasted the passwords
and it no worky
CREATE USER xxx WITH PASSWORD yyy CREATEDB
and when i put xxx yyy in node, it errs
does it work with the existing user?
What about 1234?
2444 tho
my bycicle lock pin is 1024
I either use 2^10, 2^11, 2^12 or 2^13
not what I mean
are u able to connect normally through the existing user?
or does it error too?
^
this user with "password" as password, is it able to connect?
dropped it
๐
through node
I'm asking because you had to check whether they're using an ssh key or not
yes it was using password
if it did error when connecting, then that'd be the reason
...again, not what I mean
u can use pass AND ssh key
ur in quite a risky situation then
there is no data
try psql -u theuser to see if it's created correctly
replace theuser with whatever user u created
psql: error: FATAL: Peer authentication failed for user
when u ran CREATE USER theuser WITH PASSWORD thepass CREATEDDB, did u put ; after it?
no 
that's the reason then
fuckin hell
u never finished the statement
psql cmdline allows multiline statements, so it'll only execute when u finish it
what did u run?
yw
not really
it's actually much better and safer this way, plus iirc mysql does this too
postgres always give u an output when u run a command, like > CREATE or smth
if u see nothing, it's because it's still awaiting a semi

if the cli didn't support multiline you'd be forced to write statements in a single line which...would be horrible
I dont know why I switched to postgres, I dont know what it does better but
๐ฏ Postgres best !!
postgres users dropping their entire database by accident
the gitlab incident
That must have been a long day
was using mongodb for collections of 600k+ docs
Couldn't imagine myself using nosql, maybe for cache or random data but not for complex systems
Idk, I'm too used to relationships
im using postgres for random data sometimes
just an id + maybe unique identifier and just random jsonb data
Ironically, that's still not random, as all data within that table is grouped by some purpose
For example, I have a table called dynamic_properties
Which are basically variables that are to be persisted and manipulated during runtime
The grouping purpose is that all of them are variables
Even tho the value they hold is seemingly unrelated
Imagine being in a relationship
๐
did ya get divorced
asd
how do i create this in djs?
that's generated by discord no?
I did
its just the channel url
discord formats it that way
no hugging only debugging
sad to hear that

Lol
i've been trying to do this for a few days but i cant make sense of it
i want to make a proxy server in node that logs all requests where the responses' content type starts with application/vnd
with https support
(and then start chrome with the proxy server flag)
ive been looking at https://github.com/http-party/node-http-proxy but
the target should be anything for me
hello im using tailwind for my website but the classes are not working on vs code , like absolute bg-white etc
you mean autocomplete or whatever?
if the classes arent working it wouldn't be the editor's fault
nope , like css classes
that wouldn't be vsc's issue
Ask your question, someone will respond if they know an answer
Ok
Like in my mobile the website is working fine
Like this
But whenever i switch my website to desktop mode some white space appears on below the footer
How to fix this issue
Did you make this yourself or did you just copy paste it from the internet
Something is probably wrong with the CSS targeting your body/container element
How to fix that
tried ```js
import * as Promise from "bluebird";
// and
import {Promise} from "bluebird";```
Well, I donโt know, you need to show some code
Keep in mind that itโs going to be hard to help if you didnโt write the code yourself
Why are you using bluebird?
Promise.map
I can edit just whats the problem
^^^
Do i send the code here or in dm?
Here
The html or css part
Whatever is relevant to the issue, so probably the CSS and some HTML
Use the built-in Promise.all() method by passing it an array of promises (or mapping to promises, using <Array>.map())
Ok let me send the css
ul {
margin: 0px;
padding: 0px;
}
.footer-section {
background: #151414;
position: relative;
overflow: hidden;
word-wrap: break-word;
}
.footer-cta {
border-bottom: 1px solid #373636;
}
.single-cta i {
color: #ff5e14;
font-size: 30px;
float: left;
margin-top: 0px;
padding-left: 15px;
}
.cta-text {
padding-left: 15px;
display: inline-block;
}
.cta-text h4 {
color: #fff;
font-size: 20px;
font-weight: 600;
margin-bottom: 0px;
padding-left: 0px;
}
.cta-text span {
color: #757575;
font-size: 15px;
padding-left: 15px;
}
This is the half code
Send the rest
footer-content {
position: relative;
z-index: 2;
padding-left: 15px;
}
.footer-pattern img {
position: absolute;
top: 0;
left: 0;
height: 330px;
background-size: cover;
background-position: 100% 100%;
}
.footer-logo {
margin-bottom: 30px;
}
.footer-logo img {
max-width: 200px;
}
.footer-text p {
margin-bottom: 14px;
font-size: 14px;
color: #7e7e7e;
line-height: 28px;
}
.footer-social-icon span {
color: #fff;
display: block;
font-size: 20px;
font-weight: 700;
font-family: 'Poppins', sans-serif;
margin-bottom: 20px;
}
.footer-social-icon a {
color: #fff;
font-size: 16px;
margin-right: 15px;
}
.footer-social-icon i {
height: 40px;
width: 40px;
text-align: center;
line-height: 38px;
border-radius: 50%;
}
.facebook-bg{
background: #3B5998;
}
.twitter-bg{
background: #55ACEE;
}
.google-bg{
background: #DD4B39;
}
.footer-widget-heading h3 {
color: #fff;
font-size: 20px;
font-weight: 600;
margin-bottom: 40px;
position: relative;
}
got it all g
Now youโre gonna have to wait for a CSS wizard to come help :^)
footer-widget-heading h3::before {
content: "";
position: absolute;
left: 0;
bottom: -15px;
height: 2px;
width: 50px;
background: #ff5e14;
}
.footer-widget ul li {
display: inline-block;
float: left;
width: 50%;
margin-bottom: 12px;
}
.footer-widget ul li a:hover{
color: #ff5e14;
}
.footer-widget ul li a {
color: #878787;
text-transform: capitalize;
}
.subscribe-form {
position: relative;
overflow: hidden;
}
.subscribe-form input {
width: 100%;
padding: 14px 28px;
background: #2E2E2E;
border: 1px solid #2E2E2E;
color: #fff;
}
.subscribe-form button {
position: absolute;
right: 0;
background: #ff5e14;
padding: 13px 20px;
border: 1px solid #ff5e14;
top: 0;
}
.subscribe-form button i {
color: #fff;
font-size: 22px;
transform: rotate(-6deg);
}
.copyright-area{
background: #202020;
padding: 25px 0;
padding-left: 15px;
}
.copyright-text p {
margin: 0;
font-size: 14px;
color: #878787;
}
.copyright-text p a{
color: #ff5e14;
}
.footer-menu li {
display: inline-block;
margin-left: 20px;
}
.footer-menu li:hover a{
color: #ff5e14;
}
.footer-menu li a {
font-size: 14px;
color: #878787;
}
Full css code for that part
Who is he?
Idk, someone will eventually help
Iโm just not very good with CSS so I canโt give a very good answer
Then you should use https://www.npmjs.com/package/p-limit , it's the best library for this purpose
Bluebird works for me now, do you hate it? is it bad? wsp
Bluebird is gigantic for such a simple purpose, but if you don't care about that then keep using it
ok hai
im using fluent-ffmpeg
with this version of a commnad
ffmpeg -allowed_extensions ALL -i ".m3u8" -y -threads 4 -c copy -bsf:a aac_adtstoasc ".mp4"
when i run this cmd in my terminal, it works just fine
but if i run it with fluent-ffmpeg, it says invalid data found
what's the diff between Promise.map and Promise.then?
Promise.map is not a thing, so i assume its some lib like bluebird
should be the same as Promise.all(array).then(array => array.map())
go to desktop, press F12, inspect element
we're out here
didn't understand
How do i fix this space
For desktop mode
Im on mobile
well, that'll be hard then
I can use replit
Or i can send you the website link if it helps
the link would be helpful yes
https://senpaianime.netfy.me/index.html
Ignore the main part
well, already saw the issue
what?
Yeah I didn't add anything
that's the issue
How do i fix it
add stuff
Adding stuff will fix it?
yes because it'll add height to it
like long paragraphs
Cant i change the height
or something
you can, but that'll solve nothing
it'll still be a huge white area in an empty site
just that the footer will be on the bottom
let me try
add content and it'll be solved naturally
and add content
you were right
I added some contents and it got fixed
Thank you
yw
anyone good with htaccess rewrites? i need help
i have a website on a cpanel hosting service and shit, and recently changed the primary domain so everything about this shit changed
what i had before was like this:
root
- vendor
- includes
- domainfolder
- index.php
- .htaccess
the domain's root folder was domainfolder, and from there index.php accesses the includes folder, and htaccess has a bunch of standard rewrites, basically all paths should be handled by php
but now after the change its like this:
- public_html
- vendor
- includes
- domainfolder
- index.php
- .htaccess
- .htaccess
and the primary domain's root folder is public_html and cannot be changed
so i need to rewrite everything to domainfolder
all my attempts so far are failing miserably
great
i hate how windows file deletions take so long
like on a linux system, its basically near instant
but nah, windows is like: brb gotta look around for a bit, come back in 10 min
shift delete
use the command line
only explorer is so slow
too much work ๐ค
need a better explorer
Make your own
directory opus
My font is not working for my website do you know why?
Im using custom font but it is not working
wtf is this discordjs non sense
This shit is not letting docker build at all, idc if its deprecated, im not using it
but it like hangs the docker build
wtf
?
give it some time
is there any reasonable way to loop over all discordjs interaction options? I tried using <CommandInteraction>.options.data but its structured very weirdly
Why do you need to loop over them?
to get all values
its a global function so I dont know which exist beforehand
nvm I think I understand the structure
yeah its nested with the subcommandgroup / subcommand
weird
Hey
Can anyone help me
If i use margin-bottom: -20px;
My text is going down the footer
How do i fix this
what are you trying to do?
The text is going down the footer
How do i make it not go down
by not using a negative margin
But i want some distance between the image and the text
then use margin top with positive margin...?
To i mean i want some distance between the image and the text
Down side
what class are you adding the negative margin to
just add the opposite margin with a positive value

Then the text goes upward
what do you mean with this?
Do you want it to be bigger?
@wraith pilot
whole css code?
Or that part
<div class="centered-text">
<p style="text-align: left; padding-left: 10px; margin: 1rem 0;">"Teasing Master Takagi-san" Final Chapter promo art by Souichirou Yamamoto.</p>
</div>
@real rose
if you want that space to be bigger, use margin-top
Its fixed someone send me a different code for that part
did they load before and now they dont?
or you just added them and they dont work?
The font work
But i want to change so i change it
But the same shows
Not the new one
what do u guys think of this page https://rjansen.de/servers
look swag
I have that using hetrixtools: https://status.hopefuls.de since I'm too lazy to make that myself
Hopefuls.de - Uptime Status
built in discord notifs too
tbf
const estTimezoneOffset = -5 * 60; // EST timezone offset is UTC-5
const currentDate1 = new Date();
const utcTimestamp = currentDate1.getTime();
const estTimestamp = utcTimestamp + estTimezoneOffset * 60 * 1000;
const estDate = new Date(estTimestamp);
let currentDay = estDate
.toLocaleString("en-US", {
weekday: "long",
timeZone: "America/New_York",
hour12: true,
})
.toLowerCase();```
does anyone know why my currentDay is not working properly for the est timezone?
For some reason if i try it out at 12 am the bot gets confused or sumthing. Look at this:
if i convert the discord timestamp to the est time, it shows that it happened on thursday rather than on friday..
i am reetarded af. My vps is running on some server in north america so the date.now() -5 is specified to convert from cest to est lmao
lmao
your website looks cool
but the discord icon is a bit wack though
there are also two donate buttons in the mobile page
yeah it almost looks like a mastodon icon
really goofy
Yeah I gotta find a new one
also pls dont use X
use twitter
ffs lmao
im pretty sure nobody out there actually calls it X
I saw some articles when I was looking for something recently, they called it Twitter but added an X in brackets
I don't know why but it's quite funny
formally twitter
still uses twitter.com domain
check out my x
check out my y
Apart from news media since they're required to follow branding guidelines
So they have to mention X
what's this in node/js?
in data analytics does anyone know why we tend to use n-1 when calculating the covariance rather than n?
My textbook for some reason tells me to just use n, but the whole internet is using n-1..?
ew fs-extra
What Node.js version are you using?
This is not where the error occurs, the screenshot you showed of the error is telling you that you're using fs.rmdir() or fs.rmdirSync() somewhere on a non-empty directory without the appropriate options
Can you show the full error then?
line 108
Then not sure, your system is either using a Node.js version that doesn't recognize those options, or something is going completely wrong somewhere
node issue!!!
I absolutely can't reproduce your issue
is it possible to send a message where the mentions dont actually ping but are still there?
yes
copy the role id, bot id. i dont think you can do it with members though. it usually WORKS when you dont have permission to mention roles, but im not sure if there isa solution for administrative users
What Discord API library are you using?
discord.js
See the allowedMentions option
https://old.discordjs.dev/#/docs/discord.js/14.13.0/typedef/BaseMessageOptions
Discord.js is a powerful node.js module that allows you to interact with the Discord API very easily. It takes a much more object-oriented approach than most other JS Discord libraries, making your bot's code significantly tidier and easier to comprehend.
For example, if you do <TextBasedChannel>.send({ ..., allowedMentions: { parse: [] } }), it'll mention anything but not actually ping
Yes it does look like a regular mention
You're welcome
ok I actually found an issue with that, can I like only make 1 of the mentions ping? a specific id?
oh yeah nvm
just add it to the parse array right
this should now only ping the reminder owner right? https://fs.rjns.de/v/SHdNKVeinqJeaWOfca
ignore typo
Yes
alr, thanks
You're welcome
are message edit ratelimits per token or per ip? Ive been having message edit ratelimit issues on one of my bots but not the rest (all running same codebase on same ip)
Rather per token
I host 3 bots at the same time and I had no problem sending or editing messages
I mean it may also be my code, since I have a button that is in a queue so im deferring it but because of that I need to edit the original message when its my turn out of the interactions scope so it counts towards ratelimits
this basically
import Button from "@/bot/button"
import { ActionRowBuilder, ButtonBuilder, ButtonStyle } from "discord.js"
const button: (giveawayId: number) => string = new Button()
.setName('giveaway')
.listen(async(ctx, giveawayId: number) => {
await ctx.interaction.deferReply({ ephemeral: true })
await ctx.queues.giveawayEnter.addAndWaitForFinish(async() => {
let entries = await ctx.database.giveawayEntry.count({
where: {
giveawayId
}
})
const entered = await ctx.database.giveawayEntry.findUnique({
where: {
giveawayId_serverUserId: {
giveawayId,
serverUserId: ctx.metadata.serverUserId
}
}, select: {
id: true
}
})
if (entered) entries--
else entries++
await ctx.interaction.message.edit({
components: [
new ActionRowBuilder()
.setComponents(
new ButtonBuilder()
.setEmoji('1163537482063818823')
.setLabel(entries.toString())
.setCustomId(button(giveawayId))
.setStyle(ButtonStyle.Primary)
) as any
]
})
if (entered) {
await ctx.database.giveawayEntry.delete({
where: {
id: entered.id
}, select: null
})
} else {
await ctx.database.giveawayEntry.create({
data: {
giveawayId,
serverUserId: ctx.metadata.serverUserId
}, select: null
})
}
if (entered) return ctx.interaction.editReply('`๐` Successfully left the giveaway. *on accident?*')
else return ctx.interaction.editReply('`๐` Successfully joined the giveaway. *good luck!*')
})
})
.export()
export default button```
I tried using update & followUp but that just errors that ive already replied
what type of ratelimit are you getting?
edit share limits with send, so 5 per 5 per channel
I don't even know, I looked at sentry and it's just full of 429 requests for patching a message
Uh lemme check
Nope, sentry doesn't show me the content
I mean it could just be random issue that's magically fixed tomorrow
Because like it works fine on my test bot and in prod on another token
check how many of those PATCH requests are being made to the same channel
and what is the time frame
if there are 5 of those within 5 seconds for the same channel id, then youre hitting the channel rate limit
22 requests
within 5 seconds?
About 1-2 sec from another
OH
Is it maybe because it's an announcement channel
And I crossposted the message
hmm, what would you think is the nicest way to let the user edit and show a list of potentially hundreds of items via slash commands?
im thinking a list command, with pagination with buttons, and a separate add/delete command
this is how i'd usually do it, im wondering if theres a nicer way
maybe autocomplete?
perhaps
Pagination + indexing by initial
The best option would be a site tho
Its funny that autocomplete could accomplish that ^ but it only allows 25 out of the 26 alphabetical letters. Basically a menu system via the autocompletes. Would be very messy though.
interaction.options?._hoistedOptions[0].name === 'whatever' && interaction.options?._hoistedOptions[0].value === '' //if value === '' then a choice hasn't been selected yet.
what's the best way to instruct a user to allow DMs from my bot? if they DM my bot will that enable DMs? do they need to allow DMs from everyone on the server?
If they say I can't dm the bot u could tell them to enable it or make a command instructing how they can enable the dms.
Dming the bot will NOT enable dms (if they are disabled)
And technically enabling dms on a server will allow anyone in that server to dm that user.
Hope this helps!
thanks, so it sounds like there is no way to have DMs disabled for the server, but enabled for the bot only. i dont see anyway to add bots to the friends list either. i'm still looking through.
You can not add bots as a friend
i guess the user could make a private server and install the bot there. then they could keep DMs disabled on the public server.
Well let me ask u this
What does the bot do?
Like why do they need to set it up
@proven lantern
Alr I finally have my first vote reward, longer reminder and giveaways. Personally I like it because it doesn't take away any actual functionality
it a matchmaking bot. normally it at mentions players in channel message when a match has started showing the players on each team. for games like Among Us the teams need to be hidden so the message cant be in a public channel. so i plan to message each player and tell them their team privately
Well couldnt they add the bot to there server and make a channel for it?
Or make the bot make a channel for setup then delete the channel after?
like each player adds the bot to their own private server?
the way the bot works is that a large gaming community installs the bot on their public server. the server owner runs a command that creates a "host" button. when players click the host button it puts a message in that channel showing someone is hosting a match. players join the match and choose which team they want to be on
ty
I personally use autocomplete for that
With that
let value_from_autocomplete = interactionCreate?.options.getFocused().toLowerCase()
let sub = interactionCreate.options.getFocused(true);
let a = await AppInstance.Commands.get(command).autocomplete[sub.name](LanguageDictio[lang.toLowerCase()] ?? "en", interactionCreate.user.id)
let dictio = []
let base_dictio = []
for(let i = 0; Object.keys(a).length-1 >= i; i++) {
if(base_dictio.length != 25) {base_dictio.push(a[i]);}
let c = a[i]?.name?.toLowerCase();
if((c.startsWith(value_from_autocomplete) && ~c.indexOf(value_from_autocomplete)) || (value_from_autocomplete.length >= 2 && ~c.indexOf(value_from_autocomplete)) ) {
dictio.push(a[i])
if(c == value_from_autocomplete) {break}
}
if(dictio.length == 25) {break}
}
a = a = dictio.length <= 0 ? base_dictio : dictio
interactionCreate.respond(a)
And it works but yes it's limited to 25 choices
that's a lot of cases
wrong version bucko
- I'm on win
buckarooski
Could use select pagination
@earnest phoenix excuse me what the fac
31 verbose stack TypeError: Class extends value #<Object> is not a constructor or null
31 verbose stack at Object.<anonymous> (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\tar\node_modules\minizlib\index.js:57:20)
31 verbose stack at Module._compile (node:internal/modules/cjs/loader:1241:14)
31 verbose stack at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
31 verbose stack at Module.load (node:internal/modules/cjs/loader:1091:32)
31 verbose stack at Module._load (node:internal/modules/cjs/loader:938:12)
31 verbose stack at Module.require (node:internal/modules/cjs/loader:1115:19)
31 verbose stack at require (node:internal/modules/helpers:130:18)
31 verbose stack at Object.<anonymous> (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\tar\lib\pack.js:26:14)
31 verbose stack at Module._compile (node:internal/modules/cjs/loader:1241:14)
31 verbose stack at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
32 verbose cwd C:\Users\hmanjarrez\Downloads\tim
33 verbose Windows_NT 10.0.19044
34 verbose node v20.8.1
35 verbose npm v10.1.0
Doesn't matter in this case
What's at line 57 of the latest (top) stack frame?
no idea, its a fresh node installation at someone else's pc
they tried running my repo, and got that
its comming from npm itself
on a fresh installation
i told them to try uninstalling and reinstalling node lol
Yeah it's a good idea to tell them
Looking at minizlib, there's nothing wrong
its very weird tho, that they said its a fresh installation
they are a .net dev, never used node before
ยฏ_(ใ)_/ยฏ
If they arenโt already, maybe try installing through nvm?
What is this "shapes" bot bc I don't see how it's a bot it just has u join their discord ๐ค
Once created, Shapes can be deployed across every social/communication platform (Discord, Twitter, Instagram, etc.) with persistent, cross-platform memory. In other words, just as you make new human friends and hang out with them across different social platforms, you will do the same with Shapes.
There is an article on medium.com about this but for some reason automod has blocked this link

Ah, okey

Is it bad this is the first time I've heard of this "bot"
a
Welcome to Discord's home for real-time and historical data on system performance.
days without discord downtime:
absolutely no context
Normal
Any clue about these two erros?
Unhandled Rejection: Response: Bad Gateway
at RequestHandler.execute (/home/container/node_modules/discord.js/src/rest/RequestHandler.js:357:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async RequestHandler.push (/home/container/node_modules/discord.js/src/rest/RequestHandler.js:51:14)
at async MessageManager.edit (/home/container/node_modules/discord.js/src/managers/MessageManager.js:132:15) {
code: 502,
method: 'patch',
path: '/channels/729825643482841089/messages/1162817333786591252',
requestData: {
json: {
content: undefined,
tts: false,
nonce: undefined,
embeds: [Array],
components: [Array],
username: undefined,
avatar_url: undefined,
allowed_mentions: undefined,
flags: 0,
message_reference: undefined,
attachments: undefined,
sticker_ids: undefined,
thread_name: undefined
},
files: []
}
}
Unhandled Rejection: HTTPError [AbortError]: The user aborted a request.
at RequestHandler.execute (/home/container/node_modules/discord.js/src/rest/RequestHandler.js:201:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async RequestHandler.push (/home/container/node_modules/discord.js/src/rest/RequestHandler.js:51:14)
at async MessageManager.edit (/home/container/node_modules/discord.js/src/managers/MessageManager.js:132:15) {
code: 500,
method: 'patch',
path: '/channels/993318267622019093/messages/1162136661124194325',
requestData: {
json: {
content: undefined,
tts: false,
nonce: undefined,
embeds: [Array],
components: [Array],
username: undefined,
avatar_url: undefined,
allowed_mentions: undefined,
flags: 0,
message_reference: undefined,
attachments: undefined,
sticker_ids: undefined,
thread_name: undefined
},
files: []
}
}
Well, it's 503 error code so i guess it's discord side error
Very possible that it is related
hey i have a question about data analysis. "The number of patients in a hospital" can this be considered as interval data?
I mean there's no real zero point, even 0 patients in a hospital is still 0 patients, and not a complete abscence of the number of patients.
that's complicated
because for example, if you had 10 patients on day 1, and 0 on day 2 and 3, you can't have a linear chart
it's ratio instead of interval.
because you didn't have 5 on day 2 nor 2 on day 3
regarding such data it's better to use absolute values
it HAS a true zero. 0 Patients means a complete absence of patients.
yeah indeed
but i had to classify them
it does, but it's not an interpolatable data
yeah true it's really vague but they just told me to classify it so i had no choice but to pick the nearest label it belonged to
its for sure not nominal, nor ordinal
and ig ratio would be the only label that would fit the data representation ig
why not nominal?
because you can't really categorize it.
in a hospital? u can
severe case, light injury, male, female, broken bone, illness, etc
yeah then it could but that's not what they meant
they rather meant just the NUMBER of patients, not their injuries.
or etc.
yes, but u can categorize those patients into cases
yeah but this book of pearson about data mining is rather concrete. It exactly tells you what to label
so else he would have written the injuries of patients in a hospital
what I mean is, they did specify patients, so whole entities
could've been any other entity, unless they didn't think about it too much
like, u cant have half a patient
and intervals are usually continuous no?
yeah indeed they are
hmm
idk this guy says it's ratio but i think it can be ambigious
could be either one of thse
bad commit
if you ever wanna be humbled as a developer go on leetcode 150 interview questions
some real bs questions in there
also leetcode benchmarking js solutions be like
Hi, in nextcord I can use presistent_view:custom_id to receive interactions of buttons between different runs
But how can I achieve same with discord.js?
I'm working on a dashboard, but if I log in I want to have a couple extra options that other peopl don't have, how do I do this securely?
Could I just use the oauth?
And check for id?
You could use id or password protect them
When will my bot be verified?
When they get too it
Hey, is it possible somehow to stop the awaitMessages() in discord.js?
It depends on what you need it for. Generally, if you only need one message, you can set max: 1
Thats not what I want, I would like it to stop awaiting for messages even when there is no messages sent.
You can set a time limit for which your bot will wait for a message
After this time has passed, the bot will no longer wait for messages
Or you can use collector and use collector.stop() directly
You can't interrupt it on demand
However you can do so to a collector as mentioned
const { SlashCommandBuilder } = require("@discordjs/builders");
const { Database } = require("nukleon");
const db = new Database("./database/kayitnormal.json")
const db2 = new Database("./database/sunucukayitlari.json");
module.exports = {
data: new SlashCommandBuilder()
.setName("kayฤฑt-normal")
.setDescription("Kullanฤฑcฤฑyฤฑ kaydeder. (normal)")
.addUserOption(option =>
option.setName("kullanฤฑcฤฑ")
.setDescription("Kullanฤฑcฤฑyฤฑ etiketleyiniz.")
.setRequired(true))
.addStringOption(option =>
option.setName('isim')
.setDescription('Kiลinin ismini yazฤฑnฤฑz.')
.setRequired(true))
.addNumberOption(option =>
option.setName('yaล')
.setDescription("Kiลinin yaลฤฑnฤฑ yazฤฑnฤฑz.")
.setRequired(true)),
run: async (client, interaction) => {
if (!interaction.member.permissions.has("ADMINISTRATOR") && !interaction.member.roles.cache.has(db.get(interaction.guild.id + "kayityetkilisi"))) {
return interaction.reply({ content: "Bu Komutu Kullanmak ฤฐรงin Yetkiniz Yok.", ephemeral: true });
}
const member = interaction.options.getMember('kullanฤฑcฤฑ');
try {
await member.roles.add(db.get(interaction.guild.id+"otorol"))
await member.roles.remove(db.get(interaction.guild.id+"kayitsiz"))
await member.setNickname(`${interaction.options.getString("isim")} | ${interaction.options.getNumber("yas")}`)
console.log(interaction.guild)
let yenikayitsayisi;
if(db2.get(interaction.guild.id+interaction.user.id)) {
yenikayitsayisi = db2.get(interaction.guild.id+interaction.user.id) + 1;
} else {
yenikayitsayisi = 1;
}
const exampleEmbed = new EmbedBuilder()
.setColor(0x0099FF)
.setAuthor({ name: 'Kayฤฑt Yapฤฑldฤฑ!', iconURL: interaction.guild.iconURL() || "https://cdn.discordapp.com/attachments/1158837680306655315/1163173769750253608/standard.gif?ex=653e9cfd&is=652c27fd&hm=9f86d65a146d7a1d4acc9181dd2b788c50894506e74df274e6297cd75c313162&" })
.setDescription(`> **Kayฤฑt Bilgileri**
**ใปKayฤฑt Edilen Kullanฤฑcฤฑ:** <@${member.id}>
**ใปKayฤฑt Eden Kullanฤฑcฤฑ:** <@${interaction.user.id}>
**ใปVerilen Roller:** <@&${db.get(interaction.guild.id+"otorol")}>
**ใปYeni ฤฐsim:** \`${interaction.options.getString("isim")} | ${interaction.options.getNumber("yas")}\`
**ใปKayฤฑt Tรผrรผ:** \`Normal\` `)
.setThumbnail(member.avatarURL() || "https://cdn.discordapp.com/attachments/1158837680306655315/1163173769750253608/standard.gif?ex=653e9cfd&is=652c27fd&hm=9f86d65a146d7a1d4acc9181dd2b788c50894506e74df274e6297cd75c313162&")
.setFooter({ text: `ใป${interaction.user.username}, kayฤฑt sayฤฑsฤฑ: ${yenikayitsayisi}` });
await db2.set(interaction.guild.id+interaction.user.id, yenikayitsayisi);
await interaction.reply({ embeds: [exampleEmbed] })
} catch (error) {
interaction.reply({
content: "Kullanฤฑcฤฑyฤฑ dรผzenlerken bir hata oluลtu. Muhtemelen eksik izinleriniz var.",
ephemeral: true,
});
console.error("Error while processing the command:", error);
}
}
};
Thanks for the code
Notice how you're doing interaction.member.permissions.has("ADMINISTRATOR")?
In discord.js v14 you have to do:
const { PermissionFlagsBits } = require('discord.js');
...
interaction.member.permissions.has(PermissionFlagsBits.Administrator);
You can check all of them here
https://discord-api-types.dev/api/discord-api-types-payloads/common#PermissionFlagsBits
For some reason it gives an error when I say something, I wonder if my bot has a love for me ๐
Simply run the command, that method call will always occur in this case
const { SlashCommandBuilder } = require("@discordjs/builders");
const { Database } = require("nukleon");
const db = new Database("./database/kayitnormal.json")
const db2 = new Database("./database/sunucukayitlari.json");
const { PermissionFlagBits } = require('discord.js');
module.exports = {
data: new SlashCommandBuilder()
.setName("kayฤฑt-normal")
.setDescription("Kullanฤฑcฤฑyฤฑ kaydeder. (normal)")
.addUserOption(option =>
option.setName("kullanฤฑcฤฑ")
.setDescription("Kullanฤฑcฤฑyฤฑ etiketleyiniz.")
.setRequired(true))
.addStringOption(option =>
option.setName('isim')
.setDescription('Kiลinin ismini yazฤฑnฤฑz.')
.setRequired(true))
.addNumberOption(option =>
option.setName('yaล')
.setDescription("Kiลinin yaลฤฑnฤฑ yazฤฑnฤฑz.")
.setRequired(true)),
run: async (client, interaction) => {
if (!interaction.member.permissions.has(PermissionFlagBits.Administrator) && !interaction.member.roles.cache.has(db.get(interaction.guild.id + "kayityetkilisi"))) {
return interaction.reply({ content: "Bu Komutu Kullanmak ฤฐรงin Yetkiniz Yok.", ephemeral: true });
}
const member = interaction.options.getMember('kullanฤฑcฤฑ');
try {
await member.roles.add(db.get(interaction.guild.id+"otorol"))
await member.roles.remove(db.get(interaction.guild.id+"kayitsiz"))
await member.setNickname(`${interaction.options.getString("isim")} | ${interaction.options.getNumber("yas")}`)
console.log(interaction.guild)
let yenikayitsayisi;
if(db2.get(interaction.guild.id+interaction.user.id)) {
yenikayitsayisi = db2.get(interaction.guild.id+interaction.user.id) + 1;
} else {
yenikayitsayisi = 1;
}
const exampleEmbed = new EmbedBuilder()
.setColor(0x0099FF)
.setAuthor({ name: 'Kayฤฑt Yapฤฑldฤฑ!', iconURL: interaction.guild.iconURL() || "https://cdn.discordapp.com/attachments/1158837680306655315/1163173769750253608/standard.gif?ex=653e9cfd&is=652c27fd&hm=9f86d65a146d7a1d4acc9181dd2b788c50894506e74df274e6297cd75c313162&" })
.setDescription(`> **Kayฤฑt Bilgileri**
**ใปKayฤฑt Edilen Kullanฤฑcฤฑ:** <@${member.id}>
**ใปKayฤฑt Eden Kullanฤฑcฤฑ:** <@${interaction.user.id}>
**ใปVerilen Roller:** <@&${db.get(interaction.guild.id+"otorol")}>
**ใปYeni ฤฐsim:** \`${interaction.options.getString("isim")} | ${interaction.options.getNumber("yas")}\`
**ใปKayฤฑt Tรผrรผ:** \`Normal\` `)
.setThumbnail(member.avatarURL() || "https://cdn.discordapp.com/attachments/1158837680306655315/1163173769750253608/standard.gif?ex=653e9cfd&is=652c27fd&hm=9f86d65a146d7a1d4acc9181dd2b788c50894506e74df274e6297cd75c313162&")
.setFooter({ text: `ใป${interaction.user.username}, kayฤฑt sayฤฑsฤฑ: ${yenikayitsayisi}` });
await db2.set(interaction.guild.id+interaction.user.id, yenikayitsayisi);
await interaction.reply({ embeds: [exampleEmbed] })
} catch (error) {
interaction.reply({
content: "Kullanฤฑcฤฑyฤฑ dรผzenlerken bir hata oluลtu. Muhtemelen eksik izinleriniz var.",
ephemeral: true,
});
console.error("Error while processing the command:", error);
}
}
};
It's PermissionFlagsBits, typo
okay im fix but
at SequentialHandler.runRequest (C:\Users\Emir\Desktop\discord-bot-v14-bos-altyapi-discord-bot-v14\node_modules\@discordjs\rest\dist\lib\handlers\SequentialHandler.cjs:287:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SequentialHandler.queueRequest (C:\Users\Emir\Desktop\discord-bot-v14-bos-altyapi-discord-bot-v14\node_modules\@discordjs\rest\dist\lib\handlers\SequentialHandler.cjs:99:14)
at async REST.request (C:\Users\Emir\Desktop\discord-bot-v14-bos-altyapi-discord-bot-v14\node_modules\@discordjs\rest\dist\lib\REST.cjs:52:22)
at async ChatInputCommandInteraction.reply (C:\Users\Emir\Desktop\discord-bot-v14-bos-altyapi-discord-bot-v14\node_modules\discord.js\src\structures\interfaces\InteractionResponses.js:110:5) {
rawError: { message: 'Unknown interaction', code: 10062 },
code: 10062,
status: 404,
method: 'POST',
url: 'https://discord.com/api/v10/interactions/1164252869051039805/aW50ZXJhY3Rpb246MTE2NDI1Mjg2OTA1MTAzOTgwNTpnVWJhVnpnZHZrVktqbFcwczVMS2tLdkhuaEh3aWh5djFINU14ZGNzbGUwbVc0dTM2R0ZXaUZDRFRma0FaZVA5MGVzTlpoMGg4ZUZ3WDk1QkJjQ0hvQmlFTEVYZ2dNRWplckVhYkxnQTJlUHdpcGJwdmtnWVNBQUE2UzJuSDBjQw/callback',
requestBody: {
files: [],
json: {
type: 4,
data: {
content: 'Kullanฤฑcฤฑyฤฑ dรผzenlerken bir hata oluลtu. Muhtemelen eksik izinleriniz var.',
tts: false,
nonce: undefined,
embeds: undefined,
components: undefined,
username: undefined,
avatar_url: undefined,
allowed_mentions: undefined,
flags: 64,
message_reference: undefined,
attachments: undefined,
sticker_ids: undefined
}
}
}
}```
That most likely means that you're responding to the interaction a bit too late, the response time frame is 3 seconds
const { SlashCommandBuilder } = require("@discordjs/builders");
const { Database } = require("nukleon");
const db = new Database("./database/kayitnormal.json")
const db2 = new Database("./database/sunucukayitlari.json");
const { PermissionFlagBits } = require('discord.js');
module.exports = {
data: new SlashCommandBuilder()
.setName("kayฤฑt-normal")
.setDescription("Kullanฤฑcฤฑyฤฑ kaydeder. (normal)")
.addUserOption(option =>
option.setName("kullanฤฑcฤฑ")
.setDescription("Kullanฤฑcฤฑyฤฑ etiketleyiniz.")
.setRequired(true))
.addStringOption(option =>
option.setName('isim')
.setDescription('Kiลinin ismini yazฤฑnฤฑz.')
.setRequired(true))
.addNumberOption(option =>
option.setName('yaล')
.setDescription("Kiลinin yaลฤฑnฤฑ yazฤฑnฤฑz.")
.setRequired(true)),
run: async (client, interaction) => {
if (!interaction.member.permissions.has(PermissionsBitField.Administrator) && !interaction.member.roles.cache.has(db.get(interaction.guild.id + "kayityetkilisi"))) {
return interaction.reply({ content: "Bu Komutu Kullanmak ฤฐรงin Yetkiniz Yok.", ephemeral: true });
}
const member = interaction.options.getMember('kullanฤฑcฤฑ');
try {
await member.roles.add(db.get(interaction.guild.id+"otorol"))
await member.roles.remove(db.get(interaction.guild.id+"kayitsiz"))
await member.setNickname(`${interaction.options.getString("isim")} | ${interaction.options.getNumber("yas")}`)
console.log(interaction.guild)
let yenikayitsayisi;
if(db2.get(interaction.guild.id+interaction.user.id)) {
yenikayitsayisi = db2.get(interaction.guild.id+interaction.user.id) + 1;
} else {
yenikayitsayisi = 1;
}
const exampleEmbed = new EmbedBuilder()
.setColor(0x0099FF)
.setAuthor({ name: 'Kayฤฑt Yapฤฑldฤฑ!', iconURL: interaction.guild.iconURL() || "https://cdn.discordapp.com/attachments/1158837680306655315/1163173769750253608/standard.gif?ex=653e9cfd&is=652c27fd&hm=9f86d65a146d7a1d4acc9181dd2b788c50894506e74df274e6297cd75c313162&" })
.setDescription(`> **Kayฤฑt Bilgileri**
**ใปKayฤฑt Edilen Kullanฤฑcฤฑ:** <@${member.id}>
**ใปKayฤฑt Eden Kullanฤฑcฤฑ:** <@${interaction.user.id}>
**ใปVerilen Roller:** <@&${db.get(interaction.guild.id+"otorol")}>
**ใปYeni ฤฐsim:** \`${interaction.options.getString("isim")} | ${interaction.options.getNumber("yas")}\`
**ใปKayฤฑt Tรผrรผ:** \`Normal\` `)
.setThumbnail(member.avatarURL() || "https://cdn.discordapp.com/attachments/1158837680306655315/1163173769750253608/standard.gif?ex=653e9cfd&is=652c27fd&hm=9f86d65a146d7a1d4acc9181dd2b788c50894506e74df274e6297cd75c313162&")
.setFooter({ text: `ใป${interaction.user.username}, kayฤฑt sayฤฑsฤฑ: ${yenikayitsayisi}` });
await db2.set(interaction.guild.id+interaction.user.id, yenikayitsayisi);
await interaction.reply({ embeds: [exampleEmbed] })
} catch (error) {
interaction.reply({
content: "Kullanฤฑcฤฑyฤฑ dรผzenlerken bir hata oluลtu. Muhtemelen eksik izinleriniz var.",
ephemeral: true,
});
console.error("Error while processing the command:", error);
}
}
};
how do i fix it
If you don't want that to happen, defer the response by calling interaction.deferReply() at the top
can you write the corrected version?
We don't do that here, that's considered spoon-feeding which is discouraged
It's best to write it yourself and learn the how and why
How do I make an invite link for a specific server? So like on my dashboard for the servers the user doesn't have the bot in you press add to server and it just goes to the invite page for that server, I've seen Mee6 do it
That most likely means that you're trying to add/remove roles to/from a member that has a role higher than the bot's highest role
gave that mistake to the official
Or the role(s) it's trying to add/remove are the ones higher than the bot's highest role
I also need to fix this error: If there is no record, run the record command.
python devs be like: "why is pytesseract so slow and eat tons of ram"
pytesseract devs be like: "because it saves the file to disk, then spawns tesseract, grabs the output, turns it into a dict, and deletes the temp file"
meanwhile C++ devs be like:
really proud of that tiny memory size.... literally zero cache
python is like the thiccest language ever
thicccccccc
no but i know someone who can (the person that did most of the coro stuff in D++)
i don't understand any online examples about it
on dpp server speak to miuna (windows defender) shes the expert
did she wrote co_request?
im still getting my head round it, part of the downside of a project getting bigger is parts of it arent your own work any more ๐
yes
fr same
i mean i haven't used C++ since November 2021 lol
still takes time for me to rewrap my head around things
https://discord.com/oauth2/authorize?client_id=id&scope=bot&permissions=0 &redirect_uri=qweqw
add this to the link
&redirect_uri=.gg/invitelink
that redirects to a url
I need it so a user gets to invite it directly for a specific server, so they don't have to select the server anymore
I don't quite understand how, can you explain it to me step by step?
x.x
When inviting a bot you need to select a server
I know there is a way to have an invite link for a specific server of which the user is an owner
you know what I'll figure it out
add the scope for the oauth
aga biri bunu bana tรผrkรงe รงevirsin WQEHQWOI
ingilizce bilgim kalmadฤฑ
รงevri bile adam akฤฑllฤฑ sonuรง vermiyor
so scope for oauth and guild id?
the oauth token from the user?
no, you include the scope on the authorization url
not on the invite
wait I don't get it
if you're making a dashboard I suppose u have an oauth url with identify scope, correct?
like, when the user logins on the site
add guild.join to it too
ok
this is all you need
And this comes in the https://discord.com/api/users/@me/guilds endpoint aswell?
?
guilds scope isn't guild.join
the former is merely informative
the latter allows adding the user to servers without asking
I mean, u technically ask once, but dont need approval once authorized
wait I still don't get it
I'm getting the oauth token from the user
right
using that I can get the data of the user and his guilds
that's guilds scope specifically
You to need to make request to specific url with access token provided
it gives you approval for adding that user to any server you can invite people to
no no, I want my bot to join their server
there's no scope for that
mmmhhh, but how does mee6 do it then?
I click this setup button
and I don't have to select the server from the dropdown
it gives me a pop up to add mee6 to that server
does it redirect u to an oauth screen?
this file is auto generated
Opens this window but it's not loading rn
the docs are a better reference than that file
Have you tried reading through https://www.incredibuild.com/blog/cpp-coroutines-lets-play-with-them or https://www.scs.stanford.edu/~dm/blog/c++-coroutines.html ?
alright ty very much
yeah ik, how does the http request queue work tho?
thanks
couldn't understand anything in en.cppreference.com
cppreference is very advanced, it's not meant for average users
there are multiple queues based on the path of the URL, to split up the load
your request is placed into the queue and the callback is called once the request completes, and the response is marshalled back to a separate thread
in the case of a callback you then receive that call in a callback, but with coro the promise is fulfilled by the callback and the result returned
in short requests to the same URL and path are guaranteed to be executed in order you request them
he maintains the C++ one obviously
They're not a collaborator of it, nor have any commits on it, so eh...
that looks so cursed
yeah I was supposed to do the c++ one
someone else did it
did they do something good or not?
does it suck? xD
no lmao
buffer worked on it but the code is currently broken and messy
and missing on a lot of features too
Whats the best way to loop a ban in js?
wdym "loop a ban"
I figured it out
Trying to make a bot where anyone who's banned in X server is added to a database so when I execute X command it automatically bans
Oh so you mean global bans
I have had very bad experiences with global bans
For some reason, there was always abuse and people who disagreed with the developer of a given bot were global banned

Way more vectors for bad actors
if server mods/admins could agree to bans on a per case basis and be provided with info of why a user was banned, that'd be better than just auto syncing bans
Global bans are troubling. They make sense for servers that have staff/owners in common, or for servers with โpartnerโ servers, but fully global bans are definitely just asking for abuse
Click "refresh data" button
Then "edit" and "save"
Refresh data button fetches the bot's avatar directly from the discord API
oo okayy thankss
Editing and saving refreshes the website cache from what I understand
Oof
๐คฃ
if (gonnaOverheat) {
dont(); // TODO Implement
}
I have a question: I'm using NodeJS, how can I print a text to the console when a person votes?
using topgg webhook
Official Top.gg Node SDK. Latest version: 3.1.6, last published: a month ago. Start using @top-gg/sdk in your project by running npm i @top-gg/sdk. There are 9 other projects in the npm registry using @top-gg/sdk.
thanks
apple in a nutshell: deny deny deny
Pretty much
Hello im new here
Hello, I'm not
Hello, im old here
i'm making a discord bot that scans images for abusive content. im composing a whitelist of urls that it will never ever scan. obviously needs to be pretty tightly controlled. heres what i got so far.
inline constexpr const char* whitelist[] = {
"https://*.tenor.com/*",
" bots own url ",
nullptr,
};
anyone can offer any other wildcards to add (serious suggestions only pls) ping me with it
Can't you just google it if you want sample code?
What if this channel is simply not in the cache?
Hello, we don't know
ok
It should take them a few days
noooooo
They will approve it within 2 days maximum, that's what happened to me.
ok because i want hack my friend server
ฤฐts a Turkish name?
If so, they won't approve.
yes
Wow im from turkey
where are you from ?
Turkey
merhaba
bende bilmiyorum herkes ingilizce konuลuyor
proceeds to get banned from discord
no its a joke
๐
normalde aรงฤฑklamamda tรผrk yazฤฑlฤฑmcฤฑ yazฤฑyor ama deฤiลtirdim ๐
zor olmuyormu
evet nodejs dekinin nerdeyse 3 katฤฑ kod yazฤฑyorsun ama alฤฑลtฤฑm
sฤฑkฤฑlฤฑyorum yapฤฑcak birลey yok okula gidiyim desem gidemem รผniversite sฤฑnavฤฑna hazฤฑrlanฤฑyorum.
nodejs direk kodla
nodejs de yazarsam รงok kolay oluyor
zaten
bรผtรผn herkes nodejs kodluyor
direk nodejs kodla bence
tรผrkiye geleni bir bot รงฤฑkart
hatta dรผnya geneli
ok
sonra botunu onaylattฤฑr
zaten bรผtรผn dillere uyarlamaya denerken
sฤฑkฤฑntฤฑn geรงer ๐
bekle c++ la yazฤฑlmฤฑล bir bot รถrneฤim var onun baลvurusunu yaptฤฑrdฤฑm
botun
dmden davet atฤฑyฤฑm mฤฑ?,
hi
Just to be sure, because I read the documentation: if I fetch channels using /guilds/{guild.id}/channels, is this ratelimit assigned only to a given server and is not global?
I've been working on a primitive dashboard for some time and I wanted to add the option to select a channel via dropdown and I'm wondering if fetching channels when opening the page in this way is a good idea
Because if they do not share a ratelimit, there is probably no problem with it because then these channels will go to the cache and I will have access to them
you have a global one and a endpoint one, so yes and no
the global one is higher than the endpoint /channels one
or /guilds
hi
Can anyone help to make a bot using Python?
I doubt anyone would want to "help" you like that (of course, it depends on what you mean by "help")
How can we update the webhook url on top.gg via Nodejs? Is there a specific API or something?
Only help we can provide is references on how to learn python. Should always start with the basics first, then move on to something larger like a bot.
u cant update the url dynamically
Well, let me ask you something. Now, we cannot open ports across Turkey. That's why we get support from companies like ngrok, but for example, when you close and open ngrok, that link is automatically renewed. For example, if mydiscordbot is my link, when I close and open it, it can happen like this: myawaysomediscordbot. I wanted to change the incoming link automatically to prevent this. Is there another method?
sadly that means you cant use webhooks then
not only topgg's, any webhook
as those rely on fixed urls
I'm making a button that has an embed. The button's code is below. Its wrapped in a class and appears correctly. However when I click the button, it returns an error,
@discord.ui.button(label="Commands", style=discord.ButtonStyle.green)
async def commands(self, button: discord.ui.Button, interaction: discord.Interaction):
await interaction.response.send_message("Button Pressed!")
Error:
await interaction.response.send_message("Button Pressed!")
AttributeError: 'Button' object has no attribute 'send_message'
Print out "Button" and see what attributes it has
says its undefined
so button is clearly wrong
Button is not present in the code
๐คทโโ๏ธ
Could it be because there are multiple of them?
A lot of us including me use Discord.js so unfortunately I can not help really regarding Python
show where ur calling that function
actually
ur not showing the whole context
something is calling button.send_message()
but your code says otherwise
did you save the file?
do you know how i can use python requests to get bot avatar and name?
i have this rotation logic for my 2d matrix
# class Matrix2D(list[list])
def rotate_90(self, cw = True):
w = len(self)
h = len(self[0])
w_range = range(w)
return Matrix2D(
[self[y][h - 1 - x] for y in w_range] if cw
else [self[w - 1 - y][x] for y in w_range]
for x in range(h)
)
in running it feels a bit slow on common-sized images (i used a 920 x 560 image)
is there any way i can optimise this to speed things up?
[note: i must only use default python list]
Instead of using lists you can use Numpy arrays which are significantly faster and more memory efficient, Numpy also has built-in methods to rotate the arrays
oh yeah i forgot to mention, i can't use numpy (teacher's constraints)
One message removed from a suspended account.
np.sum(bitches)
One message removed from a suspended account.
np undefined
that coloring is nice af actually
Note that list(zip(*matrix))[::-1] is actually supposed to be returned when cw is True, I accidentally swapped their places
Though the performance difference is the same as in the screenshot
me when npy.cumsum
thanks love

i found another solution that involves tiling which is faster, but having some bugs atm
You're welcome love
So true
@bitter granite When will my bot be verified?
-upto
When will my bot be reviewed?
Currently our average bot reviewal time is a few days or more.
Because of this โ and because some bots take longer to review than others due to their features โ we can't guarantee your bot will be reviewed as quickly as someone else's in the past and we also can't guarantee your bot will be reviewed within that timeframe. There is no exact time for how long bot approval can take. There is no way to check your bot's position in our reviewal queue, but remember you're not first and you're not last!
You may edit your bot's page as much as you like both before and after it's reviewed and this will have no impact on its place in queue.
You can read more about our bot reviewal process in this support article: How the Bot Reviewal Process Works.
In the meantime, please make sure your bot follows all of our Bot Guidelines for a quick and smooth approval!
when jesus comes back to life
and fights with buddha
Noooooooooo
Jesus ballin'
special participation from rey mysterio
What would be the easiest way to send sms messages or even an email of some sort?
for email, use a headless client
for sms you'll have some cost issues depending on how many you want to send, and there's the coverage problem
What do you recommend/know of
hmm well, I currently use for my bot an external client
I simply call it through command line
Mutt
it also has an "interface" (it's console-based" if u want to use it normally too
a little annoying to setup, but works wonders
Stop asking me every second and WAIT
I see thanks, I was thinking of making an app for myself to alert me when bills are due cause calanders are annoying and dont work well imo
so I wanted to use sms/emails to alert me
u can use mutt as a client by calling the cli commands
there are probably libraries for that tho
ew C# error
One message removed from a suspended account.
One message removed from a suspended account.
its okay 
One message removed from a suspended account.
Good idea, that means it's almost 2 full week
One message removed from a suspended account.
One message removed from a suspended account.
what counts as too much tho
30x?
I think muted first right?
One message removed from a suspended account.
you can just ignore them until you or someone reviews their bot
no need to be mad over pings
Nah I am not mad, just telling him
Some need to be said like that to understand
Nah hoisted or no, I still deal with around the same amount as usual
Usually it's just from a dev that has gotten denied by that br in the past
||Also finally I am lose the hoisted next mo||
are you sure
Yes, definitely
how can you tell
I take note of how many dms I get weekly
Image Trying to keep asking
At the end its another clone
If your response time is 155000 seconds does that mean I have to wait that long for my toast?
Atleast 155000 second
Aww man





XD

