#development
1 messages · Page 1335 of 1
sa
#topgg-api @tired panther https://top.gg/api/docs
in which category xD?
K I need to know how selfhost it I keep asking it
but all answers i fail
I am very dumb
😂
@snow urchin someone was suggesting online that module may not work with node v14. Potentially.
@solemn latch I have used it perfectly fine with node v14 before.
Shoot guess that's not it then. I'll keep looking
@tired panther depends on your lib and language. That page links to several
Is there a bot that force users with newly created accounts and not a profile picture to verify themselves otherwise they will be kicked from the server? Users with older accounts do not have to go through this process.
someone here want command for command? (you will make me the command that i have been trying so long to make, and i will give you one of the commands i made)
if yes DM me
(lang: js)
(in cases)
There is somthing
If user joins server
Aka an event
You can check
user.displayAvatar()
wow cwickks, from when you boosted the server?
If it's same as default avatar
displayAvatarURL()
Yes
I forgot
My brain bad
If (defaultAvatar === displayAvatar) // do smtg
Im in mobile and can't help you further soz
You can see the properties in docs
@tired panther depends on your lib and language. That page links to several
@solemn latch its inbuilt in the code of my bot?
How do u change the colors of the button?
@snow urchin
So I dont think this will help at all, but I genuinely can't find anything else online.
https://github.com/substack/minimist/issues/152
The color of the button is just css
You have to do member.user
The color of the button is just css
@solemn latch where can u define them?
Then check
For the color, in the css in a style tag in html the long description of your bot
but how do i define them
?
Define what
the invite button color
this button should be green

use inspect to get the class
You can
//Css here
}```
Without using jQuery is there a way for a form to run a JavaScript function and NOT redirect to a different webpage?
Using forms is completely optional... you can go without it and make the request yourself via javascript
this is my current code:
<form onsubmit="sendWebhook();">
async function sendWebhook(data) {
...
}
@low basalt a question for the #topgg-api channel
ah ok thanks
lol
bruh
You get a VPS
What do you mean by "selfhost"
hosting on own pc?
you mean host on your PC?
well
install everything you need, like a web server.
sure, yeah
so yes ...
"how to host a website on your computer" is a good search phrase 😛
this is my current code:
<form onsubmit="sendWebhook();">async function sendWebhook(data) { ... }
@solemn latch @cinder patio the function does get run and it does it's stuff however data is undefined inside the function and the form still does it's default redirect-to-current-page-with-GET-method-for-sending-data
Selfhosting websites is generally considered a very bad idea
what about this vid?
If it helps you, it's good
remove embed lol
Selfhosting websites is generally considered a very bad idea
@solemn latch ye I am still getting money, it will be hosted soon.
@earnest phoenix i think its because the func is async
do you really expect anyone to know what video you find helpful? We don't know how you learn 😛
(By a company)
Also note, most isp's do not allow server hosting on home networks
data is still undefined even tho i made the function normal
o
maybe i'll try doing d3.select("form").addEventListener("submit",() => {});
Honestly its been so long since I used actual proper js
Honestly its been so long since I used actual proper js
@solemn latch the i-use-too-much-frameworks guy
vanilla js 🚮
ok the addEventListener method works
async def nuke(ctx, channel: discord.TextChannel = None):
channel = ctx.guild
await channel.delete()
await guild.create_text_channel(name = f"{channel}")
await ctx.send("Succesfuly nuked!")```
Where can i cheap host my website
I got only 1$ o/month
It's showing Missing Access
trying to delete guild
he did
trying to delete guild
@misty sigil lmaoooo
Kadesti got ghostpinged
channel = ctx.guild
await channel.delete()
You want to nuke a server?
Nah
deletes guild
yes I saw
I am coding it for my own server

try ctx.channel
Does someone has a sick hosting company with webhosting
I fr need that atm
selfhosting is a nogo
Await ctx.channel.delete()?
just use a vps
@misty sigil ?
thats expensive
@sick fable no use channel = ctx.channel
I got ony $1 o/month
Shared hosting.
Galaxygate does like $2 a month
@sick fable no use channel = ctx.channel
@misty sigil k
2$ is still a lot
:(
Domains are cheap
@sick fable no use channel = ctx.channel
@misty sigil and actually when I tried it. It successfully deleted the channel but it didn't created that same channel
This isnt my day fr
no ide
My bot was restarting while the bot got checked on top.gg
Now discord denied verification request, they had to check the bot and it didnt worked for them (IDK HOW!!!)
2 times declined in one day

I am thinking of buying a hosting at galaxy-gate
seems cool
@misty sigil Can you help me again at this thing?
GUYS I GOT IT TO WORK

Uncaught (in promise) TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'.
Uhhh what?
<div>
<pre id="sts_box"></pre>
</div>
const sts = document.getElementById("sts_box");
let newsts = sts.appendChild("p");
first time i got a DOM error that did not originate from me mixing vanilla JS syntax with D3
await help
||@solemn latch||
someone here want command for command? (you will make me the command that i have been trying so long to make, and i will give you one of the commands i made)
if yes DM me
(lang: js)
(in cases)

@tardy hornet seems like an unfair trade.
You get to choose what we make you. You choose what we get.
🤷♂️
i think the error happened cuz i passed a string
Alr
i think the error happened cuz i passed a string
americansamirite?
@tardy hornet wtf is that offer xD
Just ask for help here, we will help you for free lol
pay me 1$ for specialized help
and if the other guy had different command handler than yours. What you're gonna do then?
idk
Just ask for help here, we will help you for free lol
@ionic dawnthen why ignore my massive error
Since i'm not JS' master
Just ask for help here, we will help you for free lol
@ionic dawn
yes but i dont know/ understand anything in reaction collector, and i dont want to learn it, i hate it
(no, i'm not racist)
@ionic dawn
yes but i dont know/ understand anything in reaction collector, and i dont want to learn it, i hate it
@tardy hornet use messagereaction listeners then?
or ask people to help you here
Honestly, if you dont want to learn. Why do it?
Programming and development in general is about learning
They are just async functions
I've fixed the error myself 200 IQ move trying to pass string instead of HTML element object and now I can access each individual input element's data in the SubmitEvent.form but can't seem to find any property of the input element that contains the data which the user gave
what do you not understand about the collectors lol
i just hate reaction collector
@tardy hornet then don't do it duh
i never worked with djs and i understand how to use it just from the docs
i never worked with djs and i understand how to use it just from the docs
@earnest phoenix that's why you're whitename cuz you have no bots made with anything?
i had a bot
a long time ago
me too
five seconds ago
which i deleted
i just stopped public bot development because i got fed up with a dumb userbase
i just stopped public bot development because i got fed up with a dumb userbase
@earnest phoenix welcome to humanity
true lol
i only do private/hire deving now
THIS EXISTS?!?!
same thing for me
THIS EXISTS?!?!
@earnest phoenix it has existed for a while now...
I have not opened discord developer portal or their blog for a month now
I want to make sure I'm not missing something obvious, I want to pageinate a potentially long text of over 2k characters response into a message embed. I was planning to use a pagination package and create a bunch of message embeds that are each 2K and length and send in an array of them
I just want to make sure that's the right way to go about it
Yeah, itd cycle to the next embed
I've fixed the error myself
200 IQ move trying to pass string instead of HTML element objectand now I can access each individual input element's data in theSubmitEvent.formbut can't seem to find any property of the input element that contains the data which the user gave
is there any way i can see it?
uh
no
Or rather, modify the text I think
time to read MDN
6000 total chars in an embed allowed, embed description allows up to 2048
Well, I'd prefer them be shorter regardless
imo if you've got a fuckton of text it's best to offload it to another service though
6000 chars in an embed allowed, embed description allows up to 2048
@earnest phoenix 6000 chars in overall message including embed
as webhooks can send upto 10 embeds in one message
iirc
3 embeds
Make a webpage?
tested it myself
What's it for?
also an embed alone can hold 6000 chars
that's all properties of an embed combined (desc + fields + title + ...)
there is no individual char limit for embeds
only the 6000 total char limit
so ig if you only have a single embed in the whole message and nothing else the embed will have a 6000 char limit
Yeah but you'd have to split it up
from dapi:
Hey @green kestrel which javascript interpreter does Sporks use for the custom behaviour scripts or whatever they're called?
sporks
yeah but if i put 10 chars in the message content and 6000 chars in the embed discord won't let me post it
ye
6000 characters shouldn't be on discord anyway imo 😂 make a medium blog or something
lmao
yeah but if i put 10 chars in the message content and 6000 chars in the embed discord won't let me post it
@earnest phoenix from this and flazepe's ye we conclude that embeds have no total limit on how much characters the whole thing can contain but there are limits for individual stuff and that the total message can contain no more than 6000 characters
no
what
the total message shouldn't exceed 6000 chars but the total embed only has limits for individual stuff not for the whole embed
no it's for the whole embed
wut
if the title, description, footer, field text and value combined exceeds 6k chars, it won't send
i had three embeds in a single message all under 2000 chars total yet discord didn't let me send it
With a webhook?
why are we even discussing about this so deeply
who will even need to send 6000 characters
area 51 people?
With a webhook?
@solemn latch yes
d3.select("sts_box").append("p");
it's returning an xn thingy but it ain't adding the element
(sts_box is a pre element btw)
VM614:1 Uncaught TypeError: Cannot read property 'appendChild' of null
what
<pre id="sts_box"></pre>
i have the id set on it how is null
. for classes for future reference
What's d3 anyways?
it's almost like jquery but more driven for graphs and data
in theory this should work right?
let newsts = sts.append("p");
newsts.style("background-color","rgb(207, 74, 74)");
newsts.innerHTML =
`An error occured: ${err.message}
Are you sure the webhook ID and webhook token are correct and the message content is smaller than 2000 characters?`;
(don't ask me what this is, it's just me being lazy and creating a whole webhook communicator thingy to troll my friends instead of chat normally)
you know what i would answer?
https://tryitand.see
@pale vessel epic fail there mate

[
'365917982246961162',
{ xp: 181, level: 6, last_message: 1603127345121 }
]``` how can i access the level property?
btw can't you just use ```js
sts.append("p")
.style("background-color","rgb(207, 74, 74)")
.html(An error occured: ${err.message} Are you sure the webhook ID and webhook token are correct and the message content is smaller than 2000 characters);
[1].level
object[0][1]
object[0][1]
@pale vessel nah
yep
object[0][1] worked, thanks
i assumed you were dealing with something likejs { levels: [ [ '365917982246961162', { xp: 181, level: 6, last_message: 1603127345121 } ] ] }lol
wew it worked
epic
finally got it to work
all i gotta do is figure how in the hell do i get the value of the input boxes
and then lazy day #23 finished
@still cliff why weren't you here 25 minutes ago
Don't people read docs nowadays?
@still cliff they do but it's lazy day #23
Great. 😂
and also MDN's search feature is cheese butter
I was working on a multiple client queue algorithm...
the result I want is always like 5th or 6th one
Shoo Erwin
Yes, Erwin.
.val()
@still cliff d3.js
im becoming #development 's RAID SHADOW LEGENS type of ads
oofers
@earnest phoenix if you want the value i think it's selected.property("value")
of traffic? yes, even before i did my sharding
or did you kill them with the doses first
i managed to pull around 93% of twitch's global traffic on my bot
lemme see if i can get the stats rq
cool but i want 100%
lmao
thats a much harder task cuz thousands of 0-3 viewver streams
What, @pale vessel? Wasn't he asking about setting the values of input fields using Jquery?
whats the biggest stream
d3.js
Not the Twitch thing, @opal plank. I am working on a WhatsApp thing.
wait instead of going through <ScrollEvent>.path[0][0].....val() can't i just do gib an id to every input tag and then do d3.select("#id of input").val()
...why?
imagine using whatsapp
Not very familiar with d3. Does it work like Jquery?
idk if its very redable, but here it is
Not very familiar with d3. Does it work like Jquery?
@still cliff very similar
try d3.select("#id of input").property("value") or d3.select("#id of input").node().value
Ah.
not really similar
Oh...
?
@misty sigil check above
pog
try
d3.select("#id of input").property("value")ord3.select("#id of input").node().value
@pale vessel by value i mean the value that the user gave not a property of the html element object
i think at that day it peaked at roughly 210k messages per minute
it was some insane traffic
That's remarkable!
i think at that day it peaked at roughly 210k messages per minute
@opal plank did i hear a twitch DDoSer boast
Unfortunately the WhatsApp thing is far too complicated since there exists no public API I can use...

you said yourself you love DDoSing twitch
i said i MAY be unintentionally ddossing twitch with multple connections
who uses whatsapp nowdays?
And the rate limiting is insane!
keyword UNINTENTIONALLY
Unfortunately the WhatsApp thing is far too complicated since there exists no public API I can use...
@still cliff if there is no API how are there business accounts controlled by code
ratelimit? never heard of, is that some food my 30 ipv6 block can eat?
They pay thousands of dollars to third party providers to get that, @earnest phoenix.

It is not IP based, Erwin.

It is client based.
yeah but if they have no API to build upon how are they making anything
asnwer to your question is that it is food for your 30 hungry ipv6 to eat
Not on WhatsApp...
theres a limit on each to prevent api spam
what app are you talking about
thats my question
by value i mean the value that the user gave not a property of the html element object
is this possible
each client can have 20 joins per 10 seconds, about the IP if it hits too many ratelimits it also gets cooldown and refuses connection on all clients, and then your token might be revoked
they check ip toos
@opal plank Third party providers like Twilio collect money from multiple clients and pay a sum to WhatsApp which in return gives them access to a private API.
i ask and they just respond with "whats app" ;-; doesn't give me much context to go off of
whatsapp is raking in da muny
Fact.
i use whatsapp
lowkey more about lack of option tbh
Everyone does.
no one uses discord in brasil
i ask and they just respond with "whats app" ;-; doesn't give me much context to go off of
@vernal rivet they're sayingapp is undefineddon't you understand

why use apis while you can scrape? 🤔

I have like 30 numbers on WhatsApp for this purpose only.
30 clients running simultaneously...
think i got a few hundread to say the least, mostly chicks/guys i met in parties
I have like 30 numbers on WhatsApp for this purpose only.
@still cliff so 30 SIM cards?
discord > whatsapp anyday of the week except sundays, cause thats my me day
@pale vessel by value i mean the value that the user gave not a property of the html element object
@earnest phoenix what do you mean
when you change the value, the value property also changes lol
so you can just grab it
AAAAAAAH FML
if you are searching for the value, then you would use predicates
YES
why use apis while you can scrape? 🤔
@restive furnace Because scraping is inefficient.
FINALLY
BRUH
every 5 mintues FFS
what am i looking at
Windows 7!!!
thats the best token
(yes scream at me for Windows 7 I'll quickly boot to Ubuntu and slap poop at your face)
super safe
WHY!?

@restive furnace Because scraping is inefficient.
@still cliff not really, just learn how to do it properly
I'm having trouble generating random numbers in C++:
auto map = this->_map;
srand(time(NULL));
std::pair<std::string, T *> pair = *std::next(std::begin(map), std::rand() % (map.size() - 1));
return pair.second;
But I'm always getting the same value returned. Weird
https://flazepe.became.gay/zphp7tkwO7.png js function upd() { d3.select("#res").text( d3.select("#test").node().value ) }
oh shit, cpp
I know scraping and have implemented it in a couple of my projects, but it still is inefficient.
ahhhhhhhhh
i haven't done cpp in a long time
what value are you getting @cinder patio
-> d3.select("#webhook_id").value
<- undefined
oh...
that doesn't answer my question. its a map, so what item in the map is it getting? the first, last, middle, etc.
wait it's a selection it won't work
added .node()
yee
whoops
A random value from the map, that's the whole point
or selected.property("value")
fair
map.random();
node() is cleaner imo
cpp is wack
i will feed you js what can you do

is there a reason for using the map, over raw numbers?
I figured it out, worked by using srand just once
cause its much easier doing it with unsigned ints
The hashmap stores pointers to objects, and I want to be able to get a random object
fair
now it should stack up on the notifs but i gotta clear them tho
that css makes me lose hope in life
Is there any reason for using d3 instead of the default document API?
that css makes me upset
that css makes me lose hope in life
@pale vessel there is no CSS
wdym
Is there any reason for using
d3instead of the defaultdocumentAPI?
@cinder patio faster and easier
i stole discord's 7000 line stylesheet but never used it once in the whole page
this man is planning on having this without style. I am scared
so there is css
I doubt it's faster cause it most likely just wraps around the document API
technically no
also technically yes
I doubt it's faster cause it most likely just wraps around the document API
@cinder patio is afor loop/.forEach loopon an HTMLCollection better thand3.selectAll
You can use for..of and a regular for loop to iterate through it
What does selectAll do?
just grabs everything
like querySelectorAll?
does delete work on arrays
doesn't really iterate
does
deletework on arrays
@earnest phoenix likedelete array[1]?
Uncaught TypeError: document.getElementsByClass is not a function
excuse me wtf
@earnest phoenix like
delete array[1]?
@pale vessel yes
f
why in the world would you need to use a delete keyword. just shift it, or pop it. i am not understanding this logic.
If your page is simple, just use the document API, it's pretty easy to work with it, and it's faster. If you are making a complex page, maybe you should consider using React or Vue.
splice is weird
I love vue
vue is great
:kellyded: why in the world would you need to use a delete keyword. just shift it, or pop it. i am not understanding this logic.
@vernal rivet i keep saying this and I'm saying it again
this is lazy day #23
change my mind
@earnest phoenix it's just splice(index, 1)
that doesn't make any sense, but you do you. its not that hard to do it with out a delete keyword. but you do you.
and what flaze said
wrong channel
@vernal rivet ok I change ur mind: vue's states are mutable.. while in react/nextjs they're immutable
mind changed
ok, but that doesn't really mean too much. why would i be using states. i don't need to then i don't need to.
Vue is more flexable
let resp = await deepCall(msg.content.substring(prefix.length));
let n = 1000;
let total = Math.ceil(resp.length / n);
pages = [total]
for (let i = 0; i < total; i++) {
let content = resp.substring(i * n, n);
pages[i] = new MessageEmbed()
.setTitle(`Response ${i + 1}/${total}`)
.setDescription(content)
.setAuthor(`To: ${msg.author.tag}`)
.setFooter(`From: ${client.user.tag}`)
}
paginationEmbed(msg, pages).catch(console.error);
Oof, I write complete jank when I use JS
RIP
you switched to js or what
hmm okay
Too bad I still haven't sat down and learned it properly
why don't make reaction paginations tho?
Why use J's if c# is better 
why use c# if assembly is better
Why use assembly if glass is better
why use glass if brainfuck is better
why use brainfuck if scratch is better
I can't top that
r/brokethechain
ihavereddit
C# is my preferred lang, but I can't be bothered to scaffold a new Discord bot in it. It takes better designing to set it up than throwing together some garbage like I am rn
I was thinking how cool it would be to have a rust discord bot
but you're right it's so easy to slap together something using js or py
hey fellas
Worked okay ig
but i have 20 bots and a weebhook
the bot is offline smh
@solemn heart we are not a support for reaction roles bot
Recation bot
@torn ravine @wrongserver
How do yoy work the role
What
:kekw:
???
How do you work the recation boy

Bot
you named yourself shivaco i pinged you instead of shivaco
-wrongserver @solemn heart
@solemn heart
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 "Support Server" button on the bot's page, not the "Join Discord" button at the top of our website. If there isn't a button that says Join Support Server, then we can't help you. Sorry :(
@solemn heart we are not a support server for reaction roles bot
bro did they freaking leave
I guess they did listen
bro did they freaking leave
@earnest phoenix yes he left
anyone else's bot taking ages to log in 
they joined, asked support for a bot then left when we said we can't
how did they join the wrong server anyways
Ehhh it's got some bugs lol
@faint prism that is fucking awesome
Meh, I made it over my lunch break just now
Yeah, single-purpose bots that use an API
Telk's API or smth else
DeepAI
where do I send my suggestions to the DSL bot?
also how do you view the integrations for a single channel on mobile
Since GPT-3 isn't going to be free :/
I settled with GPT-2
where do I send my suggestions to the DSL bot?
@lone siren https://github.com/top-gg/issues
I was thinking how cool it would be to have a rust discord bot
cooler to make yourself with making headcaches a discord bot in C++ with only WS and HTTP lib and the library linking is hell on windows. that's cooler.
@lone siren https://github.com/top-gg/issues
@earnest phoenix This link should be attached to this channel to make doubts easier.
@earnest phoenix This link should be attached to this channel to make doubts easier.
@lone siren it's already in #502193464054644737
also how do you view the integrations for a single channel on mobile
when i click on the integrations tab in server settings it shows nothing
and there is no way to check integrations on the channel edit page
(why am i saying page when I'm on the app?)
because you're on an actual browser 
I was not born in the United States and outside that country foreigners have difficulty speaking this language. The pronunciations of words are easy to be confused, if I say beach, you are likely to accidentally say the word "bitch" and someone is offended
and outside that country foreigners have difficulty speaking this language
slightly offtopic but this is just not true lol. if a foreigner wants to, they'll learn english properly. chances are a foreigner (enrolled in modern day education) is going to speak better english than people whose mother tongue is english
how do i setup package-lock.json?
npm generates that for you
@earnest phoenix Better, or more proper?
When it's your native tongue i'd say it's more easy to communicate via informal phrases sometimes
you probably mean package.json. if so, you can use npm init
then just use npm i and it'll install all packages and generate the file
just code without it
what's the difference btw mongodb compass and community server
The community server is a mongodb server, while mongodb compass is a tool to browse your database
oh okay ty!
someone ping me
yes
.setImage('https://cdn.discordapp.com/attachments/747141794587738228/767819225044877322/bt_dev.jpeg')
why its not working?
you tell me
just because
try visiting the url
context please
i wonder why it didn't work
shut up flaze just let them
yea i cant see why it wont work
i ain't telling shit
good
first of all, using discord cdn's images is risky enough to be a problem itself
second...
what about now
oh my
dude
listen here
use this please
also, deleting your message broke the context, don't do that
have you tried it?
low = 10
high = 30
if(low >= 10 && high <= 40)
false```
Am I dumb?
Why is it false?
high is less than or equal to 40 lmao it's true since high is 30
^^^^
Hm
LMAO
Let’s pretend I didn’t say that...
That’s gonna hurt if they check message logs on apps LMAOOOOO
if this is js
try encasing operations in ()
order of operations might be getting messed up
Looks like pu
Py
py doesn't have lowercase if nvm
Actually the &&
Wait what
@pale vessel
Why does that not work then
It’s returning false for me
if((op1) && (op2))
idk what made me say this btw #development message
https://flazepe.became.gay/k6UozW2O-z.png voodoo shit right here
can someone help me make ban/kick command?
questions like that are too abstract
my bot seems to be taking forever to connect to discord and keeps coming online and offline, anyone else experiencing similar?
are you sharding
nope
nevermind the api is having issues
Welcome to Discord's home for real-time and historical data on system performance.
when is it not
Tru
To quote the discord docs: The internet is a dangerous place. Disconnects can happen.
Always is
deleting npm cache like
Youch
Use yarn
Werks kinda
#memes-and-media message
Page 5 says the body is too long, but tbh it should be less than 1k. Guess I need a breakpoint
also does someString.substring(1000,1000) == "" ? Because I thought it'd return 1000 characters after index 1000
ig substring is start/end instead of start/length
but depending on the lang, it might return a single char
well it's only on page two
java for example uses start (inclusive) and end (exclusive)
the 1-5 work fine
and I define the substring as i*n where i is the for loop's iteration and n is 1000
on 1*1000,1000 it returns ""
but 0,1000 and 2,1000 work fine
So i looked it up before, but have forgotten: tf is a CDN and what is it's purpose
actually 2,1000 is what should be on i == 1
So i looked it up before, but have forgotten: tf is a CDN and what is it's purpose
@waxen tinsel Content Delivery Network iirc
Maybe I'll just redo it in C# lol
maybe line terminators are counting for that limit
try splitting in chunks of 512 chars each
now i'm confused, my bot logs in and is online for a few seconds before it keeps restarting itself
wtf is a "public key" and interaction endpoint
what's the context
try splitting in chunks of 512 chars each
@lyric mountain that worked wtf lol
wow so much information
even the avatar is redacted lul
sh
guessing by the description, you can make discord send you POST requests to your webserver when someone interacts with your bot
instead of being on the gateway
ik what the interaction endpoint url does
oh
not the public key though
maybe to verify the interaction
hm
because anyone could be sending requests to your webserver
free == good, because it is FREE
@shy turret it seems to be just that, public key is for verifying that the request is coming from discord
so glitch is good?
free == good, because it is FREE
where did you hear that
@earnest phoenix it's for the game sdk

a courtesy of shiv the second:
#development message
not everything that's free is good
i used 1y and i still have 200euro
like, letting me steal ur token is free
and it is good
free == good, because it is FREE
@willow mirage no
yess
would you risk it?
exactly
if something is free, you're the one being sold
esp when it comes to google
free trials,
300euro
1 month 5 euro for vps
300 / 5 = 60
60/12 = 5
5 YEARS
isnt having custom prefixes kind of intensive considering you have to make a database call pretty much on every message
not at all
@misty sigil so ?
databases excell on read-only ops
free trials 5 years
there's also the cache
gcp limits their $300 credit to a year
i cache mine
no?
yes
exactly, nothing lol
they won't charge you after the free trial expired unless you verify your card again
trolled
that is for new users
Your Free Trial ends when one of the following occurs:
You've spent the $300 in credits.
90 days have elapsed since you signed up.
no buts
that is for new users
I have 2 acc
1 acc i can forever
2 acc i can use for 90days
wew
I saw it and i knew about it
should my analytics service call the api to write to db or should it write to db directly
hmm
call a writer
you most likely upgraded your first account and allowed gcp to bill you
direct accesses are bad
1acc is old
2acc is new
or it was created before the 1y -> 3mo reduction
right but technically this is already being called by the dbl webhook & discord integration
you most likely upgraded your first account and allowed gcp to bill you
@earnest phoenix ahm maybe not cuz i used Credit card generator that i have lucky 1/10000
oh my
you can't use that, they ask you to verify
credit card gens are the best way to speedrun your account
LoL i did but who care
like i could just concatenate it to the api itself and remove the analys service
that's general knowledge even
you can't use that, they ask you to verify
@earnest phoenix but they already vertified
LoL i did but who care
@willow mirage discord cares, google cares, fbi cares, good citizens care
generated credit cards are either:
- not "generated"
- invalid
guess which one yours goes in?
its valid format but isnt a registered number probs
so yeah im the most luckiest guy this world
stuff like chancejs etc have those built in
Lol
a "generated" card can't be valid
@pale vessel but it does the percent are 1/100000
imagine if we could all generate credit cards for stuff
time to get a nasa vps then
Hey having an issue where djs shards don't connect, haven't updated the code since last reboot (All shards connected) but the shards just don't connect and I keep getting websocket timeout. Any one got an idea of how this could be fixed??
who cares about capitalism, I got a free generated cc
huge troll
Hey having an issue where djs shards don't connect, haven't updated the code since last reboot (All shards connected) but the shards just don't connect and I keep getting websocket timeout. Any one got an idea of how this could be fixed??
@vague kite discord api is having some trouble
it's been like that for about an hour
always has been
it's been like that for about an hour
@lyric mountain Where can I get an update about this??
https://discordstatus.com/ normally
Welcome to Discord's home for real-time and historical data on system performance.
does the analy service call db or should i have it call the api
@earnest phoenix rule of thumb is centralizing database access to a single layer
so api it is
yep
if thats the case might just shove all the webhook stuff and stat polling onto the api itself
I mean, it's good to have a layer with the sole purpose of making transactions with the database
while you could shove everything in it, it'd kill its purpose
kind of
the way i have the api styled is to handle most the functionality as well as transactions
yes
like game logic etc
oh 
oh no
i could break that kind of stuff into a seperate microservice style deal but like
they have an android app?
ye
for a bot i feel liek thats way too much work and maintnance
OH SHIT
when just having a basic api to handle functionality is fine
what are you on about
vps
your considering using aws or azure for a bot vps?
im guessing the scalable option?
no im using gcp
if so thats a huge waste of money
but gotta move soon
unless you need that level of scalability its way way way cheaper to go to something like ovh, docean, etc etc
i literally told you that there was a 1 year limit
but ok
const prefix = guildConfig.prefix;
```is this closed right
what do you mean closed
name your variables however you want it's your code
const BaseEvent = require('../../utils/structures/BaseEvent');
const GuildConfig = require('../../database/schemas/GuildConfig' );
module.exports = class MessageEvent extends BaseEvent {
constructor() {
super('message');
}
async run(client, message) {
if (message.author.bot) return;
const guildConfig = await GuildConfig.findOne( { guildId: message.guild.id } );
const prefix = guildConfig.prefix;
if (message.content.startsWith(prefix)) {
const [cmdName, ...cmdArgs] = message.content
.slice(prefix.length)
.trim()
.split(/\s+/);
const command = client.commands.get(cmdName);
if (command) {
command.run(client, message, cmdArgs);
console.log(guildConfig)
}
}
}
}```
so basically it spams the error
(node:12148) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'prefix' of null
but when i use a command
it works
here is how guild.config looks like
prefix: '?',
_id: 5f8dea43940fd62a789c3b71,
guildId: '739505171373096971',
__v: 0
}```
you should probably cache prefixes
doing calls to your db on every message is super expensive
i know
guilds don't exist in dms
dw abt it
oh
oh
aight
quite possibly
shit
you're using mongoose right?
how to i edit a message?
take a guess
kind of
Hey @green kestrel which javascript interpreter does Sporks use for the custom behaviour scripts or whatever they're called?
@cinder patio duktape
you're naming your message editmessage but then trying to use Message
use editmessage
editmessage.edit(f)
and how do i make it that it will edit it in 30s?
setTimeout
in the then?
yes
oh
wait i think i know how
so like
.then(editmessag => {
setTimeout(() => {
m.delete()
}, 10000)
})
editmessage.edit(f)
?
no
then how?
please
then like that
@earnest phoenix
.then(editmessage => {
setTimeout(() => {
editmessage()
}, 10000)
})
editmessage.edit()
})
ty
🥄
Hello people who are helping me a lot. What is the best way to store simple data to create a playlist: a normal array or using collection?
array
how to fix this?
let { body } = await get(`https://some-random-api.ml/mc?username=` + args.join(" "));
if(!body)return console.log('error')```
```(node:15552) UnhandledPromiseRejectionWarning: Error: Internal Server Error
at Request.callback (F:\code\Détente [FR]\bot juzoo bot v12\node_modules\superagent\lib\node\index.js:883:15)
at F:\code\Détente [FR]\bot juzoo bot v12\node_modules\superagent\lib\node\index.js:1127:20
at IncomingMessage.<anonymous> (F:\code\Détente [FR]\bot juzoo bot v12\node_modules\superagent\lib\node\parsers\json.js:22:7)
at Stream.emit (events.js:314:20)
at Unzip.<anonymous> (F:\code\Détente [FR]\bot juzoo bot v12\node_modules\superagent\lib\node\unzip.js:53:12)
at Unzip.emit (events.js:326:22)
at endReadableNT (_stream_readable.js:1223:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
(node:15552) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)```
how would i toggle a css property with html?
@wicked pivot you can't, at most what you can do is sit and wait
@drifting wedge you can't, you need js
@drifting wedge you can't, you need js
@earnest phoenix yes but how?
just like an example?
U could use html if u use hover
U dont need js if u use :hover on the css element
Can be both
i think a button would be easier / makes more sense
its not like im trying to use no js
hover selector doesn't make any sense
you have to hover over the element to have it active
??
Is that not what you want?
its not like im trying to use no js
I made an entire 3 page site without js
Dang
its a dashboard
js is king of modern day web development
so that might explain it
especially with SPAs
Mind if I see what you got going on now? 
me?
You can dm me the link lel
Lol
this is part of the profile editor




