868 Commits

Author SHA1 Message Date
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
Will
720ef38886 [V3 Help] Fix the two missing characters in help (#1456) 2018-04-02 16:29:44 -08:00
palmtree5
f3db4b5cb0 [V3 Modlog] Fix TypeError related to 'until' (#1487) 2018-04-02 20:09:09 -04:00
palmtree5
d60fc06379 [V3] Update translations from Crowdin (#1490) 2018-04-02 19:39:07 -04:00
palmtree5
8eb075fa86 [V3 Core] Embed toggling support (#1467)
* [V3 CogManagerUI] implement text-only support in [p]cogs

* Change page length to 1800 + workaround for pages starting with delim

* [V3 Core] text mode support for [p]contact and [p]dm

* Implement text-only support in modlog and fix everything that broke because of it

* Fix modlog stuff in filter too

* Fix tests

* Implement optional embed support in [p]help

* move to .format
2018-03-28 20:15:51 -04:00
palmtree5
2f23244937 [V3 Core] Add [p]backup (#1471)
* [V3 Core] add [p]backup

* move imports
2018-03-28 19:53:27 -04:00
palmtree5
61b34e835e [V3] Drop an unnecessary if in embed_requested (#1468) 2018-03-28 19:10:02 -04:00
palmtree5
4e2b83c052 [V3 Docs] Add and update existing features (#1451)
* [V3 Docs] bump version

* Remove removed functions from __all__

* Update docstring format

* Update copyright year

* Add embed utils docs

* Document bot class

* Document RPC

* Update toctree
2018-03-24 17:27:04 -04:00
palmtree5
45ee4755a6 [V3 Core] Fix url sent when doing [p]invite (#1461) 2018-03-24 17:24:06 -04:00
retke
cf5a63a5d5 [V3] Set token command fix (#1449)
* [V3] Add set token command

* DM check

* warning message + delete if token isn't send in DM

* Update string formatting

* fix condition invertion
2018-03-22 19:08:57 -04:00
James
153d710eb4 [V3] Allow load, unload and reload to deal with multiple packages (#1441)
* [V3] Allow load, unload and reload to deal with multiple packages

This PR allows multiple packages to be loaded, unloaded or reloaded with the one command, the packages are delimited by the space character as suggested by Will
This is just the functionality, I'm sure the code could be better

* introduced helper function for getting package load strings

* missed characters

* forgotten import 👀

Forgot to include the import `inline` method from chat_formatting
2018-03-20 16:32:54 -08: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
Michael H
01b9843883 [V3] Change presence (continued fixes) (#1438)
* This better fixes the root issue rather than attempting to work around it

* move bot_in_guild to checks, and use the correct syntax
2018-03-21 01:12:40 +01:00
retke
749af89e9f [V3] Set token command (#1425)
* [V3] Add set token command

* DM check

* warning message + delete if token isn't send in DM

* Update string formatting
2018-03-21 01:08:36 +01:00
palmtree5
eb3b6346bb [V3] Set r/w access before deleting files (#1412)
* [V3] set access before deleting

* [V3] move+rename do_delete and use in repo removal in downloader
2018-03-20 18:46:15 -04:00
palmtree5
f83e3cc3e7 [V3 Economy] Expand payday output (#1386)
* [V3 Economy] implement suggestions from #1371

* Fix a typo

* Add functions for getting leaderboard and leaderboard position

* Use the new functions to get leaderboard position and leaderboard (overrides https://github.com/Cog-Creators/Red-DiscordBot/pull/1435)

* Actually implement showing only guild members on leaderboard when bank is global

* get_leaderboard_position needs to be awaited

* For global bank, pass None for guild to get_leaderboard when trying to find position

* Remove some unneeded code

* Wrong index...

* Combine 3 messages into 1

* Fix guild leaderboard while bank is global

* add missing parentheses

* Modify the leaderboard formatting

* More work on leaderboard formatting

* no subtraction
2018-03-20 18:22:10 -04:00
BaIthamel
1cb74f0ea7 [V3] Fix for issue #1363 (#1424)
[p]cogs and [p]repo now print alphabetically
2018-03-12 18:44:30 -04:00
Tobotimus
c7e8c95640 [V3] discord.Game -> discord.Activity (#1397)
* [V3] discord.Game -> discord.Activity

* Update userinfo to reference new enum
2018-03-12 18:41:37 -04:00
Will
c9281f734b [V3 Config] Fix clear throwing errors (#1374) 2018-03-06 10:28:37 +11:00
palmtree5
f378ea0d2e [V3 Core] add update check (#1388)
* [V3 Core] add update check

* [V3 Core] have it DM the owner if out of date
2018-03-06 10:21:01 +11:00
James
40c37b5c06 [V3 Help][ fix help_formatter to obey length limits (#1375)
Help didn't account for docstrings passing length limits which I noticed a while ago and as noticed again when Palm forgot a dual newline in a command docstring.
This PR sees to fix this by enforcing length limits on description, field names and field values
2018-03-06 10:10:56 +11:00
Michael H
b4f5c2c0a1 Revert "[V3]Encoding issue fix" (#1392)
* Revert "[V3 Core] Encoding issue fix (#1365)"

This reverts commit f6903cf5820ec93833aced058622cb2f235ac22b.

* Don't let the system encoding screw with things,
specify opens as happening with utf-8 encoding

(cherry picked from commit c10e4dddca32a7a74978f2938359be8a65e7e40f)
2018-03-06 08:18:41 +11:00
Michael H
f6903cf582 [V3 Core] Encoding issue fix (#1365)
* Don't let the system encoding screw with things,
specify opens as happening with utf-8 encoding

* And also deal with encoding issues because windows is a special snowflake
(see: #1366)

* let's just use the encoding param in str() rather than encode/decode...
2018-03-04 13:02:04 -05:00
Thomas Mercurio
b10b746d9e [V3 Config] Correct Mongo connection URI without credentials (#1362)
* Correct connection string without credentials

* Remove extra whitespace.
2018-03-02 18:39:45 +01:00
Will
004f42bf6e
[V3 Config] Limit connections to Mongo DB (#1356) 2018-02-26 15:34:30 -05:00
Will
41e0d105f6
[V3 Config] Make Mongo work with any db (#1355) 2018-02-26 15:28:20 -05:00
Will
10cbd4d3c4
[V3 Sentry] Only log errors that come from core code (#1353)
* Do not load core cogs as extensions

* Filter this shit
2018-02-26 15:16:49 -05:00
Will
64af7800dc [V3 Config] Adjust functionality of get_attr (#1342)
* Intermediate commit

* Add defaulting stuff to config

* Remove set_attr in favor of set_raw

* Modify get_attr

* Fix issue with clearing data
2018-02-26 11:13:01 -09:00
palmtree5
c428982c00 [V3 Core] Add listlocales command (#1351)
* [V3] Add listlocales command + remove a hanging 2 letter translation

* Sort the locales list

* Doc info in set locale
2018-02-26 15:05:06 -05:00
Michael H
09ddfe4250 [V3] Re-allow using presence modifying commands without being in a guild (#1345)
Actually update on all shards (we need to do this even with autoshardedbot as base)
2018-02-25 21:10:59 -09:00
Will
e13de0950c [V3 Config] Implement a true clear method (#1344)
* Add clear methods to drivers

* Update config clear methods, add to Value

* Add test
2018-02-25 21:07:28 -09:00
palmtree5
0593bb9c53 [V3 i18n] Update translations from Crowdin (#1350) 2018-02-25 21:57:14 -05:00
Will
93ca7abc1a [V3 Core Commands] Limit status modifying commands to be run in guild only (#1331)
* Limit status modifying commands to be run in guild only

* JK let em run.

* Add a space
2018-02-23 02:44:06 +01:00
Will
d54c129c57
[V3 Config] Allow users to directly specify a cog name with config (#1339) 2018-02-22 19:42:30 -05:00
Will
7c848153f8
[V3 Config] Limit config objects to a single one per cog (#1337)
* Limit config objects to a single one per cog

* do it correctly

* Do nicer thing

* do it right...

* I will get this right eventually
2018-02-22 19:36:07 -05:00
Will
4e36c2f82d [V3 Config] Add helper methods for advanced data access (#1335)
* Add get_raw/set_raw

* Add default to get_raw

* Add custom group method to the config object

* Add more methods for custom groups

* Add some docstrings

* Deepcopy the result of get_raw, throw TypeError if no value is passed to set_raw

* Do it right..

* Better way to require kwarg
2018-02-23 11:29:37 +11:00
Sebass13
b5c71bc59c [V3 Mod/Filter] Fix #1202 (#1327)
* Fix #1326

Checks to see if `author` is a `valid_user` (of `Member` class) before checking to see if the bot `is_mod_or_superior` to the `author`.

* Fix #1202

Raises `TypeError` when `User` objects are passed into `is_mod_or_superior` or `is_admin_or_superior`, as only `Member` objects have a `guild` attribute.

* Fixes #1202

Checks to see if `author` is a `valid_user` (of `Member` class) before checking to see if the bot `is_mod_or_superior` to the `author`.
2018-02-21 18:36:13 -05:00
Will
f9d846a704 [V3 Config] Driver code initial cleanup (#1315)
* Remove get_driver

* Rename self.driver to self._driver

* Do not unnecessarily pass the cog identifier

* Remove unused import

* Fix type annotation

* Missed a keyword rename

* Modify signature of get/set methods in drivers
2018-02-18 18:30:32 -09:00
retke
3984cb8f48 load and reload command errors available with the [p]traceback command (#1307) 2018-02-19 04:18:56 +01:00
Bakersbakebread
a0327a62dd move [p]cogs to embeds (#1299)
* move [p]cogs to embeds

Fancy embeds for the masses

* pagify
2018-02-18 18:03:27 -09:00
palmtree5
a388d07f30 [V3 Events] modify CommandInvokeError handler to use the vague message as a fallback if a cog doesn't provide its own __error function (#1279) 2018-02-19 03:59:46 +01:00
Will
b871241eac
[V3 Core] Add optional async setup function (#1314) 2018-02-18 21:12:58 -05:00
palmtree5
86b5932c8f [V3] add a script for regenerating all strings (#1318)
* [V3] add a script for regenerating all strings

* Edits to the yml files

* Fix up deploy section

* Make generate_strings upload to Crowdin
2018-02-19 03:02:22 +01:00
William
263e94454c [V3 Core] Adds listening and watching games. (#1284)
* Adds listening and watching games.

* Remove guild check

* Fix typos

* Fix more typos.
2018-02-14 16:55:18 -09:00
aikaterna
78615b5dc8 [V3 Core] Add timeout exceptions to [p]servers (#1305) 2018-02-14 16:21:51 -09:00
Haruki N. Grande
9f8a008442 [V3 CogManager] Fixed typo (#1285) 2018-02-14 15:57:17 -09:00
Will
6678b29396
[V3 Config] Fix async context manager bug and add test (#1308)
* Fix config bug and add test

* Fix the full bug

* Extra safeness
2018-02-14 19:12:13 -05:00
Michael H
de3a057e6e [V3] Allow root to own data (#1264) 2018-01-28 18:41:01 -09:00
palmtree5
f36ed2f8c8 [V3 Core] add restart command (#1272) 2018-01-29 04:29:56 +01:00
palmtree5
1d1f2c9f12 [V3 Core] add uptime command (#1273) 2018-01-29 04:25:17 +01:00