Commit Graph
18 Commits
Author SHA1 Message Date
Benjamin MintzandRapptz 042a234eac [commands] update sys.modules in load_extension again
6f71552c50 introduced a regression: loading a module that is not in a package
does not add it to sys.modules. Updating sys.modules is required after all.
2019-07-18 18:06:43 -04:00
Benjamin MintzandRapptz 0a21591d0c [commands] Don't raise ExtensionNotFound for ImportErrors in modules
Now loading an extension that _contains_ a failed import will fail
with ExtensionFailed, rather than ExtensionNotFound.
2019-06-29 19:15:05 -04:00
Benjamin MintzandRapptz 850a0431bf Catch asyncio.CancelledError in 3.8 in typing context manager
In python 3.8, asyncio.CancelledError is a subclass of BaseException
rather than Exception, so `except Exception:` will not swallow
CancelledError. This change prevents an error in 3.8 from being printed
to the console when the following is run:

```
async with ctx.typing():
	pass
```
2019-06-20 22:51:28 -04:00
Benjamin MintzandRapptz a62641bd65 Add back __repr__ that were deleted in the Asset redesign
The Asset PR (be227ebcf0) changed some namedtuple-deriving
classes to object-deriving classes, which meant that the free __repr__ provided by namedtuple
was removed
2019-05-13 20:29:08 -04:00
Benjamin MintzandRapptz 0a0c43321b [commands] MinimalHelpCommand: add cog description 2019-05-09 06:11:21 -04:00
Benjamin MintzandRapptz bb9f153d29 commands.clean_content: escape || spoilers || 2019-02-06 01:52:12 -05:00
Ben MintzandRapptz ce3ede1551 Implement PartialEmoji == Emoji (fixes #1627) 2019-01-28 22:22:48 -05:00
bmintzandRapptz 24c0946a93 bot.unload_extension: also allow events with no module
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")
2018-11-24 22:51:16 -05:00
bmintzandRapptz c184b0a53d add support for Bug Hunter and Early Supporter flags 2018-11-24 22:34:22 -05:00
bmintzandRapptz 00a659c652 [docs] sort the VoiceRegions
having them appear in the docs ordered by their internal number
is not useful to the user. Sorting them by name
allows one to more quickly locate a voice region in the docs.
2018-08-30 19:20:11 -04:00
bmintzandRapptz 1d65d6993a document HypeSquadHouse and Profile.hypesquad_houses 2018-08-30 19:20:10 -04:00
Ben MintzandRapptz be7ea2678b Bot.unload_extension: don't remove commands from no module
Fixes unload_extension in the case of a command added via eval
2018-08-22 21:56:41 -04:00
bmintzandRapptz bb8b3bf2aa Add Colour.from_hsv
HSV is an easier to use colour format, and its inclusion in the colour
module will hopefully encourage its use.
2018-08-22 21:06:09 -04:00
bmintzandRapptz 95721da70e gitignore: ignore egg-info and venvs 2018-08-22 21:06:08 -04:00
bmintzandRapptz 0c446398d1 message: de-duplicate reaction type conversion
Removes some duplicate code in Message.{add,remove}_reaction.
The code in question converts the emoji object from Reaction, Emoji, str, or PartialEmoji
to a string form suitable for sending over the wire.
2018-07-31 13:36:54 -04:00
bmintzandRapptz 87d9eefdef [docs] discord/client: remove reference to async_event 2018-07-19 21:27:30 -04:00
bmintzandRapptz ec3435b224 Remove remaining asyncio.coroutine calls.
Also remove Client.async_event
2018-07-05 03:45:58 -04:00
Ben MintzandRapptz 184c4302c7 docs/mimgrating.rst: CPython 3.5.2 is not supported!
The minimum version supported by aiohttp is CPython 3.5.3, not 3.5.2.
Fixes #1344.
2018-06-21 07:44:02 -04:00