dolfies
3c9dd09aed
Re-add self_bot and user_bot
3 years ago
dolfies
4c2d9bc0d0
Give ext.commands some love
3 years ago
dolfies
9c5e4882ef
Initial de-botting
4 years ago
Willy
fa5a2188bb
Copy docs from Client.close() to Bot.close()
4 years ago
Josh
f3cb197429
[commands][types] Type hint commands-ext
4 years ago
thetimtoy
c4ee9dcafa
[commands] Return removed cog in Bot.remove_cog
The method now returns the removed cog, if it exists.
4 years ago
Rapptz
f56543df15
[commands] Remove function call indirection when checking author
4 years ago
Tari
36cf3c94b4
[commands] Remove Bot.self_bot
4 years ago
Josh
3864fb37a0
Fix various reference issues in documentation
Co-Authored-By: Riley Shaw <[email protected] >
4 years ago
Sebastian Law
4134a17a29
[commands] Raise error when a cog name is already registered
4 years ago
Rapptz
99fc950510
Use f-strings in more places that were missed.
4 years ago
pikaninja
1c553f51fb
[commands] Use has_error_handler instead in command_error
4 years ago
Nadir Chowdhury
89456022cf
Add `__all__` to remaining modules
4 years ago
Rapptz
9d39b135f4
Modernize code to use f-strings
This also removes the encoding on the top, since Python 3 does it by
default. It also changes some methods to use `yield from`.
4 years ago
Rapptz
862d509d2e
[commands] Add support for stripping whitespace after the prefix
This is configured with the strip_after_prefix option in `Bot.__init__`
4 years ago
Nadir Chowdhury
63ec23bac2
Code optimisations and refactoring via Sourcery
4 years ago
Kaylynn Morgan
1cbc537734
[commands] Allow relative paths when handling extensions
4 years ago
Nihaal Sangha
69bdc3a184
Change copyright year to present
4 years ago
Nadir Chowdhury
6b803acde4
[chore] Remove redundant imports
This also removes the historical patch for NullHandler implemented in bbf1c54
, as it has been available since Python 3.1.
4 years ago
Jaime Garcia Jr
1c3b0c02f8
Add revisions to check_once docs
5 years ago
Sebastian Law
b4b953bfc6
Fix various inconsistencies within the documentation ( #5067 )
5 years ago
Rapptz
874c2cd3c9
[commands] Raise CheckFailure if all bot "check once" fail
Fix #2643
5 years ago
Karthikeyan Singaravelan
25b8adc404
Import ABC from collections.abc instead of collections
This is for Python 3.9 compatibility.
5 years ago
Harmon
6f9793fe5e
Fixes and improvements for v1.3 documentation
* Add missing versionadded strings for v1.3
* Add missing versionchanged string for Message.edit
* Consistently use versionadded for attributes
* Consistently use versionchanged for parameters
* Use versionchanged for Bot.is_owner
* Fix references in v1.3 changelog
* Improve grammar in v1.3 changelog
5 years ago
Rapptz
6071607176
Bump copyright year to 2020
Closes #2510
5 years ago
Ben Mintz
1dddb66a1e
[commands] default Bot.owner_ids to a set
This appears to be a typo, as everywhere else, owner_ids is set to a set.
6 years ago
Rapptz
dd12fbf73d
[commands] Properly load the original module when reloading fails.
Fix #2291
6 years ago
Benjamin Mintz
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.
6 years ago
ed588
c6133ef881
[commands] Bot.is_owner should be marked as coroutine
6 years ago
Rapptz
6f71552c50
[commands] Don't update sys.modules with a stale reference.
6 years ago
Rapptz
68342db04d
[commands] Properly raise the correct exception for owner_ids
Also some minor nits with documentation.
6 years ago
Benjamin Mintz
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.
6 years ago
fourjr
3961e7ef6d
Support team members data in application info
6 years ago
NCPlayz
3c9bcc2851
Improve documentation
6 years ago
Rapptz
82b54933e2
Add asyncio.Task subclass for better __repr__ for events.
6 years ago
sirtezza451
dbe946a767
[commands] Update default on_command_error
6 years ago
Rapptz
50dcdac5ca
[commands] Fix references in Bot to actually link.
Exceptions can't seem to link due to a bug in Sphinx.
6 years ago
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.
6 years ago
Rapptz
e567b59fea
[commands] Double underscore some attributes.
6 years ago
Rapptz
c30a366106
Try to consistently use "inherit" vs "derive" in documentation.
6 years ago
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.
6 years ago
Rapptz
26e9b5bfac
[commands] Add Bot.reload_extension for atomic loading.
Also do atomic loading in Bot.load_extension
6 years ago
NCPlayz
fb02191b80
Organise documentation
6 years ago
Rapptz
f26a27dc98
[commands] Make Bot.cogs and Bot.extensions read-only mappings.
This also has the side effect of effectively documenting them for
public use.
6 years ago
Rapptz
3527203e07
[commands] Redesign HelpFormatter into HelpCommand
Part of #1938
6 years ago
Rapptz
3a8214a115
[commands] Remove Bot.get_cog_commands
6 years ago
Rapptz
caf3d17d4a
Rework entire cog system and partially document it and extensions.
6 years ago
Skyweb
e53c85110f
Clarified add_listener documentation
6 years ago
Dante Dam
9656a21ebe
Bumped copyright years to 2019.
6 years ago
bmintz
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")
7 years ago