File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -285,6 +285,13 @@ public IEnumerable<string> GetRoomOwners(string room)
285
285
return owners ;
286
286
}
287
287
288
+ public dynamic GetRooms ( )
289
+ {
290
+ var result = _chat . Invoke < dynamic > ( "getRooms" ) . Result ;
291
+
292
+ return result ;
293
+ }
294
+
288
295
public void ChangeNote ( string note )
289
296
{
290
297
Send ( String . Format ( "/note {0}" , note ) ) ;
@@ -295,6 +302,16 @@ public void Nudge(string user)
295
302
Send ( String . Format ( "/nudge {0}" , user ) ) ;
296
303
}
297
304
305
+ public void SendAdministrativeCommand ( string command )
306
+ {
307
+ if ( ! command . StartsWith ( "/" ) )
308
+ {
309
+ throw new InvalidOperationException ( "Only commands are allowed" ) ;
310
+ }
311
+
312
+ Send ( command ) ;
313
+ }
314
+
298
315
/// <summary>
299
316
/// Disconnect the bot from the chat session. Leaves all rooms the bot entered
300
317
/// </summary>
You can’t perform that action at this time.
0 commit comments