anonchat_api 0.0.1 copy "anonchat_api: ^0.0.1" to clipboard
anonchat_api: ^0.0.1 copied to clipboard

A simple anonchat api implementation

example/example.dart

import 'dart:isolate';

import 'package:anonchat_api/anonchat/anonchat_api.dart';

Future<void> main() async {
  final bot = await Anonchat.connect(host: 'localhost', port: 6969);

  Isolate.current.setErrorsFatal(false);

  bot.onMessage.where((c) => c.msg == '!ping').listen((m) {
    bot.sendMessage(Message(user: 'Anonbot', msg: '!pong'));
  });
}
0
likes
150
points
15
downloads

Publisher

unverified uploader

Weekly Downloads

A simple anonchat api implementation

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

More

Packages that depend on anonchat_api