public Message Unsubscribe(string[] parameters, MessageEvent e) { if (parameters.Length == 0) { return(new Message("/unsubscribe [feed]")); } var obj = col.FindOne(x => x.endpoint_type == e.GetEndpoint().Item1&& x.endpoint_num == e.GetEndpoint().Item2&& x.feed == parameters[0] ); if (obj != null) { col.Delete(x => x.id == obj.id); return(new Message("unsubscribed")); } return(new Message("not subscribed yet")); }
public void Erase(string w) => col.Delete(x => x.keyword == w);