Skip to content

Commit

Permalink
added dev info link to external config
Browse files Browse the repository at this point in the history
  • Loading branch information
ConnorAU committed Jan 16, 2019
1 parent f65ef48 commit 68c2aa6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The config is where you design message templates. The idea with templates is you
### Basic settings
[Example.cpp](https://github.com/ConnorAU/SQFDiscordEmbedBuilder/blob/master/addon/external/Example.cpp)

- `webhook` - [CfgDiscordEmbedWebhooks](https://github.com/ConnorAU/SQFDiscordEmbedBuilder/blob/master/addon/external/_config.cpp#L9) identifier.
- `webhook` - [CfgDiscordEmbedWebhooks](https://github.com/ConnorAU/SQFDiscordEmbedBuilder/blob/master/addon/external/_config.cpp#L11) identifier.
- `message` - The text content of your message. This example uses `This is an example message`.<br/>![](https://i.imgur.com/x80hA14.png)
- `username` - The name of the bot when it sends the message. If this is not set Discord will use the name set in the webhook settings.
- `avatar` - The avatar of the bot when it sends the message. If this is not set Discord will use the image set in the webhook settings.
Expand All @@ -36,7 +36,7 @@ That's all you need to send a simple text message, however there are more settin

### Embed settings
Messages can contain up to 10 embeds. These embeds must be defined inside the `Embeds` subclass.
[CfgDiscordEmbedTemplate](https://github.com/ConnorAU/SQFDiscordEmbedBuilder/blob/master/addon/external/_config.cpp#L14)<br/>
[CfgDiscordEmbedTemplate](https://github.com/ConnorAU/SQFDiscordEmbedBuilder/blob/master/addon/external/_config.cpp#L16)<br/>
[Example2.cpp](https://github.com/ConnorAU/SQFDiscordEmbedBuilder/blob/master/addon/external/Example2.cpp)
- `title` - Embed title text.
- `description` - Description text, located under the title.
Expand Down Expand Up @@ -125,7 +125,7 @@ You can build entire messages in SQF if you prefer that to configs. I suggest on
1. Open your Discord client and open the settings of the channel you want your message to send to.<br/>![Step 1](https://i.imgur.com/hFZ2bHw.png)
2. Click `Webhooks` on the left panel, then click `Create Webhook`.<br/>![Step 2](https://i.imgur.com/8KJXkl4.png)
3. Scroll down to `Webhook URL`, click `Copy`.<br/>![Step 3](https://i.imgur.com/l4gpTxP.png)
4. Create a unique property inside [CfgDiscordEmbedWebhooks](https://github.com/ConnorAU/SQFDiscordEmbedBuilder/blob/master/addon/external/_config.cpp#L9) and remove the base URL.
4. Create a unique property inside [CfgDiscordEmbedWebhooks](https://github.com/ConnorAU/SQFDiscordEmbedBuilder/blob/master/addon/external/_config.cpp#L11) and remove the base URL.
```cpp
class CfgDiscordEmbedWebhooks {
// https://discordapp.com/api/webhooks/000000000000000000/XXXXXXX_XXXXXXXXXXXXXXX_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Expand Down
2 changes: 2 additions & 0 deletions addon/external/_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
│ Please do not modify or remove this comment block │
└──────────────────────────────────────────────────────*/

// Developer info: https://github.com/ConnorAU/SQFDiscordEmbedBuilder/blob/master/README.md

class CfgDiscordEmbedWebhooks {
// https://discordapp.com/api/webhooks/000000000000000000/XXXXXXX_XXXXXXXXXXXXXXX_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Example="000000000000000000/XXXXXXX_XXXXXXXXXXXXXXX_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
Expand Down

0 comments on commit 68c2aa6

Please sign in to comment.