179 Commits

Author SHA1 Message Date
jack1142
465812b673
Add a command to remove bot's avatar (#3757)
* Add a command to remove bot's avatar

* blah
2020-04-20 19:40:14 +02:00
Draper
f59e77002b
Optimize config calls in few places (#3766)
* Just a tiny PR improving config call in a lot of places (Specially events and Help)

Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>

* missed this one

Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>

* welp

Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>

* welp

Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>

* welp

Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>

* jack

Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>

* Update redbot/cogs/mod/kickban.py

Co-Authored-By: jack1142 <6032823+jack1142@users.noreply.github.com>

* jack

Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-04-20 19:29:36 +02:00
Kowlin
10ad2a559a
[Core] Support setting avatar via attachment (#3747)
* [Core] Support avatars via attachments

* Fix the thing I was actually annoyed about.

* Updated error texts

* English is a damn annoying language.
2020-04-13 02:27:55 +02:00
jack1142
7492636818
Fix ignored channels list in [p]ignore (#3746)
* Fix ignored channels list

* Update settings_caches.py

* Update core_commands.py
2020-04-12 00:09:05 +02:00
Kowlin
da4e4d4ad0
Stop Outdated field from showing in [p]info when up-to-date (#3730)
* Oudated-B-Gone!

* Meh

* mehhh
2020-04-07 10:01:51 +02:00
jack1142
fce8186759
Add [p]set regionalformat command to set regional formatting (#3677)
* Add `[p]set region` command to set regional formatting

* Add Babel to intersphinx

* rename 'region' to 'regional format`
2020-03-28 23:23:02 +01:00
jack1142
d35f6abca0
Use Babel in [p]set locale to allow any valid locale (#3676)
* Use Babel in `[p]set locale` to allow any valid locale

* Remove `[p]listlocales` and link to Crowdin in `[p]set locale`

* import babel.Locale as BabelLocale to avoid confousion
2020-03-28 23:11:25 +01:00
jack1142
7009be8922
white/blacklist commands now properly require at least one user passed (#3652) 2020-03-28 01:38:46 +01:00
TrustyJAID
b9f07e8684
[Mod] Move deletedelay to core (#3638)
* Move deletedelay to core

* line lengths

* address review

* move settings change

* fine...
2020-03-21 18:39:58 +01:00
jack1142
a126da5f23
Prevent PyPI's unavailability from causing command failure (#3663) 2020-03-19 08:19:01 +01:00
Dav
4d81887bcf
[Core] Unify commands that set bot's activity status (#3646)
* alias [p]set game

* Implement suggestions
2020-03-12 22:46:19 +01:00
Stonedestroyer
b52c838018
Fix game command empty argument. (#3630) 2020-02-29 15:35:44 +01:00
jack1142
e8b975a095
[Core] Use new PyPI urls (#3607)
* fix: use new PyPI urls

* Update core_commands.py

* Update core_commands.py
2020-02-28 02:43:21 +01:00
Draper
6c062ab1e2
[Core] Update licenseinfo command to conform with non-American English. (#3460)
* Update the licence command to confirm with non-American English and keep it inline with the `colour`/`color` command

Signed-off-by: Draper <27962761+Drapersniper@users.noreply.github.com>

* What is Black

Signed-off-by: Draper <27962761+Drapersniper@users.noreply.github.com>

* improve error handling

Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
2020-02-22 20:52:01 +01:00
jack1142
901c4f7b80
Update core_commands.py (#3585) 2020-02-20 22:25:36 -05:00
jack1142
54b712fa71
Fix type hints for var-positional parameters in whitelist/blacklist commands (#3577)
* Fix type hints in whitelist/blacklist commands

* fix formatting (yay for black diff in CI again)
2020-02-20 22:23:45 -05:00
zephyrkul
e70fcef651
[Core] Utilize clean prefix (#3579)
* [core] use clean prefix

* forgot an import
2020-02-20 18:58:41 +01:00
jack1142
bb90a50ae4
i18n fixes for #3562 (#3565) 2020-02-17 12:11:42 -05:00
Dav
6c62817de5
[Core] Setting the bot's game/listening/watching displays new text in chat message and is capped at 128 chars. (#3562)
* Le code.

* Say Status instead of Game/Listening/Watching
2020-02-17 11:48:43 -05:00
TrustyJAID
74a3eba08f
[Mod] Move ignored guilds and channels to core (#3472)
* Move ignored guilds and channels to core
Add caching for ignored guilds and channels
Add caching for whitelist and blacklist
Fix #3220
Add consume-rest for whitelist and blacklist commands to add multiple users or roles in one command

* Add ability to ignore channel categories

* black

* moveignorechannels should be owner only and cleanup changes

* add changelog entries

* address Feedback
2020-02-15 01:21:09 -05:00
aikaterna
12e6f44135
[Core] No DMing the bot (#3478)
* [Core] No DMing the bot

* Return early if target user is a bot
2020-02-03 16:26:33 -05:00
jack1142
068585379a docs: deprecation of shared libraries has been postponed to 3.4 (#3449) 2020-01-26 12:16:44 -05:00
Stonedestroyer
41fdcb2ae8 [Core] Embeds toggle for channels. (#3418)
* [Core] Embedset toggle for channels.

* Typo fix

* Add to contact as well

Thanks Jack.

* Add guild only and check.
2020-01-26 12:15:22 -05:00
Michael H
2ac4dde729
update for d.py 1.3 (#3445)
* update for d.py 1.3

* Update redbot/core/commands/commands.py

Co-Authored-By: Danny <Rapptz@users.noreply.github.com>

* a few more places we use owner info

* add the cli flag + handling

* set fix

* Handle MaxConcurrencyReached.

* Bump `aiohttp-json-rpc`

Co-authored-by: Danny <Rapptz@users.noreply.github.com>
Co-authored-by: Kowlin <Kowlin@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-01-25 18:59:08 -05:00
DevilXD
ee53d50c3a Help delete pages delay feature (#3433)
* Added 'deletedelay' feature for help

* Fixes

* More fixes

* Use better message when disabling

* Added changelog entry

* Addressed feedback

* Improved the pages check

* Added additional command check

* Improved command description

* Final feedback improvements
2020-01-22 17:15:51 -05:00
Stonedestroyer
8570971f68 [Core] Make bot name adjustable in bot. (#3429)
* First draft

* Up for discussion

* Revert "Up for discussion"

This reverts commit 2f00b7ded8c0d03a7a06b7b973438cbd87d1f447.
2020-01-22 12:52:06 -05:00
Michael H
cd7f4681a4
Cache prefixes (#3150)
* Cache prefixes

 - This works towards #3148
 - Ends up centralizing some logic
   - Including that prefixes should be a reverse sorted list

* handle global prefix attempts at none

* fix prefix set for server

* cache using guild id
2020-01-17 16:49:25 -05:00
Stonedestroyer
48ccd9070c [Core] Adds server IDs to servers command. (#3393)
* [Core] Adds server ID to servers command.

* Changelog
2020-01-17 06:08:31 -05:00
Michael H
ef8b57a1d2
Add a command to set the bot description (#3340)
* description-command

* Cap the description length

* mmk
2020-01-13 10:12:31 -05:00
Michael H
d9d2e0017e
patchup name error from 3254 (#3267) 2020-01-04 00:39:48 -05:00
jack1142
b6ca8f7d2c [Core] Escape markdown in python executable path in `[p]debuginfo` command. (#3254)
* Update core_commands.py

* Create 3254.misc.rst
2020-01-03 22:44:33 -05:00
jack1142
36e2cde04d Move [p]backup command to cli command - redbot-setup backup (#3235)
* refactor: replace backup command with cli command

* chore(changelog): add towncrier entries
2020-01-02 09:03:32 -05:00
jack1142
ab747d2432 [Utils] Privatize internal utils (#3240)
* refactor(utils): privatize some utils

* chore(changelog): add towncrier entry

* refactor: update internal utils imports
2020-01-02 08:44:55 -05:00
jack1142
aabdabf3bc [Core] Prevent users from locking out themselves or guild owner with localblacklist (#3221)
* Update core_commands.py

* Update core_commands.py

* Create 3207.bugfix.rst

* Update core_commands.py

* Create 3221.bugfix.rst

* Update redbot/core/core_commands.py

Co-Authored-By: Michael H <michael@michaelhall.tech>

* Update bot.py

* Rename 3221.bugfix.rst to 3221.bugfix.1.rst

* Create 3221.bugfix.2.rst

* Update bot.py

Co-authored-by: Michael H <michael@michaelhall.tech>
2019-12-27 17:33:22 -05:00
jack1142
75c4bee8a3 [Core] Tell user that the (local) whitelist/blacklist is empty when using a list command. (#3219)
* Update core_commands.py

* Create 3219.bugfix.rst
2019-12-27 17:07:43 -05:00
Michael H
8b18526f46
[Help] Fix embed size calculation for additional text (#3208)
* Fix size calculation for additional text

* changelog

* ffs

* because of course that's a thing

* *sigh*

* prevent an edge case

* more

* ...

* ...
2019-12-26 16:53:03 -05:00
Michael H
a36e95c286
Remove a large amount of fetch_user calls (#3075)
* Non-audio changes

* address Flame's feedback
2019-12-21 01:15:34 -05:00
jack1142
b457f8d1c1 [Core] Add deprecation warnings about removal of shared libraries. (#3106)
* feat: add deprecation warning when importing shared libs

* enhance(downloader): add shared libs deprecation warns

* enhance: add deprecation warning when (re)loading cogs

* docs(downloader): add deprecation note about shared libs

* chore(changelog): add towncrier entries

* style: split long tuple unpacks in multiple lines

* fix: argument to `humanize_list` has to be a sequence
2019-12-20 02:06:53 -05:00
jack1142
335ded674e [Core] Add Python executable field to [p]debuginfo command (#3184)
* Update core_commands.py

* Create 3184.enhance.rst
2019-12-11 16:40:27 -05:00
Flame442
b4186d6724 Clarifies what [p]backup does (#3172)
* Clarify `[p]backup`

* Create 3172.enhance.rst
2019-12-07 19:24:07 -05:00
PredaaA
77742179c0 [Core] Add [p]listdisabled command (#3118)
* Update core_commands.py

* Create 3115.feature.rst

* Rename 3115.feature.rst to 3118.feature.rst

* Add a message if there's any disabled commands.

* Use the same format as [p]command disable/enable

* Make strings more i18n friendly.

* Flame's requested changes.
2019-11-22 18:54:01 -05:00
Vexed
6aeca83c63 Increased clarity of wording in info command (#3121)
* make branch + preliminary code

* correction

* towncrier

* sinbad's changes
2019-11-14 13:04:00 -05:00
Michael H
6852b7a1d1
License info command (#3090)
* Adds a licenseinfo command

* good enough for now

* changelog

* *sigh* Fine, have it your way Draper

* thanks Flame
2019-11-09 14:06:07 -05:00
Vexed
759ca3ba7e Quotes in helpset tagline for clarity (#3012)
* Add quotes to clarify helpset tagline

Add quotation marks to helpset tagline's response so two consecutive full stops don't appear.

* more commiting

* make travis/black happy

* for review

make no longer repeat tagline
2019-09-29 07:42:44 -04:00
Michael H
e38c08ab12
fix uptime for uptime of less than a second (#3009)
* fix uptime for uptime of less than a second

* changelog

* More conclusive fix
2019-09-28 15:35:26 -04:00
Michael H
25614620db
More privatization, and some error helpers (#2976)
* More privatization, and some error helpers

This makes a lot more things private. Continued from #2967, fixes #2984
Adds public methods for various things.

Below is a brief summary of things available elsewhere, though this
particular set of changes may warrant a detailed section in the release notes.

 - bot.db.locale -> redbot.core.i18n.get_locale
   - Note: This one already existed.
 - bot.db.help -> redbot.core.commands.help.HelpSettings
 - bot db whitelist/blaclist? -> bot.allowed_by_whitelist_blacklist
   - This has also been made a single cannonical function for this
   purpose including check usage
 - bot color? -> bot.get_embed_color/bot.get_embed_colour
 - bot.id.api_tokens? ->

   - bot.get_shared_api_tokens
   - bot.set_shared_api_tokens
   - bot.remove_shared_api_tokens

 -bot.db.prefix -> bot.get_valid_prefixes
   - (Note: This is a wrapper around bot.get_prefix)

 Other changes include
  - removing `bot.counter` as it was never used anywhere
  - Adding properties with helpful error messages for moved and renamed
  things
  - making bot.uptime a property with an error on set
  - adding a migration to the bot config for shared_api_tokens

* Remove overly encompassing message redaction, eval is a risk, dont run in dev if you cant manage it

* address Flame's feedback

* rephrase example

* changelog extras

* You saw nothing
2019-09-26 12:55:05 -04:00
Michael H
ee3be8b633 Extra info (#3008)
* Extra info

* changelog
2019-09-20 16:55:46 +02:00
Flame442
0be3b1acd7 Fixes the strings of [p]set usebotcolor (#2974)
* Fixes the help text of `[p]set usebotcolor`

* Create 2974.bugfix.rst
2019-09-02 09:43:56 -04:00
Michael H
6075c5bde0
Rename bot.db as bot._config (#2967)
* Rename `bot.db` as `bot._config`

  - Continues work towards strong version guarantees
  - Added methods for cog use for a few things which were previously
  only accessible via direct access.
  - Retained private use in a few internal use locations, though most
  methods were updated away from this.
  - Updated documentation for shared api token users

* changelog

* more detail

* docstring fixes

* Apparently, I forgot to commit something I had locally

  - + a copy/paste failue in the changelog

* *sigh*:

* *sigh*
2019-09-01 15:42:28 -04:00
Flame442
efcf91e934 Catch discord.errors.Forbidden when DMing a user the invite message (#2948)
* Catch discord.errors.Forbidden when DMing a user the invite message

Uses the same error message as `[p]help`

* Create 2948.bugfix.rst

* You saw nothing
2019-08-29 21:19:19 -04:00