Browse Source

Merge branch 'Davipb-issues/262' into dev

tags/1.0-rc
RogueException 8 years ago
parent
commit
ff33b3b7a3
2 changed files with 5 additions and 7 deletions
  1. +4
    -6
      src/Discord.Net.Commands/CommandParser.cs
  2. +1
    -1
      src/Discord.Net.Core/DiscordConfig.cs

+ 4
- 6
src/Discord.Net.Commands/CommandParser.cs View File

@@ -65,7 +65,9 @@ namespace Discord.Commands
return ParseResult.FromError(CommandError.ParseFailed, "There must be at least one character of whitespace between arguments.");
else
{
curParam = command.Parameters.Count > argList.Count ? command.Parameters[argList.Count] : null;
if (curParam == null)
curParam = command.Parameters.Count > argList.Count ? command.Parameters[argList.Count] : null;

if (curParam != null && curParam.IsRemainder)
{
argBuilder.Append(c);
@@ -116,11 +118,7 @@ namespace Discord.Commands
{
paramList.Add(typeReaderResult);

if (curPos == endPos)
{
curParam = null;
curPart = ParserPart.None;
}
curPart = ParserPart.None;
}
else
{


+ 1
- 1
src/Discord.Net.Core/DiscordConfig.cs View File

@@ -11,7 +11,7 @@ namespace Discord
"Unknown";

public static readonly string ClientAPIUrl = $"https://discordapp.com/api/v{APIVersion}/";
public const string CDNUrl = "https://discordcdn.com/";
public const string CDNUrl = "https://cdn.discordapp.com/";
public const string InviteUrl = "https://discord.gg/";

public const int DefaultRequestTimeout = 15000;


Loading…
Cancel
Save