diff --git a/.github/workflows/publish_release.yml b/.github/workflows/publish_release.yml index e2251129944..975aefbf5be 100644 --- a/.github/workflows/publish_release.yml +++ b/.github/workflows/publish_release.yml @@ -98,14 +98,14 @@ jobs: env: APP_YML_FILE: "Red-DiscordBot-${{ github.ref_name }}-default-lavalink-application.yml" run: | - mkdir -p dist - python .github/workflows/scripts/get_default_ll_server_config.py "dist/$APP_YML_FILE" + mkdir -p release_assets + python .github/workflows/scripts/get_default_ll_server_config.py "release_assets/$APP_YML_FILE" - name: Upload default application.yml uses: actions/upload-artifact@v3 with: name: ll-default-server-config - path: ./dist + path: ./release_assets release_to_pypi: needs: @@ -129,13 +129,13 @@ jobs: uses: actions/download-artifact@v3 with: name: ll-default-server-config - path: dist/ + path: release_assets/ - name: Upload dists to GitHub Release env: GITHUB_TOKEN: "${{ github.token }}" run: | - gh release upload "$GITHUB_REF_NAME" dist/* --repo "$GITHUB_REPOSITORY" + gh release upload "$GITHUB_REF_NAME" dist/* release_assets/* --repo "$GITHUB_REPOSITORY" - name: Publish package distributions to PyPI uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html index 996058f3102..4ee04f8e727 100644 --- a/docs/_templates/layout.html +++ b/docs/_templates/layout.html @@ -5,7 +5,7 @@

Warning

This document is for Red's development version, which can be significantly different from previous releases. - If you're a regular user, you should read the Red documentation for the current stable release. + If you're a regular user, you should read the Red documentation for the current stable release.

{% endif %} diff --git a/docs/conf.py b/docs/conf.py index b967f299d28..c280f1b2978 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -139,6 +139,9 @@ "github_user": "Cog-Creators", "github_repo": "Red-DiscordBot", "github_version": "V3/develop", + "version_slug": os.environ.get("READTHEDOCS_VERSION", ""), + "rtd_language": os.environ.get("READTHEDOCS_LANGUAGE", ""), + "READTHEDOCS": os.environ.get("READTHEDOCS", "") == "True", } # Add any paths that contain custom static files (such as style sheets) here, diff --git a/redbot/cogs/downloader/downloader.py b/redbot/cogs/downloader/downloader.py index 267d5e8d1c7..fc496f0c7ed 100644 --- a/redbot/cogs/downloader/downloader.py +++ b/redbot/cogs/downloader/downloader.py @@ -608,7 +608,11 @@ async def _repo_add( else: await ctx.send(_("Repo `{name}` successfully added.").format(name=name)) if repo.install_msg: - await ctx.send(repo.install_msg.replace("[p]", ctx.clean_prefix)) + await ctx.send( + repo.install_msg.replace("[p]", ctx.clean_prefix).replace( + "[botname]", ctx.me.display_name + ) + ) @repo.command(name="delete", aliases=["remove", "del"], require_var_positional=True) async def _repo_del(self, ctx: commands.Context, *repos: Repo) -> None: diff --git a/redbot/cogs/trivia/data/lists/worldcup.yaml b/redbot/cogs/trivia/data/lists/worldcup.yaml index 24f7e345056..918e024b851 100644 --- a/redbot/cogs/trivia/data/lists/worldcup.yaml +++ b/redbot/cogs/trivia/data/lists/worldcup.yaml @@ -637,16 +637,16 @@ Who won the Golden Boot award in 2022 Qatar?: # Golden Glove -Who won the Golden Boot award in 2010 South Africa?: +Who won the Golden Glove award in 2010 South Africa?: - Iker Casillas - Casillas -Who won the Golden Boot award in 2014 Brazil?: +Who won the Golden Glove award in 2014 Brazil?: - Manuel Neuer - Neuer -Who won the Golden Boot award in 2018 Russia?: +Who won the Golden Glove award in 2018 Russia?: - Thibaut Courtois - Courtois -Who won the Golden Boot award in 2022 Qatar?: +Who won the Golden Glove award in 2022 Qatar?: - Emiliano Martínez - Martínez - Martinez diff --git a/redbot/core/utils/chat_formatting.py b/redbot/core/utils/chat_formatting.py index b13d869dc02..9a96ae380c6 100644 --- a/redbot/core/utils/chat_formatting.py +++ b/redbot/core/utils/chat_formatting.py @@ -5,7 +5,7 @@ import math import textwrap from io import BytesIO -from typing import Iterator, List, Optional, Sequence, SupportsInt, Union +from typing import Iterator, List, Literal, Optional, Sequence, SupportsInt, Union import discord from babel.lists import format_list as babel_list @@ -21,11 +21,14 @@ "question", "bold", "box", + "header", + "hyperlink", "inline", "italics", "spoiler", "pagify", "strikethrough", + "subtext", "underline", "quote", "escape", @@ -39,6 +42,69 @@ _ = Translator("UtilsChatFormatting", __file__) +def hyperlink(text: str, url: str) -> str: + """Create hyperlink markdown with text and a URL. + + Parameters + ---------- + text : str + The text which will contain the link. + url : str + The URL used for the hyperlink. + + Returns + ------- + str + The new message. + + """ + return f"[{text}]({url})" + + +def header(text: str, size: Literal["small", "medium", "large"]) -> str: + """Formats a header. + + Parameters + ---------- + text : str + The text for the header. + size : Literal['small', 'medium', 'large'] + The size of the header ('small', 'medium' or 'large') + + Returns + ------- + str + The new message. + + """ + if size == "small": + multiplier = 3 + elif size == "medium": + multiplier = 2 + elif size == "large": + multiplier = 1 + else: + raise ValueError(f"Invalid size '{size}'") + return "#" * multiplier + " " + text + + +def subtext(text: str) -> str: + """Formats subtext from the given text. + + Parameters + ---------- + text : str + The text to format as subtext. + + Returns + ------- + str + The new message. + + """ + return "-# " + text + + def error(text: str) -> str: """Get text prefixed with an error emoji.