aboutsummaryrefslogtreecommitdiff
path: root/examples/rooms.raku
diff options
context:
space:
mode:
Diffstat (limited to 'examples/rooms.raku')
-rw-r--r--examples/rooms.raku12
1 files changed, 12 insertions, 0 deletions
diff --git a/examples/rooms.raku b/examples/rooms.raku
new file mode 100644
index 0000000..4f0a0c7
--- /dev/null
+++ b/examples/rooms.raku
@@ -0,0 +1,12 @@
+use v6;
+use Matrix::Client;
+
+
+sub MAIN($username, $pass) {
+ my $c = Matrix::Client.new(home-server => 'https://matrix.deprecated.org');
+ $c.login: $username, $pass;
+
+ for $c.joined-rooms -> $room {
+ $room.say;
+ }
+}