Function encodeInteractionCustomId

  • Creates a 'customId' for you to use in message component's 'customId fields

    This is needed as otherwise the interaction will not be handled by botloader.

    DO NOT try to emulate this function yourself, we may change to different techniques entirely in the future and if you try to emulate this function them by implmenting it yourself you WILL break stuff.

    Note that name + json(data) has to be less than 80 characters

    Parameters

    • name: string

      Name of the component, this is used when creating listeners using Script.onInteractionButton and Script.onInteractionSelectMenu

    • data: any

      Arbitrary data that will be passed to the interaction handlers, can be used to track a small amount of state. Note that name + json(data) has to be less than 80 characters

    Returns string

    The customId for use in the customId field

Generated using TypeDoc