Skip to content

Commit 5ea29ca

Browse files
authored
Merge pull request #68 from botlabs-gg/mdl-v2
workflows: use new and maintained mdl implementation
2 parents 71e8431 + f5ee839 commit 5ea29ca

File tree

6 files changed

+187
-145
lines changed

6 files changed

+187
-145
lines changed

.github/workflows/lint.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,19 @@ name: Lint
22

33
on:
44
pull_request:
5-
paths:
6-
- 'content/**/*.md'
75

86
jobs:
9-
lint-markdown:
7+
markdown:
108
runs-on: ubuntu-latest
119
steps:
12-
- name: Checkout repository
13-
uses: actions/checkout@v4
10+
- uses: actions/checkout@v4
11+
with:
12+
fetch-depth: 0
1413
- name: Lint markdown files
15-
uses: actionshub/markdownlint@main
14+
uses: DavidAnson/markdownlint-cli2-action@v19
15+
continue-on-error: true
1616
with:
17-
filesToIgnoreRegex: 'all-commands.md|scripts/.*|.github/.*'
17+
globs: |
18+
content/**/*.md
19+
!content/docs/core/all-commands.md
20+
config: config/.markdownlint.yaml

.mdlrc

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 53 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,91 @@
11
# Enable all rules; we'll configure some of them below.
2-
all
2+
default: true
33

44
# MD001: Header levels should only increment by one level at a time.
55
# Normally, this is a fair rule, but it does not quite work for our cases,
66
# especially in our humongous functions list. So disable it.
7-
exclude_rule 'MD001'
7+
MD001: false
88

99
# MD002: First header should be a top level header.
1010
# Some files do not have a top-level header, because it doesn't make sense for
1111
# them, or just looks incredibly stupid on the rendered page. So disable this
1212
# entire rule.
13-
exclude_rule 'MD002'
13+
MD002: false
1414

1515
# MD004: Unordered list style.
1616
# Use dashes for unordered lists. All lists. Even sublists.
17-
rule 'MD004', :style => :dash
17+
MD004:
18+
style: "dash"
1819

1920
# MD013: Line length.
2021
# Allow lines to be up to 120 characters long, see the .editorconfig file.
2122
# We also ignore code blocks, because they are often long and should not be
2223
# wrapped at all. Same goes for tables.
23-
rule 'MD013', :line_length => 120, :ignore_code_blocks => true, :tables => false
24+
MD013:
25+
line_length: 120
26+
code_blocks: false
27+
tables: false
2428

2529
# MD024: Multiple headers with the same content.
2630
# Allow multiple headers with the same content so long they are under different
2731
# parent headers.
28-
rule 'MD024', :allow_different_nesting => true
32+
MD024:
33+
siblings_only: true
2934

3035
# MD026: Trailling punctuation in header.
3136
# Allow question marks (FAQ-style).
32-
rule 'MD026', :punctuation => '.,;:!'
37+
MD026:
38+
punctuation: ".,;:!"
3339

3440
# MD029: Ordered list item prefix.
3541
# Should increase in numerical order.
36-
rule 'MD029', :style => :ordered
42+
MD029:
43+
style: "ordered"
3744

3845
# MD033: Inline HTML.
3946
# Allow certain HTML elements, because we use them for nicer page layout.
40-
rule 'MD033', :allowed_elements => 'center, div, sup, br, kbd'
47+
MD033:
48+
allowed_elements: ["center", "div", "sup", "br", "kbd"]
4149

4250
# MD037: Spaces inside emphasis markers.
4351
# This rule is broken. See https://github.com/markdownlint/markdownlint/issues/84
44-
exclude_rule 'MD037'
52+
MD037: false
4553

4654
# MD041: First line in file should be a top-level header.
4755
# See comment to MD002. It makes no sense to set this to H2 for similar reasons,
4856
# we have TOML frontmatter with an automatic h1 in the rendered page.
49-
exclude_rule 'MD041'
57+
MD041: false
58+
59+
# MD048: Code fence style.
60+
# Use backticks for code fences.
61+
MD048:
62+
style: "backtick"
63+
64+
# MD049: Emphasis style. (Italics)
65+
# Use asterisks for italics.
66+
# MD049:
67+
# style: "asterisk"
68+
# FIXME: Re-enable this rule once we have fixed all the italics in the docs.
69+
MD049: false
70+
71+
# MD050: Strong style.
72+
# Use double asterisks for bold text.
73+
MD050:
74+
style: "asterisk"
75+
76+
# MD051: Link fragments should be valid.
77+
# Disable this rule, because Hugo already checks for (potentially) broken links.
78+
MD051: false
79+
80+
# MD052: Reference links and images should use a label that is defined.
81+
# Similar reasons as MD051, Hugo already checks for broken links.
82+
MD052: false
83+
84+
# MD053: Link and image reference definitions should be needed.
85+
# Similar reasons as MD051, Hugo already checks for broken links.
86+
MD053: false
87+
88+
# MD054: Link and image style.
89+
# Disable this rule, because it is very extensive and thus painful to configure.
90+
# By extension, also very painful to fix.
91+
MD054: false

content/docs/reference/custom-commands-limits.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -39,21 +39,21 @@ Various limits in YAGPDB custom commands (CC) for smooth functioning of the bot
3939

4040
- **Max file size (complexMessage):** 100kB
4141
- **joinStr max string length:** 1000kB
42-
- **sendDM:** 1 call per CC -> counter key "send\_dm"
43-
- **sendTemplate/sendTemplateDM:** 3 calls per CC -> counter key "exec\_child"
44-
- **addReactions:** 20 calls per CC -> counter key "add\_reaction\_trigger". Each reaction added counts towards the
42+
- **sendDM:** 1 call per CC -> counter key "send_dm"
43+
- **sendTemplate/sendTemplateDM:** 3 calls per CC -> counter key "exec_child"
44+
- **addReactions:** 20 calls per CC -> counter key "add_reaction_trigger". Each reaction added counts towards the
4545
limit.
46-
- **addResponseReactions:** 20 calls per CC -> counter key "add\_reaction\_response". Each reaction added counts towards
46+
- **addResponseReactions:** 20 calls per CC -> counter key "add_reaction_response". Each reaction added counts towards
4747
the limit.
48-
- **addMessageReactions:** 20 calls per CC -> counter key "add\_reaction\_message". Each reaction added counts towards
48+
- **addMessageReactions:** 20 calls per CC -> counter key "add_reaction_message". Each reaction added counts towards
4949
the limit.
50-
- **deleteMessageReaction: 1**0 calls per CC -> counter key "del\_reaction\_message". Each removed added counts towards
50+
- **deleteMessageReaction: 1**0 calls per CC -> counter key "del_reaction_message". Each removed added counts towards
5151
the limit.
52-
- **editChannelName/Topic:** 10 calls per CC -> counter key "edit\_channel"
52+
- **editChannelName/Topic:** 10 calls per CC -> counter key "edit_channel"
5353
- **regex cache limit:** 10 (this means you cant have more than 10 different regexes on a CC)
54-
- **onlineCount:** 1 call per cc -> counter key "online\_users"
55-
- **onlineCountBots:** 1 call per cc -> counter key "online\_bots"
56-
- **editNickname:** 2 calls per cc -> counter key "edit\_nick"
54+
- **onlineCount:** 1 call per cc -> counter key "online_users"
55+
- **onlineCountBots:** 1 call per cc -> counter key "online_bots"
56+
- **editNickname:** 2 calls per cc -> counter key "edit_nick"
5757
- **Append/AppendSlice limit:** 10k size limit of resulting slice
5858
- **exec/execAdmin:** 5 calls per cc -> no key
5959
- **deleteResponse/deleteMessage/deleteTrigger max delay:** 86400s
@@ -71,21 +71,21 @@ Various limits in YAGPDB custom commands (CC) for smooth functioning of the bot
7171

7272
### Database Interactions
7373

74-
- **Calls per CC:** 10/50 (free/prem) -> counter key "db\_interactions"
74+
- **Calls per CC:** 10/50 (free/prem) -> counter key "db_interactions"
7575
- Valid for all database commands ->
76-
- dbDel/dbDelByID
77-
- dbGet
78-
- dbIncr
79-
- dbSet/dbSetExpire
76+
- dbDel/dbDelByID
77+
- dbGet
78+
- dbIncr
79+
- dbSet/dbSetExpire
8080

8181
### Database Multiple Entry Interactions
8282

83-
Multiple entries all count to general "db\_interactions" limit as well.
83+
Multiple entries all count to general "db_interactions" limit as well.
8484

85-
- **Calls per CC:** 2/10 (free/prem) -> counter key "db\_multiple"
85+
- **Calls per CC:** 2/10 (free/prem) -> counter key "db_multiple"
8686
- Valid for all database multiple entry related commands ->
87-
- dbCount
88-
- dbDelMultiple
89-
- dbGetPattern
90-
- dbRank
91-
- dbTopEntries
87+
- dbCount
88+
- dbDelMultiple
89+
- dbGetPattern
90+
- dbRank
91+
- dbTopEntries

content/docs/reference/custom-interactions.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -663,12 +663,12 @@ well.
663663
Possible initial responses:
664664

665665
- Output text in your script response field. This text will be sent as an interaction response.
666-
- You can even use the `ephemeralResponse` function to turn it _ephemeral_.
666+
- You can even use the `ephemeralResponse` function to turn it _ephemeral_.
667667
- Use the `sendResponse` function to send a response as soon as the function runs.
668-
- You can also use this to send `embeds` or `complexMessages`.
669-
- You'll need to send a `complexMessage` and pass it `"ephemeral" true` as an argument to send _ephemeral_ messages.
670-
- `sendResponse` comes in `NoEscape` and `RetID` variants too.
671-
- When sending an initial response, `sendResponse` does not need an interaction token, `nil` can be used.
668+
- You can also use this to send `embeds` or `complexMessages`.
669+
- You'll need to send a `complexMessage` and pass it `"ephemeral" true` as an argument to send _ephemeral_ messages.
670+
- `sendResponse` comes in `NoEscape` and `RetID` variants too.
671+
- When sending an initial response, `sendResponse` does not need an interaction token, `nil` can be used.
672672
- Use the `sendModal` function to show the user a modal. You cannot respond to a user submitting a modal by sending them
673673
another modal.
674674
- Use the `updateMessage` function to edit the message the command triggered from. This works the same way as editing a
@@ -686,24 +686,24 @@ interaction token of the interaction they should be following up on.
686686
Possible followups:
687687

688688
- Output text in your script response field. This text will be sent as an interaction followup.
689-
- You can even use the `ephemeralResponse` function to turn it _ephemeral_.
689+
- You can even use the `ephemeralResponse` function to turn it _ephemeral_.
690690
- Use the `sendResponse` function to send a followup as soon as the function runs. Note that this function morphs into
691691
sending followups if an initial response has already been made.
692-
- You can also use this to send `embeds` or `complexMessages`.
693-
- `sendResponse` comes in `NoEscape` and `RetID` variants too.
694-
- It's important to capture the message ID of any
695-
followups you'll want to edit or retrieve later, especially if you follow up ephemerally. If you follow up
696-
ephemerally without saving the message ID, you'll never be able to interface with that message again.
692+
- You can also use this to send `embeds` or `complexMessages`.
693+
- `sendResponse` comes in `NoEscape` and `RetID` variants too.
694+
- It's important to capture the message ID of any
695+
followups you'll want to edit or retrieve later, especially if you follow up ephemerally. If you follow up
696+
ephemerally without saving the message ID, you'll never be able to interface with that message again.
697697
- Use the `editResponse` function to edit an initial response or a followup message.
698-
- When editing an initial response, the `messageID` argument should be `nil`.
699-
- When editing a followup message, the `messageID` argument is required.
700-
- You can still edit any initial responses or followups using the standard `editMessage` function as long as they
701-
aren't _ephemeral_.
698+
- When editing an initial response, the `messageID` argument should be `nil`.
699+
- When editing a followup message, the `messageID` argument is required.
700+
- You can still edit any initial responses or followups using the standard `editMessage` function as long as they
701+
aren't _ephemeral_.
702702
- Use the `getResponse` function to get an initial response or a followup message.
703-
- When getting an initial response, the `messageID` argument should be `nil`.
704-
- When getting a followup message, the `messageID` argument is required.
705-
- You can still get any initial responses or followups using the standard `getMessage` function as long as they
706-
aren't _ephemeral_.
703+
- When getting an initial response, the `messageID` argument should be `nil`.
704+
- When getting a followup message, the `messageID` argument is required.
705+
- You can still get any initial responses or followups using the standard `getMessage` function as long as they
706+
aren't _ephemeral_.
707707

708708
[Interaction Function documentation](/docs/reference/templates/functions#interactions)
709709

0 commit comments

Comments
 (0)