Compare commits

...

11 commits

Author SHA1 Message Date
83bf4212b7
chore(deps): update ghcr.io/astral-sh/uv docker tag to v0.5.29
Some checks failed
Actions / Lint Code (Ruff & Pylint) (pull_request) Failing after 0s
Actions / Build Documentation (MkDocs) (pull_request) Failing after 0s
2025-02-10 11:45:55 +00:00
e854abfb0e
feat(backup): update to most recent red version
Some checks failed
Actions / Build Documentation (MkDocs) (push) Failing after 0s
Actions / Lint Code (Ruff & Pylint) (push) Failing after 51s
2025-02-08 19:00:45 -06:00
7ada16e999
chore(tooling): add .editorconfig 2025-02-08 19:00:36 -06:00
d649ca0f02
chore(repo): formatting
Some checks failed
Actions / Lint Code (Ruff & Pylint) (push) Failing after 0s
Actions / Build Documentation (MkDocs) (push) Failing after 0s
2025-02-07 16:07:50 -06:00
72dcc96fea
chore(tooling): remove comments 2025-02-07 16:07:44 -06:00
527c372fb0
chore(tooling): fix the nix flake
Some checks failed
Actions / Build Documentation (MkDocs) (push) Failing after 26s
Actions / Lint Code (Ruff & Pylint) (push) Failing after 47s
2025-02-06 17:20:39 -06:00
e7714cd2df
fix(hotreload): fix typehint 2025-02-06 17:20:21 -06:00
9b96a15621
chore(repo): add schemas to repo.json files
Some checks failed
Actions / Lint Code (Ruff & Pylint) (push) Failing after 46s
Actions / Build Documentation (MkDocs) (push) Failing after 24s
2025-02-06 15:10:19 -06:00
7593aace00
chore(tooling): add dig to the nix flake
Some checks failed
Actions / Build Documentation (MkDocs) (push) Failing after 29s
Actions / Lint Code (Ruff & Pylint) (push) Failing after 49s
2025-02-06 06:41:39 -06:00
e4f419ec7b
chore(repo): formatting
Some checks failed
Actions / Build Documentation (MkDocs) (push) Failing after 27s
Actions / Lint Code (Ruff & Pylint) (push) Failing after 52s
2025-02-06 06:41:00 -06:00
1224d2b60f
chore(deps): update dependencies 2025-02-06 06:40:49 -06:00
17 changed files with 214 additions and 211 deletions

View file

@ -1,4 +1,4 @@
FROM ghcr.io/astral-sh/uv:0.5.24@sha256:2381d6aa60c326b71fd40023f921a0a3b8f91b14d5db6b90402e65a635053709 AS uv
FROM ghcr.io/astral-sh/uv:0.5.29@sha256:88d7b48fc9f17462c82b5482e497af250d337f3f14e1ac97c16e68eba49b651e AS uv
FROM python:3.11-slim@sha256:6ed5bff4d7d377e2a27d9285553b8c21cfccc4f00881de1b24c9bc8d90016e82 AS python
FROM code.forgejo.org/forgejo/runner:6.2.1@sha256:fecc96a111a15811a6887ce488e75718089f24599e613e93db8e54fe70b706e8 AS forgejo-runner

12
.editorconfig Normal file
View file

@ -0,0 +1,12 @@
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false

3
.vscode/launch.json vendored
View file

@ -1,7 +1,4 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{

View file

@ -1,17 +1,14 @@
{
"author" : ["cswimr"],
"install_msg" : "Thank you for installing AntiPolls!\nYou can find the source code of this cog [here](https://coastalcommits.com/cswimr/SeaCogs).",
"name" : "AntiPolls",
"short" : "AntiPolls deletes messages that contain polls.",
"description" : "AntiPolls deletes messages that contain polls, with a configurable per-guild role and channel whitelist and support for default Discord permissions (Manage Messages).",
"end_user_data_statement" : "This cog does not store any user data.",
"$schema": "https://raw.githubusercontent.com/Cog-Creators/Red-DiscordBot/refs/heads/V3/develop/schema/red_cog_repo.schema.json",
"author": ["cswimr"],
"install_msg": "Thank you for installing AntiPolls!\nYou can find the source code of this cog [here](https://coastalcommits.com/cswimr/SeaCogs).",
"name": "AntiPolls",
"short": "AntiPolls deletes messages that contain polls.",
"description": "AntiPolls deletes messages that contain polls, with a configurable per-guild role and channel whitelist and support for default Discord permissions (Manage Messages).",
"end_user_data_statement": "This cog does not store any user data.",
"hidden": true,
"disabled": false,
"min_bot_version": "3.5.0",
"min_python_version": [3, 10, 0],
"tags": [
"automod",
"automoderation",
"polls"
]
"tags": ["automod", "automoderation", "polls"]
}

View file

@ -1,4 +1,5 @@
{
"$schema": "https://raw.githubusercontent.com/Cog-Creators/Red-DiscordBot/refs/heads/V3/develop/schema/red_cog_repo.schema.json",
"author": [
"cswimr"
],
@ -10,7 +11,7 @@
"hidden": false,
"disabled": false,
"min_bot_version": "3.5.6",
"max_bot_version": "3.5.14",
"max_bot_version": "3.5.16",
"min_python_version": [
3,
9,

View file

@ -1,18 +1,15 @@
{
"author" : ["cswimr"],
"install_msg" : "Thank you for installing Bible!\nThis cog requires setting an API key for API.Bible. Please read the [documentation](https://seacogs.coastalcommits.com/bible/#setup) for more information.\nYou can find the source code of this cog [here](https://coastalcommits.com/cswimr/SeaCogs).",
"name" : "Bible",
"short" : "Retrieve Bible verses from API.Bible.",
"description" : "Retrieve Bible verses from the API.Bible API. This cog requires an API.Bible api key.",
"end_user_data_statement" : "This cog does not store end user data, however it does send the following data to the API.Bible API:\n- The bot user's ID\n- The timestamp of the invoking message\n- The hashed user id of the invoking user",
"$schema": "https://raw.githubusercontent.com/Cog-Creators/Red-DiscordBot/refs/heads/V3/develop/schema/red_cog_repo.schema.json",
"author": ["cswimr"],
"install_msg": "Thank you for installing Bible!\nThis cog requires setting an API key for API.Bible. Please read the [documentation](https://seacogs.coastalcommits.com/bible/#setup) for more information.\nYou can find the source code of this cog [here](https://coastalcommits.com/cswimr/SeaCogs).",
"name": "Bible",
"short": "Retrieve Bible verses from API.Bible.",
"description": "Retrieve Bible verses from the API.Bible API. This cog requires an API.Bible api key.",
"end_user_data_statement": "This cog does not store end user data, however it does send the following data to the API.Bible API:\n- The bot user's ID\n- The timestamp of the invoking message\n- The hashed user id of the invoking user",
"hidden": false,
"disabled": false,
"min_bot_version": "3.5.0",
"min_python_version": [3, 10, 0],
"requirements": ["numpy", "pillow"],
"tags": [
"fun",
"utility",
"api"
]
"tags": ["fun", "utility", "api"]
}

View file

@ -1,16 +1,15 @@
{
"author" : ["cswimr"],
"install_msg" : "Thank you for installing Emoji!",
"name" : "Emoji",
"short" : "Retrieve information about emojis.",
"description" : "Retrieve information about emojis.",
"end_user_data_statement" : "This cog does not store end user data.",
"$schema": "https://raw.githubusercontent.com/Cog-Creators/Red-DiscordBot/refs/heads/V3/develop/schema/red_cog_repo.schema.json",
"author": ["cswimr"],
"install_msg": "Thank you for installing Emoji!",
"name": "Emoji",
"short": "Retrieve information about emojis.",
"description": "Retrieve information about emojis.",
"end_user_data_statement": "This cog does not store end user data.",
"hidden": false,
"disabled": false,
"min_bot_version": "3.5.0",
"min_python_version": [3, 10, 0],
"requirements": ["colorthief"],
"tags": [
"utility"
]
"tags": ["utility"]
}

10
flake.lock generated
View file

@ -2,12 +2,12 @@
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1738546358,
"narHash": "sha256-nLivjIygCiqLp5QcL7l56Tca/elVqM9FG1hGd9ZSsrg=",
"rev": "c6e957d81b96751a3d5967a0fd73694f303cc914",
"revCount": 747070,
"lastModified": 1738680400,
"narHash": "sha256-ooLh+XW8jfa+91F1nhf9OF7qhuA/y1ChLx6lXDNeY5U=",
"rev": "799ba5bffed04ced7067a91798353d360788b30d",
"revCount": 747653,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.747070%2Brev-c6e957d81b96751a3d5967a0fd73694f303cc914/0194cfda-968b-7c4f-95c5-bd4a42478770/source.tar.gz"
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.747653%2Brev-799ba5bffed04ced7067a91798353d360788b30d/0194d302-29da-7009-8f43-5b8a58825954/source.tar.gz"
},
"original": {
"type": "tarball",

View file

@ -17,36 +17,53 @@
system:
f {
pkgs = import nixpkgs { inherit system; };
lib = nixpkgs.lib;
}
);
in
{
devShells = forEachSupportedSystem (
{ pkgs }:
{ pkgs, lib }:
let
myPython = pkgs.python311;
lib-path =
with pkgs;
lib.makeLibraryPath [
stdenv.cc.cc
# Red-DiscordBot dependencies
libffi
libsodium
# PyLav dependency
libaio
# Material for MkDocs dependency
cairo
];
in
{
default = pkgs.mkShell {
lib-path = lib-path;
packages = with pkgs; [
python311
myPython
uv
ruff # the ruff pip package installs a dynamically linked binary that cannot run on NixOS
forgejo-runner
# Red-DiscordBot dependencies
git
libsodium
libffi
libaio
jdk17
# Material for MkDocs dependencies
cairo
pngquant
# SeaCogs dependencies
dig
];
shellHook = # bash
''
export UV_PYTHON_PREFERENCE=only-system
export UV_PYTHON_DOWNLOADS=never
export "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${lib-path}"
export "UV_PYTHON_PREFERENCE=only-system"
export "UV_PYTHON_DOWNLOADS=never"
uv sync --all-groups
alias uvr="uv run"
source ./.venv/bin/activate
export PYTHONPATH=`pwd`/.venv/${pkgs.python311.sitePackages}/:$PYTHONPATH
export "PYTHONPATH=`pwd`/.venv/${myPython.sitePackages}/:$PYTHONPATH"
export "PATH=${pkgs.ruff}/bin:$PATH"
'';
};
}

View file

@ -60,7 +60,7 @@ class HotReload(commands.Cog):
]
return "\n".join(text)
async def get_paths(self) -> Generator[Path]:
async def get_paths(self) -> Generator[Path, None, None]:
"""Retrieve user defined paths."""
cog_manager = self.bot._cog_mgr # noqa: SLF001 # We have to use this private method because there is no public API to get user defined paths
cog_paths = await cog_manager.user_defined_paths()

View file

@ -1,7 +1,6 @@
{
"author": [
"cswimr"
],
"$schema": "https://raw.githubusercontent.com/Cog-Creators/Red-DiscordBot/refs/heads/V3/develop/schema/red_cog_repo.schema.json",
"author": ["cswimr"],
"install_msg": "Thank you for installing HotReload! Please see the [documentation](https://seacogs.coastalcommits.com/hotreload) to get started.",
"name": "HotReload",
"short": "Automatically reload cogs in local cog paths on file change.",
@ -10,16 +9,7 @@
"hidden": false,
"disabled": false,
"min_bot_version": "3.5.0",
"min_python_version": [
3,
8,
0
],
"requirements": [
"watchdog"
],
"tags": [
"utility",
"development"
]
"min_python_version": [3, 8, 0],
"requirements": ["watchdog"],
"tags": ["utility", "development"]
}

View file

@ -1,7 +1,6 @@
{
"author": [
"cswimr"
],
"$schema": "https://raw.githubusercontent.com/Cog-Creators/Red-DiscordBot/V3/develop/schema/red_cog_repo.schema.json",
"author": ["cswimr"],
"install_msg": "Thanks for installing my repo!\n\nIf you have any issues with any of the cogs, please create an issue [here](https://coastalcommits.com/cswimr/SeaCogs/issues) or join my [Discord Server](https://discord.gg/eMUMe77Yb8 ).",
"index_name": "sea-cogs",
"short": "Various cogs for Red, by cswimr",

View file

@ -1,17 +1,14 @@
{
"author" : ["cswimr"],
"install_msg" : "Thank you for installing Nerdify!\nYou can find the source code of this cog [here](https://coastalcommits.com/cswimr/SeaCogs). Based off of PhasecoreX's [UwU](<https://github.com/PhasecoreX/PCXCogs/tree/master/uwu>) cog.",
"name" : "Nerdify",
"short" : "Nerdify your text!",
"description" : "Nerdify your text!",
"end_user_data_statement" : "This cog does not store end user data.",
"$schema": "https://raw.githubusercontent.com/Cog-Creators/Red-DiscordBot/refs/heads/V3/develop/schema/red_cog_repo.schema.json",
"author": ["cswimr"],
"install_msg": "Thank you for installing Nerdify!\nYou can find the source code of this cog [here](https://coastalcommits.com/cswimr/SeaCogs). Based off of PhasecoreX's [UwU](<https://github.com/PhasecoreX/PCXCogs/tree/master/uwu>) cog.",
"name": "Nerdify",
"short": "Nerdify your text!",
"description": "Nerdify your text!",
"end_user_data_statement": "This cog does not store end user data.",
"hidden": false,
"disabled": false,
"min_bot_version": "3.5.0",
"min_python_version": [3, 8, 0],
"tags": [
"fun",
"text",
"meme"
]
"tags": ["fun", "text", "meme"]
}

View file

@ -1,19 +1,15 @@
{
"author" : ["cswimr"],
"install_msg" : "Thank you for installing Pterodactyl!\nYou can find the source code of this cog [here](https://coastalcommits.com/cswimr/SeaCogs).\nDocumentation can be found [here](https://seacogs.coastalcommits.com/pterodactyl ).",
"name" : "Pterodactyl",
"short" : "Interface with Pterodactyl through websockets.",
"description" : "Interface with Pterodactyl through websockets.",
"end_user_data_statement" : "This cog does not store end user data.",
"$schema": "https://raw.githubusercontent.com/Cog-Creators/Red-DiscordBot/refs/heads/V3/develop/schema/red_cog_repo.schema.json",
"author": ["cswimr"],
"install_msg": "Thank you for installing Pterodactyl!\nYou can find the source code of this cog [here](https://coastalcommits.com/cswimr/SeaCogs).\nDocumentation can be found [here](https://seacogs.coastalcommits.com/pterodactyl ).",
"name": "Pterodactyl",
"short": "Interface with Pterodactyl through websockets.",
"description": "Interface with Pterodactyl through websockets.",
"end_user_data_statement": "This cog does not store end user data.",
"hidden": false,
"disabled": false,
"min_bot_version": "3.5.0",
"min_python_version": [3, 8, 0],
"requirements": ["git+https://github.com/cswimr/pydactyl", "websockets"],
"tags": [
"pterodactyl",
"minecraft",
"server",
"management"
]
"tags": ["pterodactyl", "minecraft", "server", "management"]
}

View file

@ -1,10 +1,11 @@
{
"author" : ["cswimr"],
"install_msg" : "Thank you for installing SeaUtils!\nYou can find the source code of this cog [here](https://coastalcommits.com/cswimr/SeaCogs).",
"name" : "SeaUtils",
"short" : "A collection of useful utilities.",
"description" : "A collection of useful utilities.",
"end_user_data_statement" : "This cog does not store end user data.",
"$schema": "https://raw.githubusercontent.com/Cog-Creators/Red-DiscordBot/refs/heads/V3/develop/schema/red_cog_repo.schema.json",
"author": ["cswimr"],
"install_msg": "Thank you for installing SeaUtils!\nYou can find the source code of this cog [here](https://coastalcommits.com/cswimr/SeaCogs).",
"name": "SeaUtils",
"short": "A collection of useful utilities.",
"description": "A collection of useful utilities.",
"end_user_data_statement": "This cog does not store end user data.",
"hidden": true,
"disabled": false,
"min_bot_version": "3.5.0",

16
uv.lock generated
View file

@ -891,16 +891,16 @@ python = [
[[package]]
name = "mkdocstrings-python"
version = "1.14.4"
version = "1.14.5"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "griffe" },
{ name = "mkdocs-autorefs" },
{ name = "mkdocstrings" },
]
sdist = { url = "https://files.pythonhosted.org/packages/8f/64/bc658504b73b9ff064046e4ee3c551254d417d409b0d848c2054f2e8d528/mkdocstrings_python-1.14.4.tar.gz", hash = "sha256:12e1b1a3848554484896b602dda1096033adeb2715fef421f47d6a163d6c983d", size = 421537 }
sdist = { url = "https://files.pythonhosted.org/packages/4e/00/75f8badeca7bcc06dd2ca0a09b98998b228beb2109f6dd4e9155ea6a6cc7/mkdocstrings_python-1.14.5.tar.gz", hash = "sha256:8582eeac8cce952f395d76ec636fc814757cba7d8458aa75ba0529a3aa10d98c", size = 421738 }
wheels = [
{ url = "https://files.pythonhosted.org/packages/4b/49/22c0415d44dc7c1714b47944fbf0734306a99c992c84efd4c197e4f4dbc9/mkdocstrings_python-1.14.4-py3-none-any.whl", hash = "sha256:35d73fdf2079a2a4e2c8e8ff52976463a75d138f97ffadbc7d29108c6de11b35", size = 448488 },
{ url = "https://files.pythonhosted.org/packages/17/1e/c970d43d2dc844b7dfabb5daf24bc1c8ffdb40c56e3ec65d6dc78879ce16/mkdocstrings_python-1.14.5-py3-none-any.whl", hash = "sha256:ac394f273ae298aeaa6be4506768f05e61bd7c8119437ea98553354b1185c469", size = 448584 },
]
[[package]]
@ -1081,9 +1081,9 @@ wheels = [
[[package]]
name = "peewee"
version = "3.17.8"
version = "3.17.9"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/b4/dc/832bcf4ea5ee2ebc4ea42ef36e44a451de5d80f8b9858bf2066e30738c67/peewee-3.17.8.tar.gz", hash = "sha256:ce1d05db3438830b989a1b9d0d0aa4e7f6134d5f6fd57686eeaa26a3e6485a8c", size = 948249 }
sdist = { url = "https://files.pythonhosted.org/packages/57/09/4393bd378e70b7fc3163ee83353cc27bb520010a5c2b3c924121e7e7e068/peewee-3.17.9.tar.gz", hash = "sha256:fe15cd001758e324c8e3ca8c8ed900e7397c2907291789e1efc383e66b9bc7a8", size = 3026085 }
[[package]]
name = "phx-class-registry"
@ -1481,7 +1481,7 @@ wheels = [
[[package]]
name = "red-discordbot"
version = "3.5.15"
version = "3.5.16"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "aiohttp" },
@ -1522,9 +1522,9 @@ dependencies = [
{ name = "yarl" },
{ name = "zipp", marker = "python_full_version >= '3.12'" },
]
sdist = { url = "https://files.pythonhosted.org/packages/55/69/42940946a3bd3a099f61ee9e6fa78e9ab7cf7e671a328506497a879b34fe/red_discordbot-3.5.15.tar.gz", hash = "sha256:2326712065b45ec61aff5d0943620efd6212c69ae08a2ad8fe673c859e34e921", size = 3685486 }
sdist = { url = "https://files.pythonhosted.org/packages/8a/2a/3d3ae9ba47de022a1a47ed5f5ea08739b069b079508a7a818bd74d18e29f/red_discordbot-3.5.16.tar.gz", hash = "sha256:f77f54cd65523ed0ea30b40cc81b07574fe10d1f1a80d013281c872664cabb35", size = 3685700 }
wheels = [
{ url = "https://files.pythonhosted.org/packages/50/f5/f0b8ebdc3f1a072a846dd0388cf67d5acdaa4f300e36dd78af1b704181dd/Red_DiscordBot-3.5.15-py3-none-any.whl", hash = "sha256:e08d96ee270a36feb2331435a6173777a514e268263d5bb4839fff713815491c", size = 5776852 },
{ url = "https://files.pythonhosted.org/packages/72/58/4ae469ee7961bc8f488669432ffb62d42a89376ad92ed809d66512228f27/Red_DiscordBot-3.5.16-py3-none-any.whl", hash = "sha256:c042c20b94b3e12b388b8ffa1d0472179403630d3e979108e7ee288a549f2ec2", size = 5777054 },
]
[[package]]