Volt is a wrapper around Revolt API for creating bots for Dart language. It's currently in active development so not all of the functionality has yet been implemented.
import 'package:volt/volt.dart';
void main() {
final bot = Volt('TOKEN');
bot.onMessageReceived.listen((event) {
if (event.message.content == '!ping') {
event.message.reply(MessageBuilder.content('Pong!'));
}
});
}
Since the library is not yet available on pub.dev, the dependency needs to be added by yourself.
To install, edit your pubspec.yaml
:
dependencies:
# ...your depedencies...
volt:
git: https://github.com/volt-framework/volt.git
Or just use the command line:
dart pub add volt --git-url=https://github.com/volt-framework/volt.git
- Read CONTRIBUTING.md
- Join our server here