extensions icon indicating copy to clipboard operation
extensions copied to clipboard

New extension: Webhooks (TurboHook replacement)

Open CubesterYT opened this issue 10 months ago • 14 comments

Hello all!

The time has finally come, the long awaited successor to the horrendous extension that is "TurboHook". Under code name "TurboHook V2", this extension took time to develop as I waited for certain APIs to happen (extension storage my beloved), and also just forgetting about the extension in the first place 😅. I deemed it smart to make this a whole new extension entirely, and TurboHook will now be hidden.

Video Example:

https://github.com/user-attachments/assets/d43db41e-12f7-4794-94b3-78f34632e63c

Honestly, I'm going to consider this extension my Magnum Opus at the moment, since this represents my growth since I first contributed here. The difference between TurboHook and this extension is insane.

CubesterYT avatar Jan 17 '25 06:01 CubesterYT

you need to await prompt() so that it works in the desktop app

ill read the rest of it later today

OHHHH SO THAT'S WHY IT BROKE IN THE DESKTOP APP DURING MY TESTING

I'll get to fixing it

CubesterYT avatar Jan 20 '25 18:01 CubesterYT

  1. make a project with a webhook
  2. save it
  3. reload the page
  4. load saved project
  5. all the blocks are still hidden

GarboMuffin avatar Jan 20 '25 19:01 GarboMuffin

dont like how empty try/catch is being used everywhere to handle errors

as it is right now a project can make a block that contains something like toString as the menu name and then store data on Object.prototype.toString.DATA and Object.prototype.toString.TYPE which probably doesn't break anything but it's definitely not great to do that. better to check if the webhook exists first

GarboMuffin avatar Jan 20 '25 19:01 GarboMuffin

TurboHook still has functionality that this doesn't have, specifically the ability to send to arbitrary webhooks not known until runtime

GarboMuffin avatar Jan 20 '25 19:01 GarboMuffin

TurboHook still has functionality that this doesn't have, specifically the ability to send to arbitrary webhooks not known until runtime

I'm confused, what do you mean by this?

CubesterYT avatar Jan 20 '25 19:01 CubesterYT

image

GarboMuffin avatar Jan 20 '25 19:01 GarboMuffin

Ah, I see The plan with this remake is to only store webhooks, but not defined till runtime. I could make adjustments...

By the way, all these things in TurboHook like content, image, and whatever only work with Discord and Discord similar syntax Webhooks, meaning it's not at ALL like how Webhooks in general work. It's only like this since it started as a Discord Webhook extension.

CubesterYT avatar Jan 20 '25 19:01 CubesterYT

I really like this extension idea. TW web hooks could change the way we do things... I'll be waiting.

Brackets-Coder avatar Jan 22 '25 03:01 Brackets-Coder

This is for sending webhooks, which is already possible, this is just a more elegant way

Do you want webhooks the other direction?

GarboMuffin avatar Jan 22 '25 03:01 GarboMuffin

This is for sending webhooks, which is already possible, this is just a more elegant way

Do you want webhooks the other direction?

@GarboMuffin I think I mentioned this in passing a year ago during TurboHook, but I had an idea where we could have our own webhook system as well to allow users to make their own Webhooks and receive data. We could incorporate this with this extension.

CubesterYT avatar Jan 22 '25 04:01 CubesterYT

This is for sending webhooks, which is already possible, this is just a more elegant way

Do you want webhooks the other direction?

Yes, I'm aware it was already possible, I'm just remarking at how much better this extension is than TurboHook

I think webhooks in both directions would be fantastic

Brackets-Coder avatar Jan 22 '25 18:01 Brackets-Coder

Ah, I see The plan with this remake is to only store webhooks, but not defined till runtime. I could make adjustments...

By the way, all these things in TurboHook like content, image, and whatever only work with Discord and Discord similar syntax Webhooks, meaning it's not at ALL like how Webhooks in general work. It's only like this since it started as a Discord Webhook extension.

You could make a temporary webhook block to "polyfill" the usage of the old turbohook block if needed.

yuri-kiss avatar Jan 23 '25 03:01 yuri-kiss

Using this pull request to test something with the bot !format

GarboMuffin avatar Feb 07 '25 04:02 GarboMuffin

The formatting bot didn't find any formatting issues. It currently only checks the extensions folder. To format all files, the pull request's author can manually run the 'Format pull request' workflow from the 'Actions' tab on the fork.

github-actions[bot] avatar Feb 07 '25 04:02 github-actions[bot]