Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Application Emojis #525

Merged
merged 1 commit into from
Jul 19, 2024
Merged

feat: Application Emojis #525

merged 1 commit into from
Jul 19, 2024

Conversation

Lulalaby
Copy link
Member

@Lulalaby Lulalaby commented Jul 19, 2024

Description

This implements Application Emojis (THANKS MAISY).
Breaking change in DiscordEmoji.TryFromName (additional required parameter)

Added methods, properties & objects

  • BaseDiscordClient.Emojis- (IReadOnlyDictionary<ulong, DiscordApplicationEmoji>)
  • DiscordClient.Emojis- (IReadOnlyDictionary<ulong, DiscordApplicationEmoji>)
  • DiscordClient.GetApplicationEmojisAsync(bool fetch = false) - (Task<IReadOnlyList<DiscordApplicationEmoji>>)
  • DiscordClient.GetApplicationEmojiAsync(ulong id, bool fetch = false) - (Task<DiscordApplicationEmoji?>)
  • DiscordClient.CreateApplicationEmojiAsync(string name, Stream image) - (Task<DiscordApplicationEmoji>)
  • DiscordClient.ModifyApplicationEmojiAsync(ulong id, string name) - (Task<DiscordApplicationEmoji>)
  • DiscordClient.DeleteApplicationEmojiAsync(ulong id)
  • DiscordConfiguration.AutoFetchApplicationEmojis
  • DiscordApplicationEmoji
  • DiscordApplicationEmoji.ModifyAsync(string name) - (Task<DiscordApplicationEmoji>)
  • DiscordApplicationEmoji.DeleteAsync()
  • DiscordEmoji.FromApplicationEmote(BaseDiscordClient client, ulong id)- (DiscordEmoji), can be casted to DiscordApplicationEmoji

Changed methods, properties & objects

  • DiscordEmoji.RolesInternal - Will default to [] meaning RolesInternal.Roles should never throw an NRE. Made it internal
  • DiscordEmoji.FromName(BaseDiscordClient client, string name, bool includeGuilds = true, bool includeApplication = true) - (DiscordEmoji) , can be casted to DiscordUnicodeEmoji, DiscordGuildEmoji & DiscordApplicationEmoji
  • ⚠️ DiscordEmoji.TryFromName(BaseDiscordClient client, string name, bool includeGuilds, bool includeApplication, out DiscordEmoji emoji) - (DiscordEmoji) , can be casted to DiscordUnicodeEmoji, DiscordGuildEmoji & DiscordApplicationEmoji | Breaking: Additional required parameter bool includeApplication

Additional

  • Updated incorrect internal documentation

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

@Aiko-IT-Systems/discatsharp

@Lulalaby Lulalaby added documentation Improvements or additions to documentation enhancement New feature or request core Changes something in core v10 Targets Discord API v10 labels Jul 19, 2024
@Lulalaby Lulalaby added this to the APIv10 milestone Jul 19, 2024
@Lulalaby Lulalaby self-assigned this Jul 19, 2024
@NyuwBot NyuwBot removed the documentation Improvements or additions to documentation label Jul 19, 2024
@Lulalaby Lulalaby marked this pull request as ready for review July 19, 2024 01:55
@Lulalaby Lulalaby requested review from NyuwBot and a team as code owners July 19, 2024 01:55
@Lulalaby Lulalaby enabled auto-merge (squash) July 19, 2024 02:29
@Lulalaby Lulalaby requested a review from FabiChan99 July 19, 2024 02:29
Copy link
Member

@TheXorog TheXorog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather minor nitpick

DisCatSharp/Clients/DiscordClient.cs Show resolved Hide resolved
DisCatSharp/Clients/DiscordClient.cs Show resolved Hide resolved
@Lulalaby Lulalaby disabled auto-merge July 19, 2024 02:54
@Lulalaby Lulalaby merged commit 78a78b9 into main Jul 19, 2024
4 of 5 checks passed
@Lulalaby Lulalaby deleted the feat/application-emojis branch July 19, 2024 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Changes something in core enhancement New feature or request v10 Targets Discord API v10
Development

Successfully merging this pull request may close these issues.

3 participants