Skip to content

Client Options

Written by
1
const { AoiClient } = require("aoi.js");
2
3
const client = new AoiClient({
4
token: string,
5
prefix: string,
6
intents: ["MessageContent", "Guilds", "GuildMessages"],
7
events: ["onMessage", "onJoin", "onLeave"],
8
disableFunctions?: ["$function", "$function"],
9
// plugins?: "./path/to/directory", (deprecated)
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("@akarui/aoi.db"),
20
tables: ["main"],
21
path: "./database/",
22
securityKey: string,
23
}, // Example refers to @akarui/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
alwaysExecute?: boolean,
32
nonPrefixed?: boolean,
33
time: number
34
},
35
});

OPTIONINPUTEXPLANATION
tokenstringYour Discord Bot Token
prefixstringYour Discord Bot Prefix
intentsstringRequired Intents
eventsstringRequired Events
disableFunctionsstringaoi.js functions you want to make unusable
pluginsstringaoi.js plugins directory
respondToBotsbooleanEither give your bot the ability to respond to bots or remove it.
guildOnlybooleanEither give your bot the ability to respond in Direct Message or remove it.
cachestringClient Cache Options.
disableAoiDBbooleanDisables the use of aoi.db within your bot, to add custom databases and such.
databasestringClient Database Options. (aoi.db)
suppressAllErrorsbooleanSuppress all occurring errors.
errorMessagestringSend a given error message when suppressAllErrors executes, supports parser and functions.
aoiAutoUpdatebooleanAutomatically update aoi.js if a update is available.
aoiWarningbooleanDisable aoiWarning logs which are sent to your console.
aoiLogsbooleanDisable aoiLogs which are sent to your console.
respondOnEditstringGive your bot the ability to respond to edited messages and execute the given commands.