Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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)`