Browse Source

Merge pull request #354 from zenima/docupdate/status

Doc update for modify user sample code
tags/1.0-rc
Christopher F GitHub 8 years ago
parent
commit
c137dce6c9
2 changed files with 5 additions and 8 deletions
  1. +2
    -2
      docs/guides/samples.md
  2. +3
    -6
      docs/guides/samples/faq/status.cs

+ 2
- 2
docs/guides/samples.md View File

@@ -13,8 +13,8 @@ title: Samples


#### Changing the bot's status #### Changing the bot's status


[!code-sharp[Bot Status](samples/faq/status.cs)]
[!code-csharp[Bot Status](samples/faq/status.cs)]


#### Sending a message to a channel #### Sending a message to a channel


[!code-csharp[Message to Channel](samples/faq/send_message.cs)]
[!code-csharp[Message to Channel](samples/faq/send_message.cs)]

+ 3
- 6
docs/guides/samples/faq/status.cs View File

@@ -1,8 +1,5 @@
public async Task ModifyStatus() public async Task ModifyStatus()
{ {
await (await _client.GetCurrentUserAsync()).ModifyStatusAsync(x =>
{
x.Status = UserStatus.Idle;
x.Game = new Game("Type !help for help");
});
}
await _client.SetStatus(UserStatus.Idle);
await _client.SetGame("Type !help for help");
}

Loading…
Cancel
Save