aoijs / aoi.js

aoi.js - The most advanced string-based package to create a Discord Bot fast and powerful.
https://aoi.js.org
Apache License 2.0
332 stars 132 forks source link

HTTP Functions Refactor #640

Closed Asayukiii closed 1 month ago

Asayukiii commented 1 month ago

Featuring Type

Function

So, what is it about?

I believe that currently the attention that has been given to HTTP functions has been null. There are some features that could be implemented for this area, and not just have $httpRequest and $jsonRequest.

what if I want to know which type of content type the API return? (currently implemented on $httpRequest but I started feeling that is not the best idea) / what if I want to know the status code of the API response / etc, etc...

The idea is: "give you more control over the requests you can make with your client".

I would like to do this work myself, but I would like to know if it will be accepted.

Code of Conduct

Faf4a commented 1 month ago

The issue is, we mostly put all methods in ONE function and call it a day. That's probably why httpRequest/jsonRequest is so confusing.

(the only exception are automod functions, lol)

I personally think it would be more than a welcome change.

cc @Leref

Leref commented 1 month ago

Seeing this I absolutely agree it can be improved. If any suggestions, please feel free to make a Pull Request and show your ideas and it can be further discussed.