129 Commits

Author SHA1 Message Date
Will
d414806fa2 Close aiohttp ClientSession (#1340) 2018-02-23 02:08:49 +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
Sebass13
d20724d7b2 [V3 General] Fix error in [p]userinfo when game is not set (#1325)
* Fix #1321

Modifies the game-checking lines so that they don't assume `user.game` is not a NoneType object.

* Fix #1321

Modifies the game-checking lines so that they don't assume user.game is not a NoneType object. Also alerts the user to go bother @tekulvw if somehow the invariants of `user` having a `game` attribute and the `game` attribute either being `None` of having a `type` attribute in `[0, 1, 2, 3]` are broken.

* Update general.py
2018-02-20 18:06:06 -05:00
Sebass13
1cca5ee5cb [V3 Downloader] Fixes issue #1323 (#1324)
The use of `popitem` makes the right side of line 642 return a tuple of the form `(repo, (old, new))` instead of a dictionary of the form `{repo: (old, new)}`, as expected by the left hand side of the same line.
2018-02-19 22:41:19 -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
249756e0d2 [V3 Downloader] Make shared libraries work and make repo handling smarter (#1313)
* Make stuff stateless

* Update shared lib stuff
2018-02-19 03:49:43 +01:00
Bakersbakebread
d2e841f681 [V3] Add prompt if message deletion > 100 (#1304)
* Add prompt if message deletion > 100

As per issue #1295. 

Add's the prompt "Are you sure you want to delete {number} messages? (y/n)"

* added checks and deletes "Continuing" message

phew

* removed unneeded delete()

Removed the unneeded code
2018-02-18 17:44:45 -09: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
palmtree5
01e8579215 [V3 instance setup] allow removing instances without taking a backup + error handling for missing data path (#1277) 2018-02-15 02:39:29 +01: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
Kowlin
11636b16d2 [V3 General] Updated userinfo (#1289)
Updated userinfo to include new statuses
2018-02-09 13:18:06 -09:00
palmtree5
0c85e0fe22 [V3] Add support for removing instances (#1270)
* [V3 Instance Setup] add a way of removing instances

* [V3 Launcher] add instance removal support to the launcher
2018-01-29 04:56:28 +01: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
Redjumpman
9feb7ad876 Config Fix (#1267)
Added helper function to fix all() method
2018-01-29 04:19:41 +01: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
Michael H
b80c327e35 For Linux service users, (#1236)
* For Linux service users,
use `appdirs.AppDirs().site_data_dir`
instead of `appdirs.AppDirs().user_config_dir

* somewhat important for this to be changed consistently

* need to import os to use it

* travis doesn't like how I was checking in config_dir had been set.
2018-01-15 05:35:33 +01:00
Aioxas
eb10508c5f [V3 Alias] Allow wider range of aliases (#1201)
* [V3 Alias] Allow wider range of aliases

Possible fix for #1118

Makes it so that the only non-valid names are the ones that can't be printed by something.

* [V3 Alias] Edit Check & Error Message

Reflects the wider range of aliases that can be created.

* [V3 Alias] Fix wrong slash in regex

* [V3 Alias] Fix Wrong Closing Parenthesis Position

Can't believe I'm messing it up
2018-01-14 19:28:57 -09: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
Tobotimus
e18f94c17d Fix [p]cleanup bot (#1205) 2018-01-15 05:20:54 +01:00
Michael H
f1a20e1677 [V3 Streams] Duplicate stream alerts fix (#1244)
case insensitive on twitch streams, with a fast dedupe on load toany prior bad entries.
2018-01-14 19:17:57 -09:00
Tobotimus
4ac606b468 [V3 Launcher] Fix asking for cli flags after invalid instance selection (#1200) 2018-01-14 19:11:24 -09:00
Tobotimus
980e8eeb3e [V3 Core] Catch errors when reloading (#1225) 2018-01-14 19:04:09 -09:00
Tobotimus
ffea55265d [V3] Fix UnicodeEncodeError on startup (#1248)
Fixes case where encoder can't support border characters
2018-01-14 18:57:28 -09:00
Tobotimus
fb0190f826
[V3 Trivia] Allow crediting the author of trivia lists (#1197)
* Credit author of trivia lists

* Use proper sentences

* Remove unwanted traceback print
2018-01-15 14:50:14 +11:00
Tobotimus
68800d28fc [V3 Streams] Replace instances of ClientSession assignment with async context manager (#1238) 2018-01-14 18:43:06 -09:00
Tobotimus
05c5c58eaf
[V3 Utils] Improve bordered function and add tests (#1206) 2018-01-13 11:15:34 +11:00
Redjumpman
1c504f681e [V3 Config] Fixed raised Attribute Error Message (#1247)
Added space in raised Attribute Error message
2018-01-13 10:57:37 +11:00
Redjumpman
5bd7a23864 [V3 Bank] Fix can_spend and withdraw_credits (#1234)
* Fixed equality operator

can_spend function should be using a >= instead > so that you can spend all of your currency.

* Update bank.py

Fix for withdraw using the wrong equality operator.

* Revert withdraw_credits

Reverted withdraw_credits back to original operator.
2018-01-11 20:26:34 +01:00
Michael H
de1b135dec [V3 Help Formatter] Fix help command's error handler (#1237) 2018-01-07 11:26:21 +11:00
Tobotimus
d83f14d1b6
[V3 Streams] Fix preceding comma in streamalert messages (#1224)
* Refactor getting mentions for streamalerts

* Add missing await

Fixes #1192
2018-01-01 18:24:36 +11:00
Kowlin
0a705071c2 [Core] QoL for argparser (#1217)
* Made Argparser more QoL

* Edited the usage command.
2017-12-31 14:19:56 +11:00
Tobotimus
80d68684fb
[V3 Context] Fix ctx.send_interactive in DM (#1221)
Fixes #1220
2017-12-31 11:29:07 +11:00
Tobotimus
76ae62cb84 [V3 Streams] Improve command responses and help, rename modules (#1194)
* Command response improvements for streams

Fix #1182

Fix #1183

Various other command response improvements

* Rename main to streams, streams to streamtypes

* Raise errors for communities
2017-12-17 18:56:17 -09:00
palmtree5
103f79eca5 [V3 Mod] Fix helpers compatibility with User objects (#1185) 2017-12-17 22:23:54 -05:00
Will
0979231435
[V3 Sentry] Modify error logging cases (#1193)
* Fix duplicate on_

* Make better use of sentry error handler
2017-12-17 21:21:41 -05:00
palmtree5
f3da10ec98 [V3 Utils] add embed utils with a random_colour function (#1164)
* [V3 Utils] add embed utils with a random_colour function

* [V3 Utils] random_colour -> randomize_colour + make it take an embed

* [V3 Utils] decomplicate the random color selection
2017-12-17 20:45:08 -05:00
Will
0debc0a4d3 [V3 Core] Add blacklist/whitelist commands (#1160)
* Add blacklist/whitelist

* Don't let owners add themselves to the blacklist
2017-12-18 12:41:11 +11:00
Will
bc8b9d32db [V3 Launcher] Use existing logic, fix bugs (#1168) 2017-12-18 12:31:05 +11:00