-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4fbbaa2
commit a55ce9e
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,33 @@ | ||
# SEContestCommands | ||
Chat commands for StreamElements' Contests | ||
|
||
## Credentials | ||
* Create file called `SEContestChatCommands.credentials.php` | ||
* The file will contain three variables | ||
* `$key` - random string, that is used in URL | ||
* `$channel` SE Account ID that you can find [here](https://streamelements.com/dashboard/account/channels) | ||
* `$bearer` SE JWT Token that you can find [here](https://streamelements.com/dashboard/account/channels) (After clicking "Show secrets") | ||
|
||
|
||
## Request | ||
This will explain all possible variables | ||
* `key` - user generated string from | ||
* `action` - action, that the API should do (start, close, draw bets) | ||
* `name` - name of bets (used with action _"start"_) | ||
* `duration` - duration of bets in minutes (used with action _"start"_) | ||
* `options` - options to bet, separated by space (underscore used as space) (used with action _"start"_) | ||
* `winner` winning option (used with action _"draw"_) | ||
|
||
## Chat commands | ||
Examples are using base command `!bets` | ||
``` | ||
!bets start <Bets_title> <Duration> <1st_option> ... <10th_option> | ||
!bets close | ||
!bets draw <Winning_option> | ||
``` | ||
|
||
### Request on API | ||
This will show example body of StreamElements command | ||
``` | ||
${customapi.example.com/SEContestChatCommands.php?key=my_key&action=${pathescape ${1}}&name=${pathescape ${2|${1}}}&duration=${pathescape ${3|${1}}}&options=${pathescape ${4:|${1}}}&winner=${pathescape ${2:|' '}}} | ||
``` |