public ListenerInfo GetListener(string id) { var found = Android.FindListener(id); if (found == null) { return(null); } return(ListenerInfo.Create(found)); }
public IEnumerable <ListenerInfo> GetListeners(ulong guildID, ulong channelID) { if (!Android.AndroidInstances.TryGetValue(guildID, out var instance)) { return(Array.Empty <ListenerInfo>()); } return(instance.Listeners.Where(l => l.ChannelID == channelID || l.GlobalListener).OrderBy(l => l.GlobalListener).Select(l => ListenerInfo.Create(l))); }