895 Commits

Author SHA1 Message Date
Flame442
8555f8c28c [Downloader] Pretties up the output when libraries fail to install (#2576)
* Pretties up the output when libraries fail to install

* Stupid double quote bullshit

* Added jack1142's suggestion

* I will never satisfy the eldritch being named black
2019-04-22 20:15:26 -04:00
jack1142
46413c2c52 [V3 Downloader] Stop including subpackages in cog list (#2590)
Before this change, `Repo.available_modules` would also contain subpackages, which is unintended
2019-04-22 20:07:52 -04:00
TrustyJAID
eaeaf9dd69 [V3 Streams] Change twitch and youtube top level commands (#2479) 2019-04-22 20:06:50 -04:00
zephyrkul
ee11d7da63 [V3 Audio] Cancel emptydisconnect when no longer alone (#2519)
* [audio] cancel disconnect when no longer alone

* [audio] fix modifying while iterating
2019-04-22 20:05:37 -04:00
NIXC
0ac93aacd5 [V3 Economy] Add default cooldown to slots (#2561)
* Add default cooldown to slots

To prevent abuse

* slight boost in time

1 second actually doesn't help, needs a bit more.
2019-04-22 19:44:05 -04:00
TrustyJAID
691d8af26d [V3 Warnings] Utilize modlog cases (#2471)
* [V3 Warnings] Utilize modlog cases

This update utilizes modlog cases for warnings and slightly improves usage of custom warnings if enabled.

* remove BadArgument error response

* Utilize Optional and consume-rest for points and reason

* black format

* Remove unnecessary imports, cleanup error handling, and improve docstrings
2019-04-22 19:34:36 -04:00
TrustyJAID
87c66b2423 [V3 Admin] Fix errors when hierarchy issues are raised (#2498)
* Fix addrole mentioning who we're trying to add the role to

* More things are broken, huh

* formatting...
2019-04-22 19:25:44 -04:00
aikaterna
005123a371 [Audio] Fix for playlist queue when not playing (#2586) 2019-04-22 19:17:44 -04:00
aikaterna
bb8ce43cc0 [Audio] Track search and append fixes (#2591)
* [Audio] Track search and append fixes

* Appeasing the style gods
2019-04-22 19:17:17 -04:00
palmtree5
13611e34d2
Fix extras in launcher (#2588)
Now non-existent voice extra was still hanging around in the launcher while the style extra was never added in
2019-04-22 14:46:07 -08:00
Neuro Assassin
b8190c44a8 [Dev] Sanitize API tokens in debug and eval (#2585)
* Sanitize API tokens in debug and eval

* Not sure what happened there
2019-04-22 18:43:02 -04:00
Will
95d5ec5f0e
[Setup] Fix the mongo name to create instances using new driver (#2594)
* oops

* damn you
2019-04-22 18:33:52 -04:00
zephyrkul
874204bf18 [mongo setup] utilize getpass (#2593) 2019-04-21 07:04:08 -08:00
Will
6c296a9a17 [V3 Setup] Overhaul backend conversion process through setup scripts (#2579)
* swap to click for setup

* Initial changes

* expose some stuff to allow for per-driver optimizations

* overwrite base config

* add red log

* add one print juuuust in case

* fix this

* thanks kowlin

* damn

* oops

* fix thing

* partial commit

* Working mongo -> json conversion, it sucks tho

* remove unused line

* Wrote initial optimized json importer

* optimized json importer

* remove useless line

* update mongo to json converter

* lets try writing the correct entry

* oops

* style fix

* add some garbage data filters going from old mongo to json

* ignore garbage data in mongov2 conversions

* simplify code a bit and add a completion message

* missed one

* Update pipfile lock

* Lock click version
2019-04-20 20:10:44 -04:00
PredaaA
ad06b0e723 [Audio] Fix issue on audiostats command when more than 20 servers to display (#2533)
* Update audio.py

* Fix of pages counter.
2019-04-18 12:12:16 -04:00
Will
0652dd344b
[V3 Mongo] Correct dictionary rebuilding process for global all case (#2581) 2019-04-13 15:51:49 -04:00
Will
8b3c3e89e9
[V3 Mongo] Fix all behavior (#2580) 2019-04-13 15:24:50 -04:00
Will
c82ac5ae68
Add some errors for backend conversions and only allow MongoV2 creation (#2570)
* Add some errors for conversions and only allow mongoV2 creation

* Add another message

* Fixed message to be more clear
2019-04-10 20:42:28 -04:00
jack1142
2776db0cf9 [V3 Core] Print actual version, when version flag is used (#2567) 2019-04-10 19:32:20 -04:00
Will
ba19179e4f
[V3 Config] Record custom group information using cog_add event (#2550)
* Do things differently

* Uncomment critical lines

* Reduce, reuse, recycle

* Check groups on all new config objects after a cog loads

* I don't know why this is failing now or why we need the global keyword

* gotta fix this too
2019-04-09 22:02:50 -04:00
jack1142
e347ffa336 Bot can join voice channel with user limit if it has move members perm (#2525) 2019-04-09 20:33:19 -04:00
kennnyshiwa
c85af62401 Fix message when user hits max credits (#2563)
* Fix message when user hits max credits

Fixes the error message when a users issues the payday command when having max credits

* Update economy.py

Changed message when user hits max payday and bank is global to match message when bank is per server

* Update economy.py

made statements match
2019-04-09 18:54:44 -04:00
aikaterna
39b64b7570 [Audio] Fix for localtrack playing (#2557) 2019-04-09 17:13:57 -04:00
aikaterna
56b220b92e [Audio] Fix for prev command display (#2556) 2019-04-09 17:10:25 -04:00
jack1142
972fbecc94 [V3 Trivia] Make sure that test will use utf-8 encoding (#2565) 2019-04-09 17:03:34 -04:00
Michael H
136e781c7f Kill DataConverter (#2554)
* Kill DataConverter

* remove the tests
2019-04-09 17:01:04 -04:00
Will
0852d1be9f
[V3 Config] Require custom group initialization before usage (#2545)
* Require custom group initialization before usage and write that data to disk

* Style

* add tests

* remove custom info update method from drivers

* clean up remnant

* Turn config objects into a singleton to deal with custom group identifiers

* Fix dumbassery

* Stupid stupid stupid
2019-04-04 21:47:08 -04:00
Will
fb722c79be
[V3 ModLog] Change register_casetypes behavior (#2551)
* Ignore runtime error in register_casetypes

* Fix documentation
2019-04-04 18:59:14 -04:00
jack1142
c63d069f69 [Trivia] Fix of dead image link (world flags) (#2540)
* New image link for Sao Tome and Principe

Current link is dead

* Someone didn't pay attention on geography lessons
2019-04-03 11:40:20 -04:00
Will
1cd7e41f33
[V3 Config] Update Mongo document organization to bypass doc size restriction (#2536)
* modify config to use identifier data class and update json driver

* move identifier data attributes into read only properties

* Update mongo get and set methods

* Update get/set to use UUID separately, make clear work

* Remove not implemented and fix get_raw

* Update remaining untouched get/set/clear

* Fix get_raw

* Finally fix get_raw and set_raw

* style

* This is better

* Sorry guys

* Update get behavior to handle "all" calls as expected

* style again

* Why do you do this to me

* style once more

* Update mongo schema
2019-04-03 09:04:47 -04:00
zephyrkul
d6d6d14977 [V3 Alias] Customize Parameters (#2455)
* [alias] custom parameters

Signed-off-by: zephyrkul <zephyrkul@users.noreply.github.com>

* [alias] quoted words remain quoted

Signed-off-by: zephyrkul <zephyrkul@users.noreply.github.com>

* [alias] fix no-parameter aliases

Signed-off-by: zephyrkul <zephyrkul@users.noreply.github.com>

* [alias] remove unneeded error dispatch

it was expensive and did nothing anyway from my own testing
2019-04-02 23:08:28 -04:00
PredaaA
82cda4b57a Delete cooldown messages when expired (#2469) 2019-04-02 23:06:30 -04:00
Toby Harradine
301c800319 Logging enhancements and cleanup (#2502)
* Logging enhancements and cleanup

- Removed debug log messages every time `Config.get_conf` is used or a JSON file is read/saved. The basic configuration is now logged once with DEBUG when the bot starts up instead.
- Changed logging output format to reverse date order, include seconds, and use the logger's name instead of the module, function and line number.
- Log files are now kept in the `DATAPATH/core/logs` directory. Each time Red is restarted, a new log is created, and the old ones renamed in a rotating fashion. There can be a maximum of 9 logs in total.
- Each log file now has a smaller max size of 500KB before it will be split into multiple parts. There are also a maximum of 9 parts of each log.
- Discord.py logger now uses the same output formatter as red's loggers
- Moved logging setup code into `redbot.logging` module.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>

* Reformat

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>

* Implement discussed changes

- We maintain a red.log over multiple runtimes, alongside a latest.log and previous.log for individual runtimes.
- Naming convention changed a bit. E.g. when latest.log is just one part, it will be named latest.log. When it becomes two parts, they will both be named latest-part1.log and latest-part2.log.
- Rotation direction is reversed. This means as the files end up being named in chronological order.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2019-04-02 22:58:34 -04:00
DiscordLiz
30af83aa6a [Permissions] Allow for multiple IDs in permissions rule commands. (#2448)
Use `commands.Greedy` to apply multiple rules at once.

closes #2214
2019-04-02 22:53:07 -04:00
jack1142
0f9501f93a Tunnel - Send message after close (#2507) 2019-04-02 22:50:01 -04:00
Michael H
466b2b82d0 Fix localwhitelist/localblacklist add/remove (#2531) 2019-04-02 22:46:12 -04:00
Michael H
8ab39512d9 [Filter] Performance increases. (#2509)
* [Filter] Performance increases.

The filter was already using re to split words, this just does the entire search in re instead.

A further improvement to this would cache patterns used and update them if the wordlist changes.

* Add a pattern cache

* exit on no-words

* formatting pass

* keep the return type consistent, even though this doesnt break core since this is available to cogs

* ...

* Quit being an idiot

* Slight further improvements, a fix, and restructure

Moved actual set creation out of the inner portion.
Reduced config lookups in case of no filter.
Fixed channel wordlist fetching.

* I really should go back to using a pre-commit hook for the style stuff
2019-04-02 22:42:13 -04:00
jack1142
e08e95c04e [V3 Downloader] Tell user how to load the cog after [p]cog install (#2523)
* tell user how to load the cog after install

* use code block
2019-04-02 22:35:21 -04:00
FixedThink
e7b1fa5ab5 [V3 Trivia] Update "World" trivias to reflect legislative changes (#2526)
* Update worldmap.yaml

* Update worldflags.yaml

* Update worldcapitals.yaml
2019-04-02 22:33:40 -04:00
Flame442
14a2f98418 [Docs] Adds self recommendation to cog_data_path (#2539)
This change adds the help text of "If calling from a command or method of your cog, this should be self." from `bundled_data_path` to `cog_data_path`. This bit of text can help people who are unsure of what a "cog instance" is to understand how to use `cog_data_path`.
2019-04-02 22:24:20 -04:00
aikaterna
de7d08ee75 [Audio] Match v2 behavior for channel change (#2521)
* [Audio] Match v2 behavior for channel change

* Use move_to instead of connect
2019-04-02 22:22:57 -04:00
aikaterna
2a486cad66 [V3 Audio] Playlist info improvements (#2274)
* [V3 Audio] Playlist info improvements

* Add pagify import, reformat for Black

* Change from code block to embed with links
2019-04-02 21:48:21 -04:00
aikaterna
80fc639480 [V3 Audio] Queue clean and queue clear addition (#2476)
* [V3 Audio] Queue clean and queue clear addition

* Use DJ role and existing checks inst. of mod/admin

* Remove unneeded .format()
2019-04-02 21:12:55 -04:00
Michael H
c7608aeb17 [V3 Mod] Use a composite class for mod (#2501)
* [V3 Mod] Use a composite class for mod

This turns mod.py into acomposite class

I've split things in this up based on purpose, including `movetocore`

`movetocore` is a set of things which likely belong in the core bot and
not relying on mod being loaded.

This is part of #2500

Per discussion in discord, this should be the first thing in #2500
merged

* Move this back,
mod was importable,
and this was intended as non-breaking

* Prevent fix from being lost if merged before this.

see Cog-Creators/Red-DiscordBot#2510

* Move case creation to before sending

see #2515

* fix failed merge done in web
2019-04-01 03:34:27 -08:00
aikaterna
050300040c [V3 Audio] Add Spotify support (#2328)
* [V3 Audio] Add Spotify support

* [V3 Audio] Update LICENSE

* Appeasing the style gods

* Extra word removal on LICENSE

* Update for #2389

Thanks to TrustyJAID for the help.

* Playlist command support for Spotify URLs or codes

* Add exception for dc while loading Spotify tracks

* Allow Spotify urls by default in audioset restrict

Matches the behavior of Spotify codes already being allowed by default.

* Update audio.py

* .format() moving

* Added a character to try to make Travis behave
2019-03-28 13:41:17 -04:00
aikaterna
94c3a2fedd [Audio] Seek command can now seek to position (#2470)
- Seek can now seek to a specific position, formatted like 00:00:00 or 00:00. Using negative or positive ints still functions the same as previously and will seek ahead or behind by that value instead.
- This PR requires the `_time_convert` func added in #2465 and should be merged after that one.
2019-03-10 18:27:23 +11:00
aikaterna
421043d923 [Audio] Fix for audioset status (#2481)
Revert player.is_playing check added to the playing players list for audioset status in #2473. This addition would cause no status to be shown when a local track was played and skip was used.
2019-03-08 09:09:22 +11:00
aikaterna
1c22b212c2 [Audio] Add songs when search-queuing (#2513)
Searching for a song and pressing the reaction to queue a song would not add the song to the queue if `[p]audioset maxlength` was off. This was an omission from #2465.
2019-03-07 14:12:15 +11:00
Flame442
d52b3eaf21 Proper capitalization of [p]blacklist help text (#2511) 2019-03-07 08:57:06 +11:00
Flame442
30ca226e39 [Trivia] Fix typo in warcraft trivia (#2508)
teh -> the
2019-03-06 20:04:11 +11:00