fluxer_api 0.2.0
fluxer_api: ^0.2.0 copied to clipboard
A package for creating Fluxer.app bots using the Dart programming language. Not officially endorsed by Fluxer.app
example/example.dart
import 'package:fluxer_api/fluxer_api.dart';
void main() async {
final bot = FluxerClient(
token: 'FLUXERAPP_BOTTOKEN',
commandPrefix: '!',
);
bot.onMessage((message) async {
print('onMessage: ${message.authorId} sent ${message.content}');
if (message.content.trim().toLowerCase() == 'ping') {
await bot.sendMessage(message.channelId, 'Pong! 🏓');
}
});
await bot.connect();
}