Remove RPC from main distribution (#925)

This commit is contained in:
Christopher F
2018-01-05 20:23:19 -05:00
committed by GitHub
parent 5f46aef3a7
commit b30af57b7f
81 changed files with 1 additions and 20 deletions

View File

@@ -0,0 +1,29 @@
using Discord.Rpc;
namespace Discord.Commands
{
public class RpcCommandContext : ICommandContext
{
public DiscordRpcClient Client { get; }
public IMessageChannel Channel { get; }
public RpcUser User { get; }
public RpcUserMessage Message { get; }
public bool IsPrivate => Channel is IPrivateChannel;
public RpcCommandContext(DiscordRpcClient client, RpcUserMessage msg)
{
Client = client;
Channel = msg.Channel;
User = msg.Author;
Message = msg;
}
//ICommandContext
IDiscordClient ICommandContext.Client => Client;
IGuild ICommandContext.Guild => null;
IMessageChannel ICommandContext.Channel => Channel;
IUser ICommandContext.User => User;
IUserMessage ICommandContext.Message => Message;
}
}