discord_rich_presence 1.1.0 copy "discord_rich_presence: ^1.1.0" to clipboard
discord_rich_presence: ^1.1.0 copied to clipboard

Discord Rich Presence library for Dart.

example/discord_rich_presence_example.dart

import 'dart:io';

import 'package:discord_rich_presence/discord_rich_presence.dart';

void main() async {
  // Create your client
  final Client client = Client(clientId: '');

  // Connect to Discord (via IPC)
  await client.connect();

  // Set your awesome activity
  await client.setActivity(
    Activity(
      name: 'minecraft',
      type: ActivityType.playing,
      timestamps: ActivityTimestamps(
        start: DateTime.now(),
      ),
    ),
  );

  // Wait 5 seconds
  sleep(Duration(seconds: 5));

  // Disconnect when you're done (Will render the client unusable)
  await client.disconnect();
}
1
likes
130
points
237
downloads

Publisher

verified publishersmolzoey.moe

Weekly Downloads

Discord Rich Presence library for Dart.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Unlicense (license)

Dependencies

buffer, collection, typed_data, uuid

More

Packages that depend on discord_rich_presence