mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
Preliminary support for APIv9 and threads
This commit is contained in:
parent
0e7bcb993e
commit
1f2b9f998d
19 changed files with 127 additions and 24 deletions
|
|
@ -5,5 +5,12 @@ 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;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue