GCommands
GCommands Legacy
Documentation open in new window
GitHub open in new window
GCommands Legacy
Documentation open in new window
GitHub open in new window
      • Theme

    Home

    • Introduction
    • Requesting more content
    • What's new

    Getting started

    • Getting started
    • Creating your first command
    • Creating your first component
    • Creating your first listener

    Commands

    • Creating your first command
    • Creating your command with arguments
    • Creating your context menu command

    Inhibitors

    • What are inhibitors?
    • Creating your first inhibitor
    • Advanced Usage

    Plugins

    • What are plugins?
    • Creating your first plugin
    • Creating a plugin with options

    Databases

    • Storing data with prisma

    CLI

    • What is a CLI?
    • How to generate a component

    Additional Information

    • Upgrading from legacy to v9
    • Upgrading from v9 to v10
    • Sharding your bot

# Async

You don't have to use .then all the time, but you can use async.

# Example code

const hyttpo = require('hyttpo').default;

(async() => {
    const res = await hyttpo.request({
        method: 'GET',
        url: 'https://api.ipify.org/?format=json'
    }).catch(e => e)

    console.log(res);
})();
1
2
3
4
5
6
7
8
9
10

# Learn

You can read more about async hereopen in new window

Edit this page open in new window
Last Updated: 10/2/2022, 10:35:07 AM