2923 Commits

Author SHA1 Message Date
palmtree5
5c9b1c9a3d Move [p]userinfo to Mod + refactor [p]names (#1719) 2018-05-28 03:23:24 +02:00
Tobotimus
5ebee60c97 Rejoice for a 3.5-less Travis (#1713) 2018-05-28 03:18:23 +02:00
Tobotimus
3337a9cbab [V3 Launcher] Fix error when removing Mongo instance (#1710)
* [V3 Launcher] Fix error when removing Mongo instance

Fixes #1573

* Fix issue causing style check to fail

* Remove unneeded whitespace
2018-05-27 16:08:25 -08:00
Michael H
54975eb812 [V3] Permissions (#1548)
* This starts setting up checks.py to handle managed permission overrides

* A decent starting point, more work to come

* missing else fix

* more work on this

* reduce redundant code

* More work on this...

* more progress

* add a debug flag to some things in .resolvers to help with exploring why checks behave in a certain way

* modify this to be a list for ease of showing full resolution order

* more

* don't bypass is_owner, ever

* remove old logic about ownercommands

* better handling of chec validity

* anonymous functions return None for __module__, remove some code as a result

* mutable default bind fix

* Add a caching layer (to be invalidated as needed)

Ensure checks in the chain inserted before the core logic only return None or False
(whitelists then blacklists are checked first in core logic, from most to least specific scope, overriding this with an allow does not make sense)

* more progress, slow work as I have time

* Modifies the predicates so that their inner functions are accesible from cogs without
being a check

* Update checks.py

Safety for existing permissions.py cogs

* This is where I take a change of course on setting this up,
because this would have been the most long winded interactive command ever as
it was starting to progress.

This is going to support individual entry updates, settings from yaml, gettings, and clearing existing settings
as well as printing a settings template out and referring people to what is going to be very well written docs

* block permissions cog from being unblocked by the permissions cog as a safety feature (really, co-owner exists at this point)

* WIP

* Okay, this has the intent of the changes, just to actually test these as working as intended + add corresponding guild functions

* oh nice, missed a couple files, sec...

* WIP, also, something's broken in resolvers or check_overrides >>

* This is working now (still needs docs and more...)

* unmerge changes from other PR

* is_owner still needs to exist in here due to management of non checked commands

* Update this to new style standards

* forgot to commit some local changes earlier

* fix update logic

* fix update logic

* b14 fix, lol

* fix issue with management command name

* this isnt a real fix

* Ok..

* perms

* This is working, but needs docs and more configuration opts now

* more

* Ux functions, need testing

* style

* fix using the obj str rather than the id

* fix CogOrCommand converter

* Return the correct things in the converter

* last fix, needs docs, and possibly some extra Ux utils

* start doc writing

* extra user facing commands

* yaml docs

* yaml fix

* secondary checks-fix

* 3rd party check stuff

* remove warning that this isn't ready yet

* swap ctx.tick for real responses, require emoji perms for interactive menuing, better attr handling for nicknames

* send file to author

* alias to `p`

* more ctx tick removal

(This is a long ass changelog...)
2018-05-28 00:17:17 +02:00
rngesus-wept
537531803a [V3 Admin] Correct spelling of 'hierarchy' (#1714) 2018-05-27 12:25:26 -08:00
Tobotimus
f4b640126b [V3 Warnings] Fix warn command when no valid reason is passed (#1672)
Resolves #1670
2018-05-27 12:15:56 -08:00
El Laggron
1de3251127 [V3 Docs] Reference 3.6 docs (#1715) 2018-05-27 12:05:35 -08:00
palmtree5
7e98076e4a [V3 Docs] expand info.json docs (#1699) 2018-05-25 12:38:32 +02:00
palmtree5
c58c55b752
[V3 Docs] Move the install docs to install Python 3.6 (#1685)
* [V3 Docs] drop ffmpeg from CentOS install guide

* [V3 Install Docs] move all to Python 3.6

* Update the toctree

* Needed a blank line

* drop a .6 that wasn't needed
2018-05-24 11:09:08 -08:00
Michael H
928be5717f [V3 Checks] Respect administrator and guildowner permissions (#1711)
* respect admin and guildowner (implicitly) in checks for permissions

* this needed it too
2018-05-25 01:17:21 +10:00
Redjumpman
ccbaa926ce [V3 Economy] fix erroneous message when transferring with insufficient funds (#1698)
Fixed an erroneous message when transferring credits while having insufficient funds.
2018-05-23 11:45:23 -08:00
Tobotimus
d1208d7d19
[V3] Update CONTRIBUTING.md with details on new dev workflow (#1659)
* Update CONTRIBUTING.md with details on new dev workflow

* Fix typos

* Update link in README.rst

* tiny grammar fix

* Specify the line length

* Update CONTRIBUTING.md

* Fix links in contents

* Add section for keeping dependencies up-to-date

* Include notes about Makefile
2018-05-23 15:26:54 +10:00
Tobotimus
099fe59a97 [V3 Core] Add [p]helpset (#1694)
* Add settings and commands for page and character limits

* Add missing returns

* Consistent responses
2018-05-22 21:04:53 -08:00
Will
889acaec82
[V3 Downloader] Fix #1671 (#1692) 2018-05-22 20:54:00 -04:00
palmtree5
c42e9d4c5c Add a makefile for helping with style checking and reformatting (#1665)
* Add a makefile

* Add make.bat

* Slightly modify Palm's makefile

* Use make in tox

* Minimise diff and refactor PATHEXT

* Fix a typo in make.bat
2018-05-22 20:44:11 -04:00
Will
4378e5295d
[V3 Downloader] Fix #1594 (#1693) 2018-05-22 20:37:34 -04:00
Will
73a427f6aa [V3 RPC] Initial RPC library switch (#1634)
* Initial RPC library switch

* Use weak refs to the methods so cog unload works

* Add docs

* Black fixes

* Add jsonrpcserver to Pipfile.lock
2018-05-22 16:29:26 -08:00
aikaterna
abfee70eb3 [V3 Audio] Only allow audio commands in servers (#1682)
* [V3 Audio] Only allow audio commands in servers

Fixes #1681

* [V3 Audio] Formatting fix
2018-05-22 19:39:01 -04:00
Michael H
77cdbf8dd6 [V3 Alias] Add checks to alias add/del (#1676) 2018-05-22 19:27:11 -04:00
aikaterna
28bc68c916 [V3 Audio] [p]llsetup fixes (#1656)
* [V3 Audio] [p]llsetup fixes

[p]llset wsport changed to not use the rest port setting and both the rest and ws ports were changed to use ints instead of strings.

* [V3 Audio] Version change
2018-05-22 19:19:47 -04:00
Will
ecb64cc2ec [V3] Add deprecation warning for Python 3.5 (#1684)
* Add deprecation warning for python 3.5

* Use colorama

* Modify background color

* Just print to stdout
2018-05-20 20:56:50 -08:00
bobloy
23706a1ba9 [V3 Tests] Fix downloader test failing on Windows (#1673)
* ignore idea

* windows option

* Remove personal setting

* proper undo

* Requested changes

```
("repos", "squid") == pathlib.Path('TEST\\\\TEST2\\\\repos\\\\squid').parts[-2:]
True
("repos", "squid") == pathlib.Path('test/test2/test3/test4/repos/squid').parts[-2:]
True
```

* Needs to remove newline too

Resolves #1663
2018-05-19 12:11:41 +10:00
Michael H
d3f406a34a [V3 Travis] Update travis to not skip pipfile lock... (#1678)
* Update travis to not sip pipfile lock

update pipfile dependencies

additional black formatting pass to conform to black 18.5b

* .

* pin async timeout until further discussion of 3.5 support

* .
2018-05-18 17:48:22 -08:00
bobloy
55afc7eb33 [V3 Downloader] Handle errors when importing modules (#1655)
* Handle errors when importing modules

* Do nothing with error

* Updated to black formatter standards

* More Black formatting
2018-05-17 13:42:41 -04:00
Tobotimus
7a70d12efd
[V3] Add tox (#1641)
* Configure tox environments for install, dev install and docs build

* Configure Travis to run tox

* Use 3.5.1 since it's our minimum supported version

* Bump lower travis build version to 3.5.2

Turns out a dependency is incompatible with 3.5.1.

* Modify Travis config to install from pipenv

* Try without skipping the lock

* Try without pip cache

* D the dev install with pipenv

* See if adding the pip cache back in breaks

* Remove the development installation

It doesn't really make any sense considering we already should be installed in develop mode, as does Travis.

* Oops, tox should go under dev packages

* Do black --check with tox

* Uncache pip again...

* Try a build matrix, and try ignoring virtualenvs

* Activate pipenv shell on travis

* Try installing prereleases

* Try the build matrix like this

* Try exclusion

* Upgrade pip

* Try this environment marker

* Back to stages...

* Try run over shell

* Try skipping the lock again

* This'll be faster but probably ignore 3.5

Because Travis

* Just manually list sources for black to check

* Magic?

* What if I told you...

That this worked perfectly on Tobotimus/Red-DiscordBot@test_travis_matrix

* It couldn't possibly be this easy

* Let's add some comments to be nice

* Let's change back to trusty just in case the stages fuck up

* Add another comment because why not

* Let's try caching pip one more time

* We don't need to whitelist these
2018-05-15 13:10:14 +10:00
palmtree5
1ecaf6f8d5 Black formatting for generate_strings.py and docs/conf.py (#1658)
* Black formatting for generate_strings.py

* Also add docs/conf.py
2018-05-15 09:27:06 +10:00
Will
e01cdbb091 Black tests and setup.py (#1657) 2018-05-15 09:09:54 +10:00
Michael H
b88b5a2601 [V3] Update code standards (black code format pass) (#1650)
* ran black: code formatter against `redbot/` with `-l 99`

* badge
2018-05-14 15:33:24 -04:00
Michael H
e7476edd68 [V3] fix help on missing cog and command docstrings (#1645)
* [V3] fix help on missing cog docstrings

* I think this is what you're looking for

* Also do a NoneType check for commands
2018-05-14 20:13:12 +10:00
Will
cbbeb412f9 [V3 Docs] Fix makefile and add dpy back in to the requirements (#1646) 2018-05-14 15:30:42 +10:00
Will
f544890f00 [V3 Docs] Modify RTD config to (hopefully) make it build (#1644)
* Fix docs requirements

* Modify RTD config
2018-05-14 15:03:43 +10:00
Will
72560fa6d0 [V3] Add pipenv files (#1642)
* Add pipenv files

* Pipfile updates

* Update sphinx version
2018-05-14 14:20:20 +10:00
Tobotimus
4637ff78c0 [V3 Docs] Remove all build warnings (#1640)
* Upgrade sphinx version to 1.7+

* Fix title overlines/underlines in autostart_systemd.rst

* Skip trying to document a method from discord.py

* Add escaped space after backtick

* Escape underscores (sphinx tries to interpret a hyperlink)

* Use fully qualified reference for class

* Fix reference in tunnel.py

* Remove python syntax highlighting in data_converter.py

For some reason sphinx couldn't lex these as python. Removing the highlighting seems like the logical solution for now, since if it wasn't being lexed, it wouldn't highlight anyway.

* Comment out static path since we're not using it right now

* Update sphinx version in docs requirements too

Would rather remove this duplication but RTD is a special snowflake
2018-05-13 20:06:52 -08:00
palmtree5
501aff41ea
[V3] Bump version to 3.0.0b14 (#1629) 3.0.0b14 2018-05-13 16:24:40 -08:00
Michael H
449b1bfe9e Make checks.py manageable from a permissions cog (#1547)
* This starts setting up checks.py to handle managed permission overrides

* missing else fix

* don't bypass is_owner, ever

* Modifies the predicates so that their inner functions are accesible from cogs without
being a check

* Update checks.py

Safety for existing permissions.py cogs

* block permissions cog from being unblocked by the permissions cog as a safety feature (really, co-owner exists at this point)

* un mix the 2 PRs (*sigh*)

* Update checks.py

remove debug prints that got lost inshuffle
2018-05-14 10:13:16 +10:00
aikaterna
4a8358ecb4 [V3 Audio] Update queue and search to use menus (#1633)
* [V3 Audio] Update queue and search to use menus

* [V3 Audio] Fix for playlist upload saving

* [V3 Audio] Add position in queue to enqueued songs

Also a bit of cleanup.

* [V3 Audio] Improvements for mobile formatting
2018-05-14 10:01:46 +10:00
Tobotimus
8f74e4dd31 [V3 Cleanup] Cleanup commands clean up after themselves (#1602)
Resolves #1572
2018-05-13 15:51:50 -08:00
Michael H
2b35d9f012 [V3 cleanup] Respect pinned messages by default (#1596)
* This sets the default behavior for `get_messages_for_deletetion()` to not include pinned messages, while providing a way to override that

resolves #1589

* actually make commands parse for pinned deletion

* fix capitalization
2018-05-13 15:49:45 -08:00
palmtree5
35001107e0 [V3 Streams] cache stream alert messages across restarts (#1630)
* [V3 Streams] cache stream alert messages across restarts

* Add some stuff to debug this

* More debug stuff

* More debug stuff

* Actually save when updating a stream alert

* Remove debug stuff

Fixes #1620
2018-05-14 09:42:28 +10:00
Leo Garcia
a7d7b90ae8 [V3] Removed py 3.6 warning for Windows (#1622)
I believe we've fixed this awhile ago.
2018-05-14 09:32:41 +10:00
Tobotimus
119ba7ef8b
[V3 ModLog] Fix [p]reason when the modlog case has no moderator (#1604) 2018-05-14 09:24:17 +10:00
palmtree5
28bbe9c646 [V3 i18n] add a NoneType check on trying to normalize a string (#1632)
Fixes #1631
2018-05-14 09:10:38 +10:00
Michael H
8739c04024 [V3] Ping changes (#1618)
* moves ping to core commands
defaults ping behavior to reacting with a ping pong paddle with ball
adds an optional boolean flag to ping to get the avg latency from the bot
(strikes a middle ground with intended behavior from dev standpoint, and how users want it)

* casing for @Kowlin

* use correct check for permissions

* remove latency
2018-05-13 15:03:17 -08:00
Tobotimus
57240d25b9 [V3] Update trivia version and allow installing in develop mode (#1635)
* [V3 Trivia] Update trivia version to >1.1

* Use actually working trivia version
2018-05-13 13:43:16 -08:00
Tobotimus
15ea5440a3 [V3 i18n] Internationalise help for commands and cogs (#1143)
* Framework for internationalised command help

* Translator for class docstring of cog

* Remove references to old context module

* Use CogManagerUI as PoC

* Replace all references to RedContext

* Rename CogI18n object to avoid confusion

* Update docs

* Update i18n docs.

* Store translators in list instead of dict

* Change commands module to package, updated refs in cogs

* Updated docs and more references in cogs

* Resolve syntax error

* Update from merge
2018-05-12 01:47:49 +02:00
Michael H
1e60d1c265 [V3] adds a permissions check for embed_links in ctx.embed_requested (#1619) 2018-05-10 14:35:18 -08:00
Tobotimus
b7cd097c43 [V3 Trivia] Lock trivia version to <1.1 (#1621) 2018-05-10 13:20:40 -08:00
bobloy
6c934b02e6 [V3] Fix help's help (#1606) 2018-05-10 13:14:44 -08:00
Kowlin
fcb9b40b43 [V3] Fixed [p]servers bug (#1617)
* Fixed servers bug

* Added protections against going negative
2018-05-10 13:10:42 -08:00
Michael H
7a6884e4b1 [V3] Mark 3.7 as unsupported in setup.py (#1623) 2018-05-10 13:04:20 -08:00