Skip to content

@aoijs/aoi.invite

Installation

Terminal window
npm i @aoijs/aoi.invite

To use aoi.invite, you are required to edit your index.js file.

1
const { AoiClient } = require("aoi.js");
2
const { InviteManager } = require("@aoijs/aoi.invite");
3
4
const client = new AoiClient({
5
token: "Discord Bot Token",
6
prefix: "Discord Bot Prefix",
7
intents: ["MessageContent", "Guilds", "GuildMessages"],
8
events: ["onMessage", "onInteractionCreate"],
9
database: {
10
type: "aoi.db",
11
db: require("@aoijs/aoi.db"),
12
dbType: "KeyValue",
13
tables: ["main"],
14
securityKey: "a-32-characters-long-string-here",
15
},
16
});
17
18
// Ping Command
19
client.command({
20
name: "ping",
21
code: `Pong! $pingms`,
22
});
23
24
new InviteManager(
25
client,
26
{
27
sk: "a-32-characters-long-string-here",
28
},
29
["inviteJoin", "inviteLeave"]
30
);

InviteEvents

  • inviteJoin (triggered on join)
  • inviteLeave (triggered on leave)
  • inviteError (triggered on error)