aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Update Configuration default value listingsZeyla Hellyer2018-08-031-32/+84
| | | | | | Update the default value for each method on the builder, as well as making the list of default values in the `Default` implementation's documentation up-to-date.
* Refactor `command::positions` a littleacdenisSK2018-08-031-12/+7
|
* Fix potential dispatch cache deadlocking + log itZeyla Hellyer2018-08-021-1/+12
| | | | | | Fix the dispatch functionality potentially deadlocking when a deadlock has occurred elsewhere (or a read/write lock is forever held elsewhere), and log when it happens, WARNing the user that a possible deadlock has happened.
* Add a test-case for no delimitersacdenisSK2018-08-021-0/+9
|
* Check if message is empty tooacdenisSK2018-08-021-1/+1
|
* Add missing `mut`acdenisSK2018-08-021-1/+1
|
* Handle no delimitersacdenisSK2018-08-021-7/+12
|
* Don't delay Ready with cache enabledZeyla Hellyer2018-08-011-46/+5
| | | | | | | | | | | When the cache is enabled, don't delay the Ready until all guilds have been received. This never really worked in the first place and duplicates the "cached" logic that fires when all guilds have been received. This presumably fixes the "silent death" bug, as this appears to stall the thread on certain conditions.
* De-cringe a commentacdenisSK2018-08-011-3/+3
|
* Add From impls for Game, generify Game paramsZeyla Hellyer2018-08-014-13/+76
| | | | | Add more `impl From<T> for Game` implementations, and make `Into<Game>` trait bounds for all function parameters accepting a Game.
* Move unit tests into sourceZeyla Hellyer2018-08-0112-0/+1242
| | | | | | | | | Move the unit tests into the relevant source files. There's no need for them to be seprate, especially when the `tests` directory is meant to be for integration tests. The deserialization tests that include JSON files are still in the `tests` dir, along with the public prelude re-export tests.
* Reword the inner doc comment in `complex_bucket`acdenisSK2018-08-011-11/+15
|
* Deprecate Context::edit_profileZeyla Hellyer2018-07-311-0/+1
| | | | This method won't exist in v0.6.x.
* Make GuildId::member use the cache when possible (#356)Maiddog2018-07-311-1/+11
|
* Reduce minimal Rust version to 1.25Zeyla Hellyer2018-07-292-4/+4
|
* Add note about cache in UserId::get docsZeyla Hellyer2018-07-291-2/+3
|
* Add `impl AsRef<MessageId> for Message` (#355)Adelyn2018-07-251-0/+6
|
* Fix `ChannelId::send_message`'s dead linksacdenisSK2018-07-251-3/+3
|
* Fallback to default-command if passed sub-command is wrongLakelezz2018-07-241-50/+59
|
* Compare built up length with original user-input instead of iterationsLakelezz2018-07-241-5/+16
|
* Some minor changes to `Args`acdenisSK2018-07-211-10/+9
| | | | | | | - use `?` rather than unwrap - Remove the `PartialEq<TokenKind> impl; it's not needed anymore. - Inline `at_end` because why not. - Split the second part of the while condition as an if inside the body.
* Add default-commands for command-groups (#351)Lakelezz2018-07-213-7/+51
|
* Do not suggest command if no command is actually related to input. (#350)Lakelezz2018-07-201-1/+1
|
* Use `current` to figure out the end quoteacdenisSK2018-07-191-17/+4
|
* Style LineacdenisSK2018-07-191-0/+1
|
* Merge `Token` and `TokenOwned`acdenisSK2018-07-191-26/+10
|
* Use an `Option` to denote endacdenisSK2018-07-191-18/+7
|
* Fix some clippy lintsZeyla Hellyer2018-07-1518-100/+98
| | | | | Some lints were not resolved due to causing API changes. Most lints in the framework were left unfixed.
* Support multiple prefixes for command-groups (#343)Lakelezz2018-07-154-28/+62
|
* Add checks for groups (#349)Lakelezz2018-07-154-5/+34
|
* typosZeyla Hellyer2018-07-141-2/+2
|
* Abstract impls in Channel's Mentionable implZeyla Hellyer2018-07-141-4/+4
| | | | | Abstract the implementations for each of Channel's variants' `Mentionable` implementations by using the underlying impl.
* Implement Mentionable for GroupZeyla Hellyer2018-07-141-0/+6
|
* Implement Mentionable for PrivateChannelZeyla Hellyer2018-07-141-0/+6
|
* Implement Mentionable for ChannelCategoryZeyla Hellyer2018-07-141-1/+7
|
* Quickly rename to `no_dm_prefix`acdenisSK2018-07-142-6/+6
| | | | Minimize assumptions that `no_prefix` would work everywhere.
* Allow for nil prefixes in DMsacdenisSK2018-07-142-1/+31
| | | | Fixes #339
* Add docs for `Args::new`acdenisSK2018-07-131-0/+27
|
* Fix doc links with no anchorZeyla Hellyer2018-07-117-4/+18
|
* impl Mentionable for GuildChannel (#348)Adelyn2018-07-101-0/+4
|
* Fix ffmpeg_optioned doctestZeyla Hellyer2018-07-091-0/+2
|
* Deprecate Message::guild_id()Zeyla Hellyer2018-07-092-15/+12
| | | | | Instead, using the structfield is preferred, since that comes from gateway events directly now anyway.
* Add voice::streamer::ffmpeg_optionedZeyla Hellyer2018-07-092-3/+39
| | | | | | Add a method for specifying custom ffmpeg arguments. Closes #266.
* Add a message cache API (#345)zeyla2018-07-095-2/+223
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds an API for message caching. By default this caches 0 messages per channel. This can be customized when instantiating: ```rust use serenity::cache::{Cache, Settings}; let mut settings = Settings::new(); // Cache 10 messages per channel. settings.max_messages(10); let cache = Cache::new_with_settings(settings); ``` After instantiation: ```rust use serenity::cache::Cache; let mut cache = Cache::new(); cache.settings_mut().max_messages(10); ``` And during runtime through the global cache: ```rust use serenity::CACHE; CACHE.write().settings_mut().max_messages(10); ```
* Remove deprecated use of Colour associated methodsZeyla Hellyer2018-07-081-2/+2
|
* impl Form<&$ID> for $IDZeyla Hellyer2018-07-081-0/+6
| | | | Implements `From<&Id>` for all `Id` types, e.g. `From<&RoleId> for RoleId`.
* Add associated consts in Colour, deprecate methodsZeyla Hellyer2018-07-071-36/+42
| | | | | | Add associated constants to the `utils::Colour` struct for all of the colour presets. Additionally, deprecate the method equivalents, preferring to use associated constants instead.
* Don't assume all characters at end are 1-lengthacdenisSK2018-07-061-2/+17
| | | | Unicode characters usually span out to more than 1-length. This would cause crashes when they appeared at the end
* Make the Cache Update API public (#344)zeyla2018-07-052-4/+118
| | | | | | | | | | | This commit makes the Cache Update API public, allowing users to manually update the cache, as well as implementing the caching API on their own types to work with mutating the cache. The motivation for this indirectly comes from a message cache: if a user has multiple processes that can receive cache updates (either splitting a bot's shards into multiple processes or other processes like web panels or pub/sub channels), then this will allow them to easily mutate the cache and feed all types implementing the CacheUpdate trait into `Cache::update`.
* Monomorphize all functionsZeyla Hellyer2018-07-0423-127/+527
| | | | | | | | | | | | | | | | | | | | | | | | | | | This commit monomorphizes all functions, turning functions like: ```rust fn foo<T: Into<Bar>>(baz: T) { baz = baz.into(); // function here } ``` Into functions like: ```rust fn foo<T: Into<Bar>>(baz: T) { _foo(baz.into()) } fn _foo(baz: Bar) { // function here } ``` This avoids binary bloat and improves build times, by reducing the amount of code duplication.