Document setting overrides in Trivia list format #5390

Merged
Vexed01 merged 12 commits from trivia-override-docs into V3/develop 2023-03-02 15:54:51 +01:00
Vexed01 commented 2021-10-13 20:58:30 +02:00 (Migrated from github.com)

Document the CONFIG key in the Trivia List Creation Guide, fixes #3977

Doc build at https://red-discordbot--5390.org.readthedocs.build/en/5390/guide_trivia_list_creation.html#optional-custom-overrides

Also fix the spelling of medallist :)

Document the CONFIG key in the Trivia List Creation Guide, fixes #3977 Doc build at https://red-discordbot--5390.org.readthedocs.build/en/5390/guide_trivia_list_creation.html#optional-custom-overrides Also fix the spelling of medallist :)
Jackenmen commented 2021-10-20 11:46:49 +02:00 (Migrated from github.com)

I'm not sure something like "bool" or "int" tells a regular user (as in, not a developer) much and that's who we target with this document.

I'm not sure something like "bool" or "int" tells a regular user (as in, not a developer) much and that's who we target with this document.
Vexed01 commented 2021-10-20 17:58:18 +02:00 (Migrated from github.com)

That's certainly a very valid point that I hadn't considered, thanks for pointing it out.

That's certainly a very valid point that I hadn't considered, thanks for pointing it out.
Jackenmen commented 2021-10-20 19:59:10 +02:00 (Migrated from github.com)

Most of these accept any number with or without fractional component but there's also max_score which only accepts integers. Do you think this could be improved in some way?

Most of these accept any number with or without fractional component but there's also `max_score` which only accepts integers. Do you think this could be improved in some way?
Vexed01 commented 2021-10-20 20:18:24 +02:00 (Migrated from github.com)

I've added decimals to the defaults which accept them and clarified "whole number" for max_score.

Would it be worth a new issue to actually validate these, as at the moment anything would be accepted?

I've added decimals to the defaults which accept them and clarified "whole number" for `max_score`. Would it be worth a new issue to actually validate these, as at the moment anything would be accepted?
Jackenmen commented 2021-10-20 20:21:21 +02:00 (Migrated from github.com)

Would it be worth a new issue to actually validate these, as at the moment anything would be accepted?

They are validated, see #4571/#4659.

As for the change, I'm not entirely sure "whole number" is clearer than "integer" would have been. I'm not a native speaker so someone else might want to chime in here.

> Would it be worth a new issue to actually validate these, as at the moment anything would be accepted? They are validated, see #4571/#4659. As for the change, I'm not entirely sure "whole number" is clearer than "integer" would have been. I'm not a native speaker so someone else might want to chime in here.
Vexed01 commented 2021-10-20 20:33:34 +02:00 (Migrated from github.com)

As far as I'm aware, integers can be positive or negative while whole numbers are always positive - and a negative number for max_score (well, as well as 0) wouldn't be good.

I'm not saying that "whole number" is better as I would hope someone advanced enough to touch this wouldn't put in a negative for max score. Though, "integer" is better than "int". Basically idk either and a 3rd opinion would be useful, but from a technical standpoint I'm pretty sure "whole number" is more accurate for what's wanted, and I think it would look odd if "integer" was surrounded by "number" for the floats.

As far as I'm aware, integers can be positive or negative while whole numbers are always positive - and a negative number for max_score (well, as well as 0) wouldn't be good. I'm not saying that "whole number" is better as I would hope someone advanced enough to touch this wouldn't put in a negative for max score. Though, "integer" is better than "int". Basically idk either and a 3rd opinion would be useful, but from a technical standpoint I'm pretty sure "whole number" is more accurate for what's wanted, and I think it would look odd if "integer" was surrounded by "number" for the floats.
Flame442 commented 2021-10-20 20:38:55 +02:00 (Migrated from github.com)

"positive number" / "positive integer" would be my votes, unless it supports zero, in which case "whole number" is best. For the floats, perhaps "number with decimal" or something like that, to avoid the oddity of using just "number" for floats?

"positive number" / "positive integer" would be my votes, unless it supports zero, in which case "whole number" is best. For the floats, perhaps "number with decimal" or something like that, to avoid the oddity of using just "number" for floats?
Jackenmen commented 2021-10-24 01:46:37 +02:00 (Migrated from github.com)

The valid values for each of these are:

  • max_score: positive integer (>0)
  • delay: positive number greater than or equal to 4 (>=4.0)
  • timeout: positive number (>0.0)
  • payout_multiplier: non-negative number (>=0.0)

Additional notes:

  • for timeout, equivalent [p]triviaset command also imposes an additional requirement that this value is higher than delay, we might want to restrict in the same way for YAML files
  • for all of the numeric fields, we need to be stricter with what we accept per the requirements above as currently we only restrict to int/float
The valid values for each of these are: - max_score: positive integer (>0) - delay: positive number greater than or equal to 4 (>=4.0) - timeout: positive number (>0.0) - payout_multiplier: non-negative number (>=0.0) Additional notes: - for `timeout`, equivalent `[p]triviaset` command also imposes an additional requirement that this value is higher than `delay`, we might want to restrict in the same way for YAML files - for all of the numeric fields, we need to be stricter with what we accept per the requirements above as currently we only restrict to int/float
Jackenmen commented 2023-01-02 05:35:43 +01:00 (Migrated from github.com)

#5947 is now merged, this PR still needs updates to the used wording. It's been settled in #5947 so it's just a matter of making it consistent with what we use in error messages there.

#5947 is now merged, this PR still needs updates to the used wording. It's been settled in #5947 so it's just a matter of making it consistent with what we use in error messages there.
Jackenmen (Migrated from github.com) requested changes 2023-01-02 20:23:21 +01:00
Jackenmen (Migrated from github.com) commented 2023-01-02 20:19:46 +01:00
`medalist` is a correct US spelling: https://dictionary.cambridge.org/us/dictionary/english/medalist
@ -126,0 +159,4 @@
payout_multiplier: 0.5
max_score: 20
How many days are there in a regular year?:
- 365
Jackenmen (Migrated from github.com) commented 2023-01-02 20:13:22 +01:00

I suggest adding a couple more numeric examples to show what can be passed (hopefully better shows the difference between an integer and a number):

        delay: 20
        payout_multiplier: 0.5
        max_score: 20
I suggest adding a couple more numeric examples to show what can be passed (hopefully better shows the difference between an integer and a number): ```suggestion delay: 20 payout_multiplier: 0.5 max_score: 20 ```
Jackenmen (Migrated from github.com) commented 2023-01-02 20:15:56 +01:00

If you want to correct answers in this PR, you should update answers here as well.

If you want to correct answers in this PR, you should update answers here as well.
Jackenmen (Migrated from github.com) commented 2023-01-02 20:19:56 +01:00
`medalist` is a correct US spelling: https://dictionary.cambridge.org/us/dictionary/english/medalist
Jackenmen (Migrated from github.com) approved these changes 2023-03-02 15:54:28 +01:00
Jackenmen (Migrated from github.com) left a comment

Looks good to me, thanks for writing this new section.

Looks good to me, thanks for writing this new section. ![](https://i.fluffy.cc/MKjDMmwXxZlqRTwnn070gVqZ8Rwh6d3p.gif)
red-githubbot[bot] commented 2023-04-19 22:56:39 +02:00 (Migrated from github.com)

#6039 is a backport of this pull request to Red 3.4.

#6039 is a backport of this pull request to [Red 3.4](https://github.com/Cog-Creators/Red-DiscordBot/tree/3.4).
Sign in to join this conversation.
No reviewers
No labels
Automated PR
Blocked
Blocked By: Damage Control
Blocked By: Dependency
Blocked By: Other PR
Breaking Change
Category: CI
Category: Cogs - Admin
Category: Cogs - Alias
Category: Cogs - Audio
Category: Cogs - Bank
Category: Cogs - Cleanup
Category: Cogs - CustomCommands
Category: Cogs - Dev
Category: Cogs - Downloader
Category: Cogs - Economy
Category: Cogs - Filter
Category: Cogs - General
Category: Cogs - Image
Category: Cogs - Mod
Category: Cogs - Modlog
Category: Cogs - Mutes
Category: Cogs - Permissions
Category: Cogs - Reports
Category: Cogs - Streams
Category: Cogs - Trivia
Category: Cogs - Trivia - Lists
Category: Cogs - Warnings
Category: Core - API - App Commands Package
Category: Core - API - Audio
Category: Core - API - Bank
Category: Core - API - Commands Package
Category: Core - API - Config
Category: Core - API - Other
Category: Core - API - Utils Package
Category: Core - Bot Class
Category: Core - Bot Commands
Category: Core - Command-line Interfaces
Category: Core - Downloader
Category: Core - Help
Category: Core - i18n
Category: Core - Modlog
Category: Core - Other Internals
Category: Core - RPC/ZMQ
Category: Docker
Category: Docs - Changelogs
Category: Docs - For Developers
Category: Docs - Install Guides
Category: Docs - Other
Category: Docs - User Guides
Category: Meta
Category: RPC/ZMQ methods
Category: Vendored Packages
Changelog Entry: Added
Changelog Entry: Pending
Changelog Entry: Skipped
Closed: Duplicate
Closed: External
Closed: Invalid
Closed: User Error
Closed: Won't Fix
Complex Issue
Docs-only
Feature Branch
Good First Issue
Help Wanted
High Priority
Needs Backport To stable-docs
No Activity
No Repro
QA: Bypassed
QA: Changes Requested
QA: Passed
Release Blocker
Status: Accepted
Status: Frozen
Status: In Progress
Status: Needs Discussion
Status: Needs Info
Status: Needs Triage
Status: PRs Welcome
Type: Bug
Type: Dependency Update
Type: Deprecation
Type: Enhancement
Type: Feature
Type: Informational
Type: Merge
Type: Optimisation
Type: Question
Type: Removal
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Mrcoolgamer11/Red-DiscordBot!5390
No description provided.