Skip to content

TypeError when adding a sku in the entitlements() method #2627

@UnBonWhisky

Description

@UnBonWhisky

Summary

When calling entitlements() method with the skus argument, a TypeError is raised.

Reproduction Steps

Make a call with guild.entitlements(limit=None, skus=[<sku Object>])

Minimal Reproducible Code

No response

Expected Results

return all the entitlements that correspond to the SKU

Actual Results

It raises something like this TypeError: sequence item 0: expected str instance, int found

Intents

guilds, messages, reactions, message_content

System Information

Checklist

  • I have searched the open issues for duplicates.
  • I have shown the entire traceback, if possible.
  • I have removed my token from display, if visible.

Additional Context

The source code that raises the error is this one :

params["sku_ids"] = ",".join(sku_ids)

I have checked, edited and verified that if we edit this line into this one :
params["sku_ids"] = ",".join(str(sku_id) for sku_id in sku_ids)

The code works perfectly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    unconfirmed bugA bug report that needs triaging

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions