almost working

This commit is contained in:
Henry Hiles 2025-11-06 22:03:24 -05:00
commit 4c1d9baa41
No known key found for this signature in database
14 changed files with 1690 additions and 0 deletions

View file

@ -0,0 +1,29 @@
import "package:cozybot/controllers/client_controller.dart";
import "package:riverpod/riverpod.dart";
class RecordController extends Notifier<String> {
@override
String build() {
ref.watch(ClientController.provider).on("message", (
_,
userstate,
message,
_,
) {
if (userstate.username == "Streamlabs") {
final match = RegExp(
r"\d+[Ww]?-\d+[Ll]?",
).allMatches(message).lastOrNull;
final group = match?.group(0);
if (group == null) return;
state = "Record:\n$group";
}
});
return "Record:\n0-0";
}
static final provider = NotifierProvider<RecordController, String>(
RecordController.new,
);
}