30 lines
765 B
C#
30 lines
765 B
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
namespace Maki
|
|
{
|
|
internal sealed class MessageManager : BaseManager<DiscordMessage>
|
|
{
|
|
internal MessageManager()
|
|
{
|
|
}
|
|
|
|
public DiscordMessage Id(ulong id)
|
|
{
|
|
lock (Collection)
|
|
return Collection.Where(x => x.Id == id).FirstOrDefault();
|
|
}
|
|
|
|
public IEnumerable<DiscordMessage> Channel(DiscordChannel channel)
|
|
{
|
|
lock (Collection)
|
|
return Collection.Where(x => x.Channel == channel);
|
|
}
|
|
|
|
public IEnumerable<DiscordMessage> Server(DiscordServer server)
|
|
{
|
|
lock (Collection)
|
|
return Collection.Where(x => x.Server == server);
|
|
}
|
|
}
|
|
}
|