# Tesco Query Command (/tesco)

The Tesco query command provides stock information, regarding specific products in designated areas.

## Usage

### Finding a Tesco product number

Firstly, find the product you want to query on the Tesco website, below is an example.

<figure><img src="https://1818776014-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2isSajtVK1Gg2XPq7dYN%2Fuploads%2Fk0o6RIwpUMYfHZfMBSbH%2Fimage.png?alt=media&#x26;token=6f4b15de-0075-47ae-94f4-4bc46b3d95e7" alt=""><figcaption><p>Example Tesco product</p></figcaption></figure>

<figure><img src="https://1818776014-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2isSajtVK1Gg2XPq7dYN%2Fuploads%2FImeGuytDFd7QRhAP4s2x%2Fimage.png?alt=media&#x26;token=25855f0f-deab-4565-947f-6a8719ae1c1d" alt=""><figcaption><p>Tesco product URL</p></figcaption></figure>

Now, looking in the URL, you can find the [Tesco Product Number (TPN)](https://edwardcallow.co.uk/tesco-jargon/t.html#tesco-product-number-tpn). In this example, that is **308103753**.

### Running the /tesco command

Now in the Discord server running Mercury Dynamics bot, type the following command:

<figure><img src="https://1818776014-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2isSajtVK1Gg2XPq7dYN%2Fuploads%2FM0G33A74KHvv9A54DHW6%2Fimage.png?alt=media&#x26;token=14593786-fd43-4f38-96da-44139998bf44" alt=""><figcaption><p>Example Tesco command</p></figcaption></figure>

The parameters of this command are below:

* storetype - This defines what kind of store you want to search in (autocompleted)
* postcode - This is the postcode you want to base your search around
* identifier - This is the TPN
* public - This defines whether your command/results are seen by only yourself, or others
* radius - This is how far from the defined postcode the bot should search (autocomplete)

If done correctly, you should receive a result like so:

<div align="left"><figure><img src="https://1818776014-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2isSajtVK1Gg2XPq7dYN%2Fuploads%2F7n5gk1FLwkRNiTqSUVaS%2Fimage.png?alt=media&#x26;token=c8e66978-ad31-4dbb-91dd-cd2398531572" alt=""><figcaption><p>Example Tesco results</p></figcaption></figure></div>
