| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| |
|
| |
The code before this returned None when there is no category.
|
| | |
|
| |
|
|
| |
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.
|
| | |
|
| |
|
|
| |
Fix #2290
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Fix #2185
|
| | |
|
| | |
|
| |
|
|
| |
Fix for #2189
|
| |
|
|
|
| |
* Replaced instances of 'return an' with 'returns an'
* fixed pluralization errors
|
| | |
|
| |
|
|
| |
Apparently some people get confused by this.
|
| |
|
|
| |
Fixes #2093
|
| |
|
|
| |
Refactor delete_after kwargs to use new delay kwarg
|
| |
|
|
|
| |
This has potential for data loss as a consequence of how the function
works.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
| |
Fix #2016
|
| |
|
|
| |
Convert list comprehension to genexpr
|
| |
|
|
| |
Fixes #2002
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| | |
|
| |
|
|
| |
Fix #1809
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
Reorder imports to be consistenly grouped by standard library, third
party library, and local modules in that order thoughout the library.
|
| |
|
|
|
|
| |
Use bare raise statement when reraising the exception that occured, and
remove unused exception variables. Also remove a pointless exception
handler in discord.opus.
|
| |
|
|
| |
Add exception qualifier(s) to bare except clauses swallowing exceptions.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
Adds the following:
* `slowmode_delay` for `TextChannel.edit`
* `slowmode_delay` attribute for `TextChannel`
|
| | |
|
| |
|
|
| |
Adjust whitespace to be consistent with the rest of the library.
|
| |
|
|
| |
Left over from various refactoring and rewrites.
|
| | |
|
| | |
|
| |
|
|
| |
Mostly dealing with permissions, also fixes Raw Events inclusion.
|
| |
|
|
| |
Fix #1254
|
| | |
|
| |
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
| |
Apparently this is unsupported.
Affected functions include:
* abc.Messageable.send
* Message.delete
* TextChannel.delete_messages
* TextChannel.purge
|
| | |
|