nectyra

/setuserfilter

Saves a new filter, which decides which items the bot alerts you about.

Type this in DiscordGenerated from the bot
/setuserfilter [json:<text>] [file:<file>]
  • jsonoptional

    Paste the text from the Copy for Discord button in the filter builder. It must include highPriority and regularPriority sections; globalBlacklist is optional. If you also attach a file, both must hold the same filter.

    Type: text

  • fileoptional

    Attach a filter.json file, such as one saved with the Download button in the filter builder. Use this when your filter is too long to paste. The file can be up to 256 KB.

    Type: file

What it does

This command replaces your filter with a new one. Your filter decides which items the bot alerts you about. To learn how filters work, see the filter guide.

You give the bot your filter in one of two ways:

  • json: paste the filter as text. This works for most filters.
  • file: attach the filter as a filter.json file. Use this when your filter is too long to paste. The filter builder tells you when a filter is over 4,000 characters and should be saved as a file.

Use one option. If you fill in both, they must hold the same filter (spacing and order don't matter), or nothing is saved.

You don't need to write the filter by hand:

  1. Run /edituserfilter to open your current filter in the filter builder, or open the builder and start fresh.
  2. Make your changes. You can check how your filter behaves in the filter tester.
  3. Click Copy for Discord in the builder. If your filter is very large, click Download instead to save it as filter.json.
  4. Run /setuserfilter. Paste into the json option, or attach the downloaded filter.json to the file option.

The bot checks your filter before saving it. If anything is wrong, nothing is saved and your old filter stays in place.

This replaces your whole filter. It does not add to your old one. To change only part of your filter, start from /edituserfilter so your current filter is loaded first.

What you get back

Only you can see the reply. If your filter is valid, you see Filter Updated. To double-check what was saved, use /viewuserfilter.

Example

/setuserfilter json:{"highPriority":{"type":"all","conditions":[{"field":"percentOff","op":">=","value":90}]},"regularPriority":{"type":"all","conditions":[{"field":"percentOff","op":">=","value":70}]}}

This saves a filter that sends an alert that mentions you for items 90% off or more, and a silent alert for other items 70% off or more.

If something goes wrong

  • No Filter Provided: you didn't fill in either option. Paste your filter into json, or attach filter.json to file.

  • Filters Don't Match: you filled in both json and file, and they hold different filters. Use just one, or make sure both are the same filter.

  • Invalid File: the attached file isn't a JSON text file. Attach the filter.json you downloaded, without changing it.

  • File Too Large: the file is bigger than 256 KB. Remove rules you no longer need and try again.

  • Download Failed: the bot couldn't fetch your file from Discord. Attach it again and retry.

  • Invalid JSON: the text you pasted or the file you attached is incomplete or damaged. Copy or download it again from the filter builder and try again.

  • Invalid Filter: the JSON is complete, but the filter has a mistake. The reply lists each problem and names the section it's in (highPriority, regularPriority, or globalBlacklist). Common problems:

    • A section is missing. Both highPriority and regularPriority are required.
    • A number comparison (such as "at least") used on a text field, or a text comparison (such as "contains") used on a number field.
    • Rules in the same "all" group that can never all be true, such as price over $50 and under $20.

    Fix the filter in the filter builder and try again.

  • Error Occurred: something failed on our side. Try again later.

On this page