#development
1 messages · Page 1895 of 1
Lemme check myself
often those issues are per guild
Yeah
alright hold on
embed works fine for me
Hmm works fine for me, too
added it to a brand new guild, same issue
Even if it’s a guild issue the API shouldn’t respond with a empty message error
Weird
I am so very confused right now
did you update djs recently?
maybe one of the non stable versions had a bug
i did like a half hour a go
ago*
Maybe try reverting? not sure how though, im on ubuntu 20.04
i installed djs via npm
tbh, next thing I would do since so many of us have looked at it now is open a github issue.
I wonder why it’s responding with that other message you showed in your screenshot
yea
But not with an embed
this is interesting
A last test before reinstalling it
then change the version in your package.json
Just try to send content only
then npm install
message.reply({ content: "some text" });
Pls help me
Ah damn
with?
When I do vote for pls vote on dank member the ad keeps glitching and resetting making the ad restart and loops it
dank memer you mean?
Try an ad blocker, people reported the issue before
Ok
Topgg site is just, a huge bug
love the pfp, looks like how my chinchilla stands lol
😔 soon itll be better
ight
it's what im currently using
Well the rework has brought so much issues with it even simple things I can only slam my head on the keyboard like not forcing my css content to a max width of 100%
Which ends up in a fucked to site, since I set my iFrame width to 700px
Just a simple .content * { max width } would fix that but no
I wonder what other bots have done for that 🤔
uhm
looks like you never properly updated to v13
and now are properly on it
The way they try to mutate to usable mobile version is just, well I wouldn’t do it that way, but hmm
I feel like you weren’t on v13 before
no wonder why it wasn't working
yeah, us telling you v13 code(thinking you are on v13) wont work on v12
Im trying to update my code
That can’t work on v12
You should have updated discord.js first
Yeah but if you’re trying to run your updated script BEFORE updating to v13 it can’t work
lol
Guess you missed the update?!
discord.js docs shows a way to update
lol
Actually opus can't be used on 13 can it
im using opus for my bot so it can
what does this mean
he needs to download the voice package though
I already did that
you entered a wrong bitfield flag
what intents did you add?
how'd you type it?
12 will lose support in like 7 months iirc.
You'll need to use and learn 13 anyway.
Intents.SERVER_PRESENCE
Intents.Flags
uh
correction: its actually .FLAGS
Why am i getting this error
If i want to pass in a redirect path for oauth do i need to save it in a db so i can look it up later when i get the callback, or is there some other way
Bruv that pfp gave me a nightmare
it's a happy teddy bear

Anyone know how to make js bot "online only" on repl
What does that even mean
I want to make bot "online only"
On repl.it
I need coding few lines for making bot online
What does ‘online only’ mean
@plain talon do you knowhow to make js bot "online only" on repl
Like "not offline"?
Mean bot will online and no command on it

Yess
Google is your friend
You can find helpful resources in the pins here
But i dont know when i search on google
But here a lot of pins
😵💫
Oh come on there’s only a maximum of 50 I’m sure you can find what you need
Can you give me codes for making bot online
If you can’t help yourself then why do you expect us to help you
Welcome to development. You're going to need to do a lot of reading.
-
Discord.js guides exists
const myChart = new QuickChart();
myChart.setConfig({
type: 'bar',
data: { labels: ['Hello world', 'Foo bar'], datasets: [{ label: 'Foo', data: [1, 2] }] },
});```
I use resultsArr[][] for results.
[0][0] and [0][1] matches in case of tie
In all other case [0][0] is the winner
I want to use my data to create charts displaying how many user has voted for each.
How can I fit my data in the above format?
Uh
Hello, can you help me please, I don't see the numbers.
dblwrongserver
@nova basin
Hey! We think you have our server mistaken. We do not provide support, help, or advice for any bot. You need to click on the "Discord" button on the bot's page of the bot you need support for, not the "Join Discord" button at the top of our website. If there isn't a button that says "Discord" or nothing else mentioned about a support server, the server invite is invalid or you were banned from the bot's support server, then we can't help you. Sorry :(
I believe someone already explained this to you the other day?
i dont renember
oh...
For a language that isn't already supported
so how can i contribute?
you need to give node-canvas a font
It's my bot 👀
which language doesnt supported
Ah ok my bad
Check the link
How
Theme color is wrong, check the og metadata stuff
did you even read the error
this one by googlefeud https://googlefeud.github.io/docs-demo
are you doing a little trolling
preact auto binds the value of this in arrow functions?
maybe
also any way to find the twitch torrent leak
they say its public but I can't find shit lmao
just wanna have a peak
google can't search bittorrent's network
I know but you'd expect among the huge amount of pages of journalism you'd expect to find a link
with very catchy titles "here's all you need to know" (not)
they would get sued for leaking
true
any tips?
do I go to the land of pedophiles (dark web) and search there or something
twitch really encrypted the passwords instead of hashing
guess where they stored the private keys
@split hazel```magnet:?xt=urn:btih:N5BLZ6XECNEHHARHJOVQAS4W7TWRXCSI&dn=twitch-leaks-part-one&tr=udp%3A%2F%2Fopen.stealth.si%3A80%2Fannounce
tim you never fail to satisfy
satisfy me by tipping some bittorrent tokens 
can confirm it's correct
what does twitch have against christianity and islam
what are these guys doing
and jojo
small summary: https://sizeof.cat/post/twitch-leaks/
pokimane made 38k during the month of september only
tyler1 made 2+ million on twitch
that's pocket change
tim why are you checking twitch source code
im not
just checking out the summary from sizeof.cat
lmfao
basically you can see what people torrented in those "unmanaged devices"
includes games, movies and porn
those are supposed to be whitelisted ips that can access twitch dbs or something
apparently iknowwhatyoudownload.com is a redirect to an ad
not for me?
LIKES WHAT
module.exports = {
name: "rr-add",
aliases: [],
group: "roles",
description: "add a role into the category. ",
clientPermissions: ["SEND_MESSAGES",
"EMBED_LINKS"],
memberPermissions: ["MANAGE_ROLES" || "MANAGE_SERVER"],
examples: ["rr-add {category} {@role} {name} {emoji}" || "rr-add pings, @chat-ping, chat-revive, @ping"],
cooldown: {
time: 5000,
message: ""
},
nsfw: false,
run: async(client, message, args, data) => {
try {
let arg = args.join(" ").split(",")
let category = `${arg[0]}`
let role = message.guild.roles.cache.get((arg[1].match(/\d{17,19}/)||[])[0]) ||
message.guild.roles.cache.find(r => r.name === role);
let name = `${arg[2]}`
let emoji = `${arg[3]}`
if(!category || !data.roles.map(c => c).find(c => c.category === category)) return message.error("Invalid Format\nExample: rr-add pings, @ping, chat-revive, emoji.");
if(!role) return message.error("Invalid Format\nExample: rr-add pings, @ping, chat-revive, emoji");
if(!name) return message.error("Invalid Format\nExample: rr-add pings, @ping, chat-revive, emoji");
if(!emoji || !emoji.startsWith("<") && !emoji.endsWith(">") && !emoji.includes(":") || !client.emojis.cache.get(emoji)) {
emoji = null
}
let arr = data.roles.find(c => c.category === category)
console.log(arr);
arr.roles = arr.roles.push("YOOOOOO")
data.save()
message.success(`Role added with name: ${name} to ${category}`)
} catch (e) {
message.error("Something went wrong ;)..\nError: " + e.message)
console.log(e)
}
}
}```
its saving data to array
and db too
you again with that
For some reason all internal Twitch developers use justin.tv emails.
Isn't this because twitch devs don't see themselves as part of amazon or something
I remember reading something about that the other day
Friend of mine that works at AWS said that Amazon was trying to move Twitch and their repos over to Amazons code base but the Twitch devs didn't merge the code over and this is supposedly why they were at risk lol.
i guess twitchbros decided to do their own thing, so none of the stuff in the amazon source control got leaked
apparently they were pushing back on migrating their code over, so now we're here
that sucks, tho I can totally understand not wanting to hand over the thing you've worked on for so long to amazon corporate overlords even if you've already "handed it over" on paper
Yeah.
They hardcoded so many slack related secrets and tokens everywhere. Their infosec and It must be having a hayday trying to regen everything.
guess some heads will roll now
Yeah
and probably won't be the infosec people 
Imagine being that person.
I wouldn't want to
not having a good week
spearphishing is so difficult to deal with like how do you even stop that. Every single person is an attack vector
I'm excited for the reddit hack.
Lots of training.
Coincidentally a couple frined of mine both work for one of the largest security company for the country. Twitch could just spend money now trying to train everyone.
Not sure how else you make sure oyur weakest link doesn';t hand over every repo you have.
why does the CEO prefer NULL == variable rather than variable == NULL?
Reason I mention friends here is they showed me shit of how easy they webswcrape sites send it to employees and gets info like that
It's crazy
because they are a monster
🤨
he didn't explain why I should do that for conditions
it's called a yoda condition
😮
if (variable = null)
is a bug that goes unnoticed
if (null = variable)
is a runtime error
or a compile time error depending on the language you're using
yeah
aight, seems reasonable
it breaks my brain to think that way so I don't use it but that's the usecase for it
I mean that's what equality means, it's commutative
npm i some-very-popular-package
mfw pic related
npm audit fix
its the same
i love npm
it's not an npm problem it's a maintenance problem
i know
how to get free critical vulnerability for your npm package:
function toInt(str) {
const result = eval(str);
return result;
}```
very popular package doesnt mean its good or even updated
honestly many packages are utter garbage, but are popular just because they were the one of the first at doing what they do
and just became the norm
is there a way to make this less?
else if(checks === true || checks2 === true || checks3 === true || checks4 === true || checks5 === true || checks6 === true || checks === true && checks2 === true || checks === true && checks3 === true || checks === true && checks4 === true || checks === true && checks5 === true || checks === true && checks6 === true || checks2 === true && checks3 === true || checks2 === true && checks4 === true || checks2 === true && checks5 === true || checks2 === true && checks6 === true || checks3 === true && checks4 === true || checks3 === true && checks5 === true || checks3 === true && checks6 === true || checks4 === true && checks5 === true || checks4 === true && checks6 === true || checks5 === true && checks6 === true){
all possible combinations
and will this work btw
jesus christ
One message removed from a suspended account.
One message removed from a suspended account.
I'm not even sure what I am looking at,
do you just want to check if all are true, or is there a pattern im not seeing
One message removed from a suspended account.
if any two are true?
One message removed from a suspended account.
i dont get it either
.__.
im dead
lol
nah it's ok
i'll see if works
just explain what you want to do
there are billions of ways to improve that code
but we didnt understand what its supposed to do
do you want to check if any two are true?
it's like it'll check that is one thing is true of 6 things and so it can be true more than 1 thing so i combined them
there are a lot of different ways you can do that
for example if([check, check1, check2, check3, check4, check5, check6].filter(Boolean).length >= 2) {}
:0
that checks if two or more items are true
heck, thats what I was thinking
oh my fuck are you actually kidding me
now npm isnt working
im tryna get some work done
but looks like im not allowed to
how do i get the false/null items?
and where
Boolean
it's true, right?
filter() expects a function that returns true or false
filter(Boolean) is a shortcut for filter(item => Boolean(item))
Boolean() returns true for anything that is "truthy", such as non-zero numbers, non-empty strings, arrays, objects, etc... and false for anything that is "falsey", such as undefined, null, 0, empty string, etc...
if you want a filter that returns the falsey values instead, you can invert the filter function: filter(item => !Boolean(item))
so here i have to do it one by one
thx
its not one by one
so?
so what?
filter(item => !Boolean(item))
it's filtering one thing (?)
what do you want to do?
anyone know how to stop express from adding a slash to the end of the URL when going to a directory?!?!1
this is what it currently does
/images => /images
/images/ => /images/
/images => /images/
i want it to be like
/images => /images
/images/ => /images/
/images => /images
i tried these
app.enable("strict routing");
const router = express.Router({ strict: true });
app.use(router);
nothing worked so far 
how does your app.get look like,do you have params?
I'm pretty sure directories are always treated as slash-ended urls
app.get('/', (req, res) => {
return res.send({
success: 'API is ACTIVE'})
});
like, if it doesnt end in slash then it's supposed to be a file
yeah thats how it works
would be better if it was possible
I want to make a command in JavaScript but I have no idea how I'd do it, I want a command that will nuke a channel (deleting everything in the channel but leaving the channel) any ideas how I might do that?
Please ping me if you can help
we wont help you with a command like that
its against tos
that is against tos
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.
oh, never mind then lol
One message removed from a suspended account.
ill just keep deleting and remaking channels after raids then
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
we have verification but that doesnt stop all raids
One message removed from a suspended account.
yeah
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
oh, ig ill get a better way to do that then .-.
One message removed from a suspended account.
yeah, ik that
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
nvm sorry, I am too lazy for this
One message removed from a suspended account.
I guess there is an easier way to make timeouts in collectors so this error doesnt need to be handled any more
One message removed from a suspended account.
One message removed from a suspended account.
I feel it. But I doupt that someone is motivated enaugh to click a link. I mean.... nevermind
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.
pastebin is sus
When the website to paste your shitty code is sus
One message removed from a suspended account.

does anyone know any good ts doc gen or a theme that's better than the default theme for typedoc
I made one but I don't wanna advertise
How do i edit slash command options in code
Make an API call to get the commands for your bot. Then find the command that you want to modify. Then copy that command's ID and make another API call to modify that command's options. Just write some code to do that.
can I get a preview?
if someone asks its not really an ad
const Discord = require('discord.js');
const db = require('../../database');
module.exports = {
"name": "blep",
"type": 1,
"description": "Send a random adorable animal photo",
"options": [
{
"name": "options",
"description": "What you wanna do",
"type": 3,
"required": true,
"choices": [
{
"name": "Set",
"value": "set"
},
{
"name": "Reset",
"value": "reset"
}
]
},
{
"name": "role",
"description": "Choose a role",
"type": 8,
"required": true
},
],
async run(client, i, lang, options) {
let role = i.options.getRole('role');
let choice = i.options.getString('options');
let embed = new Discord.MessageEmbed()
.setColor(client.color.red)
.setTimestamp()
if(choice === "set") {
embed.setDescription(`${choice} | ${role}`)
}
if(choice === "reset") {
embed.setDescription(`${choice} | ${role}`)
}
return i.reply({
embeds: [embed]
})
},
};
I want if user choose reset role option required = false
That's not possible unfortunately
Hmm then i make it false
And
if(set) {
if(!role) error
}
in my case it will be ```js
[check, check2, check3, etc..].filter(item => !Boolean(item))
if you want a list of falses/nulls/etc, yes
and how do i use the list?
how do you want to use it?
like if 1 or more things are false, it'll send a new embed with new things
like a else if
so you just want to check how many are false?
yes
oh
k
if([check, check1, check2, check3, check4, check5, check6].filter(!Boolean).length >= 2) {
```? or without !
no
^
how
wdym how
[check, check2, check3, etc..].filter(item => !Boolean(item).length > 0) //?

[check, check2, check3, etc..].filter(item => !Boolean(item))
yes
ok
now add .length
this?
yes?
[check, check2, check3, etc..].filter(item => !Boolean(item)).length > 0
yes
and?
and what
how to use it like i said before
yes
thx
oh and how do i get the false items? to add the false items
without the .length > 0?
add where
add to the db
like if there are 2 things, one is true and other is false, the true will be out and the false will be added to the db to make it true
but in my case, i want to have the true too, to add xp to the true and add false like new
thats a completely different thing, it has nothing to do with the code you showed
you need to show more code
i didn't finish it but you can have reference the other codes like "epic" and "legendary",
https://pastebin.com/p3CWF2x5
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
I want to send a message when the time runs out in the collector:
const MsgCollector = inter.channel.createMessageCollector({
time: 10000, errors: ['time']
})
MsgCollector.on('error', async (i) => { console.log("out of time") })
This isnt working btw but I would like to know how this works
what are you doing here?
you dont need to fetch stuff before doing anything else on it
you're not doing anything that need fetching there
so i don't need it
ok
i thinked that fetching it, it gets the data and without fetching it's hard for the db to work
fetching it gets the data, but you're not using the data for anything
you only fetch when you use it
like put it in a variable
ok
otherwise the databse is doing work for nothing
ok
tf is that
¯_(ツ)_/¯
the 2nd param is true (because it's supposed to be all false/null)
if(!channel) return;
btw u can use `` for multiline strings so u don't need to use \n
`
Some
text
duh
`
is the same as
'Some\ntext\nduh'
And use buttons instead embed links bc if someone invite your bot without this perm you will get error
Idk if button links need perms btw
so now you understand it?
i still dont understand which part is supposed to be the one that sets the falses to trues
but anyway, i have to go now, so good luck
what would be an intent calculator?
If you need the int of intents you need, just use actual code
dont all libs include enums of all intents/permissions?
(1 << 0) | (1 << 3) = 9
is there someway to pass a parameter to oauth so that discord calls my oauth endpoint with the parameter?
i dont want to register an oauth endpoint for every oauth action
this endpoint gives this error {"error":"invalid_request","error_description":"Invalid \"redirect_uri\" in request."}
Hello, I have this code, and I want to make it so takes the username of the user who executed the command. Anyone can help me?
It is Python btw
what the fuck just happened today
0 vulnerabilities
install a very popular and clean package
150 vulnerabilities
wtf.tsx
npm audit fix
160 vulnerabilities
what
npm rm package-that-i-installed
160 vulnerabilities
?????????????????????????
==
package-lock.json
Could someone help me please
what about it
installing the package changed your package-lock.json. then you uninstalled the package, but package-lock.json is still changed
Are you taking to me?
Hello, I have this code, and I want to make it so takes the username of the user who executed the command. Anyone can help me?
can you stop spamming
Sorry for the doubles capture, is just to make sure you understaned what i meant
someone will respond to you
Sorry
Ook
Intents = Discord.Intents.FLAGS.GUILDS,
Discord.Intents.FLAGS.GUILD_MEMBERS,
Discord.Intents.FLAGS.GUILD_BANS,
Discord.Intents.FLAGS.GUILD_EMOJIS_AND_STICKERS,
Discord.Intents.FLAGS.GUILD_INTEGRATIONS,
Discord.Intents.FLAGS.GUILD_WEBHOOKS,
Discord.Intents.FLAGS.GUILD_INVITES,
Discord.Intents.FLAGS.GUILD_VOICE_STATES,
Discord.Intents.FLAGS.GUILD_PRESENCES,
Discord.Intents.FLAGS.GUILD_MESSAGES,
Discord.Intents.FLAGS.GUILD_MESSAGE_REACTIONS,
Discord.Intents.FLAGS.GUILD_MESSAGE_TYPING
I wanna use
Intents = 21939202(a number include all intents)
Can you teach me
cant you do something like (Intents & Discord.Intents.FLAGS.GUILD_BANS) === Discord.Intents.FLAGS.GUILD_BANS
i suck at bitwise btw
that is bitwise
Hello, I have this code, and I want to make it so takes the username of the user who executed the command. Anyone can help me?
You’ve asked that question several times
You need to do author = message.author because msg is a string that you defined as message.content
Ok thanks!
Discord.Intents.FLAGS.GUILD_MEMBERS | Discord.Intents.FLAGS.GUILD_BANS = GUILD_MEMBERS and GUILD_BANS
so like, imagine theyre 1 and 2 respectively, doing that would return 3
bcuz 1 = 1 and 2 = 10 so 1 | 2 = 1 | 10 = 11 = 3
Isnt there a number include all?
1 = 0001
2 = 0010
3= 0011
you can omit left zeroes
make it urself if it doesn't exist
just save as a constant somewhere
const ALL_INTENTS = Discord.Intents.FLAGS.GUILDS
| Discord.Intents.FLAGS.GUILD_MEMBERS
| Discord.Intents.FLAGS.GUILD_BANS
| Discord.Intents.FLAGS.GUILD_EMOJIS_AND_STICKERS
| Discord.Intents.FLAGS.GUILD_INTEGRATIONS
| Discord.Intents.FLAGS.GUILD_WEBHOOKS
| Discord.Intents.FLAGS.GUILD_INVITES
| Discord.Intents.FLAGS.GUILD_VOICE_STATES
| Discord.Intents.FLAGS.GUILD_PRESENCES
| Discord.Intents.FLAGS.GUILD_MESSAGES
| Discord.Intents.FLAGS.GUILD_MESSAGE_REACTIONS
| Discord.Intents.FLAGS.GUILD_MESSAGE_TYPING;
would this logic work KuuHaKu
that's for checking an specific intent
should it do a >= check?
no
if u do 1 & 3 ur actually checking if the very first bit is set to true
& is bitwise AND
so, if 1 AND 11
so if you have that permission and more you might have a higher value
which is true
using such operators is ill-advised for bitwise stuff
but sure, u can
just remember flags AREN'T in decimal, they're sequences of bits
can someone help me get a placeholder in a status to update more often than just on restarts?
just use setInterval()
- if js
and flags with higher binary values doesnt mean they have all the permissions of the lower value flags
ye
for example
4 would fail your expectation
bcuz it wouldn't contain 1, 2 and 3
it'd be a lone permission
and 4 might not have the permissions that 1 and 2 have
ye
100 &
(001 |
010 |
011 )
000
edited
im using that, this is what i have
``` const statusArray = [${client.guilds.cache.size} servers, WATCHING, 'some YouTube, WATCHING', 'some Spotify, LISTENING' ];
setInterval(() => {
client.user.setStatus('online');
const random = statusArray[Math.floor(Math.random() * statusArray.length)].split(', ')
const status = random[0];
const mode = random[1];
client.user.setActivity(status, { type: mode })
}, 10000)```
i deleted package-lock and regenerated it and its the same
you need to get the package-lock.json version that you had before doing the npm install
u shouldn't also do bit & bit & bit & mask
u should do (bit | bit | bit) & mask
else one will nullify the other
updated again'
100 &
(
001 |
010 |
011
)
----
0/false
it's crazy that bitwise math can actually do useful things
moving bits around and stuff
this is what ur checking for
so: Is third bit set to 1 in any of the values below? R: no
0
bitwise is fun once u understand how it works
most people get confused with it bcuz they're looking at decimal values
where converting to binary would be easier
intellij:
that's why i was putting those extra 0s in
makes people think in binary
this is the extent of bitwise in my project
perfect

btw, y don't u enable ligatures?
i dont think so, let me see
that wasn't a yes or no question 
lul
except for fireinthenight
how do i add reactions in discord.py?
thanks
is there a way to do this without having different endpoints? i want to have one endpoint that can do different actions based on parameter
this is what im doing now, but i still need to register each endpoint with discord
query params?
i tried that here
#development message
discord was not happy with it
weird
can't you inspect the payload to determine where it's supposed to go
the only thing that discord sends in the payload is {code:"code"}
the process is like this. localhost:3000/claim-points -click link-> https://discord.com/api/oauth2/authorize -redirect-> localhost:3000/api/auth/discrod/claim-points
discrod
lucky
sometimes i can spell correctly1
i never get the code until discord sends it to localhost:3000/api/auth/discrod/claim-points
Ok. So if you can authorize that Discord is sending that payload, then you know where to send
i want to have one routing endpoint instead of different endpoints for each action
like this type of endpoint localhost:3000/api/auth/discrod/action-router
ah now I see
if your oauth access_token expires can you use the refresh_token to get a new token or does that expire too?
It shouldn't expire unless you use it
Or it may expire after the user's token resets if 2fa
mmkay
is it a security risk to return the access_token and refresh_token in the querystring? should i make a server set cookie and encrypt the values instead
i dont want to use cookie
maybe i can put those values in the querystring and then do a url rewrite as soon as the page loads so the user never sees it
is this naughty?
they do
i agree, but im worried about people sharing this link with their tokens in the querystring
but if i rewrite the page as soon as it loads to remove the values it should be fine
depending on how fast your page loads, you might have to make it so that it only loads a script to change the values of the query string and then edit the innerHTML of the body so that it loads and fires on load events close to immediately and then builds the webpage after the fact
why do you need it in a query string in the first place?
read above for context
i did, and still dont get
I suppose just tossing ideas for how to solve their issue of wanting to route through only 1 endpoint for oauth
Discord redirects user with the tokens in the qs
yes, but thats not what hes doing
he already has that
his code is showing an additional redirect on top of that
like if he wanted to transfer the token from one endpoint to another
ah fair

I did suggest storing states, but I suppose routing would still be an issue because Discord doesn't send arbitrary data
actually. I wonder what the headers look like
if a referrer or host was present, could def use that
i wonder what hes trying to do, but this conversation is 3 hours late
oauth is pain
hi
Well i got a bot running for 106 hours non stop
My highest uptime is somewhere in the neighborhood of 1 year
private void load();{
^^^^
Syntax error, insert "VariableDeclarators" to complete LocalVariableDeclaration
My bot crashed many times on last discord embed error lol
My Bot Just went down had to go restart the server
Why
You using uptimerobot right?
Bugged
Yep
Itsnt bugged
You just using 30 days filter and probably your bot started less than 30 days
Also How do i get the bot dev role?
ooh
By adding your bot to topgg
Ok
Im on a 2 week queue
You need to wait almost 4 weeks
1 more week or more now
Yes
Just be sure your bot is online
I will
Had to switch out a new server for 1 of my bots
is there a maximum number of guilds that a user can belong to?
100 without nitro. 200 with nitro.
thanks!
1
For anyone using linux here, does someone know how wine works in installing .exe files?
hey on top.gg's website, it is not showing the number of servers m bot has reached.....
I'm trying to make a hover effect in scss
<div class="card">Hover me</div>
.card {
height: 100px;
border: 1px solid black;
border-radius: 5px;
&:hover {
animation: 0.25s hover;
}
}
@keyframes hover {
100% { transform: translateY(-10px) }
}
the div hovers over the page and then snaps back to its original position
how do I make it persist
with what?
wait a minute...
function start(action = true) {
var i = 0;
var timer = document.getElementById('numerator');
setInterval(function interval() {
timer.innerHTML = i;
i++;
}, 1000);
if (action == true) {
interval();
} else if (action == false) {
timer.innerHTML = 0;
clearInterval(interval);
} else {
alert("Error...");
}
}
function reset() {
start(false);
}
```It is intended that when clicking on reset, the value should be set to 0 and the interval is cleared. But in practice, he only briefly sets the value to 0 and the interval continues immediately...
@earnest phoenix

I don't understand what you mean
My english is not the yellow from the egg xD
the only problem i found is that interval is undefined
And why?
nvm that's correct
ok
you need to clear the interval on reset
store the value of setInterval in a variable called interval
okay
const interval = setInterval(something goes here);
when you need to reset run clearInterval(interval)
Ahora si xd```
@sand cosmos #general-int
Ñ
someone notice my question lol
function start(action = true) {
var i = 0;
var timer = document.getElementById('numerator');
const interval = setInterval(() => {
timer.innerHTML = i;
i++;
}, 1000);
if (action == false) {
timer.innerHTML = 0;
clearInterval(interval);
} else {
alert("Error...");
}
}
function reset() {
start(false);
}
``` Still not possible
@earnest phoenix

you forgot to add the action == true check
the code runs fine but it still says error
oh i got it

running start() again creates another interval which is immediately removed
Can you do this xD
@earnest phoenix
store the interval outside the function
const interval = setInterval(() => {
timer.innerHTML = i;
i++;
}, 1000);
``` This?
yes
create the variable interval outside of the function
assign it a value inside the function
var interval = null;
function start() {
// ...
interval = setInterval();
}
imagine a scam
Imagine
Imagine a capybara
Are you sure about <div></card> 
lol
i fixed it
using transitions instead of animation
const collector = message.channel.createMessageCollector(filter, { time: 90000 });```how do i put a max of 4 answers ere?
here*
{ max: 4 }
slash commands replys are visible only to the person that used the command?
not all
mh
u choose to show ephemeral or not
ew v12
Some people are talking about sharding a bot. What are shards and what do they have to do with the bot?
they split ur bot in multiple processes
like, instead of 1 bot with 1000 guilds, u get 2 bots with 500 guilds each
but they're all the same bot
just "fragmented"
splitting your bot into multiple "shards" that handle 500 guilds each
wayyyyy better than a single process handling every single guild
shard 0 will always do more work though because it also handles all DMs
shard 0 is the real one
Depends on your library. Discord.js spawns a worker_thread for each ws connection, which is the better choice because you can quickly run into the hard cap of how much memory nodejs can address.
Node can only address like 1-2GB iirc?
worker_threads
worker_threads are their own v8 instance
worker_threads are technically their own process since they don't share the same memory space with the master
.channel.bulkDelete(amount, true)
There is an option "true / false". What does this option do?
Thats for filtering msgs older than two weeks, right?
check your lib docs
so if you have false. It is filtering?
It is not filtering if false
which will lead to errors
if you try to bulk delete a message ID older than 2 weeks, Discord will throw a non ok status code
Alright then "true" is good
Depends on your definition of "good". Filtering out could leave the array empty
but without filtering it will lead to errors when messages are older than 14days
hello get this error
There are tradeoffs which is why it's false
have you npm installed
ya 2 times
delete your package-lock and your node_modules folder and npm install again
ok
no problem in my package json?
If you keep your packages in your package up to date, no problems
hmm
also you know any free host?
not repl , heroku or glitch
google offers a free forever vps, but its not got a lot of resources.
Free hosts are bad. Just buy a cheap vps like from OVH
also thwy all end
$ not chep for me
the free forever vps?
$1 - 75 rs
then you need to pay
but parents cant support
zero free hosts offer free good cpu's
not 18+ for earn own self
You'd have to wait then or have someone support you
I was on heroku for 2 years before I bought my own
my bot is music cant worth for me
using rasebeary pie and it also dead now
Mine is too 
hmm
also i'm from poor country
to high prics of vps
Every VPS I know of, free or not, requires you to input a valid debit/credit card or some sort of form of electronic payment to verify identity
tbh, your life situation doesn't change the fact that good servers cost money.
48$ - 3,593.85 rs
If you can do that, then I’d recommend Oracle’s free tier. It’s not great, but there’s no hidden fees to get hit with on a free tier
chines nop
never like chines projuct
oracles free tier they cancel randomly and will charge you iirc
cursed
!gb not worth
my rasbeary dead
Does anyone know how to limit slash commands for everyone? Was looking at discordjs.guide section, but it isnt working for me
someone had their mc server on one, got charged like $50 a few months later and canceled
thats why problem happem
If you go over your limits you don’t get slapped with a bill
one doesn't simply put "oracle" and "recommend" in the same sentence
Just for free tier
yup
for hosting galaxy gate best
I had oracle support call me the other day regarding a trial I had set up a while ago
Never used it
wanted to slam the vm
Lmao
The trial expires soon
just for some days
rip my question
You can get your own trial for free
in what way is it not working?
prepaid card can"t work internation
¯_(ツ)_/¯
Limit the roles to the guild ID as the role ID. The @everyone role is <@&guildID>
As woo said, your life situation doesn’t change the prices for good hosts
There is a tip that says:
If you set defaultPermission: false when creating a command, you can immediately disable it for everyone, including guild administrators and yourself.. So I added to a command defaultPermission false. But it doesnt seem to lock me out as the tip says
Unfortunately you might have to stick with a crappy host until you can afford to upgrade
wait
go with contabo
{
name: 'beep',
description: 'Replies with Beep!',
defaultPermission: false,
execute: [AsyncFunction: execute]
}
This is the json I am sending to discord
The command registers fine, just the permission thing doesnt actually work
just to double check, this is when you originally added the command to the guild.
From what the docs say, it appears defaultPermission is only when its first added.
just wating for some onw who sponsor me
so only when the command first gets registered?
appears so yeah
try patreon.
pretty sure the age restriction is 18 though.
link pls
Just created a new command, still doesnt work
don't u need a paypal account for it?
Or buymeacoffee is pretty good I think
This is my anual income
dont exactly understand 100%
or a bank account(which is generally free, for a basic checking account)
If you need permissions on a per role basis, add the guildID as a role and configure it's perms
I just want to block the command from being used in general for now
Like nobody can usei t
🤔 are you the owner of the server?
I dont think you can disable commands for owners
hold on, ill log on my alt
are you woo a tea pfp mod?
no
any suggest a free host or host give sponsor to developers
There are a few, but none i would recommend
currently none that im aware of
where you do
also where you?
Cant you get a job? You can even buy a vps from contabo with relatively good specs (ish) working for low amount
only 16 year old
no one give me job
im 15 and i work
different countries have different standards for hiring depending on age.
my country cant allow child labour
18- work also come in this law
i am just come back discord after 3 month
and djsv13 suck my mind
but everything easy now
v13 much better than v12
Anyone have a good medium article on writing custom benchmark libs that are actually accurate in node?
No but I know a tim that likes to benchmark and would probably know.
@quartz kindle sorry for the ping but can you provide any insight on my above question?
console.error(error);
return attentionembed(message, https://media.discordapp.net/attachments/880721991106199592/892749201295933510/design-a-logo-with-only-a-letter-that-is-eyecatching.pngget the thumbnail
let thumb = "https://media.discordapp.net/attachments/880721991106199592/892749201295933510/design-a-logo-with-only-a-letter-that-is-eyecatching.pngng.thumbnail === undefined) thumb = "https://cdn.discordapp.com/attachments/778600026280558617/781024479623118878/ezgif.com-gif-maker_1.gif";
else thumb = song.thumbnail.url;
//if there is a server queue send that message!
I accidently copy and paste link and this happen
Anyone fix it
@earnest phoenix
What's the question? I don't see one.
Just remove your wrongly copy and pasted stuff.
I mean it's obviously what's wrong.
I accidentally do this and idk what i do
Can u help
I am android user
Just remove your wrongly copy and pasted stuff.
I mean it's obviously what's wrong.
undo

Idk here is only 1 link and after pasting i see here 3 links
Can you fix it
I need urgent
Follow your strings... starts here " and ends here "
Please you can fix it
You must be kidding...
;-;
Idk what i do
you want to undo your copy paste?
Yes
I am android user
your best bet is to delete the code and rewrite it correctly rather than trying to fix it since you wrote it before, but dont know how to fix it.
Ok
... === undefined)
It's obviously a statement.
let thumb = (condition) ? "something" : "something else";
=== undefined ... !condition makes more sense
ytsr.searchOne(search) ;
song = {
title: songInfo.title,
url: songInfo.url,
thumbnail: songInfo.thumbnail,
duration: songInfo.durationFormatted,
};
} catch (error) {
console.error(error);
return attentionembed(message,
let thumb = "https://cdn.dhttps://media.discordapp.net/attachments/880721991106199592/892749201295933510/design-a-logo-with-only-a-letter-that-is-eyecatching.png";
else thumb = song.thumbnail.url;
//if there is a server queue send that message!
if (serverQueue) {
//Calculate the estimated Time```
@boreal iron i improved it but not working
If you fix it so please
So?
If you fix it so please
My brother is gone
And i accidently do it
If you fix it so please
No one help
Don't know anything about your code...
What's attentionembed supposed to do?
dont blame advanced library because of your failure
No help if you're not able to answer the question.
hwe 2 mke disocrd tbot on wnidows phone
yeah, people are weird
My brother is gone
And i accidently do it
Funny how people without any clue touch code of others
@earnest phoenix
@boreal iron you’re not required to help if you do not wish however you are not to harass people based on their knowledge of code; I ask that in the future you redirect them to appropriate sources instead.
you’re not required to help
I did and got no answer, there's no harass anywhere, nothing I need to be sorry about, just the fact he fucked up the code and nobody else magically knows what it was before.
hwe 2 mke disocrd tbot on wnidows phone
Same goes with this one, obviously sarcasm and absolutely on point in this case, nothing people need to be ashamed about



