https://github.com/depthbomb/discord.addons.extensions
An unofficial library for Discord.Net that adds useful extensions.
https://github.com/depthbomb/discord.addons.extensions
Last synced: 5 days ago
JSON representation
An unofficial library for Discord.Net that adds useful extensions.
- Host: GitHub
- URL: https://github.com/depthbomb/discord.addons.extensions
- Owner: depthbomb
- License: mit
- Created: 2024-02-08T03:14:43.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-02-08T10:48:09.000Z (over 2 years ago)
- Last Synced: 2026-05-27T20:47:01.199Z (24 days ago)
- Language: C#
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Discord.Addons.Extensions
I was tired of copying and pasting common extensions I use between [Discord.Net](https://github.com/discord-net/Discord.Net) projects so I extracted them into a shared library.
This is a still a work-in-progress but features are ready to use.
[](https://www.nuget.org/packages/Discord.Addons.Extensions)
[](https://www.nuget.org/packages/Discord.Addons.Extensions)
---
### StringExtensions
- `.ToHeading(int? level)`
- `.ToH1()`
- `.ToH2()`
- `.ToH3()`
- `.ToSpoiler()`
- `.ToItalic(bool useUnderscores, bool bold)`
- `.ToBold(bool italic)`
- `.ToUnderline(bool bold, bool italic)`
- `.ToStrikethrough()`
- `.HideLinkEmbed()`
- `.ToQuote()`
- `.ToBlockQuote()`
- `.ToHyperlink(string url, string? title)`
- `.ToHyperlink(Uri url, string? title)`
- `.ToInlineCode()`
- `.ToCodeBlock(string? language)`
- `.IsValidDiscordToken(TokenType? type)`
- `.TryValidateDiscordToken(out string? result, TokenType? type)`
### LongExtensions
- `.ToUserMention(bool? ping)`
- `.ToChannelMention()`
- `.ToRoleMention()`
### EnumerableExtensions
- `.ToUnorderedList(bool useAsterisks)`
- `.ToOrderedList()`
### DateTimeExtensions/DateTimeOffsetExtensions
- `.ToTimestampTag(TimestampTagStyles style)`
- `.ToTimestampTag(string style)`
### DiscordSocketClientExtensions
- `.GetCategoryChannelAsync(ulong channelId)`
- `.GetTextChannelAsync(ulong channelId)`
- `.GetVoiceChannelAsync(ulong channelId)`
- `.GetForumChannelAsync(ulong channelId)`
- `.GetThreadChannelAsync(ulong channelId)`
- `.GetOrCreateWebhookAsync(ulong channelId, string name, string? auditLogReason)`
- `.CreateWebhookAsync(ulong channelId, string name, string? auditLogReason)`
- `.GetWebhookAsync(ulong channelId, string name)`