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

retracted

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: '1312131727766061066');

  // 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
0
points
237
downloads

Publisher

verified publishersmolzoey.moe

Weekly Downloads

Discord Rich Presence library for Dart.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

buffer, collection, typed_data, uuid

More

Packages that depend on discord_rich_presence