diff --git a/src/Discord.Net/DiscordClient.cs b/src/Discord.Net/DiscordClient.cs
index a5f1317c4..a2fe85afd 100644
--- a/src/Discord.Net/DiscordClient.cs
+++ b/src/Discord.Net/DiscordClient.cs
@@ -1040,8 +1040,8 @@ namespace Discord
#endregion
#region Async Wrapper
- /// Blocking call that will not return until client has been stopped. This is mainly intended for use in console applications.
- public void Run(Func asyncAction)
+ /// Blocking call that will execute the provided async method and wait until client has been manually stopped. This is mainly intended for use in console applications.
+ public void ExecuteAndWait(Func asyncAction)
{
try
{
@@ -1050,7 +1050,7 @@ namespace Discord
catch (TaskCanceledException) { }
_disconnectedEvent.WaitOne();
}
- /// Blocking call that will not return until client has been stopped. This is mainly intended for use in console applications.
+ /// Blocking call and wait until client has been manually stopped. This is mainly intended for use in console applications.
public void Wait()
{
_disconnectedEvent.WaitOne();
diff --git a/src/Discord.Net/Legacy.cs b/src/Discord.Net/Legacy.cs
index 8b0f3b78e..e74494508 100644
--- a/src/Discord.Net/Legacy.cs
+++ b/src/Discord.Net/Legacy.cs
@@ -25,6 +25,17 @@ namespace Discord.Legacy
public static class LegacyExtensions
{
+ [Obsolete("Use DiscordClient.ExecuteAndWait")]
+ public static void Run(this DiscordClient client, Func asyncAction)
+ {
+ client.ExecuteAndWait(asyncAction);
+ }
+ [Obsolete("Use DiscordClient.Wait")]
+ public static void Run(this DiscordClient client)
+ {
+ client.Wait();
+ }
+
[Obsolete("Use Server.FindChannels")]
public static IEnumerable FindChannels(this DiscordClient client, Server server, string name, ChannelType type = null, bool exactMatch = false)
{