Expand description
A Bevy plugin that allows the developer to interact with the Discord Presence API with ease
This plugin is a Bevy wrapper around the Discord Presence crate which in turn is a wrapper around the Discord Presence API.
§Examples
use bevy::prelude::*;
use bevy_discord_presence::{ActivityState, RPCConfig, RPCPlugin};
fn main() {
println!("hello world!");
let mut app = App::new();
app.add_plugins(DefaultPlugins);
app.add_plugin(RPCPlugin {
config: RPCConfig {
app_id: 425407036495495169,
show_time: true,
}
});
app.add_system(update_presence);
app.run();
}
fn update_presence(mut state: ResMut<ActivityState>) {
state.details = Some("Hello World".to_string());
}Structs§
- Activity
State - The state that holds the Discord activity
- Client
- A wrapper around the internal
discord_presence::Clientstruct that implementsbevy::prelude::Resource - RPCConfig
- Configuration for the RPC plugin
- RPCPlugin
- The main RPC plugin