1851 Commits

Author SHA1 Message Date
palmtree5
6acdcdeae9
Move modlogset/bankset commands to core (#4486)
* Move bankset and modlogset to core commands

* Move prune over too

* Finish moving prune

* Move [p]economyset registeramount to [p]bankset registeramount

* style fix

* Fix circular import issue with another breaking change

* Apparently I missed a conflict and git still let me commit...

* Really git?

* Rename RawUserIds -> RawUserIdConverter, improve documentation

* Improve documentation of `is_owner_if_bank_global()`

* MENTION_REGEX -> USER_MENTION_REGEX

* Add 'bank.' prefix

* Fix command examples in docstrings

* Missing docstring change from `bankset prune`

* Missing changes for commands in modlogset

* Update docs

* Remove duplicated info in `economyset showsettings`

* Fix toctree in index.rst

* Add command group prefixes to names of functions for bankset/modlogset

* Remaining string updates due to command name changes

* Ensure that the bank folder is actually gone

Co-authored-by: palmtree5 <palmtree5+3577255@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-11-25 10:06:30 +01:00
jack1142
fc560db72d
Stop fetching the messages when getting the cases in Modlog (#4977)
* Use PartialMessage when Case is fetched from Config

* Update docstring
2021-11-05 12:18:23 +01:00
Kowlin
6c4e5af5ee
Check to avoid an IndexError (#5429) 2021-11-02 11:53:42 -07:00
jack1142
3f4842603b
Remove currently deprecated functionality (#5433) 2021-11-02 13:04:45 +01:00
Predeactor
483ef36d1b
Modernize syntax in chat formatting module and add success() (#5427)
* Downloader's plurial & Fix

* Don't forget pipinstall

* Fix syntax issue

* This f****** fix that took me too much of my time for nothing.

* Black

* Update redbot/cogs/downloader/downloader.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* Update redbot/cogs/downloader/downloader.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* Update redbot/cogs/downloader/downloader.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* Update redbot/cogs/downloader/downloader.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* Update redbot/cogs/downloader/downloader.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* Update redbot/cogs/downloader/downloader.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* Update redbot/cogs/downloader/downloader.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* Update redbot/cogs/downloader/downloader.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* Update redbot/cogs/downloader/downloader.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* Fix Jack's syntax, remove numbers & fix bad calculated cogs

* Black ofc

* Update redbot/cogs/downloader/downloader.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* Update redbot/cogs/downloader/downloader.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* Update redbot/cogs/downloader/downloader.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* Update redbot/cogs/downloader/downloader.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* Update redbot/cogs/downloader/downloader.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* Update redbot/cogs/downloader/downloader.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* Update redbot/cogs/downloader/downloader.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* Update redbot/cogs/downloader/downloader.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* Update redbot/cogs/downloader/downloader.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* Address my review comment

* Simplify

* this is kinda a lot but shh

* Change format to f-string

* Add success function to char_formatting

* Revert "Merge branch 'V3/develop' of github.com:Predeactor/Red-DiscordBot into master/chat-formatting-enhancement"

This reverts commit c338da7b66a79eaff975f4dbaa8269263a388e37, reversing
changes made to f2422ad782258990a56438db8abad61180cea681.

* For once I would have appreciated if style checks were failing...

Co-authored-by: Predeactor <ubuntu@vps-35e65bf5.vps.ovh.net>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-10-27 14:34:20 +02:00
jack1142
7abc9bdcf1
Pre-fetch app owners and fail early on no owners (#4926)
* Pre-fetch app owners and fail early on no owners

* Improve command mention in error message

* Further change the order of startup actions
2021-10-20 12:13:07 +02:00
jack1142
6db5c866af
Rename RedBase to Red, remove the old Red (#5159)
* Rename RedBase to Red, remove the old Red

* Update docs references

* add noindex directives
2021-10-20 12:12:55 +02:00
Kreus Amredes
b64ece3ee9
[Admin] Add [p]selfroleset clear command (#5387) 2021-10-17 18:51:04 +02:00
Flame442
d56f31a708
[Mutes] Fix vars not getting formatted due to previous PR (#5404)
* Fix vars not getting formatted due to #5364

* Only format a second time if needed

* Format only on string literals
2021-10-17 02:56:26 +02:00
Kowlin
67bcd72d9c
Update the timestamping we forgot to Discord compatible timestamping (#5395) 2021-10-16 21:38:52 +02:00
Dav
1d34e9e47b
[Downloader] Show repo name in findcog (#5383)
* show repo name in findcog

* how did i manage to overcomplicate this?

* for Kreusada

* I wanted to do that... but forgot
2021-10-16 02:10:57 +02:00
WreckRox
9aee8ce28f
Fix descriptions for examples of ID-based command invocations in Mod (#5372)
* Fix wording in redbot/cogs/mod/kickban.py to match with the command example

* Made changes as requested in PR Review #770078179

* Added changes to docs/cog_guides/mod.rst as requested in PR Review #70784066

* Fixed kick wording

* Fix kick wording
2021-10-16 01:29:15 +02:00
krak3n
17dc9e0c47
[Mod] Indicate successful run in [p]voicekick (#5367) 2021-10-16 00:50:58 +02:00
MAX
b8535ee53e
Add a tick on traceback command when it's sent to DMs (#5353)
* add a `tick` when sent to dm.

* confused ™️

* did i learn now? :P

* i'm not confused anymore :3
2021-10-16 00:47:13 +02:00
jack1142
4b70acb989
Do not include expected wait_for responses in translated strings (#5364)
* Do not include 'I agree' prompt in translation string

* Add more stuff

* Address review comment

* Address review comments
2021-10-16 00:02:35 +02:00
jack1142
334cd4fa2a
Add optional message to send when bot can't react in ctx.tick() and ctx.react_quietly() (#4092)
* Update context.py

* Pre-emptive check to avoid hitting the API
2021-10-15 18:44:12 +02:00
Kreus Amredes
a8f35f762c
Improve helpset showaliases docstring (#5376) 2021-10-07 12:22:35 -07:00
aikaterna
6eb922e7d9
[Audio] Remove extra whitespace (#5366) 2021-10-03 21:10:32 +02:00
Fixator10
b4037a80d8
fix possible issue when joined_at is None (#5361) 2021-10-02 11:08:17 -04:00
El Laggron
cb18a66336
Initialize driver before starting the backup (#5315) 2021-09-23 22:38:50 +02:00
Leet
2ce8e65527
Only initialize and teardown driver if actually needed (#5313)
* Fix #5312

* Update setup.py

* put db actions under one if statement

* check backend type and improve displayed message

* accept format fix

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* fix whitespace

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* separate datapath delete from data delete

* Fix indentation

* Call `driver_cls.initialize()` outside try-finally

* Backup requires db server to run too + some simplifications

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-23 17:34:38 +02:00
MAX
d69326b1fe
Use discord native timestamp in [p]uptime (#5323)
* support for discord's timestamp on uptime

* woops not supposed to remove `_`.

* ups

* ups x2

* Apply suggested change.

* hehe
2021-09-23 16:22:16 +02:00
aikaterna
b2e9b38a03
[Audio] Update Lavalink.jar build (#5329) 2021-09-23 02:32:11 +02:00
Kowlin
89e3a78ead
Fix Case's modified_at attr and its format in message content (#5317)
* Fix modified_at field to properly format.

* let's just fix the type hints

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-14 02:42:20 +02:00
PhenoM4n4n
e5b236fb1c
Add CommandConverter and CogConverter + add usage in Core (#5037)
* add commands, cog converter

* properly use type_checking

* make core commands use command converter

* update commands to use cogconverter

* fix undefined variable name, style

* Update redbot/core/commands/converter.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* Update redbot/core/commands/converter.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* Update redbot/core/core_commands.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* Update redbot/core/core_commands.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* Update redbot/core/core_commands.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* Update redbot/core/core_commands.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* Update redbot/core/core_commands.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* update cog argument names

* update documentation arg names

* update more docs

* This new Sphinx is annoying about this...

* I'm questioning my skills

* Fix name error in `[p]embedset showsettings` when command is not given

* Do not use the new cog converter in `[p]command enablecog`

This is needed so that a cog that isn't loaded but was disabled
can be enabled back.

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-07 23:43:29 +02:00
Kreus Amredes
63fd7cc95f
[Docs] Update Cleanup docs with new cleanupset command group (#5245)
* Add cleanupset commands to cleanup docs

* fix spacing

* shown -> sent

* update command docstring

* Fix trailing whitespace and use same style for docs

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-07 21:12:46 +00:00
palmtree5
3254698c78
Update deps, allow Python 3.9, drop Fedora 32 (#5121)
* Update deps + allow Python 3.9

* Add in updates from Jack's branch

* Fix multiple target for cross-reference warnings

* Update a few more Python 3.8 occurrences

* Bump further

* Don't install tox in CodeQL environment

* Bump Python version in docs to 3.9.7

* more bumps

* Add missing pin

* Stop using the deprecated distro.linux_distribution()

* Suppress deprecation warning

* Fix OpenSUSE Leap instructions

* Drop Fedora 32

* Add Python 3.10-dev to CI

* meh

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-06 18:43:29 +02:00
Just-Jojo
0dded8aa47
[Core] Add more APIs for allowlists and blocklists (#5206)
* [Core] Blacklist api

* [Core] Use to_add, remove star from other method calls

* various touch ups

* style

* fix doc style

* [Core] Remove iterable import

* [Core] Update commands to use the blacklist/whitelist api

* Change signatures to not use `*args`

* Update all usage of private cache to the new public APIs

* Update the docstrings

* Update the usage in diagnoser

Co-authored-by: Kreusada <67752638+Kreusada@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-06 18:38:07 +02:00
Zoë F
ed9bb77eec
Add RelativedeltaConverter and parse_relativedelta (#5000)
* Added years and months to parse_timedelta

* Added new parse_datetimedelta along with classes for relative dates

* Switched datetime as dt to just datetime for clarity

* Changed to returning relativedelta instead of datetime

* Fixed single char typo

* After some digging, removed min and max from relative delta b/c of https://github.com/dateutil/dateutil/issues/350

* Add dateutil to intersphinx mapping

* Change uppercase D in RelativeDeltaConverter to a lowercase D

* Fix cross-references in docstrings

* Add new class and methods to __all__

* Remove get_relativedelta_converter()

* style

* Fix name of parse_relativedelta test

* more style

* Re-export new class and function in `redbot.core.commands`

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-06 02:50:21 +02:00
jack1142
86649e897f
Add [p]diagnoseissues command (#5243)
* Split `Requires._transition_state` into reusable methods for Diagnoser

* (style) Fix line length

* Add missing .format()

* Add handling for user permissions, privilege level, Permissions rules

* Add missing awaits, use correct method in user perms check, add 'the'

* Fix .format() fields

* Add comment

* Add new file to labeler's configuration

* Add the command to the documentation

* All the work from DiagnoserCog

You can find the commit history of it here:
https://github.com/jack1142/DiagnoserCog

* Fix circular import

* Make channel argument optional

* Add a tip about channels from different servers
2021-09-05 19:01:46 +02:00
jack1142
a0a433b13d
Improve and add more usage of discord timestamps (#5241)
* Improve and add more usage of discord timestamps

* How did that whitespace get there?
2021-09-04 09:14:05 +02:00
PredaaA
4366af6f6c
[Cleanup] Handle NotFound error of prompt in check_100_plus (#5191)
* [Cleanup] Handle HTTPException of prompt in check_100_plus

* Update redbot/cogs/cleanup/cleanup.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-04 00:38:03 +02:00
PredaaA
42edb12b2e
[Trivia] Handle potential Discord errors in session (#5172)
* [Trivia] Handle potential Discord errors in session.

* Hm why did I put HTTPException in there

* Revert "Hm why did I put HTTPException in there"

This reverts commit dc5cb990cb9632c52f322076c69a0c1568c9eab0.

* Revert "[Trivia] Handle potential Discord errors in session."

This reverts commit d90e45f9e0188cfeaef914a78eda5f397730a47a.

* Handle Discord errors in _error_handler.
2021-09-04 00:36:48 +02:00
Lui
36ea867dcf
[Streams] Check non-existent streams more than once (#5223)
* [Streams] Check non-existent streams more than once

- For YouTube streams, it seems like the RSS feed may sometimes return
  an HTTP 404 for a channel, even though the channel exists.
- If this happens more than a few times, then we should declare the
  stream as non-existent, and purge it from the list of streams we
  check.

* [Streams] Move retry_count reset for YouTubeStream

- Reset after the RSS check, since that is the only place where we raise
  StreamNotFound in that function.

* [Streams] Increase retry to 20

* [Streams] Reduce retry count to 10
2021-09-03 16:25:01 +02:00
Samuel
cad7f400f9
Add commands for editing aliases (#5108)
* [Alias] Added alias edit and alias global edit

* Comment and whitespace only changes

* Docstring fix

* Remove more whitespace

* Add `the` before some English purists make a PR for this...

Co-authored-by: npc203 <npc203@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-03 01:50:08 +00:00
jack1142
6d40de8da3
Invalidate cache in filter clear commands 2021-09-03 03:37:25 +02:00
Enul
8880251749
[Mod] Add user hierarchy check to [p]rename (#5211)
* added hierarchy check for rename

added hierarchy check for rename from utils

* format and self check

changed formats and added statement if me != member

* black format

apply black formatting and fix typo

* tox style 

tox i guess

* tox again 

:<

* Update redbot/cogs/mod/names.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* Fix styling

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-03 01:08:46 +00:00
aikaterna
17d24b28f1
[Audio] Update Lavalink.jar build (#5233) 2021-09-03 02:30:04 +02:00
Jamie
c4f8f65d4d
Add toggleable notification of deleted messages count in Cleanup (#5218)
* Addition of cleanup notification.

* black

* subtract invoking message from count

* Update redbot/cogs/cleanup/cleanup.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* be explicity about kwarg

* address review

* style

* Fix type hints

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-03 01:12:28 +02:00
Kreus Amredes
4e2e4bfe6a
[Mod] Send ban reason on Temp Bans (#4837)
* [Mod] Send ban reason on Temp Bans

* If none

* Locale friendly

* Fixes for black style

* Use double line break to distinguish between reason header

* Check settings

* Black

* Reduce the number of config calls

* remove additional config call

* fixes

* style

* We're already in `if reason` so this is always True

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-02 19:07:07 +02:00
Kreus Amredes
f628093208
[Filter] Add filter clear commands (#4981)
* [Filter] Add filter clear commands

* define messagepredicate

* actually send msg, lol

* deco fixes

* black

* [Docs] Update filter documentation

* fixes

* style

* Add missing whitespace

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-02 17:55:58 +02:00
jack1142
f6cf0d5670
Allow dots in the middle of repo names (#5214)
* Allow dots in the middle of repo names

* Screw you, Black
2021-09-02 01:45:25 +02:00
PredaaA
8eac787f7b
[Streams] Improve config calls in stream alerts (#4968)
* [Streams] Improve config calls in stream alerts.

* config->guild_data, style changes

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-02 01:40:15 +02:00
jack1142
88abe469b6
Accept mentions in [p]cleanup user (#5169)
* Accept mentions in `[p]cleanup user`

* Updated spacing & formatting on info logging

* Whoops...

Co-authored-by: Kowlin <boxedpp@gmail.com>
2021-09-02 01:08:13 +02:00
Kreus Amredes
b0f93a3ce1
[Admin] Allow selfroleset command to consume multiple roles (#5238)
* Initial commit

* update docs

* remove usage kwargs

* style

* Type hint with SelfRole and not discord.Role

* fix docstring

* Various improvements, fixes

* i need to wake up

* more improvements

* AAAA

* add back check

* Improve converter error

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-01 22:37:45 +00:00
Vexed
f8664a4e8a
[Help] Let owners set menu reaction timeout (#5205)
* initial help reaction timeout with min 15, max 300

* slight wording change

* docs!

* aaa

* Suggestions from code review, thank Jack!

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-01 18:35:11 +02:00
Kreus Amredes
dbd25e92a1
Document parameters in remaining chat_formatting functions (#5215) 2021-09-01 02:51:59 +02:00
GhOsT
c57ef4828e
[Core] add ctx.tick() to [p]invite (#5199) 2021-08-31 23:27:11 +02:00
Kreus Amredes
6bf85a42f8
[Downloader] Fix various formatting issues in cog update notices (#5185)
* again :P

* some more

* fix
2021-08-31 23:20:29 +02:00
Kreus Amredes
d15011e2c5
[Downloader] Suppress NotFound errors in [p]cog update command (#5109)
* [Downloader] Suppress NotFound errors when cog update message is deleted

* occurance 2
2021-08-31 23:19:15 +02:00