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

fix parsing stickers #1692

Merged
merged 2 commits into from
Jun 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ public String getName()
}

/**
* The description of the sticker.
* The description of the sticker or empty String if the sticker doesn't have one.
*
* @return the description of the sticker
* @return Possibly-empty String containing the description of the sticker
*/
@Nonnull
public String getDescription()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1463,7 +1463,7 @@ public MessageSticker createSticker(DataObject content)
{
final long id = content.getLong("id");
final String name = content.getString("name");
final String description = content.getString("description");
final String description = content.getString("description", "");
final long packId = content.getLong("pack_id", content.getLong("guild_id", 0L));
final String asset = content.getString("asset", "");
final MessageSticker.StickerFormat format = MessageSticker.StickerFormat.fromId(content.getInt("format_type"));
Expand Down