| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| |
|
| |
untested
|
| | |
|
| |
|
|
|
|
|
|
|
| |
This affects:
* commands.has_role
* commands.has_any_role
* commands.bot_has_role
* commands.bot_has_any_role
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
It turns out that events created in an eval command also cause
the issue described in #1506.
Ensure that events we remove are part of a module as well.
Also performs minor comment maintenance
("x", "first y", "then z") -> ("x", "y", "z")
|
| |
|
|
|
|
| |
Basically Discord retrieves the data like
`artist1; artist2; artist3` and when you split only by `;` the results
will be: `[artist1, " artist2", " artist3"]`
|
| |
|
|
|
|
|
|
|
| |
`Webhook.send()` now accepts a `files` kwarg holding a list of `File`
objects, which are included in the HTTP request as `file1`, `file2` and
so on.
This is an undocumented feature of the Discord API, but is analogous
with the client's sending of messages with multiple files.
|
| |
|
|
|
|
| |
Remove the old and slow Member._copy implementation that was left over
by accident in 095f0ec. Since it was defined later it overrode the new
implementation and rendered it moot.
|
| | |
|
| | |
|
| |
|
|
| |
Left over by the removal of handlers in 2721689.
|
| |
|
|
| |
Remove trailing whitespace in guild.py introduced by 3727ea9.
|
| |
|
|
| |
Missed by a4d1599 despite being pointed out in #1570.
|
| |
|
|
|
| |
Reorder imports to be consistenly grouped by standard library, third
party library, and local modules in that order thoughout the library.
|
| |
|
|
|
| |
Remove two duplicated entries from the quote mapping in commands.view.
These were introduced at the creation of this mapping in ea061ef.
|
| |
|
|
|
| |
Convert log("fmt" % args) to log("fmt", args) as the latter is lazy and
does not do the formating if the string is never logged.
|
| |
|
|
| |
Remove redundant paranthesis and checks from util.valid_icon_size.
|
| |
|
|
|
| |
Remove redundant parenthisis around await expressions. Left over from
f25091ef.
|
| |
|
|
|
|
|
|
| |
Restrict the values accepted by comparisons with booleans to be actual
booleans.
Minor breaking of undocumented behaviour in permissions; the value to
set bits to must be booleans (as indicated by the type error thrown).
|
| |
|
|
|
| |
Use the more explicit (and common) exc instead of e as the variable
holding the exception in except handlers.
|
| |
|
|
|
|
| |
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.
|
| |
|
|
| |
This reverts commit 96981210b3415e15446db0b702b07fef25c8b680.
|
| |
|
|
|
| |
Technically a breaking change. This is to be a parallel with the
Bot.add_check interface.
|
| | |
|
| |
|
|
| |
They can now delete all emoji
|
| | |
|
| |
|
|
| |
This will probably be reverted in 1 week.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
* type(x) is y is faster than isinstance(x, y)
* Re-arrange if-statements for common statements
* Drop handler getattr for most events that don't use it
|
| |
|
|
|
|
|
| |
* Skip user update if possible
* Drop copy.copy in favour of manual copy
Credit to Hornwitser for these findings.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| |
|
|
|
| |
This allows for greedy "consume until you can't" behaviour similar to
typing.Optional but for lists.
|
| |
|
|
|
|
|
|
|
|
| |
Original code by zephyrkul.
This new parsing mode allows for backtracking in case of failure
when a typing.Union[..., NoneType] or a typing.Optional[...] is used.
This means that if a type would fail to parse, the view is undo'd to
a previous state, passing the default parameter to the callback, and
then continuing on the next parameter as if nothing had happened.
|
| | |
|
| |
|
|
| |
Remove incorrect note; extension of #1575
|
| |
|
|
| |
For when the hooks are not coroutines.
|
| | |
|
| | |
|
| | |
|