Removed case sensitivity of commands
This commit is contained in:
@@ -41,7 +41,7 @@ namespace Discord.Commands
|
|||||||
{
|
{
|
||||||
string nextPart = parts[index];
|
string nextPart = parts[index];
|
||||||
CommandMap nextGroup;
|
CommandMap nextGroup;
|
||||||
if (_items.TryGetValue(nextPart, out nextGroup))
|
if (_items.TryGetValue(nextPart.ToLowerInvariant(), out nextGroup))
|
||||||
return nextGroup.GetItem(index + 1, parts);
|
return nextGroup.GetItem(index + 1, parts);
|
||||||
else
|
else
|
||||||
return null;
|
return null;
|
||||||
@@ -68,7 +68,7 @@ namespace Discord.Commands
|
|||||||
{
|
{
|
||||||
string nextPart = parts[index];
|
string nextPart = parts[index];
|
||||||
CommandMap nextGroup;
|
CommandMap nextGroup;
|
||||||
if (_items.TryGetValue(nextPart, out nextGroup))
|
if (_items.TryGetValue(nextPart.ToLowerInvariant(), out nextGroup))
|
||||||
{
|
{
|
||||||
var cmd = nextGroup.GetCommands(index + 1, parts);
|
var cmd = nextGroup.GetCommands(index + 1, parts);
|
||||||
if (cmd != null)
|
if (cmd != null)
|
||||||
@@ -93,7 +93,7 @@ namespace Discord.Commands
|
|||||||
if (index != parts.Length)
|
if (index != parts.Length)
|
||||||
{
|
{
|
||||||
CommandMap nextGroup;
|
CommandMap nextGroup;
|
||||||
string name = parts[index];
|
string name = parts[index].ToLowerInvariant();
|
||||||
string fullName = string.Join(" ", parts, 0, index + 1);
|
string fullName = string.Join(" ", parts, 0, index + 1);
|
||||||
if (!_items.TryGetValue(name, out nextGroup))
|
if (!_items.TryGetValue(name, out nextGroup))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user