Browse Source

Fixed HandleCommand Error message

if (!result.IsSuccess)
    await msg.Channel.SendMessageAsync(result.ErrorReason);
}
msg -> context
tags/1.0-rc
Evan Sours GitHub 8 years ago
parent
commit
dd9ae6e870
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      docs/guides/samples/command_handler.cs

+ 2
- 2
docs/guides/samples/command_handler.cs View File

@@ -50,7 +50,7 @@ public class Program
// rather an object stating if the command executed succesfully)
var result = await commands.ExecuteAsync(context, argPos, map);
if (!result.IsSuccess)
await msg.Channel.SendMessageAsync(result.ErrorReason);
await context.Channel.SendMessageAsync(result.ErrorReason);
}

}
}

Loading…
Cancel
Save