# Discord Blackjack

## Easy setup and use

## Installation

```
$ npm i discord-blackjack
```

## Setup

```javascript
const blackjack = require("discord-blackjack")
// other code here

// if you are using prefix commands
client.on("messageCreate", async message => {
    if (message.content === "!blackjack") {
        blackjack(message)        
    }
})

// if you are using slash commands
client.on("interactionCreate", async interaction => {
    if (!interaction.isCommand) return;
    
    if (interaction.commandName === "blackjack") {
        blackjack(interaction)
    }
})

// other code here
```

This is only an example.&#x20;

If you do not know Discord.JS or JavaScript in general, we suggest you to learn it, as unexpected errors may occur if you do not know what you're doing.

Check out or next page to see what changed from v4


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://discord-blackjack.gitbook.io/discord-blackjack/master.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
