Added RPC ChannelCreated, GuildCreated and GuildStatusUpdated events
This commit is contained in:
27
src/Discord.Net.Rpc/Entities/Channels/RpcChannel.cs
Normal file
27
src/Discord.Net.Rpc/Entities/Channels/RpcChannel.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using Model = Discord.API.Rpc.ChannelCreatedEvent;
|
||||
|
||||
namespace Discord.Rpc
|
||||
{
|
||||
public class RpcChannel
|
||||
{
|
||||
public ulong Id { get; }
|
||||
public string Name { get; set; }
|
||||
public ChannelType Type { get; set; }
|
||||
|
||||
internal RpcChannel(ulong id)
|
||||
{
|
||||
Id = id;
|
||||
}
|
||||
internal static RpcChannel Create(Model model)
|
||||
{
|
||||
var entity = new RpcChannel(model.Id);
|
||||
entity.Update(model);
|
||||
return entity;
|
||||
}
|
||||
internal void Update(Model model)
|
||||
{
|
||||
Name = model.Name;
|
||||
Type = model.Type;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user