Class Utilities
- Namespace
- DisCatSharp
- Assembly
- DisCatSharp.dll
Various Discord-related utilities.
public static class Utilities
- Inheritance
-
Utilities
- Inherited Members
Methods
- AddParameter(Uri, string, string)
Adds the specified parameter to the Query String.
- CheckGitHubVersionAsync(DiscordClient, string, string, string, bool, string?, string?)
Perfoms a version check against github releases.
- CheckNuGetVersionAsync(DiscordClient, string, bool, string?)
Performs a version check against nuget.
- Contains(string, params char[])
Checks whether this string contains given characters.
- ContainsChannelMentions(string)
Contains the channel mentions.
- ContainsEmojis(string)
Contains the emojis.
- ContainsNicknameMentions(string)
Contains the nickname mentions.
- ContainsRoleMentions(string)
Contains the role mentions.
- ContainsUserMentions(string)
Contains the user mentions.
- GetChannelMentions(string)
Gets the channel mentions.
- GetDateTimeOffset(long, bool)
Helper method to create a DateTimeOffset from Unix time seconds for targets that do not support this natively.
- GetDateTimeOffsetFromMilliseconds(long, bool)
Helper method to create a DateTimeOffset from Unix time milliseconds for targets that do not support this natively.
- GetEmojis(string)
Gets the emojis.
- GetRoleMentions(string)
Gets the role mentions.
- GetShardId(ulong, int)
Gets a shard id from a guild id and total shard count.
- GetSnowflakeTime(ulong?)
Computes a timestamp from a given snowflake.
- GetSnowflakeTime(ulong)
Computes a timestamp from a given snowflake.
- GetUnixTime(DateTimeOffset)
Helper method to calculate Unix time seconds from a DateTimeOffset for targets that do not support this natively.
- GetUnixTimeFromSnowflake(NullableSnowflakeObject)
Converts a Discord snowflake object to Unix time seconds.
- GetUnixTimeFromSnowflake(SnowflakeObject)
Converts a Discord snowflake object to Unix time seconds.
- GetUnixTimeFromSnowflake(ulong?)
Converts a Discord snowflake to Unix time seconds.
- GetUnixTimeFromSnowflake(ulong)
Converts a Discord snowflake to Unix time seconds.
- GetUserMentions(string)
Gets the user mentions.
- StripIds(string?, bool)
Removes discord-based ids from a given string.
- StripTokens(string?)
Removes discord-based tokens from a given string.
- StripTokensAndOptIds(string?, bool)
Shorthand method to strip both tokens and IDs.
- ToPermissionString(Permissions, bool, bool, bool, bool)
Converts this Permissions into human-readable format.