Created
November 21, 2022 01:21
-
-
Save Slyrith/4e1372398ef56772366f159006c1c70f to your computer and use it in GitHub Desktop.
Aoi.js V5 Setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const aoijs = require("aoi.js") | |
| const bot = new aoijs.AoiClient({ | |
| token: "DISCORD BOT TOKEN", | |
| prefix: "DISCORD BOT PREFIX", | |
| intents: ["GUILDS", "GUILD_MESSAGES"] | |
| }) | |
| //Events | |
| bot.onMessage() | |
| bot.onInteractionCreate() | |
| //Status | |
| bot.status({ | |
| text: "TEXT", | |
| type: "PLAYING", | |
| }) | |
| //Variable | |
| bot.variables({ | |
| variable: "value" | |
| }) | |
| //Command Example (ping) | |
| bot.command({ | |
| name: "ping", | |
| code: `Pong! $pingms` | |
| }) | |
| //Ready Event | |
| bot.readyCommand({ | |
| channel: "CHANNEL ID", | |
| code: `$log[Ready on $userTag[$clientID]]` | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment