nyxx-discord / nyxx

Wrapper around Discord API for Dart
Apache License 2.0
326 stars 49 forks source link

Add application emojis #678

Open Rapougnac opened 1 month ago

Rapougnac commented 1 month ago

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.

Use smart commits here to manipulate issues (eg. Fixes #issue)

Connected issues & other potential problems

If changes in PR are connected to other issues or are affecting code in other parts of framework (e.g. in main package or any other subpackage) make sure to link issue/PR and describe said problem

Type of change

Please delete options that are not relevant.

Checklist:

kingmigdor commented 1 day ago

I am getting the following error while testing:

Error: type '_Map<String, dynamic>' is not a subtype of type 'List<dynamic>' in type cast
Stack trace: #0      ApplicationManager.listApplicationEmojis (package:nyxx/src/http/managers/application_manager.dart:220:25)

This is due to the returned body not actually being a List. It's Map<String, dynamic> with the "items" key being a List. I tried printing out an empty result on this:

{items: []}

Not sure what's the direct cause of this is though.