mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-19 04:38:17 +00:00
refactor(handlers): resolve RequestManager.<method> using await before returning the value (#468)
* Update channel.ts * Update gateway.ts * Update guild.ts * Update member.ts * Update message.ts * Update oauth.ts * Update webhook.ts * move things arrouond * Update guild.ts * Update src/api/handlers/webhook.ts * stop linter complains * add this back Co-authored-by: Ayyan <ayyantee@gmail.com>
This commit is contained in:
@@ -3,8 +3,10 @@ import { OAuthApplication } from "../../types/oauth.ts";
|
||||
import { endpoints } from "../../util/constants.ts";
|
||||
|
||||
/** Returns the bot's OAuth2 application object without `flags`. */
|
||||
export function getApplicationInformation() {
|
||||
return RequestManager.get(endpoints.OAUTH2_APPLICATION) as Promise<
|
||||
OAuthApplication
|
||||
>;
|
||||
export async function getApplicationInformation() {
|
||||
const result = await RequestManager.get(
|
||||
endpoints.OAUTH2_APPLICATION,
|
||||
);
|
||||
|
||||
return result as OAuthApplication;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user