/setuserfilter
Saves a new filter, which decides which items the bot alerts you about.
/setuserfilter [json:<text>] [file:<file>]jsonoptionalPaste 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
fileoptionalAttach 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 afilter.jsonfile. 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:
- Run /edituserfilter to open your current filter in the filter builder, or open the builder and start fresh.
- Make your changes. You can check how your filter behaves in the filter tester.
- Click Copy for Discord in the builder. If your filter is very large, click Download instead to save it as
filter.json. - Run
/setuserfilter. Paste into thejsonoption, or attach the downloadedfilter.jsonto thefileoption.
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 attachfilter.jsontofile. -
Filters Don't Match: you filled in both
jsonandfile, 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.jsonyou 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, orglobalBlacklist). Common problems:- A section is missing. Both
highPriorityandregularPriorityare 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.
- A section is missing. Both
-
Error Occurred: something failed on our side. Try again later.