# NBA/WNBA TopShot

{% hint style="info" %}
Before reading below, make sure you have invited the Emerald bot to your Discord server using [this link](https://discord.com/oauth2/authorize?client_id=907407354427998279\&permissions=294473821264\&scope=bot%20applications.commands).
{% endhint %}

## :crossed\_swords:Create a Challenge in Discord

This discord command will let you create your own challenges for your community. You can access a detailed list (discord name + wallet addresses) of those who complete it. And you can automatically run raffles based on who completed the challenge.

### Command

```
/nbatopshot challenge
```

#### Inputs

1. `title`- the title of your challenge
2. `description`- the description of your challenge
3. `play_ids`- a comma-separated list of Play IDs that users must own in order to pass the challenge (ex. `1376,1247,1678,1679,1477`). *A Play ID can be found in the URL on the LiveToken website. For example, the playID here is 1420:* [*https://livetoken.co/listings/topshot?playID=1420*](https://livetoken.co/listings/topshot?playID=1420)
4. `end_date`- a unix timestamp (represented in seconds) for when your challenge should end (ex. `1694199412`). You can use <https://www.unixtimestamp.com/> to get the unix timestamp.

### Accessing User Completion Data

Once you create the challenge, you can click the "Check Status" button. From here, you can click "View Completers" to get a list of users (their discord names + wallet addresses) who completed the challenge.

The bot automatically re-verifies everyone before placing them on the returned file.

### Running a Raffle

Once you create the challenge, you can click the "Check Status" button. From here, you can click "Raffle Winner" to automatically select 1 user who completed the challenge as the winner. You can run this raffle any amount of times.

The bot automatically re-verifies everyone before selecting a winner.

### Helpful Pictures

<figure><img src="https://2734617986-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FogaTXzUJbd9ErdHY45Ri%2Fuploads%2FT5wGNpb8oeokYC0ycryr%2Fimage.png?alt=media&#x26;token=9c70cfa2-20e2-4ebb-87ec-e6d7ebd9941d" alt=""><figcaption></figcaption></figure>

## :eyeglasses:View Moments in Set

This discord command will let you view all of the moments that a user has from a specific NBATopShot set.

### Command

```
/nbatopshot momentsinset
```

#### Inputs

1. `address`- the wallet address of the user
2. `setname`- the name of the set (ex. "Cool Cats")
3. `series` - the series the set is from (ex. 2)

### Helpful Pictures

<figure><img src="https://2734617986-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FogaTXzUJbd9ErdHY45Ri%2Fuploads%2FEhcrRFOZfY0inToAQPH4%2Fimage.png?alt=media&#x26;token=e6b3adcc-3b91-4641-84f9-26d8ba72076e" alt=""><figcaption></figcaption></figure>
