mineral 5.0.0 copy "mineral: ^5.0.0" to clipboard
mineral: ^5.0.0 copied to clipboard

Mineral is a Discord framework for designing discord bots in Dart.

example/main.dart

import 'package:mineral/api.dart';

import 'feedback/feedback_provider.dart';
import 'global_states/vote_counter.dart';
import 'poll/poll_provider.dart';
import 'welcome/welcome_provider.dart';

void main(List<String> args) async {
  final client = ClientBuilder()
      .setIntent(Intent.allNonPrivileged)
      .registerProvider(WelcomeProvider.new)
      .registerProvider(PollProvider.new)
      .registerProvider(FeedbackProvider.new)
      .build();

  client
    ..register<VoteCounterContract>(VoteCounter.new)
    ..onCommandError = (CommandFailure failure) {
      client.logger.error(
        'Command "${failure.commandName}" failed: ${failure.error}',
      );
    };

  await client.init();
}
21
likes
150
points
226
downloads

Documentation

API reference

Publisher

verified publishermineral-dart.dev

Weekly Downloads

Mineral is a Discord framework for designing discord bots in Dart.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

collection, env_guard, eterl, glob, http, intl, logging, mansion, path, recase, uuid, yaml

More

Packages that depend on mineral