1856 Commits

Author SHA1 Message Date
apple502j
d15a0f541b
Remove "needs python 3.5+" from async iter section 2019-04-12 20:15:54 +09:00
Rapptz
e46842a7cd [tasks] Add before_loop and after_loop decorators 2019-04-12 04:08:42 -04:00
Rapptz
4770f5a958 Export tasks extension 2019-04-12 03:22:50 -04:00
Rapptz
015404b01c [commands] Add versionadded to dm_only 2019-04-12 03:21:49 -04:00
Vexs
b6b55e820f Update FAQ with some common tags
Pointed references to random.cat to use their aws api
Added details about custom and unicode emojis to how to add a reaction
Added watching example to presence changing
Added new fetch methods to specific model FAQ
2019-04-12 03:21:49 -04:00
Rapptz
4cf96107ae [tasks] Document version added 2019-04-11 08:26:46 -04:00
Rapptz
4513dac7a3 [tasks] Ensure total number of seconds is not less than 0. 2019-04-11 08:21:45 -04:00
Rapptz
10bc939348 [tasks] Rename Loop.run to Loop.start to avoid blocking connotations 2019-04-11 08:19:32 -04:00
Rapptz
b0c7f48caf [tasks] Add a new background helper 'tasks' extension. 2019-04-11 08:04:26 -04:00
Rapptz
ec1b3434a2 [commands] Fix erroneous string in dm_only check 2019-04-11 00:55:32 -04:00
Dante Dam
aabbd5a446 [commands] Added dm_only check
Raises PrivateMessageOnly on failure.
2019-04-11 00:02:22 -04:00
Rapptz
50dcdac5ca [commands] Fix references in Bot to actually link.
Exceptions can't seem to link due to a bug in Sphinx.
2019-04-10 05:13:30 -04:00
Rapptz
5b99e7d6f4 Update changelog v1.0.1 2019-04-10 01:05:47 -04:00
Rapptz
37e6b53216 Version bump to v1.0.1 2019-04-10 00:59:43 -04:00
Rapptz
ef0b2a1092 [commands] Properly name heading for ExtensionError 2019-04-10 00:59:02 -04:00
Imayhaveborkedit
7eb8417883 Fix voice handshake race condition
In the event that two voice_server_updates are received in a short time frame, the second one is now ignored.
2019-04-10 00:55:52 -04:00
Vexs
4df0f79a6b Add notes warning that fetch_ methods are api calls
Also recommends using cache attributes/methods instead
2019-04-10 00:55:45 -04:00
Rapptz
407d18a30d Fix various bugs with Asset._url None handling. 2019-04-09 05:17:29 -04:00
Rapptz
e77dec85e9 Fix cleanup code on Linux not working properly. 2019-04-09 00:56:36 -04:00
Rapptz
dcdcf1adac Stop the event loop if it's running during cleanup.
Also handle the coroutine directly instead of using run_until_complete
2019-04-09 00:14:42 -04:00
Daniel
3a36f78e08 Use is_connected() instead of _connected in checks
Was doing a falsy check on an Event object instead of using the (unused) is_connected() function.
2019-04-09 00:14:41 -04:00
Steve C
db340fd5f9 Fix broken documentation attribute 2019-04-09 00:10:28 -04:00
Rapptz
67ec59caea Fix issue with speaking state causing an error. 2019-04-08 23:08:43 -04:00
Rapptz
d37839f38a Update classifier in setup.py v1.0.0 2019-04-08 18:54:40 -04:00
Rapptz
4a4db1a02c Version bump to v1.0.0 2019-04-08 18:38:51 -04:00
Rapptz
3e2e6ad502 Update Japanese translation files. 2019-04-08 18:38:10 -04:00
NCPlayz
7acb7de195 Add notes stating what Guild.fetch_guild and Guild.fetch_guilds returns
Also fixed two typos.
2019-04-08 18:17:40 -04:00
Rapptz
51c64a3b73 Fix documentation so Sphinx can build semi-cleanly. 2019-04-08 18:17:15 -04:00
Rapptz
bb79f2ae81 Bump PyNaCl to 1.3.0 2019-04-08 17:51:16 -04:00
Rapptz
04262b9371 Wording nit, library -> function in load_opus 2019-04-08 17:51:15 -04:00
Rapptz
0ddc6867e9 Change all IntEnum to Enum
A testament to how many 3.5 users there are.
2019-04-08 17:51:14 -04:00
Rapptz
1da624a8b5 Remove manual documentation for AppInfo 2019-04-08 17:27:31 -04:00
Rapptz
bb5aaf2ab3 Missing a word in Attachment.save 2019-04-08 17:19:11 -04:00
Rapptz
61ee88b0fc Fix oversight where on_disconnect did not get called on WS termination. 2019-04-08 07:45:05 -04:00
Rapptz
f8999b63ae Fix long-standing issue with user updates not dispatching properly.
This fix is long coming. For a long time due to the addition of a
global user cache, the on_member_update event would only have the
updated user in the very first dispatch due to a quirk in the reference
only being updated once.

In order to fix this issue two things had to change:

1. There had to be a new event, `on_user_update` to complement
   the equivalent member event.
2. Unnecessary copies of User had to be removed to compensate for the
   performance hit from the diffing.

While doing these two fixes I also re-evaluated some more unnecessary
copies done during the PRESENCE_UPDATE to add member case while
fetch_offline_members=False is set or due to chunking issues. The
number of copies was brought down from 2 to 1, discounting the original
Member creation. Unsure on the benefits of this one, however.

N.B: this doesn't change the pre-existing behaviour of on_member_update
2019-04-08 07:45:04 -04:00
Rapptz
1a9726087a GUILD_MEMBER_UPDATE no longer does actual user updates.
This had been delegated to PRESENCE_UPDATE a long time ago,
unfortunately.
2019-04-08 06:34:28 -04:00
Rapptz
c9fd092476 Don't use an enum when unnecessary in Member._client_status 2019-04-08 04:06:01 -04:00
Rapptz
c904e4f25b Add a note to load_opus that it's auto loaded on Windows. 2019-04-08 02:34:26 -04:00
Rapptz
1243298b34 Add some version guarantees to the documentation. 2019-04-08 02:18:48 -04:00
khazhyk
7845bfb79b terminate iterators immediately once out of data
if len(data) < 100, either limit was less than 100, or we ran
out of results, in both cases, we should terminate the lookup.

This fixes, e.g., hangs in audit_logs(limit=999999), and will
reduce the number of fetch calls for any case where limit is
greater than the number of results. (Prior, would just kinda
loop calling audit-logs)
2019-04-07 23:03:01 -07:00
khazhyk
52c45da0bc simplify AuditLogIterator ordering
rename reverse to oldest_first and remove cases where messages would
be ordered differently from the order we fetch audit log entries,
similar to HistoryIterator
2019-04-07 22:46:41 -07:00
khazhyk
366dc4855b simplify HistoryIterator message ordering
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.
2019-04-07 22:46:40 -07:00
khazhyk
7078b665a3 allow passing 0 for logs_from parameters 2019-04-07 22:18:30 -07:00
Rapptz
72b6152e96 Client.event raises TypeError instead of ClientException. 2019-04-07 22:33:38 -04:00
Rapptz
aeabd0761e [commands] Raise TypeError instead of ClientException in some places
Certain decorators and functions expect coroutines and raise an
exception when this is not met. Change these to raise the appropriate
TypeError since they can't actually be handled by the user gracefully
anyway.
2019-04-07 22:31:05 -04:00
Rapptz
84c1eac62a Don't raise an exception during the signal handlers. 2019-04-07 16:10:44 -04:00
Rapptz
7b95611e62 Forgot to escape backticks. 2019-04-07 00:46:15 -04:00
Rapptz
4d06879669 Add ignore_links and as_needed options to utils.escape_markdown.
This allows for URLs to be left alone since they can include markdown
characters and allows for total escaping of all markdown characters
by default to prevent some form of data manipulation.
2019-04-07 00:24:34 -04:00
Rapptz
d68af294a2 Fix regex substitution in utils.escape_mentions 2019-04-06 23:02:49 -04:00
Rapptz
47ab24991f [commands] Remove extraneous or 2019-04-06 22:02:58 -04:00