PluralKit/Myriad/Extensions/ChannelExtensions.cs
2021-08-27 11:03:47 -04:00

16 lines
518 B
C#

using Myriad.Types;
namespace Myriad.Extensions
{
public static class ChannelExtensions
{
public static string Mention(this Channel channel) => $"<#{channel.Id}>";
public static bool IsThread(this Channel channel) => channel.Type.IsThread();
public static bool IsThread(this Channel.ChannelType type) =>
type is Channel.ChannelType.GuildPublicThread
or Channel.ChannelType.GuildPrivateThread
or Channel.ChannelType.GuildNewsThread;
}
}