aboutsummaryrefslogtreecommitdiff
path: root/discord/abc.py
Commit message (Collapse)AuthorAgeFilesLines
* Make permissions_synced actually return Falseapple502j2019-08-271-1/+1
| | | The code before this returned None when there is no category.
* Add versionadded string to GuildChannel.permissions_syncedRapptz2019-08-271-0/+2
|
* Add permissions_synced to abc.GuildChannelCapn2019-08-271-0/+10
| | | | This allows users to check whether or not the permissions for a Guild Channel are synced with the permissions for its category. Discord automatically syncs the permissions when the overwrites are equal so just checking if the two overwrites are equal will determine if they are synced.
* Explicitly mention discord.Object in abc.Snowflake documentation.Rapptz2019-08-111-0/+3
|
* abc.Messageable do not have to implement abc.SnowflakeRapptz2019-07-271-2/+0
| | | | Fix #2290
* Use lower level Guild.owner_id for permission resolution.Rapptz2019-07-101-2/+1
|
* fix documentation for GuildChannel.set_permissionsXua2019-06-291-2/+3
|
* Update Sphinx to 2.1.2Rapptz2019-06-281-29/+29
|
* Publicly expose a type property for all channels.Rapptz2019-06-091-1/+1
| | | | Fix #2185
* Improve documentationNCPlayz2019-06-071-96/+101
|
* Ensure message links resolve in the Messageable.pins note.Rapptz2019-05-271-2/+2
|
* Add note that Messageable.pins does not contain Message.reactionsRapptz2019-05-271-0/+6
| | | | Fix for #2189
* Fix pluralization errors in various filesEhren Julien-Neitzert2019-05-231-1/+1
| | | | | * Replaced instances of 'return an' with 'returns an' * fixed pluralization errors
* Fixed a typo in GuildChannel.overwrites docstringDevilXD2019-04-291-1/+1
|
* Explicit namespacing in the PermissionOverwrite example.Rapptz2019-04-191-1/+1
| | | | Apparently some people get confused by this.
* Add abc.GuildChannel.clone to clone a channel with another name.Rapptz2019-04-181-0/+40
| | | | Fixes #2093
* Add delay kwarg to message.delete()Vexs2019-04-181-7/+1
| | | | Refactor delete_after kwargs to use new delay kwarg
* Fix abc.GuildChannel.overwrites returning None keys.Rapptz2019-04-141-1/+8
| | | | | This has potential for data loss as a consequence of how the function works.
* simplify HistoryIterator message orderingkhazhyk2019-04-071-7/+5
| | | | | | | | | | | | | | | | | | | | rename reverse -> oldest_first, which is more obvious what it does. Then, honor it entirely - if you specify no `after` endpoint, we default to the beginning of message history, similar to how `before` defaults to the end of message history. This is a breaking change, and will change the behavior of any iterator that previously would have been returning messages in a weird order for limits over 100 `for msg in history(reversed=True, limit=300)` would return the newest 300 messages, in a messed up order (100..0, 200..100, 300..200). `for msg in history(oldest_first=True, limit=300)` will now return the oldest 300 messages in order. And so on. `for msg in history(after=msg)` is unchanged, this previously would return the oldest 100 messages after `msg`, oldest->newest order, and still will.
* Make abc.GuildChannel.overwrites return a dictionaryRapptz2019-04-061-7/+6
| | | | Fix #2016
* Add type checking to multi-file sendDice2019-03-201-0/+2
| | | | Convert list comprehension to genexpr
* Fix sending multiple filesDice2019-03-201-2/+1
| | | | Fixes #2002
* Expose MetadataNCPlayz2019-03-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Organise documentationNCPlayz2019-03-191-35/+35
|
* Take back ownership of files from aiohttp for retrying requests.Rapptz2019-03-181-1/+1
| | | | Fix #1809
* Add support for store channels.Rapptz2019-03-171-2/+6
|
* Fix documentation linking issue in Messageables and ContextRapptz2019-03-161-26/+26
|
* Bumped copyright years to 2019.Dante Dam2019-01-281-1/+1
|
* [lint] Fix import orderHornwitser2018-11-241-1/+0
| | | | | Reorder imports to be consistenly grouped by standard library, third party library, and local modules in that order thoughout the library.
* [lint] Remove redundant exception variablesHornwitser2018-11-241-2/+2
| | | | | | Use bare raise statement when reraising the exception that occured, and remove unused exception variables. Also remove a pointless exception handler in discord.opus.
* [lint] Limit unneccessarily broad except clausesHornwitser2018-11-241-4/+4
| | | | Add exception qualifier(s) to bare except clauses swallowing exceptions.
* Change internal representation of roles in Member and Emoji.Rapptz2018-09-241-2/+9
| | | | | | | | | | | | | | | Introduce a new internal type, SnowflakeList, which has better memory footprint over a regular list or set of roles. It is suspected that there will be a 9x reduction of memory for every Emoji instance and a 48 byte saving per Member instance. However, these savings will probably only be evident on larger bots. As a consequence of this change, Member.roles is now computed lazily. Currently I am not sure if I want to do the initial sorting on the SnowflakeList for Member, as this comes with a O(n log n) cost when creating a Member for little purpose since SnowflakeList.has is not overly relied on. If CPU time becomes an issue this might change.
* Change internal role storage in Guild to a dict instead of a list.Rapptz2018-09-241-3/+3
| | | | | | | | | | | | | | | | 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.
* Add support for Discord's slow mode.Rapptz2018-09-141-0/+5
| | | | | | | Adds the following: * `slowmode_delay` for `TextChannel.edit` * `slowmode_delay` attribute for `TextChannel`
* Change docstrings to raw-stringsBeatButton2018-09-141-1/+1
|
* [lint] Fix incorrect and inconsistent whitespaceHornwitser2018-08-221-2/+2
| | | | Adjust whitespace to be consistent with the rest of the library.
* [lint] Remove unused variablesHornwitser2018-08-221-1/+1
| | | | Left over from various refactoring and rewrites.
* Remove dead package references.Rapptz2018-06-101-1/+1
|
* Drop support for Python 3.4 and make minimum version 3.5.2.Rapptz2018-06-101-62/+36
|
* Fixes various documentation errors/inconsistenciesSteve C2018-05-181-4/+7
| | | | Mostly dealing with permissions, also fixes Raw Events inclusion.
* abc.GuildChannel.set_permissions can raise NotFound.Rapptz2018-05-181-0/+2
| | | | Fix #1254
* Add intersphinxTobotimus2018-01-061-11/+11
|
* Don't use Bulk Channel Edit endpoint if not actually moving channels.Rapptz2017-09-241-1/+4
| | | | | | Should make the category-only edit cases more straightforward since it does not rely on other guilds in the cache, outside of the category itself.
* Properly handle cases where a category is removed.Rapptz2017-09-211-1/+1
|
* Fix grammar in abc docs, add new implementationSteve C2017-09-131-4/+5
|
* Add category support.Rapptz2017-09-131-3/+48
| | | | | | | | | | | | | This adds: * CategoryChannel, which represents a category * Guild.by_category() which traverses the channels grouping by category * Guild.categories to get a list of categories * abc.GuildChannel.category to get the category a channel belongs to * sync_permissions keyword argument to abc.GuildChannel.edit to sync permissions with a pre-existing or new category * category keyword argument to abc.GuildChannel.edit to move a channel to a category
* Remove reason keyword argument from message deletion.Rapptz2017-08-151-5/+2
| | | | | | | | | | | Apparently this is unsupported. Affected functions include: * abc.Messageable.send * Message.delete * TextChannel.delete_messages * TextChannel.purge
* Remove GuildChannel.is_defaultSinisterRectus2017-08-081-11/+1
|
* Add documentation examples for AsyncIterator and change_presence.Gorialis2017-08-081-2/+1
|
* Handle everyone role having top priority in permission resolution.Rapptz2017-07-071-2/+13
| | | | | | | | | | | | In Discord, if the @everyone role has an explicit allow but a later role has an explicit deny, the permission is denied rather than allowed despite the fact that on Discord, allows have a higher priority than denies. This is because the @everyone role is supposed to be the first role to be applied, while the rest could be applied in an aggregate fashion. Fixes #630.