discord_rich_presence 1.0.0 discord_rich_presence: ^1.0.0 copied to clipboard
Discord Rich Presence library for Dart.
example/discord_rich_presence_example.dart
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(),
),
),
);
// Disconnect when you're done (Will render the client unusable)
await client.disconnect();
}