Started rename of member -> user, added server permission resolving, added channel message cache options.

This commit is contained in:
RogueException
2015-10-24 22:16:38 -03:00
parent 55e8b3b7d3
commit 01f299e030
21 changed files with 221 additions and 162 deletions

View File

@@ -12,7 +12,7 @@ namespace Discord.Commands
public int? Permissions { get; }
public string[] Args { get; }
public Member Member => Message.Member;
public User Member => Message.Member;
public Channel Channel => Message.Channel;
public Server Server => Message.Channel.Server;

View File

@@ -8,7 +8,7 @@ namespace Discord.Commands
{
private readonly DiscordClient _client;
private List<Command> _commands;
private Func<Member, int> _getPermissions;
private Func<User, int> _getPermissions;
public IEnumerable<Command> Commands => _commands;
@@ -17,7 +17,7 @@ namespace Discord.Commands
public bool RequireCommandCharInPublic { get; set; }
public bool RequireCommandCharInPrivate { get; set; }
public CommandsPlugin(DiscordClient client, Func<Member, int> getPermissions = null)
public CommandsPlugin(DiscordClient client, Func<User, int> getPermissions = null)
{
_client = client;
_getPermissions = getPermissions;