# Discord

Discord integration brings Genie into your team's communication space. By adding a bot to your Discord server, team members can interact with the AI assistant directly within channels or through direct messages.

***

## Setup

To connect Discord to Genie:

1. Create a new application in the Discord Developer Portal
2. Add a bot to the application
3. Copy the bot token
4. Paste the token into your Genie channel settings
5. Generate an invite URL with the required permissions
6. Invite the bot to your Discord server

Once the bot is in your server and connected to Genie, it will respond to mentions and direct messages.

***

## How to Use

### In Channels

Mention the bot in any channel it has access to:

```
@GenieAI how do I set up a PostgreSQL database?
```

The bot responds in the same channel, making the conversation visible to everyone.

### In Direct Messages

You can also message the bot privately for individual interactions. DM responses are only visible to you.

***

## Team Collaboration

Discord is particularly effective for teams:

* Multiple members can interact with the same bot
* Conversations are organized by channel
* Questions and answers are visible and searchable
* New team members can learn from previous interactions

Consider creating a dedicated channel like `#genie-ai` to keep bot conversations organized and separate from other discussions.

***

## Permissions and Access

The bot requires basic permissions to function:

* Read Messages
* Send Messages
* Read Message History

You can restrict which channels the bot has access to and which roles can interact with it through Discord's built-in permission system.

***

## Credits and Team Usage

All interactions through the Discord bot consume credits from the Genie account that connected it.

If multiple team members use the bot, they all draw from the same credit pool. For heavier usage, consider upgrading your plan or having each team member use their own Genie account with their own bot.

***

## Privacy

The bot can only see messages in channels it has been added to and direct messages sent to it. It cannot see private conversations between users or messages in channels where it does not have permission.

Bot tokens should be treated as sensitive credentials. If compromised, regenerate the token immediately through the Discord Developer Portal and update it in your Genie settings.
