24 Commits

Author SHA1 Message Date
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
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
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
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
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
96791bd72b [V3] supress pynacl warning (#1508)
* supress pynacl warning

* move the supression to __init__.py

* ..

* Revert "move the supression to __init__.py"

This reverts commit ee7ba9c968dd8d7038fcba856c5718d2e5bd3345.

Doesn't properly work here

* Changes are fine in __init__.py

Needs a module level import in __main__.py or the console scripts generated by pip setup don't ever run the code in __init__

* supress pynacl warning

* puts the changes back again to avoid duplicate module import warning
2018-04-16 14:32:05 -08:00
Will
29ce2401ca [V3 Config] Fix unloading and implement singleton driver (#1458)
* Add the identifier as an initialization parameter

* Remove config object singleton and opt for a shared JSON datastore

* Fix bot unloading to deal with memory leaks

* Fix tests

* Fix clear all bug
2018-04-02 16:47:27 -08:00
palmtree5
61b34e835e [V3] Drop an unnecessary if in embed_requested (#1468) 2018-03-28 19:10:02 -04:00
palmtree5
83471e0866 [V3 Core] implement commands and settings for embeds (#1437)
* [V3 Core] add settings for whether to use embeds or not

* Implement commands to toggle embed settings

* Add a function to context for finding whether to use embeds or not

* Hide [p]embedset for now

* Move embed_requested to bot

* Add a simple helper in context
2018-03-21 01:17:40 +01:00
Will
b871241eac
[V3 Core] Add optional async setup function (#1314) 2018-02-18 21:12:58 -05:00
Michael H
1b45397e67 [V3 Core] Mentionable prefix (#1256)
* allow mentioning the bot as a fallback to a prefix

* make this toggleable
2018-01-24 10:43:51 +11:00
Tobotimus
73c08da037
[V3 Sentry] Allow toggling of Sentry logging (#1214)
* Refactor sentry to allow toggle

* Rename sentry module

* Protect sentry manager

* Fix tests

* Fix EOF newlines

* Add docstrings
2018-01-15 15:26:26 +11:00
palmtree5
4f0043b805 [V3 Mod] fix some issues relating to ignore (#1166)
* [V3 Mod] remove unnecessary decos from ignore/unignore

* [V3 Core] fix is_mod and is_admin so they don't return True if the mod/admin roles aren't set
2017-12-12 20:31:12 -05:00
Will
6d1d699059
[V3] Actually add compatibility with 3.5.1 (#1155)
* Fix 3.5.1 issue with TYPE_CHECKING

* I hate you

* Smarter...
2017-12-09 18:51:35 -05:00
Tobotimus
9dbf56f942 [Config] Retrieve/save values with async context manager (#1131)
* [Config] Retrieve/save values with async context manager

* Add a little docstring

* Documentation

* Implement async with syntax in existing modules
2017-12-03 18:07:34 -09:00
palmtree5
5ebde77747
[V3 Core] add traceback, invite, leave, and servers commands (#1125)
* [V3 Core] add traceback, join, leave, and servers commands

* [V3 Core] rename join to invite
2017-12-03 17:42:00 -09:00
Will
064e9b6bd0
[V3 Help] Convert help command to support embeds (#1106)
* Replace built in help with embedded help

* Make embeds pagify

* Fix thingy

* Fix missing embed permissions
2017-11-26 20:04:26 -05:00
palmtree5
32372ea237 [V3] Standardize to ctx.send_help() (#1077) 2017-11-05 13:09:02 -05:00
Will
f459a21bef
[V3 RPC] Add basic RPC functionality (#1017)
* Add basic RPC functionality

* Add load/unload/reload rpc commands

* Reorganize without rpc_ready event

* Remove rpc ready event

* Removed bot reference from rpc module

* Close RPC server cleanly

* refactor bot

* Refactor a bit and make RPC server initialization based on a cli flag

* Fix version resolver

* standardize version getters

* Pick a new port number
2017-10-27 20:55:41 -04:00
palmtree5
fb125ef619 [V3] Mod initial rewrite (#1034)
* Readd work due to redoing branch

* [modlog] Move to core and start work on separating it from cogs

* More work on modlog separation

* [Core] Finish logic for modlog, do docstrings, async getters

* [Core] Add stuff to dunder all

* [Docs] Add mod log docs

* [Core] Move away from dunder str for Case class

* [Docs] don't need to doc special members in modlog docs

* More on mod log to implement commands

* More work on Mod

* [Mod] compatibility with async getters

* [Tests] start tests for mod

* [Tests] attempted fix

* [Tests] mod tests passing now!

* [ModLog] update for i18n

* modlog.pot -> messages.pot

* [Mod] i18n

* fix getting admin/mod roles

* Fix doc building

* [Mod/Modlog] redo imports

* [Tests] fix imports in mod tests

* [Mod] fix logger problem

* [Mod] cleanup errors

* A couple of bug fixes

Async getters, some old `config.set` syntax

* Filter ignores private channels

* Fix softban

Was still relying on default channels

* Actually ignore private channels

* Add check for ignored channels

* Fix logic for ignore check

* Send confirm messages before making case

* Pass in guild when setting modlog

* Thanks autocomplete

* Maintain all data for case

* Properly ignore softbans in events

* [Mod] bugfixes

* [Mod] more changes

* [ModLog] timestamp change

* [Mod] split filter and cleanup to their own cogs + regen messages.pot

* [Cleanup] change logic

* [Cleanup] increase limit for channel.history

* [Mod] await getter in modset banmentionspam

* [Mod] attempt duplicate modlog message fix

* [Mod] get_user -> get_user_info

* [Modlog] change reason command so the case author can edit their cases (#806)

* [Modlog] make reason command guild only

* [Modlog] clarify the reason command's help

* [Mod] package path changes + numpy style docstrings for modlog

* [Mod] change ban and unban events to need view audit log perms to find/create a case

* [Modlog] refactoring

* [Filter] add autoban feature

* [Mod] update case types + event changes

* [Mod/Modlog] fix tests, fix permissions things

* [Docs] fix up modlog docs

* Regenerate messages.pot
2017-10-22 21:02:16 -04:00
Tobotimus
c80684a129 [V3] NumPy Docstrings (#1032)
* ALL THE DOCSTRINGS

* Remove imports in drivers package

* Fixed build warnings
2017-10-17 22:01:59 -04:00
Will
684004d614 [V3] Add sharding (#1027)
* EZ PZ sharding

* Add this little nugget
2017-10-16 19:54:55 -04:00
Tobotimus
86b18c702c [V3] Custom context class (#988)
* Create custom context class

* Documentation

* Remove old help method, replace with new

* Update from rebase
2017-10-15 21:02:50 -04:00
Will
d69fd63da7 [V3 Everything] Package bot and write setup scripts (#964)
Ya'll are gonna hate me.

* Initial modifications

* Add initial setup.py

* working setup py help

* Modify setup file to package stuff

* Move a bunch of shit and fix imports

* Fix or skip tests

* Must add init files for find_packages to work

* Move main to scripts folder and rename

* Add shebangs

* Copy over translation files

* WORKING PIP INSTALL

* add dependency information

* Hardcoded version for now, will need to figure out a better way to do this

* OKAY ITS FINALLY FUCKING WORKING

* Add this guy

* Fix stuff

* Change readme to rst

* Remove double sentry opt in

* Oopsie

* Fix this thing

* Aaaand fix test

* Aaaand fix test

* Fix core cog importing and default cog install path

* Adjust readme

* change instance name from optional to required

* Ayyy let's do more dependency injection
2017-09-08 23:14:32 -04:00