stdoat 0.4.0-dev.1 copy "stdoat: ^0.4.0-dev.1" to clipboard
stdoat: ^0.4.0-dev.1 copied to clipboard

A package for creating Stoat.chat bots using the Dart programming language. Not officially endorsed by stoat.chat

example/example.dart

import 'package:stdoat/stdoat.dart'; 

void main() async {
	final String botToken = 'STOATCHAT_BOTTOKEN';
	final client = StdoatClient(botToken);
	
	client.onReady('ready_listener', (client) {
		print('Revolt Bot is Online!');
	});

	client.onMessage('message_listener', (client, message) async {
		if (message.content != null && message.content == '!ping') {
			await client.sendMessage(
				message.channelId,
				content: 'Pong!',
			);
		}
	});

	await client.connect();
}
1
likes
0
points
143
downloads

Publisher

unverified uploader

Weekly Downloads

A package for creating Stoat.chat bots using the Dart programming language. Not officially endorsed by stoat.chat

Repository

License

unknown (license)

Dependencies

web_socket_channel

More

Packages that depend on stdoat