1039 Commits

Author SHA1 Message Date
khazhyk
b1fae0861a add read-only cached_messages property to Client
For those of us who want access to this sweet trove of zero hop messages
2019-04-17 22:41:59 -04:00
Rapptz
296d4bf580 [commands] Add new MessageConverter to commands prose page. 2019-04-17 22:41:58 -04:00
retke
440db2a568 [commands] Add MessageConverter to fetch messages by URL or ID. 2019-04-17 20:47:21 -04:00
Rapptz
321efb11ed Fix typo in on_raw_reaction_remove docs. 2019-04-14 06:05:11 -04:00
Dante Dam
497894e756 Improvements to intro docs. 2019-04-12 20:56:40 -04:00
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
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
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
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 2019-04-10 01:05:47 -04:00
Steve C
db340fd5f9 Fix broken documentation attribute 2019-04-09 00:10:28 -04:00
Rapptz
3e2e6ad502 Update Japanese translation files. 2019-04-08 18:38:10 -04:00
Rapptz
51c64a3b73 Fix documentation so Sphinx can build semi-cleanly. 2019-04-08 18:17:15 -04:00
Rapptz
1da624a8b5 Remove manual documentation for AppInfo 2019-04-08 17:27:31 -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
1243298b34 Add some version guarantees to the documentation. 2019-04-08 02:18:48 -04: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
Rapptz
9833ea82e2 Add helpers to escape markdown and mentions from text.
Fixes #1673
2019-04-06 20:14:05 -04:00
Vexs
9591b00dcf Redesign bulk delete events
Change `parse_message_delete_bulk` to not dispatch individual
`message_delete` events, and instead `bulk_message_delete`. Also make
`raw_bulk_message` delete and `raw_message_delete` have message
objects attached.

Fixes #1807
2019-04-06 19:18:06 -04:00
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
2019-04-06 19:12:50 -04:00
Rapptz
d48a424f6f Fix mistake in documentation. 2019-03-20 23:29:04 -04:00
apple502j
9c32bcdf80 Update docs, mostly Inviting Your Bot 2019-03-20 22:30:22 -04:00
Rapptz
d9e54d7dd3 [commands] Redesign extension exception flow.
Instead of raising a whole variety of exceptions, they are now wrapped
into ExtensionError derived classes.

* ExtensionAlreadyLoaded
	* Raised when an extension is already loaded in Bot.load_extension
* ExtensionNotLoaded
	* Raised when an extension is not loaded, e.g. Bot.unload_extension
* NoEntryPointError
	* Raised when an extension does not have a `setup` function.
* ExtensionFailed
	* Raised when an extension's `setup` function fails.
* ExtensionNotFound
	* Raised when an extension's module import fails.
2019-03-19 09:23:11 -04:00
Rapptz
26e9b5bfac [commands] Add Bot.reload_extension for atomic loading.
Also do atomic loading in Bot.load_extension
2019-03-19 09:23:10 -04:00
Rapptz
2ce42b5b50 Some widget fixes. 2019-03-19 09:23:09 -04:00
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
2019-03-19 09:00:18 -04:00
NCPlayz
fb02191b80 Organise documentation 2019-03-19 08:24:42 -04:00
Rapptz
8ba48c14a7 Minor typo fix. 2019-03-18 05:34:20 -04:00
Rapptz
963cf4b34e Add on_disconnect event.
I assume this is where it has to be. Fix #1937
2019-03-18 05:29:38 -04:00
Rapptz
5061915b2a Add support for store channels. 2019-03-17 14:32:51 -04:00
Episword
67de13eb84 Translated some .po files. 2019-03-16 19:22:12 +09:00
Rapptz
f37bc22054 Update Japanese .po files 2019-03-16 05:49:10 -04:00
Kaeptm Blaubaer
b506ee1b8e Change superclass to subclass in some documentation 2019-03-16 05:32:59 -04:00
Rapptz
3527203e07 [commands] Redesign HelpFormatter into HelpCommand
Part of #1938
2019-03-15 05:54:23 -04:00
Rapptz
560783c3d2 [commands] Separate view parsing errors from BadArgument.
This causes them to be raised from a new exception named
ArgumentParsingError with 3 children for ease with i18n. This is
technically a breaking change since it no longer derives from
BadArgument, though catching UserInputError will prevent this change
from affecting the user.
2019-03-12 05:27:34 -04:00
Rapptz
13b23963ec Add exception hierarchy to the documentation. 2019-03-12 01:15:24 -04:00
Rapptz
5ea84fb971 Add support for guild news channels. 2019-03-08 21:40:43 -05:00
Rapptz
d124daef33 Fix non-working example in commands documentation. 2019-03-06 02:37:02 -05:00
Rapptz
f6869242ca Update Japanese .po files. 2019-02-24 04:10:48 -05:00
Rapptz
ab8e7b7732 [commands] Fix bug in behaviour in the cog inspection methods. 2019-02-23 10:51:23 -05:00
Rapptz
a8dd4a826f Document listener changes in the migrating docs. 2019-02-23 04:26:03 -05:00
Rapptz
caf3d17d4a Rework entire cog system and partially document it and extensions. 2019-02-23 04:10:10 -05:00
cod
4e5b4a9b93 Translated ext.commands.HelpFormatter class.
ext/commands/api.po
2019-02-19 00:27:05 +09:00
Rapptz
41924a8b32 Update Japanese .po files 2019-02-18 03:54:27 -05:00
CraftSpider
e920fe9a56 Add guild_integrations_update event 2019-02-18 03:47:56 -05:00
Rapptz
5d78f43e55 Expose more information from partial invites, along with counts.
This adds the following information.

* `PartialInviteGuild` to replace `Object` patching
* `PartialInviteChannel` to replace `Object` patching
* Invite.approximate_member_count and Invite.approximate_presence_count

The new partial objects provide better documentation on what is
expected when you fetch random invites.

Fixes #1830
2019-02-12 20:22:47 -05:00
stuarth
5fa54d196e Fix typo in API documentation. 2019-02-06 01:52:55 -05:00