PluralKit/Myriad/Extensions/ChannelExtensions.cs

15 lines
480 B
C#
Raw Permalink Normal View History

2021-08-27 15:03:47 +00:00
using Myriad.Types;
namespace Myriad.Extensions;
public static class ChannelExtensions
2020-12-22 12:15:26 +00:00
{
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;
2020-12-22 12:15:26 +00:00
}