# Discord Bot

<details>

<summary>Discord Webhook (Simple Notifications Only)</summary>

### What can the Discord Webhook do?

* Caesar can let your discord know when a users has opted out of a current epoch, and how much give was refunded.

<img src="https://3139449263-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgYEoMnmffKn5dtH9m8PM%2Fuploads%2Fgit-blob-cce3b4316327effec20509b552af3c83954127ea%2FBot%20Opted%20Out.jpg?alt=media" alt="" data-size="original">

* Inform users that an epoch is active

<img src="https://3139449263-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgYEoMnmffKn5dtH9m8PM%2Fuploads%2Fgit-blob-08a8aae9bf7f7871854f77bfb15b8ce1fc7b78ad%2FBot%20Comment.jpg?alt=media" alt="" data-size="original">

* Let users know when the epoch ends

### How to add "Caesar" the discord bot to your teams Discord Channel

1. Click **Edit Channel** on the channel where you want Coordinape notifications to appear. ![](https://3139449263-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgYEoMnmffKn5dtH9m8PM%2Fuploads%2Fgit-blob-bf5e24a2b06b3c61019c5eacefb97c581e35b6c0%2FEdit%20Channel.jpg?alt=media)
2. Go to I**ntegrations** -> **View Webhook**
3. ![](https://3139449263-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgYEoMnmffKn5dtH9m8PM%2Fuploads%2Fgit-blob-a0b08e213b47a772aab20b646fa8202a0be01849%2FIntegrations.jpg?alt=media)\ <img src="https://3139449263-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgYEoMnmffKn5dtH9m8PM%2Fuploads%2Fgit-blob-cf1314abed179b76b886493e97a04494dfd3a246%2Fimage.png?alt=media" alt="" data-size="original">\\
4. Create **New Webhook** and **Name it** "Coordinape" *(Naming isn't required but it will help your users know where the notifications are coming from)* click on **Copy Webhook URL**![](https://3139449263-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgYEoMnmffKn5dtH9m8PM%2Fuploads%2Fgit-blob-f9b168f2d47b2ef38cb3675805abd7381aaac266%2FNew%20Webhook.jpg?alt=media)\
   ![](https://3139449263-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgYEoMnmffKn5dtH9m8PM%2Fuploads%2Fgit-blob-714433f60715329622c54609957c4baafe3a98c2%2Fimage.png?alt=media)

4\. Go to Coordinape Circle where you're an Admin and click the **Admin Tab** and scroll to the Integration section and click Edit Webhook

<img src="https://3139449263-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgYEoMnmffKn5dtH9m8PM%2Fuploads%2FPUIj9mOmkFxZ4uAzv06N%2Fimage.png?alt=media&#x26;token=49d936fc-4f1e-4448-adab-7341783eb7d9" alt="" data-size="original">

5\. **Paste the webhook url** from the Discord bot into text field and **click save**&#x20;

#### BOOM! You now have Caesar helping you keep track of active Epochs, giving you a heads up when users make allocations, and letting you know if a user opts out. We'll be adding features to the bot over time, but in the meantime we hope you enjoy this functionality!

If you appreciate this make sure to let Zashton know!

*You may need to enter developer mode in discord to add the bot*

</details>

## Discord Bot

{% hint style="info" %}
The Bot is currently in beta testing. Please provide any feedback you may have in the Coordinape Discord by going to the **Roles** channel and reacting to the Discord Bot Tester message to get permission to join the Discord Bot Channel. We'll have the bot set up there if you want to test the bot before adding it to your server
{% endhint %}

To add the bot to your server click this link <https://discord.com/api/oauth2/authorize?client_id=1081300551947538533&permissions=8&scope=bot>  and then&#x20;

![](https://3139449263-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgYEoMnmffKn5dtH9m8PM%2Fuploads%2FaerQVLTAqClPIlSySIyb%2Fimage.png?alt=media\&token=5f924d7d-5eed-41a2-a33a-766bdc4f6d6b)

Once the bot has been added to your discord use the `/coordinape config` command click **link** account.&#x20;

![](https://3139449263-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgYEoMnmffKn5dtH9m8PM%2Fuploads%2FR6AoZ3SGlLhl4jvAz4YL%2Fimage.png?alt=media\&token=c9a5acfb-1c70-4033-8fdf-8ddbf374507b)

once you've linked your account, you will have the option to configure the bot by using the `/Coordinape Config` command and clicking the configure button.

![](https://3139449263-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgYEoMnmffKn5dtH9m8PM%2Fuploads%2F1TYyHHEav8ukBqYTW8De%2Fimage.png?alt=media\&token=3906e6cd-89b4-4f5a-bb9c-a45dc0ebda8c)

You can then follow the prompts provided by the bot to finish configuring the bot.&#x20;

{% tabs %}
{% tab title="Add Circles" %}
After adding the Bot to your server you can select which Circles to enable in this server.&#x20;

<figure><img src="https://3139449263-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgYEoMnmffKn5dtH9m8PM%2Fuploads%2F6jUOk19onNbiFYkn633d%2Fimage.png?alt=media&#x26;token=4c389401-6045-4ddb-bceb-b75ca74bc946" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
The bot will query your account and will display all Circles you administer. This could include circles across different Orgs so be mindful when selecting circles.
{% endhint %}

1. Click the Dropdown
2. Select the Circles from the drop down
3. Click the input box again
4. Click `Next`

The Bot will create a Channel, and a Role for each Circle in your Discord and then send this message:&#x20;

<figure><img src="https://3139449263-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgYEoMnmffKn5dtH9m8PM%2Fuploads%2Fptgjgg0TIjfI64CfcHJW%2Fimage.png?alt=media&#x26;token=831bec06-0913-48f3-bbeb-0018f3fc898d" alt=""><figcaption></figcaption></figure>

This will ensure the Bot sends the correct alerts and gets the correct commands for each circle in their respective channels

After clicking next navigate to your new channels and click `Link Circle` Button and then click the `Authorize` button

<figure><img src="https://3139449263-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgYEoMnmffKn5dtH9m8PM%2Fuploads%2FBFiloYhjR5DBkhvuZncF%2Fimage.png?alt=media&#x26;token=5606ba5e-ea86-402b-88e8-75de073afff8" alt=""><figcaption></figcaption></figure>

This will take you to Coordinape to retrieve your API key for the circle.&#x20;

Once that's complete the bot will ask you if you want it to send alerts for your Circle.&#x20;
{% endtab %}

{% tab title="Enable Alerts" %}
Once you've linked your Circles you will be prompted to set up alerts in your circle. &#x20;

<figure><img src="https://3139449263-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgYEoMnmffKn5dtH9m8PM%2Fuploads%2FN4m39rWgjk0XvuvfwNdT%2Fimage.png?alt=media&#x26;token=316e064b-aebb-4e6f-8f65-26e25c07b3da" alt=""><figcaption></figcaption></figure>

#### Alert Descriptions

| Alert                | Description                                                            |
| -------------------- | ---------------------------------------------------------------------- |
| Epoch Start          | Alerts when an Epoch starts                                            |
| Epoch End            | Alerts when an Epoch ends                                              |
| Nomination           | Alert when a user is Nominated for a Circle                            |
| Vouch                | Alert when a user vouches for a Nominee                                |
| Vouch Successful     | Alert when a user is successfully vouched into a circle                |
| Vouch Unsuccessful   | Alert when a user is not successfully vouched into a circle            |
| User Added to Circle | Alert when a user is added to a circle                                 |
| User Leaves a Circle | Alert when a User leaves a Circle                                      |
| User Opts out        | Alert when a User opts out of receiving Give from other Circle Members |
| {% endtab %}         |                                                                        |
| {% endtabs %}        |                                                                        |

### Contributions

You can now add contributions directly from within Discord!&#x20;

It's as simple as typing `/Coordinape Contribute` in Discord and then entering the contribution you made.&#x20;

<figure><img src="https://3139449263-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgYEoMnmffKn5dtH9m8PM%2Fuploads%2FByAvId0XT4frDck89941%2Fimage.png?alt=media&#x26;token=1ca94164-b988-4aba-bebb-cc6ec251b167" alt=""><figcaption></figcaption></figure>

After you hit Enter you'll be prompted to save your submission. After clicking save the Bot will submit your contribution to the app for your team to see, and will publicly post your contribution in the channel.&#x20;

<figure><img src="https://3139449263-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgYEoMnmffKn5dtH9m8PM%2Fuploads%2FDnEvvIjX3CaZlfWJLzR3%2Fimage.png?alt=media&#x26;token=0ebcceaa-20b0-4e78-9106-4c30ecf169d9" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3139449263-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgYEoMnmffKn5dtH9m8PM%2Fuploads%2F7Cpgjo0iRyWahjjCyDm5%2Fimage.png?alt=media&#x26;token=f37a1d00-6288-4ec0-80bb-0bebb0e2e952" alt=""><figcaption></figcaption></figure>

In this MVP version each Coordinape Circle is linked 1-1 to a Discord channel, so you must enter your contributions in a linked channel for the command to work correctly<br>
