Skip to content

Commit

Permalink
all: expunge antiquated references to (docs|learn).yagpdb.xyz
Browse files Browse the repository at this point in the history
Signed-off-by: Luca Zeuch <[email protected]>
  • Loading branch information
l-zeuch committed Dec 15, 2024
1 parent 308ab21 commit 7f4a3b1
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 31 deletions.
2 changes: 1 addition & 1 deletion content/docs/core/all-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Calc <Expression:Text>

**Aliases:** ce

Creates an embed from what you give it in json form: https://docs.yagpdb.xyz/others/custom-embeds
Creates an embed from what you give it in JSON form: https://help.yagpdb.xyz/docs/refehttps://help.yagpdb.xyz/docs/reference/custom-embeds/#the-customembed-command
Example: `-ce {"title": "hello", "description": "wew"}`

**Usage:**
Expand Down
26 changes: 15 additions & 11 deletions content/docs/reference/templates/functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2307,17 +2307,21 @@ present, respectively, at position `N` (starting from 0).

An argument's `"type"` must be one of the following:

- `int` (whole number)
- `float` (decimal number)
- `string` (text)
- `user` (user mentions, resolves to the [user](https://docs.yagpdb.xyz/reference/templates#user) structure)
- `userid` (mentions or user IDs, resolves to the ID itself)
- `member` (mentions or user IDs, resolves to the [member](https://docs.yagpdb.xyz/reference/templates#member)
structure)
- `channel` (channel mention or ID, resolves to the channel structure)
- `role` (role name or ID, resolves as type \*discordgo.Role)
- `duration` (duration that is human-readable, i.e `10h5m` or `10 hour 5 minutes` would both resolve to the same
duration)
- `int`: whole number
- `float`: decimal number
- `string`: text
- `user`: user mentions, resolves to a [user object]
- `userid`: mentions or user IDs, resolves to the ID itself
- `member`: mentions or user IDs, resolves to a [member object]
- `channel`: channel mention or ID, resolves to a [channel object]
- `role`: role name or ID, resolves to a [role object]
- `duration`: duration that is human-readable, i.e `10h5m` or `10 hour 5 minutes` would both resolve to the same
duration

[user object]: /docs/reference/templates/syntax-and-data/#user
[member object]: /docs/reference/templates/syntax-and-data/#member
[channel object]: /docs/reference/templates/syntax-and-data/#channel
[role object]: https://discord.com/developers/docs/topics/permissions#role-object

Additionally, the `int`, `float`, and `duration` type support validation ranges in the interval `(min, max)`, where for
`duration` it is in [time.Duration format](/docs/reference/templates/syntax-and-data#time) values.
Expand Down
11 changes: 6 additions & 5 deletions content/docs/reference/templates/syntax-and-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,9 @@ times, while conditional actions like `if` and `with` allow for alteration of wh
### If (conditional branching)

Branching using `if` action's pipeline and comparison operators - these operators don't need to be inside `if` branch.
`if` statements always need to have an enclosing `end`.\
Learning resources covers conditional branching [more in depth](https://learn.yagpdb.xyz/beginner/control_flow_1).\
`if` statements always need to have an enclosing `end`.

See also the [conditional branching chapter](/learn/beginner/conditional-branching) in the learning resources.

{{< callout context="tip" title="Tip: Test Many Arguments at Once" icon="outline/rocket" >}}

Expand Down Expand Up @@ -821,12 +822,12 @@ Patterns are basic PostgreSQL patterns, not RegEx: An underscore `(_)` matches a
Keys can be max 256 bytes long and has to be strings or numbers. Values can be anything, but if their serialized
representation exceeds 100kB a `short write` error gets raised.

You can just pass a `userID`of 0 to make it global (or any other number, but 0 is safe).\
\
You can just pass a `userID`of 0 to make it global (or any other number, but 0 is safe).

There can be 10 database interactions per CC, out of which dbTop/BottomEntries, dbCount, dbGetPattern, and dbDelMultiple
may only be run twice. (50,10 for premium users).

Learning resources covers database [more in-depth](https://learn.yagpdb.xyz/intermediate/custom-command-database).
See also the [chapter on the database](/learn/intermediate/database) in the learning resources.

[Database functions documentation](functions#database).

Expand Down
5 changes: 2 additions & 3 deletions content/docs/welcome/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ patient when they don't respond in 10<sup>-3</sup> seconds, they are probably bu

### Learning Center

This page is also a work in progress, and can be found at [learn.yagpdb.xyz](https://learn.yagpdb.xyz). It is a more
step-by-step guide to get you started with YAGPDB's custom command system and is less in-your-face than the
documentation.
If you are new to YAGPDB's custom command system, you might want to check out the
[Learning Center](/learn/welcome/introduction) for a more structured approach to learning how to write custom commands.

However, it is not a replacement for the documentation, so you will need to read both to actually write custom commands.

Expand Down
26 changes: 15 additions & 11 deletions content/learn/beginner/command-arguments.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,21 @@ Each `carg` is a single argument definition. The `carg` function has the followi

Following types are supported:

- `int` (whole number)
- `float` (decimal number)
- `string` (text)
- `user` (user mentions, resolves to the [user](https://docs.yagpdb.xyz/reference/templates#user) structure)
- `userid` (mentions or user IDs, resolves to the ID itself)
- `member` (mentions or user IDs, resolves to the [member](https://docs.yagpdb.xyz/reference/templates#member)
structure)
- `channel` (channel mention or ID, resolves to the channel structure)
- `role` (role name or ID, resolves as type _\*discordgo.Role_)
- `duration` (duration that is human-readable, i.e `10h5m` or `10 hour 5 minutes` would both resolve to the same
duration)
- `int`: whole number
- `float`: decimal number
- `string`: text
- `user`: user mentions, resolves to a [user object]
- `userid`: mentions or user IDs, resolves to the ID itself
- `member`: mentions or user IDs, resolves to a [member object]
- `channel`: channel mention or ID, resolves to a [channel object]
- `role`: role name or ID, resolves to a [role object]
- `duration`: duration that is human-readable, i.e `10h5m` or `10 hour 5 minutes` would both resolve to the same
duration

[user object]: /docs/reference/templates/syntax-and-data/#user
[member object]: /docs/reference/templates/syntax-and-data/#member
[channel object]: /docs/reference/templates/syntax-and-data/#channel
[role object]: https://discord.com/developers/docs/topics/permissions#role-object

The `description` is a human-readable description of the argument. This is used in the error message if the argument is
not valid.
Expand Down

0 comments on commit 7f4a3b1

Please sign in to comment.