-
Notifications
You must be signed in to change notification settings - Fork 46
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
Fix/user apps #336
Fix/user apps #336
Conversation
Tests/Remora.Discord.Rest.Tests/API/Applications/DiscordRestApplicationAPITests.cs
Dismissed
Show dismissed
Hide dismissed
You're still missing test payloads for the added entities and tests for those. |
For interaction objects? Or the application object |
The JSON payloads under test haven't been updated for existing entities (IApplicationCommand) and no new JSON payloads have been added for new types (like IMessageInteractionMetadata). Check your changed and added entities from both this PR and #327. |
.WithElement(0, e => e.Is("1")) | ||
.WithElement(1, e => e.Is("0")) | ||
a => a.WithProperty("0", p => p.IsObject()) | ||
.WithProperty("1", p => p.IsObject()) |
Check warning
Code scanning / InspectCode
Variable in local function hides variable from outer scope Warning
This removes the string enum converter for ApplicationIntegrationType, which caused deserialization to fail due to the fact that Discord accepted a stringified value, but would return a numeric value in the response payload, which the enum converter cannot handle. Missing JSON fields (`contexts`, `integration_types` have also been added, as they were previously missing, and likely would've caught this issue. A new converter type was also added to fix this confounding issue, but it breaks on `Optional<IReadOnlyDictionary<...>>` which confuses me. This is being posted purely for debugging purposes, and is known to be broken at this point for reasons entirely beyond me and perhaps even God.
[AllowedContexts(InteractionContextType.PrivateChannel)] | ||
[DiscordInstallContext(ApplicationIntegrationType.UserInstallable)] | ||
[Description("Posts a cat image that matches the user, usable exclusively in DMs.")] | ||
public Task<IResult> PostUserHttpCatDMAsync([Description("The user to cattify")] IPartialUser catUser) |
Check notice
Code scanning / InspectCode
Type member is never used: Non-private accessibility Note
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just some small things. :)
Backend/Remora.Discord.API.Abstractions/API/Objects/Interactions/IMessageInteractionMetadata.cs
Outdated
Show resolved
Hide resolved
Backend/Remora.Discord.API/API/Objects/Interactions/ApplicationIntegrationTypeConfig.cs
Outdated
Show resolved
Hide resolved
Backend/Remora.Discord.API/API/Objects/Interactions/MessageInteractionMetadata.cs
Outdated
Show resolved
Hide resolved
Backend/Remora.Discord.Rest/API/Applications/DiscordRestApplicationAPI.cs
Outdated
Show resolved
Hide resolved
Backend/Remora.Discord.API/Json/Converters/Internal/IntegrationTypeConfigConverter.cs
Outdated
Show resolved
Hide resolved
Backend/Remora.Discord.API/Json/Converters/Internal/EnumKeyDictionaryConverterFactory.cs
Outdated
Show resolved
Hide resolved
Backend/Remora.Discord.API/Json/Converters/Internal/EnumKeyDictionaryConverterFactory.cs
Outdated
Show resolved
Hide resolved
…nIntegrationTypeConfig.cs Co-authored-by: MazeXP <[email protected]>
…tionaryConverterFactory.cs Co-authored-by: MazeXP <[email protected]>
This reverts commit 42b7edf.
BREAKING-CHANGE: Removes the name field from interaction metadata; Discord says this field is currently unstable.
You've got a few alerts remaining along with some merge conflicts that came in as part of polls - other than that, things seem ready to go. |
@Nihlus should be good to go now |
No description provided.