aboutsummaryrefslogtreecommitdiff
path: root/src/model
Commit message (Collapse)AuthorAgeFilesLines
...
* Switch to a mostly-fully OOP approachAustin Hellyer2017-01-2310-677/+2975
| | | | | | The context is now strictly in relation to the context of the current channel related to the event, if any. See Context::say for a list of events that the context can be used for.
* Make a single POST on guild role createAustin Hellyer2017-01-181-4/+1
| | | | | The endpoint to create a role no longer returns an empty role which must be PATCHed, and can be completed in the initial request.
* Add back Message::guild_id()Austin Hellyer2017-01-161-0/+13
|
* First round of deleting useless methodsAustin Hellyer2017-01-154-164/+3
|
* Clarify that messages can't be older than 2 weeks.Illia2017-01-141-2/+6
|
* Convert Colour to be a tuple structAustin Hellyer2017-01-131-1/+1
| | | | The struct only has one field (`value`) anyway.
* Fix buildIllia2017-01-112-7/+7
|
* Add Message.content_safe and fix distinct method not being included in User.Illia2017-01-113-1/+40
|
* Fix a payload decodeAustin Hellyer2017-01-091-2/+0
| | | | Resume doesn't have a heartbeat_interval, so don't try to decode it.
* Use CDN for default avatarsAustin Hellyer2017-01-091-13/+1
|
* Update icons/splashes to be WEBPAustin Hellyer2017-01-082-7/+7
|
* Add User::default_avatar_url() methodAustin Hellyer2017-01-081-0/+31
|
* Simplify Reaction::delete()Austin Hellyer2017-01-081-10/+9
|
* Alphabetize model method namesAustin Hellyer2017-01-085-111/+118
|
* Code style cleanupAustin Hellyer2017-01-086-57/+66
|
* Fix model doc linksAustin Hellyer2017-01-021-3/+4
|
* Fix no-cache method buildsAustin Hellyer2017-01-021-1/+3
|
* Add Message::guild() helperAustin Hellyer2016-12-311-3/+15
|
* Fix typoIllia2016-12-313-4/+4
|
* Add command alias support and command.exampletaavi?2016-12-291-2/+0
|
* Add guild and channel searchAustin Hellyer2016-12-294-8/+321
|
* Use conditional blocks over macrosAustin Hellyer2016-12-294-56/+84
|
* Add user static avatar url methodsAustin Hellyer2016-12-281-0/+16
|
* Simplify Role's Ord implAustin Hellyer2016-12-281-11/+3
|
* Support webp/gif avatarsAustin Hellyer2016-12-281-4/+24
| | | | | If the avatar hash begins with "a_", then the avatar is animated and is a GIF. Otherwise, use WEBP.
* Accept u64 shard countsAustin Hellyer2016-12-261-3/+3
|
* Match event namesAustin Hellyer2016-12-221-107/+63
|
* Simplify event decodingAustin Hellyer2016-12-221-62/+62
|
* Abstract event decoders to associated functionsAustin Hellyer2016-12-221-260/+682
| | | | | | Abstract the logic from simply `Event::decode` and `VoiceEvent::decode` to each individual event variant struct, in the form of associated `decode` functions.
* (╯°□°)╯︵ ┻━┻Austin Hellyer2016-12-191-3/+10
|
* Fix a typo in UserId::find docsAustin Hellyer2016-12-181-1/+1
|
* Fix Message::delete()Austin Hellyer2016-12-181-7/+7
|
* Expose message webhook IdsIllia2016-12-181-0/+6
|
* Add guild splash URL methodsAustin Hellyer2016-12-171-0/+23
|
* Make Id displays format u64 instead of a mentionAustin Hellyer2016-12-171-3/+3
| | | | | | Instead of mentioning the channel, role, or user on an Id display format, format its inner u64 instead. Instead, use `Id::mention()` to accomplish the equivilant.
* Fix User::avatar_url + add Id display testsAustin Hellyer2016-12-151-2/+2
| | | | | User::avatar_url was formatting the user's Id as a mention, rather than the inner u64.
* Implement command groups and bucketsIllia2016-12-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement command groups * change to ref mut * Implement framework API. * Remove commands field * Make it all work * Make example use command groups * Requested changes * Implement adding buckets * Add ratelimit check function * Finish everything * Fix voice example * Actually fix it * Fix doc tests * Switch to result * Savage examples * Fix docs * Fixes * Accidental push * 👀 * Fix an example * fix some example * Small cleanup * Abstract ratelimit bucket logic
* Add emoji URL generation methodsAustin Hellyer2016-12-122-0/+16
|
* More config for CreateCommand, add various methodsIllia2016-12-107-100/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | Adds multiple configurations to the command builder, and adds methods to various structs. Context::get_current_user is a shortcut to retrieve the current user from the cache. Message::get_member retrieves the member object of the message, if sent in a guild. Message::is_private checks if the message was sent in a Group or PrivateChannel. User::member retrieves the user's member object in a guild by Id; Adds 6 configurations to the command builder: - dm_only: whether the command can only be used in direct messages; - guild_only: whether the command can only be used in guilds; - help_available: whether the command should be displayed in the help list; - max_args: specify the maximum number of arguments a command must be given; - min_args: specify the minimum number of arguments a command must be given; - required_permissions: the permissions a member must have to be able to use the command;
* Fix no-cache+method conditional compilesAustin Hellyer2016-12-106-27/+35
| | | | Additionally, flag imports behind feature flags to avoid unused imports.
* Fix some clippy lintsAustin Hellyer2016-12-093-6/+6
|
* Change all try's into ?sacdenisSK2016-12-079-279/+276
| | | This breaks compatibility with < 1.13, but we didn't support that anyway.
* Allow mentionable structs to be used as command argumentsIllia2016-12-072-1/+89
| | | | | Add EmojiIdentifier, allow User, UserId, Role, RoleId, EmojiIdentifier, Channel and ChannelId to be used as arguments for commands and add more parsing functions to utils
* Improve Mentions, fix MessageBuilderIllia2016-12-066-101/+48
| | | | | Remove the obsolete Mention struct as well as related methods, improve the way mentioning works, fix the message builder, add a test for all this.
* Add more Context docs+permission requirementsAustin Hellyer2016-12-041-0/+2
| | | | | Add more documentation to most of the Context methods, also clarifying which permission/s are required for each method.
* Add documentation for modelsIllia2016-12-042-3/+7
|
* Import this import _again_Austin Hellyer2016-12-031-0/+2
|
* Make Member::colour() return an optional colourAustin Hellyer2016-12-031-18/+7
|
* Add Member::colourIllia2016-12-031-9/+34
| | | | Add a colour method to retrieve the member's top role with a unique colour, or the default colour if none can be applied.
* Add Role Eq/Ord implsAustin Hellyer2016-12-031-0/+33
| | | | | | | | | Roles can now be compared directly. This is a heirarchy check. This checks the following between two roles, A and B: - A's position is greater than B; - if not, then A's Id is greater than B; if these two conditions are false, then B is greater than A. If the two conditions are both true, then they are of equivilance.