Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: about 1 month 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 (11 months ago)
- Default Branch: master
- Last Pushed: 2024-02-08T10:48:09.000Z (11 months ago)
- Last Synced: 2024-11-05T05:48:48.612Z (about 2 months 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.
[![NuGet Downloads](https://img.shields.io/nuget/dt/Discord.Addons.Extensions?style=for-the-badge&logo=nuget&cacheSeconds=600)](https://www.nuget.org/packages/Discord.Addons.Extensions)
[![NuGet Version](https://img.shields.io/nuget/v/Discord.Addons.Extensions?style=for-the-badge&logo=nuget&cacheSeconds=600)](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)`