diff --git a/Discord.Net.sln b/Discord.Net.sln
index 900f44b13..bac38366c 100644
--- a/Discord.Net.sln
+++ b/Discord.Net.sln
@@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2012
+# Visual Studio 14
VisualStudioVersion = 14.0.23107.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{8D7989F0-66CE-4DBB-8230-D8C811E9B1D7}"
@@ -13,10 +13,6 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Discord.Net.Commands", "src
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "net45", "net45", "{DF03D4E8-38F6-4FE1-BC52-E38124BE8AFD}"
EndProject
-Project("{9344BDBB-3E7F-41FC-A0DD-8665D75EE146}") = "Discord.Net", "src\Discord.Net.Net45\Discord.Net.csproj", "{8D71A857-879A-4A10-859E-5FF824ED6688}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Discord.Net.Commands", "src\Discord.Net.Commands.Net45\Discord.Net.Commands.csproj", "{1B5603B4-6F8F-4289-B945-7BAAE523D740}"
-EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{6317A2E6-8E36-4C3E-949B-3F10EC888AB9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Discord.Net.Tests", "test\Discord.Net.Tests\Discord.Net.Tests.csproj", "{855D6B1D-847B-42DA-BE6A-23683EA89511}"
@@ -26,43 +22,58 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
global.json = global.json
EndProjectSection
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Discord.Net", "src\Discord.Net.Net45\Discord.Net.csproj", "{8D71A857-879A-4A10-859E-5FF824ED6688}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Discord.Net.Commands", "src\Discord.Net.Commands.Net45\Discord.Net.Commands.csproj", "{1B5603B4-6F8F-4289-B945-7BAAE523D740}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
+ FullDebug|Any CPU = FullDebug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {ACFB060B-EC8A-4926-B293-04C01E17EE23}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {ACFB060B-EC8A-4926-B293-04C01E17EE23}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {ACFB060B-EC8A-4926-B293-04C01E17EE23}.FullDebug|Any CPU.ActiveCfg = FullDebug|Any CPU
+ {ACFB060B-EC8A-4926-B293-04C01E17EE23}.FullDebug|Any CPU.Build.0 = FullDebug|Any CPU
+ {ACFB060B-EC8A-4926-B293-04C01E17EE23}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {ACFB060B-EC8A-4926-B293-04C01E17EE23}.Release|Any CPU.Build.0 = Release|Any CPU
{19793545-EF89-48F4-8100-3EBAAD0A9141}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{19793545-EF89-48F4-8100-3EBAAD0A9141}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {19793545-EF89-48F4-8100-3EBAAD0A9141}.FullDebug|Any CPU.ActiveCfg = Debug|Any CPU
+ {19793545-EF89-48F4-8100-3EBAAD0A9141}.FullDebug|Any CPU.Build.0 = Debug|Any CPU
{19793545-EF89-48F4-8100-3EBAAD0A9141}.Release|Any CPU.ActiveCfg = Release|Any CPU
{19793545-EF89-48F4-8100-3EBAAD0A9141}.Release|Any CPU.Build.0 = Release|Any CPU
- {1B5603B4-6F8F-4289-B945-7BAAE523D740}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {1B5603B4-6F8F-4289-B945-7BAAE523D740}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {1B5603B4-6F8F-4289-B945-7BAAE523D740}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {1B5603B4-6F8F-4289-B945-7BAAE523D740}.Release|Any CPU.Build.0 = Release|Any CPU
{855D6B1D-847B-42DA-BE6A-23683EA89511}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{855D6B1D-847B-42DA-BE6A-23683EA89511}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {855D6B1D-847B-42DA-BE6A-23683EA89511}.FullDebug|Any CPU.ActiveCfg = Debug|Any CPU
+ {855D6B1D-847B-42DA-BE6A-23683EA89511}.FullDebug|Any CPU.Build.0 = Debug|Any CPU
{855D6B1D-847B-42DA-BE6A-23683EA89511}.Release|Any CPU.ActiveCfg = Release|Any CPU
{855D6B1D-847B-42DA-BE6A-23683EA89511}.Release|Any CPU.Build.0 = Release|Any CPU
{8D71A857-879A-4A10-859E-5FF824ED6688}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8D71A857-879A-4A10-859E-5FF824ED6688}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8D71A857-879A-4A10-859E-5FF824ED6688}.FullDebug|Any CPU.ActiveCfg = FullDebug|Any CPU
+ {8D71A857-879A-4A10-859E-5FF824ED6688}.FullDebug|Any CPU.Build.0 = FullDebug|Any CPU
{8D71A857-879A-4A10-859E-5FF824ED6688}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8D71A857-879A-4A10-859E-5FF824ED6688}.Release|Any CPU.Build.0 = Release|Any CPU
- {ACFB060B-EC8A-4926-B293-04C01E17EE23}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {ACFB060B-EC8A-4926-B293-04C01E17EE23}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {ACFB060B-EC8A-4926-B293-04C01E17EE23}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {ACFB060B-EC8A-4926-B293-04C01E17EE23}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1B5603B4-6F8F-4289-B945-7BAAE523D740}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1B5603B4-6F8F-4289-B945-7BAAE523D740}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1B5603B4-6F8F-4289-B945-7BAAE523D740}.FullDebug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1B5603B4-6F8F-4289-B945-7BAAE523D740}.FullDebug|Any CPU.Build.0 = Debug|Any CPU
+ {1B5603B4-6F8F-4289-B945-7BAAE523D740}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1B5603B4-6F8F-4289-B945-7BAAE523D740}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{EA68EBE2-51C8-4440-9EF7-D633C90A5D35} = {8D7989F0-66CE-4DBB-8230-D8C811E9B1D7}
- {DF03D4E8-38F6-4FE1-BC52-E38124BE8AFD} = {8D7989F0-66CE-4DBB-8230-D8C811E9B1D7}
{ACFB060B-EC8A-4926-B293-04C01E17EE23} = {EA68EBE2-51C8-4440-9EF7-D633C90A5D35}
{19793545-EF89-48F4-8100-3EBAAD0A9141} = {EA68EBE2-51C8-4440-9EF7-D633C90A5D35}
+ {DF03D4E8-38F6-4FE1-BC52-E38124BE8AFD} = {8D7989F0-66CE-4DBB-8230-D8C811E9B1D7}
+ {855D6B1D-847B-42DA-BE6A-23683EA89511} = {6317A2E6-8E36-4C3E-949B-3F10EC888AB9}
{8D71A857-879A-4A10-859E-5FF824ED6688} = {DF03D4E8-38F6-4FE1-BC52-E38124BE8AFD}
{1B5603B4-6F8F-4289-B945-7BAAE523D740} = {DF03D4E8-38F6-4FE1-BC52-E38124BE8AFD}
- {855D6B1D-847B-42DA-BE6A-23683EA89511} = {6317A2E6-8E36-4C3E-949B-3F10EC888AB9}
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
diff --git a/README.md b/README.md
index e0d292577..7136d32dc 100644
--- a/README.md
+++ b/README.md
@@ -1,10 +1,10 @@
-# Discord.Net v0.7.3-beta4
+# Discord.Net v0.8.0-beta1
An unofficial .Net API Wrapper for the Discord client (http://discordapp.com).
Check out the [documentation](https://discordnet.readthedocs.org/en/latest/) or join the [Discord API Chat](https://discord.gg/0SBTUU1wZTVjAMPx).
### Current Features
-- Using Discord API version 3
+- Using Discord API v3
- Supports .Net 4.5 and DNX 4.5.1
- Server Management (Servers, Channels, Messages, Invites, Roles, Users)
- Send/Receieve Messages (Including mentions and formatting)
@@ -17,6 +17,4 @@ You can download Discord.Net from NuGet:
- [Discord.Net.Commands](https://www.nuget.org/packages/Discord.Net.Commands/)
### Known Issues
-- Due to current Discord restrictions, private messages are blocked unless both the sender and recipient are members of the same server.
-- The Message cache does not currently clean up when their entries are no longer referenced, and there is currently no cap to it. For now, disconnecting and reconnecting will clear all caches.
- DNX Core 5.0 is experiencing several network-related issues and support has been temporarily dropped.
diff --git a/src/Discord.Net.Commands.Net45/Discord.Net.Commands.csproj b/src/Discord.Net.Commands.Net45/Discord.Net.Commands.csproj
index b1540a5e3..69f042ac3 100644
--- a/src/Discord.Net.Commands.Net45/Discord.Net.Commands.csproj
+++ b/src/Discord.Net.Commands.Net45/Discord.Net.Commands.csproj
@@ -52,11 +52,14 @@
CommandsPlugin.Events.cs
-
- Shared\TaskHelper.cs
-
+
+
+ {8d71a857-879a-4a10-859e-5ff824ed6688}
+ Discord.Net
+
+
-
-
- {8D71A857-879A-4A10-859E-5FF824ED6688}
- Discord.Net
-
-
\ No newline at end of file
diff --git a/src/Discord.Net.Commands.Net45/Properties/AssemblyInfo.cs b/src/Discord.Net.Commands.Net45/Properties/AssemblyInfo.cs
index cb9c99e42..e242053d8 100644
--- a/src/Discord.Net.Commands.Net45/Properties/AssemblyInfo.cs
+++ b/src/Discord.Net.Commands.Net45/Properties/AssemblyInfo.cs
@@ -13,6 +13,6 @@ using System.Runtime.InteropServices;
[assembly: ComVisible(false)]
[assembly: Guid("76ea00e6-ea24-41e1-acb2-639c0313fa80")]
-[assembly: AssemblyVersion("0.7.3.0")]
-[assembly: AssemblyFileVersion("0.7.3.0")]
+[assembly: AssemblyVersion("0.8.0.0")]
+[assembly: AssemblyFileVersion("0.8.0.0")]
diff --git a/src/Discord.Net.Commands/CommandsPlugin.Events.cs b/src/Discord.Net.Commands/CommandsPlugin.Events.cs
index c33f751ad..5901aa2a7 100644
--- a/src/Discord.Net.Commands/CommandsPlugin.Events.cs
+++ b/src/Discord.Net.Commands/CommandsPlugin.Events.cs
@@ -11,14 +11,10 @@ namespace Discord.Commands
public string ArgText { get; }
public int? Permissions { get; }
public string[] Args { get; }
-
+
public User User => Message.User;
- public string UserId => Message.UserId;
- public Member Member => Message.Member;
public Channel Channel => Message.Channel;
- public string ChannelId => Message.ChannelId;
public Server Server => Message.Channel.Server;
- public string ServerId => Message.Channel.ServerId;
public CommandEventArgs(Message message, Command command, string commandText, string argText, int? permissions, string[] args)
{
diff --git a/src/Discord.Net.Commands/CommandsPlugin.cs b/src/Discord.Net.Commands/CommandsPlugin.cs
index 478a584db..44abce8f4 100644
--- a/src/Discord.Net.Commands/CommandsPlugin.cs
+++ b/src/Discord.Net.Commands/CommandsPlugin.cs
@@ -8,7 +8,7 @@ namespace Discord.Commands
{
private readonly DiscordClient _client;
private List _commands;
- private Func _getPermissions;
+ private Func _getPermissions;
public IEnumerable Commands => _commands;
@@ -17,7 +17,7 @@ namespace Discord.Commands
public bool RequireCommandCharInPublic { get; set; }
public bool RequireCommandCharInPrivate { get; set; }
- public CommandsPlugin(DiscordClient client, Func getPermissions = null)
+ public CommandsPlugin(DiscordClient client, Func getPermissions = null)
{
_client = client;
_getPermissions = getPermissions;
@@ -28,14 +28,14 @@ namespace Discord.Commands
RequireCommandCharInPublic = true;
RequireCommandCharInPrivate = true;
- client.MessageCreated += async (s, e) =>
+ client.MessageReceived += async (s, e) =>
{
//If commands aren't being used, don't bother processing them
if (_commands.Count == 0)
return;
//Ignore messages from ourselves
- if (e.Message.UserId == client.CurrentUserId)
+ if (e.Message.User == client.CurrentUser)
return;
//Check for the command character
@@ -96,7 +96,7 @@ namespace Discord.Commands
argText = msg.Substring(args[cmd.Parts.Length].Index);
//Check Permissions
- int permissions = _getPermissions != null ? _getPermissions(e.Message.User, e.Message.Channel?.Server) : 0;
+ int permissions = _getPermissions != null ? _getPermissions(e.Message.User) : 0;
var eventArgs = new CommandEventArgs(e.Message, cmd, msg, argText, permissions, newArgs);
if (permissions < cmd.MinPerms)
{
@@ -110,7 +110,7 @@ namespace Discord.Commands
{
var task = cmd.Handler(eventArgs);
if (task != null)
- await task;
+ await task.ConfigureAwait(false);
}
catch (Exception ex)
{
diff --git a/src/Discord.Net.Commands/project.json b/src/Discord.Net.Commands/project.json
index b09d1b4e5..aac273d4e 100644
--- a/src/Discord.Net.Commands/project.json
+++ b/src/Discord.Net.Commands/project.json
@@ -1,11 +1,10 @@
{
- "version": "0.7.3",
+ "version": "0.8.0-beta1",
"description": "A Discord.Net extension adding basic command support.",
"authors": [ "RogueException" ],
"tags": [ "discord", "discordapp" ],
"projectUrl": "https://github.com/RogueException/Discord.Net",
"licenseUrl": "http://opensource.org/licenses/MIT",
- "compile": ["**/*.cs", "../Discord.Net/Shared/*.cs"],
"repository": {
"type": "git",
"url": "git://github.com/RogueException/Discord.Net"
@@ -14,7 +13,7 @@
"warningsAsErrors": true
},
"dependencies": {
- "Discord.Net": "0.7.3"
+ "Discord.Net": "0.8.0-beta1"
},
"frameworks": {
"net45": { },
diff --git a/src/Discord.Net.Net45/Discord.Net.csproj b/src/Discord.Net.Net45/Discord.Net.csproj
index aa9491683..0b3717e57 100644
--- a/src/Discord.Net.Net45/Discord.Net.csproj
+++ b/src/Discord.Net.Net45/Discord.Net.csproj
@@ -67,37 +67,74 @@
-
-
-
-
-
-
- API\Common.cs
+
+ API\Auth.cs
+
+
+ API\Bans.cs
+
+
+ API\Channels.cs
API\Endpoints.cs
-
- API\HttpException.cs
+
+ API\Enums\AvatarImageType.cs
+
+
+ API\Enums\ChannelType.cs
+
+
+ API\Enums\PermissionTarget.cs
+
+
+ API\Enums\Regions.cs
+
+
+ API\Enums\StringEnum.cs
+
+
+ API\Enums\UserStatus.cs
+
+
+ API\Invites.cs
+
+
+ API\Maintenance.cs
-
- API\Requests.cs
+
+ API\Members.cs
-
- API\Responses.cs
+
+ API\Messages.cs
-
- API\RestClient.BuiltIn.cs
+
+ API\Permissions.cs
-
- API\RestClient.cs
+
+ API\Presence.cs
-
- API\RestClient.Events.cs
+
+ API\Roles.cs
-
- API\RestClient.SharpRest.cs
+
+ API\Servers.cs
+
+
+ API\Users.cs
+
+
+ API\Voice.cs
+
+
+ API\WebSockets.cs
+
+
+ Audio\IDiscordVoiceBuffer.cs
+
+
+ Audio\IDiscordVoiceClient.cs
Audio\Opus.cs
@@ -111,74 +148,68 @@
Audio\Sodium.cs
-
- Collections\AsyncCollection.cs
+
+ Audio\VoiceBuffer.cs
-
- Collections\Channels.cs
+
+ DiscordAPIClient.cs
-
- Collections\Members.cs
+
+ DiscordAPIClientConfig.cs
-
- Collections\Messages.cs
+
+ DiscordClient.Bans.cs
-
- Collections\Roles.cs
+
+ DiscordClient.Channels.cs
-
- Collections\Servers.cs
+
+ DiscordClient.cs
-
- Collections\Users.cs
+
+ DiscordClient.Invites.cs
-
- DiscordAPIClient.cs
+
+ DiscordClient.Messages.cs
-
- DiscordClient.API.cs
+
+ DiscordClient.Permissions.cs
-
- DiscordClient.Cache.cs
+
+ DiscordClient.Roles.cs
-
- DiscordClient.cs
+
+ DiscordClient.Servers.cs
+
+
+ DiscordClient.Users.cs
-
- DiscordClient.Events.cs
+
+ DiscordClient.Voice.cs
DiscordClientConfig.cs
-
- DiscordSimpleClient.cs
-
-
- DiscordSimpleClient.Events.cs
-
-
- DiscordSimpleClient.Voice.cs
-
-
- DiscordSimpleClientConfig.cs
+
+ DiscordWSClient.cs
-
- Enums\ChannelTypes.cs
+
+ DiscordWSClient.Events.cs
-
- Enums\PermissionTarget.cs
+
+ DiscordWSClient.Voice.cs
-
- Enums\Regions.cs
+
+ DiscordWSClientConfig.cs
-
- Enums\UserStatus.cs
+
+ Helpers\AsyncCollection.cs
-
- Format.cs
+
+ Helpers\BitHelper.cs
-
- Helpers\CollectionHelper.cs
+
+ Helpers\CachedObject.cs
Helpers\EpochTime.cs
@@ -186,32 +217,38 @@
Helpers\Extensions.cs
-
- Helpers\MessageCleaner.cs
+
+ Helpers\Format.cs
-
- Helpers\TaskExtensions.cs
+
+ Helpers\Mention.cs
-
- Mention.cs
+
+ Helpers\Reference.cs
+
+
+ Helpers\TaskHelper.cs
+
+
+ HttpException.cs
Models\Channel.cs
+
+ Models\Color.cs
+
+
+ Models\GlobalUser.cs
+
Models\Invite.cs
-
- Models\Member.cs
-
Models\Message.cs
-
- Models\PackedColor.cs
-
-
- Models\PackedPermissions.cs
+
+ Models\Permissions.cs
Models\Role.cs
@@ -222,59 +259,62 @@
Models\User.cs
-
- Shared\TaskHelper.cs
-
-
- TimeoutException.cs
-
-
- WebSockets\Data\Commands.cs
+
+ Net\Rest\IRestEngine.cs
-
- WebSockets\Data\DataWebSocket.cs
+
+ Net\Rest\RestClient.cs
-
- WebSockets\Data\DataWebSockets.Events.cs
+
+ Net\Rest\RestClient.Events.cs
-
- WebSockets\Data\Events.cs
+
+ Net\Rest\SharpRestEngine.cs
-
- WebSockets\Voice\Commands.cs
+
+ Net\WebSockets\DataWebSocket.cs
-
- WebSockets\Voice\Events.cs
+
+ Net\WebSockets\DataWebSockets.Events.cs
-
- WebSockets\Voice\VoiceBuffer.cs
+
+ Net\WebSockets\IWebSocketEngine.cs
-
- WebSockets\Voice\VoiceWebSocket.cs
+
+ Net\WebSockets\VoiceWebSocket.cs
-
- WebSockets\Voice\VoiceWebSocket.Events.cs
+
+ Net\WebSockets\VoiceWebSocket.Events.cs
-
- WebSockets\WebSocket.BuiltIn.cs
+
+ Net\WebSockets\WebSocket.cs
-
- WebSockets\WebSocket.cs
+
+ Net\WebSockets\WebSocket.Events.cs
-
- WebSockets\WebSocket.Events.cs
+
+ Net\WebSockets\WebSocketSharpEngine.cs
-
- WebSockets\WebSocket.WebSocketSharp.cs
-
-
- WebSockets\WebSocketMessage.cs
+
+ TimeoutException.cs
+
+ lib\libopus.so
+
+
+
+ lib\libsodium.dll
+
+
+ lib\opus.dll
+
+
+