35 Commits

Author SHA1 Message Date
Toby Harradine
df922a0e3e
[Audio] More robust startup and unload (#2118)
* More robust cleanup for audio and streams

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

* Remove copied code from streams

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-09-22 15:04:46 +10:00
palmtree5
589041556e [Streams] Fix excessive writes to config (#2095)
Resolves #2052.
2018-09-04 11:01:48 +10:00
Toby Harradine
93138b04cb
[Streams] Set YouTube channel name when added by ID (#2047)
* [Streams] Set YouTube channel name when added by ID

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

* Move unset token raise to correct place

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

* Correct logic in get_stream

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

* Fetch name explicitly instead

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-08-26 23:53:47 +10:00
Toby Harradine
1b196bf0fb
[i18n] Use redgettext over pygettext (#2023)
* [i18n] Use redgettext over pygettext

* Clear out autogenerated `messages.pot` files

* Remove redundant `regen_messages.py` files

* Refactor `generate_strings.py` to use redgettext

* Install redgettext in Travis Crowdin job

* Clean up some problematic usages of gettext function

* Reformat

* Replace generate_strings.py with Makefile argument

* Update to redgettext 2.1, use exclusion pattern

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-08-26 23:35:42 +10:00
Toby Harradine
f595afab18
[Streams] [p]streamalert twitch channel is not for Discord channels (#2048)
Resolves #2003.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-08-26 23:18:22 +10:00
Toby Harradine
dc9a85ca98
[Streams] Add docstring for [p]streamalert list (#2001) 2018-08-12 12:09:38 +10:00
Toby Harradine
51a54863c5
[Streams] Don't raise KeyError on missing token (#1994)
Some streaming services don't require a token/clientID.

Resolves #1932
2018-08-10 15:07:30 +10:00
Eslyium
cd6af7f185 [V3 Streams] Rewording Responses/Docstrings (#1837)
* [V3 Streams] Rewording Responses/Docstrings

w/ Black if I did this right

* Readding strings
2018-07-12 03:07:15 +02:00
Michael H
1c2196f78f autohelp changes. (#1836) 2018-07-12 01:23:18 +02:00
Tobotimus
a070dffb93
[V3 Streams] Fix streams race condition (#1834) 2018-06-10 00:12:58 +10:00
Michael H
17c7dd658d [V3 Core] Command group automatic help (#1790)
* decorator inheritence

* black format

* add autohelp

* modify commands to use autohelp
2018-06-08 20:54:36 -04:00
Eslyium
60a72b2ba4 [V3] Cleanup quotes in cogs (#1782)
* Cleanup quotes in cogs

* More quote cleanup that I missed

fixed a little bit of grammar here and there as well.

* [V3 Warnings] Change allowcustomreasons docstring

To help not confuse users who would believe that the command would use allow or disallow.

* Run black reformat
2018-06-07 00:42:59 -04:00
jjay12365
f830f73ae6 [V3 Streams] Fixed issue with making YT Stream Embed (#1812)
fixed error not allowing bot to make yt stream embed
2018-06-06 14:57:25 -04:00
Redjumpman
1fd5dffdc7 [V3/Misc] Spelling, Grammar, and doc string fixes. (#1747)
* Update streams.py

* Update filter.py

* Update permissions.py

* Update customcom.py

* Update image.py

* Update trivia.py

* Update warnings.py
2018-06-01 19:20:12 +10:00
Tobotimus
14cc701b25 [V3] Update black version and reformat (#1745)
* Update black version and reformat

* Pin black in extras_require
2018-05-29 18:37:00 -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
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
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
palmtree5
efdf69552f
[V3] Beta 12 release (#1525)
* [V3] update translations from Crowdin

* [V3] bump version to 3.0.0b12
2018-04-16 19:05:21 -08:00
palmtree5
d60fc06379 [V3] Update translations from Crowdin (#1490) 2018-04-02 19:39:07 -04:00
palmtree5
27b61a2770 [V3 Streams] Fix community alerts (#1426)
* [V3 Streams] fix community alerts

* drop unneeded parentheses + delete messages when removing from cache

* move to one embed for a community

* fix adding image to embed

* Remove unneeded params

* Really helps to point to the right place

* drop the game, move channel name+link to value

* Use stream title in embeds

* Increase number of streams to grab to 100

* filter out streams with existing individual alerts in the channel

* need channel id, not stream id in filtering function

* sample from the list

* we only want to break out if the alert is a TwitchStream alert

* drop off sending the mentions if there are none
2018-03-20 19:25:23 -04:00
palmtree5
fe3d6f57af [V3 Streams] Add support for Youtube streams (#1385) 2018-03-14 19:07:14 -04: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
0593bb9c53 [V3 i18n] Update translations from Crowdin (#1350) 2018-02-25 21:57:14 -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
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
68800d28fc [V3 Streams] Replace instances of ClientSession assignment with async context manager (#1238) 2018-01-14 18:43:06 -09: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
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
Vicente Rivera
ee0d1d269c [V3 Streams] Fix race issue on init (#1135)
* Fix for #1132

Fixes `self.streams` being a `Task` object instead of a list. 
Also replicated for `self.communities`, since the issue is the same 
(although untested, it can be inferred).

* Implement sub-method to avoid init errors

The new method waits for `streams` and `communities` to be initialized
before running the `_stream_alerts` method, avoiding possible errors
due to lists being uninitialized

* Fix streams and communities loading

* Delete IDE config file
2017-12-09 18:58:01 -05:00
palmtree5
52f264dae6
[V3 Streams] Update picarto stream thumbnail URIs for new load-balanced thumbnails (#1130) 2017-12-03 22:04:42 -09:00
Will
e983e1cefb Fix shutdown issue with streams (#1107) 2017-11-19 14:32:00 -09:00
palmtree5
32372ea237 [V3] Standardize to ctx.send_help() (#1077) 2017-11-05 13:09:02 -05:00
Twentysix
cee92e1cd2 [Streams] [WIP] Rewrite (#782)
* [Streams] [WIP] Rewrite

* [Streams] [WIP] Settings related commands

* [Streams] Moved to Config

* [Streams] Added [p]streamalert stop

* [Streams] Added toggleable autodeletion

* [Streams] Added [p]streamalert list

* [Streams] beam.pro -> Mixer

* V3 streams modifications (#847)

* [Streams] implement mention command

* [Streams] implement mentions in stream alert check

* [Streams] move to 3 separate commands for alert mentions

* [Streams] implement support for alerting for twitch community streams… (#849)

* [Streams] implement support for alerting for twitch community streams (Twentysix26/Red-DiscordBot/issues/824)

* [Streams] async getter implementation

* [Streams] repr for TwitchCommunity class

* [Streams] move and fix imports (#994)

* [Streams] function rename due to duplicate names

* [Streams] drop force_registration

* [Streams] fix command not displaying help
2017-10-27 16:28:51 -08:00