Skip to content

Commit

Permalink
updated the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
iLinked committed Jul 7, 2020
1 parent 45cd5f3 commit 9ad7c7e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,13 @@ private static void Session_OnConnected(DiscordVoiceSession session, EventArgs e
// Create a stream with 96kbps, optimized for music
DiscordVoiceStream stream = session.CreateStream(96000, AudioApplication.Music);

// to play audio in a voice channel, we must first update our voice state
session.SetSpeakingState(DiscordVoiceSpeakingState.Microphone);

// Play audio from 'Audio.mp3'
stream.CopyFrom(DiscordVoiceUtils.ReadFromFile("Audio.mp3"));

// Anarchy notifies Discord that you're sending audio through, but you have to tell it that you've stopped yourself.
session.SetSpeaking(false);
session.SetSpeakingState(DiscordVoiceSpeakingState.NotSpeaking);

session.Disconnect();
}
Expand All @@ -138,9 +140,9 @@ private static void Session_OnConnected(DiscordVoiceSession session, EventArgs e
```csharp
DiscordClient client = new DiscordClient("your token here");

client.User.ChangeProfile(new UserProfileUpdate() { Avatar = Image.FromFile("lol.png") }); //this function is for updating profile related settings
client.User.ChangeProfile(new UserProfileUpdate() { Avatar = Image.FromFile("lol.png") }); //this method is for updating profile related settings
client.User.ChangeSettings(new UserSettingsProperties() { Language = Language.EnglishUS }); //this is for changing any other setting
client.User.ChangeSettings(new UserSettingsProperties() { Language = DiscordLanguage.EnglishUS }); //this is for changing any other setting
```


Expand Down

0 comments on commit 9ad7c7e

Please sign in to comment.