Commit Graph

46 Commits

Author SHA1 Message Date
Mia
05295e356a
Modify uses of <youtube> tag to comply with API ToS (#7848) 2020-12-28 22:09:32 -08:00
Mia
981019e148
YouTube: Fix crash in interval (#7831) 2020-12-23 20:35:09 -08:00
Mia
14218b133d Youtube: Fix crash in /yt endwatch 2020-12-13 20:12:20 +00:00
Mia
3fb5f20321
Youtube: Track current video time in groupwatch (#7767) 2020-12-11 11:39:23 +04:00
Guangcong Luo
cc1acbb934 Fix build error from merging conflicting PRs 2020-12-01 15:16:02 +00:00
Mia
e942ed1f56
Youtube: Add support for watching videos as a group (#7732) 2020-12-01 06:53:59 -08:00
Mia
23615e5ce0
Youtube: Make /show show videos directly in chat (#7725) 2020-11-24 10:14:04 -08:00
Mia
f03cae8360
Youtube: Update category command permissions (#7668) 2020-11-11 19:41:38 -08:00
Mia
251f801210
Studio: Only request YT video data once (#7595) 2020-10-29 08:31:54 -07:00
Mia
34db61539e
Youtube: Cache requested video data (#7593) 2020-10-27 14:11:30 -07:00
Mia
6c825ad198
Youtube: Properly check permissions (#7590) 2020-10-27 10:52:29 -04:00
Kris Johnson
57e3d7c185
Add The Studio chat plugin (#7542) 2020-10-24 14:09:43 -07:00
Mia
c6aa139f62
Youtube: Persist interval time (#7550) 2020-10-21 05:37:02 -07:00
Mia
ef6cad7c9d
CommandContext: Make requireRoom support specifying a room (#7549) 2020-10-21 04:21:42 -07:00
Mia
e7cf8a23c9
COTW: Support saving channel data of winning channels (#7535) 2020-10-20 05:48:24 -07:00
Guangcong Luo
9d87616176
Add more style linting rules (#7537)
* Lint arrow-body-style

* Lint prefer-object-spread

Object spread is faster _and_ more readable.

This also fixes a few unnecessary object clones.

* Enable no-parameter-properties

This isn't currently used, but this makes clear that it shouldn't be.

* Refactor more Promises to async/await

* Remove unnecessary code from getDataMoveHTML etc

* Lint prefer-string-starts-ends-with

* Stop using no-undef

According to the typescript-eslint FAQ, this is redundant with
TypeScript, and they're not wrong. This will save us from needing to
specify globals in two different places which will be nice.
2020-10-19 02:42:28 -07:00
Mia
918d436ac0
Youtube: Move video data fetching to a different function (#7536) 2020-10-19 02:18:44 -07:00
Mia
d020a2f921
Youtube: Support searching for videos (#7529) 2020-10-17 02:52:04 -07:00
Mia
ca3e7237d7
Youtube: Support channel categories (#7509) 2020-10-11 13:44:42 -07:00
Mia
896793c010
Youtube: Update channel url handling (#7482) 2020-10-06 16:00:16 -07:00
Mia
4279d1f3bc
Update attributions in various locations (#7354) 2020-10-06 15:55:26 -07:00
Mia
62bcce1d55 Plugins: Don't try-catch ENOENT errors when using FS.readIfExists() 2020-09-26 23:02:45 -05:00
Mia
44fc0123ad
Chat: Refactor CommandContext and PageContext to use ErrorMessage more (#7234) 2020-09-06 00:15:16 -07:00
Mia
42ba4b87d2
Youtube: Fix crash (#7280) 2020-08-31 06:45:35 -07:00
Mia
fbe5d90dd0
Youtube: Add tests (#7081) 2020-08-06 00:34:18 -07:00
Lusamine
3a2ca90040
Minor cleanup of global demotion messages (#7011) 2020-07-17 01:17:36 -07:00
Guangcong Luo
c124720885
Support throwing error messages (#6946)
The idea is that throwing `ErrorMessage` will replace needing to pass
`context` variables around (which make it hard to unit test a lot of
chat functions).

I recognize the drawback is that it makes it harder to tell where
chat commands might return from. This might be somewhat alleviated by
a convention such as prefixing everything with `check`

    this.checkBroadcastable();

    this.checkCan('lock');

I honestly didn't like the old approach of `if (!this.can(...)) return`,
though. It didn't seem very obvious which commands would show error
messages and which needed you to write your own error messages. I think
the new system would at least be clearer about that.

We can also consider things such as some sort of sigil, such as:

    !this.checkCan('lock');

There's no other reason to use `!` at the beginning of a line, so I
think this is reasonably unambiguous, although it might take some
time to learn. Also we'd have to screw with eslint.

Another alternative is something all-caps?

    this.CHECK_can('lock');

In the end, I still think `this.checkCan('lock')` would be enough, and
I still think it's already an improvement in many ways.
2020-07-06 14:07:02 -07:00
Mia
4997a47314
Commands: Allow the room parameter to be null (#6948)
Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2020-07-05 14:25:09 -07:00
Guangcong Luo
d7ba455e2b Update permissions
Permissions have gotten out-of-date, so this commit syncs them.
Default permissions are now matched with Main, in particular including
the new & rank as admin (removing the old Leader rank and ~ symbol).

Relevant changes:
- Admin (~) and Leader (&) have been merged into Admin (&)
- The 'ban' permission was split into 'globalban' and 'ban'
- The 'broadcast' permission was renamed 'show' (going forward,
  "broadcast" should only refer to the big red/blue/green
  announcement bars.)
- Bots no longer have global moderation abilities, making it
  easier to give untrustworthy bots the "bot" rank.
2020-07-03 17:32:49 -04:00
Guangcong Luo
bdb0b0ff72 Refactor Net use in YouTube plugin 2020-07-02 17:14:24 -07:00
Mia
857d5c648e
Youtube: Allow drivers to use /youtube update (#6933) 2020-06-30 12:11:09 -07:00
Guangcong Luo
6af875af8b Improve RoomPermission/GlobalPermission checks
Global permissions can no longer be used as room permissions. Instead,
the two are entirely separate lists, with only a few permissions in
both lists.
2020-06-21 03:53:06 -07:00
Mia
f306ed069f
Youtube: Fix crash (#6891)
Ensure video data exists in the response
2020-06-20 20:47:55 -07:00
Mia
a888c10bb6
Youtube: Don't crash if key isn't configured (#6848) 2020-06-20 20:16:07 -07:00
Mia
1f6029e156
Youtube: Fix ID crash (#6858) 2020-06-17 20:42:02 -07:00
Mia
6c97866f83
Add commands to show media in chat (#6745) 2020-06-16 14:40:10 -07:00
Mia
31263c79a0
Youtube: Fix crashes with checking ID (#6826) 2020-06-10 21:52:54 -07:00
Mia
6839a1f4db
Add a library for utility functions (#6817) 2020-06-09 22:06:43 -07:00
Annika
f4863a9444
Update references to Global Administrators post-flattening (#6815)
Co-authored-by: Charlie Kobayashi <sparkychildcharlie@gmail.com>
2020-06-08 09:41:03 -07:00
Mia
da1da746b3
Youtube: Use Net library (#6803) 2020-06-05 15:20:29 -07:00
Mia
c9c7f6a747
Youtube: Accredit videos and improve interval (#6762) 2020-06-04 06:54:05 -07:00
DeltaCoderr
1c33855a3d
YouTube: Fix Grammar (#6761)
Co-authored-by: Konrad Borowski <konrad@borowski.pw>
2020-05-29 18:32:52 +02:00
Mia
73b7b451d0
Fix crash in YouTube plugin (#6757) 2020-05-29 01:16:26 -07:00
HoeenHero
02164f2ba0 Youtube: Don't crash when adding an invalid channel 2020-05-27 08:16:22 -04:00
Mia
40f5fcf0e2
Youtube: Error out if there are no channels in the database (#6749) 2020-05-26 23:44:02 -07:00
Mia
de24f97f03
Youtube: Add plugin for viewing videos/channels (#6740) 2020-05-25 18:35:38 -07:00