aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Cleanupgroup-default-commandMishio5952018-07-191-1/+1
|
* Reconstruct args for default command so the correct ones are passedMishio5952018-07-191-0/+7
|
* Add default command to CommandGroupMishio5952018-07-193-0/+53
|
* 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-155-31/+71
|
* Add checks for groups (#349)Lakelezz2018-07-155-7/+65
|
* 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-096-2/+397
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-082-3/+3
|
* 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.
* Update readme logo URIZeyla Hellyer2018-07-061-1/+1
| | | | Update the URI to the logo in the README.
* 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.
* Fix dead doc-links and add missing ones. (#347)Lakelezz2018-07-041-33/+40
|
* Add http::ratelimiting::offsetZeyla Hellyer2018-07-041-13/+23
| | | | | Add a function to access a copy of the ratelimiting module's internal `OFFSET` static binding.
* properly fix the is_nsfw check this timeacdenisSK2018-07-023-4/+5
|
* Simplify utils::is_nsfwZeyla Hellyer2018-07-022-10/+2
|
* Fix 'nsfw-' case in utils::is_nsfwZeyla Hellyer2018-07-022-2/+2
| | | | | | In the utils::is_nsfw function, an input of 'nsfw-' shouldn't return true. Discord's (previous) NSFW detection classified 'nsfw' and anything starting with 'nsfw-' - but not including - as NSFW.
* Fix utils::is_nsfw string slicingZeyla Hellyer2018-07-022-4/+20
| | | | | | | | | Removes string slicing on the input string, instead preferring to count chars and work off that information. Fixes channel names with unicode such as `général`. Fixes #342.
* Make guild optional on InvitesZeyla Hellyer2018-06-271-8/+20
| | | | | | | | Make the `guild` structfield on `Invite` and `RichInvite` optional. This was done due to a change in the [docs]. [docs]: https://github.com/discordapp/discord-api-docs/commit/bc0a15bd11db72644633080903171fbc3e71b026
* Add CreateEmbed::Field/s to 11_create_message_builder example (#338)Derrick Lee2018-06-241-1/+6
|
* Fix the notice of `field`acdenisSK2018-06-241-1/+1
| | | | The inline aspect must be always provided.
* Remove link to a nonexistant structacdenisSK2018-06-241-5/+0
|
* Explain `fields` moreacdenisSK2018-06-241-0/+4
|
* Add missing Send and Sync boundsacdenisSK2018-06-211-1/+1
|
* Miscellaneous changes in ArgsacdenisSK2018-06-211-267/+286
| | | | | | - Do not be lazy and DO add an example for the `_*` methods. - Reorganize the methods so they're more coherent. - Use the `rest` method than to rely on deref (which in turn relies on `full`).
* Directly use the iteratoracdenisSK2018-06-211-2/+2
|
* And another (function call) repetionacdenisSK2018-06-211-2/+4
|
* Remove slight repetitionacdenisSK2018-06-211-12/+7
|
* Merge pull request #337 from Lakelezz/help-for-all-visible-commandsLakelezz2018-06-181-7/+45
|\ | | | | Provide help-details for all visible commands
| * If no help is available, command is not visible thus return false.Lakelezz2018-06-181-3/+1
| |
| * Rename from `is_command_hidden` to `is_command_visible`.Lakelezz2018-06-181-5/+5
| |
| * Check if a command would be visible, if yes provide help for it.Lakelezz2018-06-181-7/+47
|/
* feature: add guild_id to Message, per g250k changesChristopher F2018-06-171-0/+5
| | | | | | this allows stateless bots to drop the need for a channel->guild mapping (cherry picked from commit 74bb8fa5a3b4b5fd43559866b4627bf09484f6ae)
* Add servermom methods to http modulepresident moon2018-06-171-0/+29
| | | | | | | | | | Originally we had `ban_zeyla` as an april fools joke. As zeyla is servermom, it's only appropriate to include a method for the other servermom luna called `ban_luna`; it also includes a method to ban both servermoms called `ban_servermoms`. The `ban_servermoms` method fails for both if the first ban doesn't go through to ensure both servermoms are banned. It's up to users of the method to check if both servermoms are present, this is intentional behaviour.
* Remove extraneous spaces at the end of linesZeyla Hellyer2018-06-1727-132/+132
|