Archived
commandbot readme
This commit is contained in:
1 parent
f56a2bb1bc
commit
fd8790389d
1 file changed
+4
-4
@@ -32,7 +32,7 @@ Key features
|
|||||||
### Installation
|
### Installation
|
||||||
1. Install this package using npm
|
1. Install this package using npm
|
||||||
```
|
```
|
||||||
npm install discordcommands@latest
|
npm install commandbot@latest
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Add the following entry to your *package.json* file
|
2. Add the following entry to your *package.json* file
|
||||||
@@ -42,7 +42,7 @@ npm install discordcommands@latest
|
|||||||
|
|
||||||
3. Import the package
|
3. Import the package
|
||||||
```javascript
|
```javascript
|
||||||
import { Bot, Command } from 'discordcommands';
|
import { Bot, Command } from 'commandbot';
|
||||||
```
|
```
|
||||||
### Creating bot instance
|
### Creating bot instance
|
||||||
```javascript
|
```javascript
|
||||||
@@ -92,7 +92,7 @@ If command function returns
|
|||||||
- *string* - the returned text will be sent as a reply to the command caller
|
- *string* - the returned text will be sent as a reply to the command caller
|
||||||
- *[MessageEmbed](https://discord.js.org/#/docs/main/stable/class/MessageEmbed)* - the embedded content will be sent as a standalone message
|
- *[MessageEmbed](https://discord.js.org/#/docs/main/stable/class/MessageEmbed)* - the embedded content will be sent as a standalone message
|
||||||
#### Errors
|
#### Errors
|
||||||
If your command throws an error, it will get logged to the console and sent to the user in a message with embedded content. **The bot will not crash.** ([Example](https://raw.githubusercontent.com/GRZ4NA/DiscordCommands/master/assets/error_example.png))
|
If your command throws an error, it will get logged to the console and sent to the user in a message with embedded content. **The bot will not crash.** ([Example](https://raw.githubusercontent.com/GRZ4NA/CommandBot/master/assets/error_example.png))
|
||||||
|
|
||||||
### Command examples
|
### Command examples
|
||||||
#### Simple reply
|
#### Simple reply
|
||||||
@@ -208,7 +208,7 @@ Each message can be customized using these properties
|
|||||||
- **footer** - *string* - footer of the embedded content
|
- **footer** - *string* - footer of the embedded content
|
||||||
## Complete example
|
## Complete example
|
||||||
```javascript
|
```javascript
|
||||||
import { Bot, Command } from 'discordcommands';
|
import { Bot, Command } from 'commandbot';
|
||||||
|
|
||||||
const bot = new Bot({
|
const bot = new Bot({
|
||||||
name: "CommandBot",
|
name: "CommandBot",
|
||||||
|
|||||||
Reference in new issue
Block a user