Client Options
Client Options
1const { AoiClient } = require("aoi.js");2
3const client = new AoiClient({4 token: string,5 prefix: string,6 intents: ["MessageContent", "Guilds", "GuildMessages"],7 events: ["onMessage", "onJoin", "onLeave"],8 disableFunctions?: ["$function", "$function"],9 mobilePlatform?: boolean,10 respondToBots?: boolean,11 guildOnly?: boolean,12 cache?: {13 users: number,14 messages: number,15 },16 disableAoiDB?: boolean,17 database?: {18 type: "aoi.db",19 db: require("@aoijs/aoi.db"),20 tables: ["main"],21 path: "./database/",22 securityKey: string,23 }, // Example refers to @aoijs/aoi.db, other databases are not included in this Example.24 suppressAllErrors?: boolean,25 errorMessage?: string,26 aoiAutoUpdate?: boolean,27 aoiWarning?: boolean,28 aoiLogs?: boolean,29 respondOnEdit?: {30 commands: boolean,31 time: number,32 nonPrefixed?: boolean,33 },34});
OPTION | INPUT | EXPLANATION |
---|---|---|
token | string | Your Discord Bot Token |
prefix | string | array | Your Discord Bot Prefix |
intents | array | Required Intents |
events | array | Required Events |
disableFunctions | array | aoi.js functions you want to make unusable |
mobilePlatform | boolean | Display your Discord Bot Status as “mobile” |
respondToBots | boolean | Either give your bot the ability to respond to bots or remove it. |
guildOnly | boolean | Either give your bot the ability to respond in Direct Message or remove it. |
cache | string | Client Cache Options. |
disableAoiDB | boolean | Disables the use of aoi.db within your bot, to add custom databases and such. |
database | string | Client Database Options. (aoi.db) |
suppressAllErrors | boolean | Suppress all occurring errors. |
errorMessage | string | Send a given error message when suppressAllErrors executes, supports parser and functions. |
aoiAutoUpdate | boolean | Automatically update aoi.js if a update is available. |
aoiWarning | boolean | Disable aoiWarning logs which are sent to your console. |
aoiLogs | boolean | Disable aoiLogs which are sent to your console. |
respondOnEdit | string | Give your bot the ability to respond to edited messages and execute the given commands. |