/// <summary>Returns whether meta commands are allowed in a given channel.</summary> /// <param name="channel">The channel to check.</param> /// <returns>True if allowed, false otherwise.</returns> public static bool MetaCommandsAllowed(IMessageChannel channel) { if (channel is SocketThreadChannel threadChannel) { channel = threadChannel.ParentChannel; } return(ChannelToDetails.TryGetValue(channel.Id, out ChannelDetails details) && details.Docs); }
/// <summary> /// Returns whether meta commands are allowed in a given channel. /// </summary> /// <param name="channel">The channel to check.</param> /// <returns>True if allowed, false otherwise.</returns> public bool MetaCommandsAllowed(ISocketMessageChannel channel) { return(ChannelToDetails.TryGetValue(channel.Id, out ChannelDetails details) && details.Docs); }