#development
1 messages · Page 243 of 1
its cloudflared
when locally testing you have to use smth like ngrok or cloudflared
you can't use localhost directly
you need some sort of tunnel / reverse proxy
Are you leaving the activity and joining back?
Nope
Maybe it just doesn't find
maybe
And it seems it takes so much time to update
Lol it works now
I deleted the app and re-created it
Wait.... websocket doesn't work
bit useless if this doesnt support websockets
youll have to stick with the old fashioned manual polling
(if it even allows that)
websocket should certainly work
Or I create another webapp that embeds my app with an iframe 
it only support secure web sockets
obviously
yes, but...
I use socket.io
Why it doesn't work with cloudlflare ?
it is enabled
Look
It works there
but not on the Activity
first
(yes I downloaded experimental PTB Discord Client
Yeah you wont be able to externally load these
because content policy on these sandboxes discord uses
It blocks js
I must turn everything into type=module
No, set the type of the file imported
I think I have to download the external libs
Bruh let's go make an external app I suppose ?
that embeds the game?
Yeah guys you're right
I've set black background
Found this
An Aussie's guide to creating a discord activity using Unity and Sveltekit
Thumbnail made with Thumbnado.
https://github.com/Chizaruu/thumbnado
💰🔗 Feel like Supporting The Channel 🔗💰
ᐅ Github Sponsor
https://github.com/sponsors/Chizaruu
ᐅ Patreon
https://www.patreon.com/thesleepykoala
🔗 Relevant Links 🔗
ᐅ Svelcordity
https://github.com/The...
Good night
Would
But well, some sort of night dweller like a vampire or some sort of necromancer
?
a neck romancer
they are called dark elves
Doesn't look like an elf
I was going for a fallen angel type thing
Hm, i can see that
Vaksam was the race name I chose
If it's a celestial race, perhaps a name ending in -el or -im would feel more natural
I mean, just invent a name and append either suffix
vaksamel

pro
does topgg have any api that lets me send vote data? like if somebody votes can i make an api call to topgg to update the vote on my bot?
nah i used prebuilt one instead
im too noob to understand cmake errors
i almost got my keyboard bricked 
bump
Does Bulk Overwrite Guild Application Commands overwrite all the Global Application Commands? I want to test out a new command on my server before releasing it, but i'm worried i'll discard the Global Application Commands if i do a PUT.
https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands
const res = await fetch(`https://discord.com/api/${API_VERSION}/applications/${APPLICATION_ID}/guilds/${guild_id}/commands`, {
// const res = await fetch(`https://discord.com/api/${API_VERSION}/applications/${APPLICATION_ID}/commands`, {
method: "PUT",
headers: {
"Content-Type": "application/json",
"Authorization": API_KEY
},
body: JSON.stringify(commands)
});
PUT application guild commands does not override global commands. You must make 1 request to PUT global commands and 1 request per guild to PUT guild commands
thanks
Actually.... the game is made in unity then exported to webgl then embedded into a svelte app....
But It's not what I want to do lol
hey guys i don't understand typescriopt
like, how do i fucking run the ts program gang

npm i -g typescript
then run tsc your-file.ts
it will convert into js
and then run ur js file
otherwise
Use bun
you forgor tsc --init 
For the tsconfig yes
well uh that's to setup ts project yes
it can executes ts
or you can use tsnode
but it's not very good
it's just using tsc internally and execute the compiled ts to js internally
it seems
bun uses esbuild
Bun, the code
Yes and ?
It removes the burden of the esm and common js modules lol
it's just bound together
and memory leaks on the http lib
esbuild seems fast?
it is
?
You mean bun makes memory leaks with the http lib ?
Or it solves that?
bun causes leaks when using streams to respond with data
pretty crazy how slow bun.serve is
It seems

their parent, uws is still over 3x faster
Uws ?
?
uwebsockets
Like they fake their numbers you mean ?
is it an engine ?
is this ws:// based ?
??
it has http and websockets
it can do all at once
Yeah but, I mean.... Discord seems to blocks websockets from my webapp
It also blocks their own sdk lmao
/Users/apple/.zprofile:2: no such file or directory: /usr/local/bin/brew
* Terminal will be reused by tasks, press any key to close it. ```
tryna run this bitch but i keep getting this error
i am for sure homebrew is downloaded
bun users trying to be taken seriously when their built in libraries literally leak memory
hold on ill fire up my macos VM
you should be able to just install it?
darn macos amateur
@neon leaf
thats not a standards compliant http server lmao
Yes I know
But I use NodeJS server anyway
For express
b-b-but their benchmarks!!!!!
nodejs beloved
c/c++ and rust my beloved
nerd
no u
no u
and
therefore you are a nerd 🤓
-# ||Null is always a nerd||
ur a bigger nerd
how
directx and decancer
sure
mmmm
mmmm
mmmm
mmmm
mmmm
thank you for joining in on the bullying of 0x7d8
OH MY GOD AFTER 4 HOURS OF ENDLESS GOOGLING I REALIZED ITS AN ACTUAL BUG THAT NO ONE HAS REPORTED IN THE GITHUB REPO


wtf when i compiled the first time it works but when i recompile it without any changes it causes a segfault 😭
what the fuck is THIS
i made your code segfault
fixed it with ```cpp
SendMessage(reinterpret_cast<wxWindow*>(take_one_frame_every_dropdown)->GetHWND(), CB_SETCURSEL, static_cast<WPARAM>(2), 0);

what the fuck is that
a workaround that works
is it just me or is OOP inheritance a bit useless?
i never see myself using it at all
inheriting a single class, maybe, maybe you have a base class and other classes which need those base properties, but apart from that i dont see any more use for it
can make the code more complicated since you have to figure out from which class something came from
extending library methods too but usually in OOP inheritance is displayed as a much more important and vital concept
Isnt that the entire point of inheritence though?
To extend properties from one class to another
perhaps, but the idea is to model the object in a way that copies how things work irl
so its more of a mental/psychological thing than actual code efficiency/readability advantage
yeah, but that can also often be achieved just as well through composition
in my plavm project i do use some inheritance but it's mostly 1 layer deep and in reality it's pretty much all abstract classes that could just as well have been interfaces
most of the time it's a matter of "i want polymorphism, how will i do it"
I mean sure
i also disagree with that notion quite a bit and it's especially funny when you're give the Dog extends Mammal extends Animal example
go ahead and implement Platypus extends Mammal hehe
you CANT!!!!!
just a lot of the things you represent in code are inherently abstract
i think it works the other way as well with people portraying inheritance as something that's academically very evil where every class will have a 500 layer deep inheritance tree when in most applications in the real world that will never happen
Yes, because it is a game
sure, and for those cases you can implement them in other ways, assuming you're using a multi-paradigm language
i would use classes in cases where it makes sense to model something like that
i guess in the platypus example it wouldnt make sense
no they're just one of the few egg laying mammals
the average joe would say live birth is a classifying trait of mammals!!
I mean its still a mammal
doesnt matter if its one of the few that lays eggs
but this
if your code assumes mammals do live births
womp womp you gotta go change everything
rust doesnt have inheritance at all
although its not really an oop language
they let you have structs with methods but thats about it
thats really all i use classes for anyways
Rust has “inheritance” at a certain level but treating it as such leads to painful consequences
no inheritance shall protrude thy sacred rusted code
I'm sure there's certain things that are more painful to model in Rust, it's all a matter of tradeoffs
rust is the epitome of complicated and pain
<
> "i gave you the chance to code in C++, willingly.... but you.... have elected... THE WAY OF PAIN!!!!"
hi chat
currently struggling with something
high chance nobody can help
but will just try
im using coolify x docker compose atm
docker compose builds the local dockerfile, which exposes port 3000
docker compose has ports: - 3000:3000
thing is, i cannot connect to that port at all
even withouut the :3000 after the domain it still 👎s
it just shows the debian 404
just gonna do a different method nvm
Are you allowing port 3000 through the firewall?
no firewall on server
what's the cmd for debian
ufw typically
not found
Oh yea you can open a ssh tunnel via -L too
i love ssh tunnels
but i dont see anything for system firewall
it's just docker docker docker
who even needs a firewall in 2024 smh
yeah okay coolify just implements compose really really weirdly
i had a db service and api service
i just moved the db service to a different instance
connected to it internally from the api service
and gg
weird shit
wait
i think i might know why
uhm a firewall is pretty much mandatory
whyy :3
does anyone has any suggestion to solve this error in my bot
it has 42k servers and the error shows randomly or when starting and stops the bot
429 means you hit a ratelimit
i know that, but what should i do about it am getting it alot
Stop spamming the api
42 k server there is no way to not spamm the api
There is
how?
but not spamming it.
Ima be real bro, you posted a vague error
It does not tell me what endpoint is being called, so i can't tell you if there is a better way to handle it.
When does the error occur
the error stops the bot from getting online , so the rate limit on the bot it self
What library are you using
djs

do you fetch all members on login?
discord-hybrid-sharding for sharding
no but the guilds yea
and the bot data
you dont need to fetch the guilds if you have the guilds intent. All of the guilds are sent via GUILD_CREATE
or they're all ready per shard when shardReady hits
partial data ofc, but you can fetch for the rest of the information as you need it
i do other wise how am gonna get the messages sent in the guilds?
for prefix commands
you do not need to fetch all guilds to do that
No. The full object is there. GET /guilds/:guild_id doesn't include some fields like channels, etc
look guys i manually dont do any of that its just djs login way
djs does not fetch all guilds on its own
it stores partial data in cache once it hits GUILD_CREATE
You might be globally rate limited if it's preventing you from logging in
idk but i thenk when sharding it did
or if yo uare sharding the ready event ofr that shard
Also yea, what Ophidian said, if you got too many 429 you likely got a global rate limit and even a CF ban
yea that what am sayin
which if thats the case you have to wait 24h
do discord give whitelist for bots above 10k server?
Global rate limit isnt based off how many 429s you receive. There is an error limit temp ban, but you can only make so many requests within a day before you hit your global rate limit.
As your bot grows, so too does the limit
As well as your max_concurrency when starting your bot from GET /gateway/bot
ok ty
I know you probably get this a lot, but I really do not recommend discord.js at your scale. I'd say it's high time to consider modular solutions which do just what you want so you can separate logic and narrow errors as well as manage your own cache logic since discord.js is. a. memory. hog.
🐖
Honestly, I think back to when I used it because I thought the class based approach was helpful - it isn't. Its design only serves to cause suffering. Did you know that unless you cache a message, you cant receive reaction events? I mean, now there's partials but lol
you'll receive a retry-after header that you can use to know how long to wait for
if (response.status === 429) { // Handle rate limit response
const retryAfter = response.headers.get('Retry-After');
console.log(`Rate limited, retrying after ${retryAfter} seconds`);
await pause(retryAfter * 1000); // Convert to milliseconds
attempt--; // Don't count this as an attempt
}```
you can't compare rust to zig
i can
wait, you just compared rust to zig
you can't do that!
zig has a better icon
so real
took me days just to write a simple GUI
if I make this API only can I update it to be available via the store later?
what is this
Discord SKU. i created it and it looks like it can be added later
what's a SKU?
i'm trying to find the SKU ID now. i think it might only be available via the api
A SKU, or stock-keeping unit, is a tool used to keep track of inventory. In the context of Premium Apps, premium features can be thought of as "products" that an App offers. These “products” can be tracked through their own SKU and managed in the Developer Portal of your application.
oh interesting
i have no SKUs!!!
any request made to Discord has ratelimit info. X-Ratelimit-Global on a 429 response is present if you are being globally ratelimited. X-Ratelimit-Reset-After is a float in seconds when the bucket will reset to limit. Or the 429 response will have a JSON body which has this info
you get both. use X-Ratelimit-Reset-After to know how long until the timeout is over
Both what?
headers
The X- prefixed header should be used as headers not prefixed with X- not defined in the HTTP spec are the result of bad practices
Pretty sure Retry-After was slated for removal at some point anyways
does the sku need to be added to the store before it gets a sku?
https://discord.com/developers/docs/monetization/skus#list-skus
Cant you just create them once you enabled monetization? https://support-dev.discord.com/hc/en-us/articles/17297949965079-How-Do-I-Monetize-My-App
yeah, i was just using the wrong app id. i'm getting the skus now
guys can someone help me? how can i fix circular deps. So basically my flow rn is file1 calls a function in file2. file 2 calls a function in file3 and then laslty a file3 needs to call a function in file1. for example I have buttons players can click. now lets say player clicks a button to view something, and then in the view embed there a button that allows players to join it. now when you join something i want to automatically show the users what they joined which is the "view" function. And then in the view i want to give players the option to join it
how can i split this logic
Well the problem is, you have
File 1 -> File 2 -> File 3 -> File 1
So eventually it will all loop back to the start
You can move the function that file 2 & 3 relies on from file 1 so that way you can export it as needed.
That will help
Put it into a separate file
so i need to duplicate it is what you're saying
Not duplicate it, but move it out
well there is only 1 function in file1
and after file3 does something i need to call this function which is in file1
I see yea so file 1 calls a function in file 2, then 2 in 3 and then 3 in 1.
So basically file 1 imports file 2,
file 2 imports 3
3 imports 1
yea
So the problem is still importing file 1 unless I am mistaken
as when you import another file it is reading the imports of that file as well afaik
yeah
You have a design flaw
so like how can i fix it in that case. whats a better solution
i dont want to pass callbacks to all the functions
so that file 3 uses some callback to go back to file2 and then file1 to call the function
I mean without know what each file does, you likely could just combine the functions into 1 file. As it sounds like its just a function per file
and they all rely on each other
You breaking them up into 3 files and then importing each file all the way back to importing file 1 (which starts the import loop) sounds like a bad idea
I mean, I don't see any other way to get around this
Maybe someone smarter than me can.
I use rust and its hard to get a circular dependecy error if at all
i was thinking event emitters
so any JS problems are a little beyond me as I haven't used JS in ages
ok so let me explain what im trying to do maybe you can offer a better solution. this isnt related to any language just a design flow im thinking
so i have a button that says "fight" the player clicks on it and it starts the fight after the fight ends i show some kind of result that relies on the fight data. now in this result embed i want to show the "fight" button again. which is the same function as the initial one from file1
does that make sense?
yeah so what do i do here to fix this cyclic dep
i mean the actual fight function and result function are big. so i cant just put everything into 1 file. that wont be readable.
discord
discord buttons
maybe its a me thing, but I hate writing massive functions. I usually abstract it further.
yeah that is there
Breaking it up into chunks so its easier to edit
but again the problem here is. how do i show the fight button again
yeah i've done that
Well, you can keep track of some sort of state
When they start the fight set some value to true, and wait until its false again then show the button once more.
right, ig thats the only other way
thanks
rust doesn't have circular deps or at least I have never ran into it
i see
it doesn't
c++ when i add a trailing comma
I feel like you probably could run into them tho
but idk how use statements are processed in rust
so maybe not
if thats the g++ compiler makes sense
if thats clang im kinda surprised
clang is useually more descriptive
uhm that's Microsoft Visual C++ (MSVC)
can you show your code? or share it somehow
the code is pretty complex to share tbh. it does a lot of things before calling the function in a diff file. but anyway for now i figured i'll use something like events or just remove it entirely
im also busy rn maybe i can share some other time
are you using import or require?
import
weird part is my eslint isnt complaining that its cyclic
and everything works fine
if you absolutely cannot move the function from file1 to another file, what you can do is to use an async import in file3
i see
in file3, inside the function, you call import(file1).then(run function code)
of course the function needs to be async
but that will make the importing happen only after all the files have been processed
so file1 is free from the cycle
gotcha, i'll give that a shot
how do i call the function inside that file again?
import("./file1").then(() => func1(options)) doesnt make sense
no, move the import to inside trhe function
async function func1() {
const file1 = await import(...)
}
func1() {
import("file2").then((t) => t.function2)
}
i think this should work
?
ig this works too
ye
you can await import?
cool
ye, the dynamic import function is an async function like any other
ok it is still being detected as a cyclic dep my madge
ig thats expected? since it is still cycling
just during compile time it wont pick it up right?
is func1 being called immediatelty on file load?
yeah, lemme send a snippet
if (!raidId) return;
options.args = [ `${raidId}` ];
const { joinRaid } = await import("./join");
joinRaid(options);
return;
}```
something liks this
there is a function in file1 which joinRaid func calls
I also did the same there
so which file is this and which file is /join?
this is file1. join is another file. File1 has a function which join needs to call which creates a join button
vice versa. the join button created needs to call the join func when clicked
so its in file 1
madge still says its cyclic which is ok but let me see if the function is available during compile time
so file1 has an export function something() {}
and join.js has export function joinRaid()
and joinRaid() has await import("./file1")
yep and file1 has await import("./join")
is file1 and join.js imported in any other way?
but do any of them have the top level import statement?
nop
like import abc from "..."
i got rid of that
then if i understand correctly it should work
but it would be easier if i could see the code
i the code works. i dont get or run into errors
its just that cyclic deps are bad. and i want to see if i can do seomthing to fix it
the only way to truly fix it is to not do it
move the functions to other files
so that 2 functions can never depend on each other simultaneously
mhm thats what ive been trying to do
ok so i have a common file that shows some embed and then it also adds a button to join raid.
this button action is what calls join file. ok? now when somebody joins i need to show the embed again with the join button.
how do i achieve this without cyclic dep
all the function in file 1 does is send a embed with button which when clicked needs to joinRaid
hard to understand without seeing the code
but idealy you would separate the logic into self-contained pieces
if a part of it cannot be self-contained, it should not be there
got it. let me see if i can send code by breaking them down
but the thing is, its a common function
also, do you use classes? or its all functions
its all functions
this could be a use case for classes
it will run into same problem no
also, its a good idea to have buttons be self-contained as well
on the discord side, a button click is an independent standalone interaction
its a good idea to model your code in the same way
so have a dedicated functino for a button click that does not depend on the code trhat created the button
thats why the uniqueid property is there for
yeah i have that
you can use the unique id to store the state in some global object or map, and then use the button's unique id to get the correct state and update it accordingly
but in the callback i need to call some func right?
are you using discord.js?
I heard they are using oceanic /j
well, same thing mostly
these libraries all have functions like createMessageComponentCollector and awaitMessageComponent
but in realiy, using those functions is not always ideal
because it breaks away from how discord actually works
sure it makes it easier to do a lot of things
but depending on the case, i wouldnt use them
but i mean, if i could see your code, i could suggest which way would be easier for you to do it
because doing it without collectors and such would require a lot of rewriting
so here's the full flow,. when i type a command a function in file1 is called which creates a button. now when a button is clicked it calls joinRaid func. which then calls the function in file1 to attach the join button again
so makes it cyclic
i tried moving the button attachment code to a diff file and call it in file1 but still same thing
since button attachmend code will call join
and join indirectly calls attach buttons again
how about separating join and attach buttons?
the issue is not with the way button is clicked. I just use callback
attach button is wat creates a "join" button and adds it to embed.
if i want to show this button i need to call it right?
function onJoinButtonClick() {
join();
attachButtons()
}
right i could do that yea
thats one way to do it ig
but was tryna find a way if i cann call attachButtons() inside of join()
if you were using classes, you could do something like ```js
class Raid {
join() {
this.attachButtons()
}
attachButtons() {}
}
but using functions, the only way is to pass stuff through a function argument/parameter
that makes sense
but like the join() func itself is big so its in another file
ig i can pass this
well, you can also use a context switch by using join.call()
got it
but at that point it would be the same as passing an additional parameter
idk, writing massive functions just makes no sense to me, I abstract as much as possible. Maybe im just weird
At the end of the day my function has like 4-5 different functions being called in it
💀
they are all abstracted. the business logic is just a lot in there thats what i meant
ye thats what i do too
Abstracting is a double edged sword
Indeed
I shouldn’t have to read 30 different functions to figure out what one function does, but good abstraction is a mix
Well I would never abstract that deeply
but I abstract the different logic out.
If a function is doing 4 different calls to an api, I abstract those calls out
maybe thats just a me thing
It’s all very nuanced and situational anyways
@quartz kindle help
someone just told me they were going to brute force my 2FA pins

What shall I do
lol
idk im no security expert, but it shouldnt be possible
I mean
It is
but its all down to luck
you have to hope the pin you tried was the right one at the right time
but you also need to know user/pass to even get there no?
Yea but thats not nearly as hard to get past as 2FA
i mean, if they somehow got it from some breach, just change password
finally making some progress but holy shit this is so annoying to work with
Still using protobuffers?
maybe its junk meant to throw you off
nah cant be, its sent when i join the call
it has to contain something
i have the events for when i enable/disable cam/mic, but i dont have the data for the cam/mic current state when i join
where is this coming from
RTCDataChannel.send()
my browser sends this when i click "join" in a google meet call
interesting
Does google not give you any specifications
do they literally just hang you out to dry?
no for this no, since this is not a public api
this is basically reverse enginneering google meet
google violates our privacy more than anyone could ever violate their terms of service
were good
holy shit i did it
it was compressed with gzip but also had 3 bytes added as a header idk why, thats why my decompression wasnt working, had to do buffer.slice(3) first
this time you are lucky, next time it will be 69 bytes
lmao
for now i added a check like this:
const check1 = d.indexOf(0x1F);
const check2 = d.indexOf(0x8B);
if(check1 > -1 && check1 < 10 && check2 === check1 + 1) {...}
1F and 8B are gzip magic numbers
i check for their index and see if they are within the first 10 bytes and if they are next to each other and in order
tbh i could check for the entire gizp header tho, its 10 bytes
probably some flags or length
ye
no idea waht this does
d is an uint8array
indexOf checks the index of a number in the array
0xF1 and 0x8B are "magic numbers" indicating that the file type is gzip
to check whether the uint8array is gzipped or not, i check if the gzip magic numbers exist and where they are
so i can slice correctly before unzipping
oh thats cool
what if it happens to not be gzipped and the data just happens to start with those exact magic numbers
havent considered that scenario have you
youll break the data lol
brazil doesnt seem like a country that worries too much about complying with extradition treaties
i think he'll be fine
How?
possible but unlikely
He's already removing it
the worst it can happen is they send me a C&D
also, im gonna publish this in the chrome store
if they dont like it, they'll just remove it from there
What are you making exactly'
Nice image
tracking user activity in a google meeting, like how much time they talked, had cam on, send texts, etc

I think your image isnt loading
Alt text boi
na
the image is served locally from the extension files
i just didnt set the image path after i moved it
my god this looks so cool
good job on it!!

this is my type of project hahaha
do you store the data in your db (server) or does it saved locally?
hey guys,
i have a /setup command:
this embed shows a lot of buttons:
when i click on a button, it edits the embed and then when i click another button it simply says that the interaction has already been replied to, or is unknown.
could this be where it comes from?
its driving me crazy
like is it not possible to send a message, accept a button click, edit the message with a new button and then add a click?
I usually discourage adding/removing buttons. The usual way to do things is to disable the buttons locally and through Discord. To replace the select menu, I'd use a form probably
😮 that's pretty rad, congrats. is the extension open source? I'd love to take a look how you tackled webrtc
best way to approach that is to send your embed, and defer update for the interaction. Then have each button as a separate listener. So "when X is clicked, do this" etc.
As default, your message will only listen for 1 interaction update.
Haven't devved bots in a while, but iirc that's how I approached my multi button menu
Was a bit of a robust setup
this is the first time I've ever seen Tim design anything that involves a frontend
I am proud
hey
i have to ask a about problem
see my bot dont have any slash commands
but when i
or any user
uses
the slash cmds
this came up
Please send it in a coherent message instead of 3 words at a time
Is your bot called Universal
My bot's code doesn’t have or support slash commands however, when anyone tries to use slash commands with my bot, they encounter an error how can we remove these slash commands to prevent this issue?
yesss
Then you will have to send an empty dictionary or however else discord.py instructs you
Look at their docs on how to remove slash commands
hahah thanks
its stored locally in chrome's extension storage
still thinking if i wanna add something like cloud sync to it or not
ooooo
could be useful when you have multiple devices
its on github yeah, but the code in there doesnt use rtc, its all done with mutation observers https://github.com/timotejroiko/meet-statistics
i will add the rtc branch later when its more polished
lmao, its not my first frontend project, but yeah its rare for me to make frontends xD
but basically, this is how i intercept the rtc datachannel
const ___onmessage = Object.getOwnPropertyDescriptor(RTCDataChannel.prototype, "onmessage");
const ___send = Object.getOwnPropertyDescriptor(RTCDataChannel.prototype, "send");
Object.defineProperty(RTCDataChannel.prototype, "onmessage", {
get() {
return ___onmessage.get.call(this);
},
set(val) {
const fn = async function(d) {
if(d.target.label === "collections" || d.target.label === "reactions") {
document.dispatchEvent(new CustomEvent('@_@', { detail: { type: d.target.label, data: d.data } }));
}
// console.log(d.target.label, d.data)
return val(d);
}
return ___onmessage.set.call(this, fn);
}
});
Object.defineProperty(RTCDataChannel.prototype, "send", {
value: function(d) {
document.dispatchEvent(new CustomEvent('@_@', { detail: { type: "send", data: d } }));
return ___send.value.call(this, d);
}
});
very hacky xD
oh god
@_@
cool, if I'm reading it right you're proxying calls? that's pretty smart
yeah intercepting onmessage event and send function, so when google meet calls these, i get the data that is being transmitted
Just makin sure
You dont need manage server right for bot to see server icon/banner/name
for bot to see? nah only for bot to change them
thanks, time to click the decline button
Uncaught exception: Error: Unsupported client
Exception origin: uncaughtException why am i getting this when i try to use autoposter?
which lib are you using?
do you use discordjs?
yes discordjs
which version?
14.14.1
can you show your code
sure
const TuningClient = require("./src/structures/TuningClient")
const dotenv = require("dotenv");
const bot = new TuningClient();
const express = require("express");
const Topgg = require("@top-gg/sdk");
const discord = require("discord.js");
const { AutoPoster } = require("topgg-autoposter");
require("./src/structures/Logger");
dotenv.config({
path: __dirname + "/.env"
});
["EventHandler", "LavalinkHandler", "AntiCrash"].forEach(handler => {
require(`./src/handlers/${handler}`)(bot);
});
bot.on("raw", (data) => bot.music.packetUpdate(data));
bot.start(process.env.TOKEN)
const app = express();
const webhook = new Topgg.Webhook("authremoved");
app.post(
"/dblwebhook",
webhook.listener((vote) => {
const embed = new discord.EmbedBuilder()
.setTitle("New Vote")
.addFields([
{ name: "From User", value: bot.users.cache.get(vote.user).username },
{ name: "Type of vote", value: vote.type }
])
.setColor("DarkRed")
.setTimestamp(new Date().toUTCString());
bot.channels.cache.get("1267451243731750923").send({embeds: [embed]})
})
);
AutoPoster("tokenhasbeenremoved", bot).on("posted", () => {
console.log("[@TopGG] Posted bot stats!");
});
app.listen(3000);
i removed from code before sending cause yeah, those are credentials that aren't meant to be sent in discordxD
what is TuningClient
Yea, same question
const { Client, Collection, GatewayIntentBits } = require("discord.js");
const fs = require("fs")
const path = require("path")
var botconfig = require("../config/botconfig")
const { MoonlinkManager } = require("moonlink.js");
class TuningClient extends Client {
constructor() {
super({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildVoiceStates,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent,
GatewayIntentBits.GuildMembers
],
sweepers: {
messages: {
interval: 3600,
lifetime: 1800,
},
users: {
interval: 3600,
filter: () => user => user.bot && user.id !== this.user.id,
},
},
});
this.bot = this;
this.snek = require("axios");
this.owners = botconfig.owners;
this.commands = new Collection();
this.events = new Collection();
this.categories = fs.readdirSync(path.join(__dirname, "../../src/commands/"))
this.music = new MoonlinkManager(
botconfig.nodes,
{
clientName: "TuningThunder/1.0.0"
},
(id, sPayload) => {
const guild = this.guilds.cache.get(id);
if (guild) guild.shard.send(JSON.parse(sPayload))
},
);
this.haste = async function haste(text) {
const req = await this.snek.post("https://haste.ntmnathan.com/documents", { text });
return `\`\`\`https://haste.ntmnathan.com/${req.data.key}\`\`\``
}
}
start(token) {
this.login(token);
require("../database/MongoDB")(this);
}
}
module.exports = TuningClient;
``` i am using custom client stuff
is that why it's not supported?
I mean you are extending client, it should technically work
hm
i wonder why it doesn't
well nvm, i modified it a bit and works now 💀
sorry for wasting time
😭
too much javascript is not good for the noggin
you have to diversify
fun fact lack of new experiences can lead to an increased chance of developing dementia
lmao
class AnimeBot(commands.Bot):
def __init__(self, *, intents: discord.Intents):
super().__init__(command_prefix=commands.when_mentioned_or('>'), intents=intents, owner_id=757618515451838546)
async def on_ready(self):
await self.change_presence(activity=discord.Activity(type=discord.ActivityType.watching, name="/help"))
logger.info("Logged in: %s | %s", self.user, self.user.id)
logger.info("Votes : %s", await self.Topgg.get_bot_votes())
async def setup_hook(self) -> None:
# Register the persistent view for listening here.
# Note that this does not send the view to any message.
# In order to do this you need to first send a message with the View, which is shown below.
# If you have the message_id you can also pass it as a keyword argument, but for this example
# we don't have one.
self.Topgg = topgg.DBLClient(bot=self, token=TOPGG_TOKEN)
await self.sync()
async def sync(self):
await self.tree.sync()
intents = discord.Intents.all()
bot = AnimeBot(intents=intents)
@bot.event
async def on_dbl_vote(data):
print(data)
bot.run(TOKEN)```
YO
can u explain me why on_dbl_vote dont work
Did you fill in the webhook url on top.gg? Not a discord url.
I need to setup "WebhookManager" or not ?
yes
Right
So hear me out
How do I make a taser
Not like a zappy zappy you go on the ground for a napy napy
but an uncomfortable shock
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
Right i was hoping you guys knew that so Ididn't have to google and possibly get on a wanted list
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 its nothing weird
One message removed from a suspended account.
One message removed from a suspended account.
but thats no fun
I want to make a custom fence
using hand made parts
and when you go out of bounds it shocks ya (dog)
Im not using this on humans trust me
I feel like i've been in the rust discord so much I have to explain myself
One message removed from a suspended account.
But none of those I would easily be able to interact with remotely
If I made my own it'd be easier
I dont want to figure out how ot make use of a pre-made one
One message removed from a suspended account.
One message removed from a suspended account.
Well not remotely accessible but interactive from the outside
One message removed from a suspended account.
from the different nodes
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.
well
I had to clarify
that I wasn't wanting something powerful enough to literally hurt someone / something
but something that was more annoying
Could I have worded it better? Yea but im also tired
I also never said for a human
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
i think i messed up my bingo game 😬
But thats no fun :c
Well
time to become the next Michael Reeves then
Make dumb shit
One message removed from a suspended account.
Yea now he does
But before he was quite literally just making dumb shit and hoping it worked. with a lot of testing ofc
like this
class AnimeBot(commands.Bot):
def __init__(self, *, intents: discord.Intents):
super().__init__(command_prefix=commands.when_mentioned_or('>'), intents=intents, owner_id=757618515451838546)
async def on_ready(self):
await self.change_presence(activity=discord.Activity(type=discord.ActivityType.watching, name="/help"))
logger.info("Logged in: %s | %s", self.user, self.user.id)
logger.info("Votes : %s", await self.Topgg.get_bot_votes())
async def setup_hook(self) -> None:
# Register the persistent view for listening here.
# Note that this does not send the view to any message.
# In order to do this you need to first send a message with the View, which is shown below.
# If you have the message_id you can also pass it as a keyword argument, but for this example
# we don't have one.
self.Topgg = topgg.DBLClient(bot=self, token=TOPGG_TOKEN)
self.ToppggWebhook = topgg.WebhookManager(self)
self.ToppggWebhook.dbl_webhook(route="/dbl", auth_key=TOPGG_AUTH)
self.ToppggWebhook.run(6000)
await self.load_all()
await self.sync()
async def sync(self):
await self.tree.sync()
intents = discord.Intents.all()
bot = AnimeBot(intents=intents)
@bot.event
async def on_dbl_vote(data):
print("ererer")
print(data)```
anyone know how to add this
It's automatic
nice
As soon as your bot is verified and Discord has enough data, it will display this
yes, looks fine
but does not work
what did you put in your top.gg settings?
Simplifying top.gg webhooks for all users, allowing non-developers and developers to use webhooks for their bot and server without confusing configuration.
well, that will redirect it to discord directly, it will not be sent to your bot
how to send it to my bot
where is your bot hosted?
local, on my server
do you have a static ip address?
nop
if i have it, how i do
the top.gg url should be your.public.ip.address:6000/dbl
and you need to port forward in your router
to unblock port 6000
hmmm
its easier if you host your bot in a vps
is there another solution
what is it
Dynamic DNS makes a dynamic IP address act like it is a static IP address, meaning it does not change. It does this by utilizing a hostname and our Dynamic Update Client to keep your hostname updated with the correct IP address.
you make an account and install an app
the app detects your ip changes
and auto updates the address they give you
6000 is the right port, or another is better
can be any port you chose
Hello
as long as its not used by something else
okay
Can someone tell me how to make a bot please
do you know how to code?
Not really
well, either learn how to code first, or try using one of those "bot makers" thingies out there
it depends on a lot of factors including whether the skin is wet, composition of your skin, how well the individual is grounded (if at all), etc
but in general for DC (which is what you would wanna use) it takes around 30-50 volts to penetrate the human skin, for AC oscillating at 60hz its usually less
for current youd usually keep it at single digit milliamps otherwise it can become dangerous
-# Disclaimer: Chloe is not responsible for any malice that may be done with this information, for more accurate information and readings, a professional should be consulted.
-# Error: this message failed to load
https://discord.com/developers/docs/reference#message-formatting
</NAME:COMMAND_ID>
</airhorn:816437322781949972>
I don't think you can pay with crypto
they already said it - sell the crypto then pay with the money

Sometimes I wonder what moderators think when they read these automod alerts
/send.*crypto/
hello guys can I send my code here? its related to crypto
see, works
send crypto paypal
you send me pay for 200%
maybe it's from discord's automod system
i doubt it
hmm
hmm
you send me your crypto
you send me your crypto, but i charge 200% conversion fee
you send me your crypto, pay with paypal, but i charge 200% conversion fee

you send crypto for you pay with paypal
this chat is like me testing my regexes
A real #development chat
put you
nvm
pay you paypal conversion crypto
pay for you with paypal, conversion, crypto
comma?
wait, does automod consider edits?
pay for you with paypal, conversion, crypto
yep, it does
lmao
inb4 mods reading these alerts thinking we all got our accounts hacked
oh, never saw that
lies, not free
there is discord://-/guilds/<guild_id>/settings/delete
LMAO it actually does directly delete a server
pls dont try it thanks
discord when try not to allow catastrophic exploits (HARD)
Does it bypass 2FA?
If it's from known users, I mostly ignore it 
What happend if they got token grabed
without confirmation???
yeah
I think
or am stupid, wait
nevermind, just makes it look like it lmao
wow click funny
lemme try deleting topgg
Bypass 2fa? If so i need that
oh yeah nvm it just switches the view away from the server
thats a lot of monitors
rich
bro's just a gamer
Im not trying to make a taser btw
lmao
For some reason ima say that's not screen monitors
If that's not the case its 100% a bug cause no one has that many monitors
damn
strongest password in Brazil
some of my league of legends smurfs still use this password lmao
this is exactly why companies need to move to webauthn (https://webauthn.io/) for authentication
its impossible for data breaches to leak passwords this way because you authenticate by proving you own a private key by signing a challenge
12345678?
nah password
ah xD
nah its your discord account's password tim
Too complicated
No ty
thats the only bad thing about it
they made it a bit too complicated
you need to spend time learning and implementing it to do it properly
but theres libraries that can do it for you
So basically webauthn uses biometrics to register and authenticate
it can do if you want it to be more secure but its not required
can be as simple as storing it on the computer
im going to be using it as my primary authentication gateway for accessing resources on my server
you losers can stick to using passwords
you need to also make sure your backend verifies everything correctly otherwise you can allow unauthenticated logins by accident
but like
you use your phone as the authenticator sort of, right?
what if you lose your phone?
- you strictly dont have to use your phone unless a website demands it, but you can store it locally on your computer, or use a security key/phone which basically bundles 2fa with normal login
- you can also setup multiple passkeys to mitigate the risk of losing your phone (so one may be on your computer locally)
didnt know discord had bullet points
markdown™️
when i try to enable passkey on some website it asks me for either a yubikey/device/thing or a phone
no option to store locally on windows
thats probably because they disallowed it in the options which lets them control whether the key has to be stored off platform or if it can be stored on device
if you try it on here it should let you store locally https://webauthn.io/
nah
It lets me save the passkey to 1password
L tim
so that means any of my devices with 1password on it can use it
yeah the website mandated off-platform keys
not much you can do if the website doesnt allow it, but you could thereotically write a mod which lies to the website that its off platform when it actually isnt
also, when i select a phone, it shows this, does it mean its locked to brave browser only? and if i use another browser this specific key wont work?
webauthn.io should allow off site
the passkey is stored on windows/the operating system itself so its cross browser
well thats internally
if its cross platform your phones os stores it
so request coming from brave.exe doesnt mean anything, its just a security warning about what is asking to create keys
Seems like it
yeah its brave calling the windows api for registering a passkey
Its just letting you know what is calling it



