Nihaal Sangha
a3f700c11f
Fix references to snowflakes being max 21 long
4 years ago
Rapptz
a0404807d5
[commands] Add support for rgb function in ColourConverter
This also adds support for 3 digit hex.
Fixes #6374
4 years ago
Alex Nørgaard
68eb844d48
[commands] Add discord.Guild converter and GuildNotFound error
* Add discord.Guild converter and GuildNotFound error
* note for lack of disambiguation in Guilds with duplicate names, and removed the possibility of returning None
* edited converter to use `utils.get` over `utils.find` and docs edited with Converter and Exception.
4 years ago
Nihaal Sangha
69bdc3a184
Change copyright year to present
4 years ago
Josh
eeafc9363f
[commands] Add PartialMessageConverter
4 years ago
Ben Skerritt
0995d07727
[commands] Added in missing channel links
4 years ago
Rapptz
0456458ad1
[commands] Fetch user if an ID is passed and cache lookup fails.
4 years ago
Rapptz
431ee8794b
Fix error with templates not having access to member cache flags.
This also changes the attribute from having an underscore
Fix #5986
5 years ago
Jonathan Feenstra
c54d6f03c5
[commands] Update MessageConverter link regex
Remove redundant parts of the MessageConverter regexes and support www
5 years ago
Rapptz
3daaadafdd
[commands] Lazily fetch members in discord.Member converters
This makes commands taking members mostly work transparently without
much effort from the user.
5 years ago
Michael
93fa46713a
Fix and add documentation
5 years ago
Simon Beal
6ebd2e13a1
[commands] Add subclasses of BadArgument for converters
5 years ago
parafoxia
ad04fbeee4
[commands] Added ColorConverter alias
5 years ago
James
475762e8df
Document raises for Converter.convert
5 years ago
Sebastian Law
7a07644de3
[commands] Raise TypeError when Optional is used with Greedy converter
5 years ago
Rapptz
66c6be50d8
Prepare for the discord.com domain rename
5 years ago
Rapptz
02397306b2
Drop superfluous zero in version related changes in the documentation
5 years ago
Hugo Woesthuis
ee6f4e85d6
[commands] Allow @ prefixed usernames in DM contexts for UserConverter
Previously the argument '@user#0000' return None.
To fix this, as this is a common user error, an extra check was added
to remove the first character from the argument if this is an '@'.
Discord names may not contain an '@' anyways.
5 years ago
Rapptz
6071607176
Bump copyright year to 2020
Closes #2510
5 years ago
Rapptz
2e6882bd8c
[commands] Fall back to using Message.mentions in converters
Useful if there's no cache.
6 years ago
NCPlayz
3c9bcc2851
Improve documentation
6 years ago
Rapptz
40cac30da1
[commands] Fix MessageConverter not inheriting from Converter
Closes #2126
6 years ago
Rapptz
919dbcafb3
Consistent use of __all__ to prevent merge conflicts.
6 years ago
Rapptz
296d4bf580
[commands] Add new MessageConverter to commands prose page.
6 years ago
retke
440db2a568
[commands] Add MessageConverter to fetch messages by URL or ID.
6 years ago
Rapptz
6574c97a8b
[commands] Support callables in Greedy converter
6 years ago
Rapptz
9833ea82e2
Add helpers to escape markdown and mentions from text.
Fixes #1673
6 years ago
Rapptz
e4de25eaab
[commands] Raise BadArgument in ColourConverter when using from_hsv/rgb
Fixes #2043
6 years ago
CapnS
24d3a5a48d
Only escape characters as necessary in clean_content
Fixes #1885
6 years ago
NCPlayz
be227ebcf0
Redesign asset retrieval in the library.
Most assets now return a new class named `Asset`. This allows for the
assets to be consistently saved via a `save` method instead of special
casing for `Attachment`.
`AppInfo` is no longer a namedtuple it is a fully documented dataclass,
as well as having the state attached to it.
Fixes #1997
6 years ago
Joshua B
d221ca5f7d
[commands] ColourConverter raises if value is out of range
changes make the `ext.commands.ColourConverter` Converter fail when
user input is outside the acceptable value range 0x000000 - 0xFFFFFF
6 years ago
NCPlayz
f507f508a2
Expose Metadata
Added access to:
* `/users/@me/guilds`
* `/guilds/{guild_id}`
* `/guilds/{guild_id}/members/{member_id}`
BREAKING CHANGE:
* `get_user_info` -> `fetch_user_info` to match naming scheme.
Remove useless note
Remove `reverse` and corresponding documentation
Update documentation to reflect #1988
Rename `get_` HTTP functions to `fetch_`
Breaking Changes:
* `get_message` -> `fetch_message`
* `get_invite` -> `fetch_invite`
* `get_user_profile` -> `fetch_user_profile`
* `get_webhook_info` -> `fetch_webhook`
* `get_ban` -> `fetch_ban`
Fix InviteConverter, update migrating.rst
Rename get_message to fetch_message
6 years ago
NCPlayz
fb02191b80
Organise documentation
6 years ago
Rapptz
45af9fa40b
[commands] Allow passing of typing.Union into Greedy. Fix #1951
6 years ago
Rapptz
69f5a70eeb
[commands] Allow Converter instances in Greedy. Fix #1939 .
6 years ago
Benjamin Mintz
bb9f153d29
commands.clean_content: escape || spoilers ||
6 years ago
Dante Dam
9656a21ebe
Bumped copyright years to 2019.
6 years ago
Dice
bda690c32f
[commands] Remove message being required from Role/Member converters.
This allows for easier "mock" context objects, for those who use
converters as utility functions outside of commands, and it's more
straightforward with the rest of the file.
6 years ago
Hornwitser
efb4ff850e
[lint] Fix import order
Reorder imports to be consistenly grouped by standard library, third
party library, and local modules in that order thoughout the library.
7 years ago
Hornwitser
fa46b07db1
[lint] Rename exception variables to exc
Use the more explicit (and common) exc instead of e as the variable
holding the exception in except handlers.
7 years ago
Rapptz
45af0c83de
[commands] Fix NameError in clean_content converter
7 years ago
Rapptz
3d03dbc451
Change internal role storage in Guild to a dict instead of a list.
This adds the following APIs:
* Guild.get_role
This removes the following APIs:
* Guild.role_hierarchy
To compensate for the removed APIs, Guild.roles is now a sorted list
based on hierarchy. The first element will always be the @everyone
role.
This speeds up access at the cost of some memory, theoretically.
7 years ago
Rapptz
814b03f5a8
[commands] Add commands.Greedy converter and documentation.
This allows for greedy "consume until you can't" behaviour similar to
typing.Optional but for lists.
7 years ago
Hornwitser
c8b49d37be
[lint] Fix incorrect and inconsistent whitespace
Adjust whitespace to be consistent with the rest of the library.
7 years ago
Hornwitser
d58fc0ccee
[lint] Remove unused imports
Left over from various refactoring and rewrites.
7 years ago
Rapptz
f25091efe1
Drop support for Python 3.4 and make minimum version 3.5.2.
7 years ago
Gorialis
04d9dd9c0d
Change PartialReactionEmoji to PartialEmoji, add a PartialEmojiConverter
7 years ago
Tobotimus
3112e1c17e
Add intersphinx
7 years ago
Joshua Butt
f5a443fa8f
Add support for animated emoji to commands ext EmojiConverter
7 years ago
Rapptz
e614f6b4cd
[commands] Add CategoryChannelConverter
8 years ago