diff options
| author | Austin Hellyer <[email protected]> | 2016-11-29 23:33:59 -0800 |
|---|---|---|
| committer | Austin Hellyer <[email protected]> | 2016-11-29 23:33:59 -0800 |
| commit | efad058f596c9df717774cb2e9dafc0035a8df9c (patch) | |
| tree | ef54b7d65841fb63609a2b5135727922f2d8f81a /examples/README.md | |
| parent | Clean up the codebase (diff) | |
| download | serenity-efad058f596c9df717774cb2e9dafc0035a8df9c.tar.xz serenity-efad058f596c9df717774cb2e9dafc0035a8df9c.zip | |
Add documentation for examples
The examples include a README located in `examples/README.md`, which
contains instructions for running these examples.
They act as a simple form of tutorial to the library, without getting
into too many details.
Diffstat (limited to 'examples/README.md')
| -rw-r--r-- | examples/README.md | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 0000000..04b7b89 --- /dev/null +++ b/examples/README.md @@ -0,0 +1,28 @@ +# Serenity Examples + +The examples listed in each directory demonstrate different use cases of the +library, and increasingly show more advanced or in-depth code. + +All examples have documentation for new concepts, and try to explain any new +concepts. Examples should be completed in order, so as not to miss any +documentation. + +### Running Examples + +To run an example, you have the option of either: + +1. cloning this repository, `cd`ing into the example's directory, and then +running `cargo run` to run the example; or +2. copying the contents of the example into your local binary project +(created via `cargo new test-project --bin`) and ensuring that the contents of +the `Cargo.toml` file contains that of the example's `[dependencies]` section, +and _then_ executing `cargo run`. + +Note that all examples - by default - require an environment token of +`DISCORD_TOKEN` to be set. If you don't like environment tokens, you can +hardcode your token in. + +### Questions + +If you have any questions, feel free to submit an issue with what can be +clarified. |