Skip to content

Commit

Permalink
Merge branch 'V3/develop' into V3/develop
Browse files Browse the repository at this point in the history
  • Loading branch information
BenCos17 committed Sep 12, 2024
2 parents d794bf1 + 005b8af commit f5929c4
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 12 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/_templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<p class="first admonition-title">Warning</p>
<p class="last">
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 <a href="{{ dict(versions)['stable'] }}">Red documentation for the current stable release</a>.
If you're a regular user, you should read the <a href="/{{ rtd_language }}/stable/">Red documentation for the current stable release</a>.
</p>
</div>
{% endif %}
Expand Down
3 changes: 3 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 5 additions & 1 deletion redbot/cogs/downloader/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 4 additions & 4 deletions redbot/cogs/trivia/data/lists/worldcup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
68 changes: 67 additions & 1 deletion redbot/core/utils/chat_formatting.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -21,11 +21,14 @@
"question",
"bold",
"box",
"header",
"hyperlink",
"inline",
"italics",
"spoiler",
"pagify",
"strikethrough",
"subtext",
"underline",
"quote",
"escape",
Expand All @@ -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.
Expand Down

0 comments on commit f5929c4

Please sign in to comment.