QuackJS
The main class for creating and managing Discord bots
Implements
QuackJSObject
Constructors
constructor
• new QuackJS(token
, config
)
Creates an instance of QuackJS.
Parameters
Name | Type | Description |
---|---|---|
|
| The Discord bot's token. |
|
| The config of the Discord bot. |
Defined in
Properties
client
• client: Client
<boolean
>
Implementation of
QuackJSObject.client
Defined in
commands
• commands: QuackJSSlashCommand
[]
Implementation of
QuackJSObject.commands
Defined in
config
• config: QuackJSConfig
Implementation of
QuackJSObject.config
Defined in
events
• events: QuackJSEvent
[]
Implementation of
QuackJSObject.events
Defined in
models
• models: Record
<string
, ModelStatic
<Model
<any
, any
>>>
Implementation of
QuackJSObject.models
Defined in
sequelize
• sequelize: undefined
| Sequelize
Implementation of
QuackJSObject.sequelize
Defined in
token
• Private
token: string
Defined in
triggers
• triggers: QuackJSTrigger
[]
Implementation of
QuackJSObject.triggers
Defined in
Methods
AddModel
▸ AddModel(name
, model
): void
A method for adding models for the Database.
Parameters
Name | Type | Description |
---|---|---|
|
| The name of the model. |
|
| The model to be used for the Database. |
Returns
void
Defined in
CreateCommand
▸ CreateCommand(slashCommand
): void
Adds a slash command to the object.
Parameters
Name | Type | Description |
---|---|---|
|
| The slash command to be added. |
Returns
void
Defined in
CreateEvent
▸ CreateEvent(event
): void
Adds an event to the object.
Parameters
Name | Type | Description |
---|---|---|
|
| The event to be added. |
Returns
void
Defined in
CreateTrigger
▸ CreateTrigger(trigger
): void
Adds a trigger to the object.
Parameters
Name | Type | Description |
---|---|---|
|
| The trigger to be added. |
Returns
void
Defined in
Login
▸ Private
Login(): Promise
<unknown
>
Returns
Promise
<unknown
>
Defined in
Start
▸ Start(QuackJS
): Promise
<void
>
Starts the Discord bot.
Parameters
Name | Type | Description |
---|---|---|
|
| The parameter of this class. |
Returns
Promise
<void
>
Defined in
StartEvents
▸ Private
StartEvents(): Promise
<void
>
Returns
Promise
<void
>
Defined in
Last updated