aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin Hellyer <[email protected]>2016-12-14 10:55:44 -0800
committerAustin Hellyer <[email protected]>2016-12-14 10:55:44 -0800
commitcc57039339580e72bf3f2b2676bed0516d2f7164 (patch)
treebd2c83031e3fa0c47cc1ede316feec549693ad32
parentFramework requires cache (diff)
downloadserenity-cc57039339580e72bf3f2b2676bed0516d2f7164.tar.xz
serenity-cc57039339580e72bf3f2b2676bed0516d2f7164.zip
Release v0.1.2v0.1.2
-rw-r--r--CHANGELOG.md107
-rw-r--r--Cargo.toml2
2 files changed, 103 insertions, 6 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 75588f2..da524d2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,12 +2,108 @@
All notable changes to this project will be documented in this file.
This project mostly adheres to [Semantic Versioning][semver].
-## [Unreleased]
+## [0.1.2] - 2016-12-14
+
+v0.1.2 focuses on revamping the framework, adding a large amount of
+configuration and overall features. v0.1.3 will be focused on performance
+optimizations and code cleanup.
+
+Thanks to the following for contributions this release:
+
+- [@acdenisSK]
+- [@fwrs]
+
+v0.1.2 can now be retrieved from the [crates.io listing].
### Added
+`UserId::find()` has been added to find the User from cache ([@fwrs]).
+
+`utils::{parse_channel, parse_emoji, parse_role, parse_username}` added to parse
+each item from a string; useful for command arguments.
+
+The `CreateEmbed` builder now implements `From<Embed>`, so you can use an
+ already-built embed from something like a `Message`.
+
+`Context::get_current_user` to retrieve the current user from the cache; prefer
+using `CACHE.read().unwrap().user` to avoid a clone.
+
+Implemented `Emoji::url()` and `EmojiIdentifier::url()` to generate URLs for the
+emoji's image.
+
+
+
+The framework has been revamped:
+Structs can now be used as framework command arguments. FromStr is implemented
+for:
+- `User`
+- `UserId`
+- `Role`
+- `RoleId`
+- `EmojiIdentifier`
+- `ChannelId`
+- `Channel`
+You can implement this yourself for your own structs ([@fwrs]).
+
+The framework global configuration now has additional configuration:
+
+- account type to listen to or ignore (selfbot, ignore bots, or listen to
+ everyone)
+- dynamic prefix per context
+- multiple prefixes
+- error messages for various errors (not enough arguments, command cooldown,
+ check fails, lack of permissions, etc.)
+
+Commands can now be built with a large amount of configuration via a
+`CreateCommand` builder; see example 06 on how to use this. The configuration
+for commands includes:
+
+- checks (whether the command should be executed)
+- cooldown (ratelimit) bucket
+- description (used for the help command)
+- usage listing (used for the help command)
+- argument quote parsing (parsing `a b c` vs. `a "b c"`)
+- required minimum/maximum argument counts
+- permissions required to use the command
+- whether to display the command in the help message
+- whether the command can only be used in DMs or Guilds
+
+Additionally, groups can now be created via the `CreateGroup` builder. It allows
+setting the group name (e.g. `"music"`), adding commands to the group, and
+setting the group's prefix.
+
+Two default help commands are provided for you if you don't wish to make your
+own: one that creates an embed and one that is text-only.
+
+
+Thanks to [@fwrs] for most work of the work on the framework.
+
+See [example 06][v0.1.2:example 06] for examples on most of this.
+
+
+### Fixes
+
+- MessageBuilder channel/role/user methods now properly mention the given
+ item ([@fwrs])
+- No-cache+method compiles have been fixed
+- `rest::edit_profile` no longer updated the internal token for bot users; this
+ is a preliminary fix, as the endpoint will soon not return `"Bot "` in the
+ token key for bot users
+
### Changed
+- `model::Mention` has been removed, in favour of simply
+ `model_name::mention()` (BC break) ([@fwrs])
+- Ids now mention where possible on format; use Id.0 to format the inner
+ snowflake directly (BC break) ([@fwrs])
+- All internal `try!()`s have been converted to use rustc 1.13's `?`
+ ([@acdenisSK])
+- `CreateEmbedImage::{height, width}` and
+ `CreateEmbedThumbnail::{height, width}` have been deprecated, as these do
+ not do anything and there seems to not be any plans on Discord's side to make
+ them do anything. These will be removed in v0.1.3 and the builders themselves
+ will be replaced with methods on `CreateEmbed` (BC break)
+
## [0.1.1] - 2016-12-05
v0.1.1 is a "features that v0.1.0 should have had" and "miscellaneous work"
@@ -50,7 +146,7 @@ v0.1.1 can now be retrieved from the [crates.io listing].
- Context permission requirements
- A custom shared state (not the Cache) can now be accessed and mutated across
commands/contexts, through the use of `Context.data`'s ShareMap. See
- [example 06] for an example
+ [example 06][v0.1.1:example 06] for an example
### Fixes
@@ -72,8 +168,6 @@ v0.1.1 can now be retrieved from the [crates.io listing].
None
-[example 06]: https://github.com/zeyla/serenity.rs/tree/ccb9d16e5dbe965e5a604e1cb402cd3bc7de0df5/examples/06_command_framework
-
Clause: backwards compatibility breaks are ones that are _not_ due to a change
in Discord's API.
@@ -82,13 +176,16 @@ in Discord's API.
Initial commit.
-[Unreleased]: https://github.com/zeyla/serenity.rs/compare/v0.1.1...master
+[0.1.2]: https://github.com/zeyla/serenity.rs/compare/v0.1.1...v0.1.2
[0.1.1]: https://github.com/zeyla/serenity.rs/compare/v0.1.0...v0.1.1
[0.1.0]: https://github.com/zeyla/serenity.rs/tree/403d65d5e98bdfa9f0c018610000c4a0b0c7d8d5
[crates.io listing]: https://crates.io/crates/serenity
[semver]: http://semver.org
+[v0.1.2:example 06]: https://github.com/zeyla/serenity.rs/tree/5a3665a9951c023e3e6ea688844558b7f8b5fb6e/examples/06_command_framework
+[v0.1.1:example 06]: https://github.com/zeyla/serenity.rs/tree/ccb9d16e5dbe965e5a604e1cb402cd3bc7de0df5/examples/06_command_framework
[@abalabahaha]: https://github.com/abalabahaha
+[@acdenisSK]: https://github.com/acdenisSK
[@Flat]: https://github.com/Flat
[@fwrs]: https://github.com/fwrs
[@GetRektByMe]: https://github.com/GetRektByMe
diff --git a/Cargo.toml b/Cargo.toml
index b5964f0..13f8471 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -9,7 +9,7 @@ license = "ISC"
name = "serenity"
readme = "README.md"
repository = "https://github.com/zeyla/serenity.rs.git"
-version = "0.1.1"
+version = "0.1.2"
[dependencies]
base64 = "0.2"