easterobot 1.1.1__tar.gz → 1.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {easterobot-1.1.1 → easterobot-1.1.2}/.dockerignore +4 -1
- {easterobot-1.1.1 → easterobot-1.1.2}/.github/workflows/tests.yml +13 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/Dockerfile +10 -5
- {easterobot-1.1.1 → easterobot-1.1.2}/PKG-INFO +6 -1
- {easterobot-1.1.1 → easterobot-1.1.2}/README.rst +5 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/commands/disable.py +2 -1
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/commands/edit.py +2 -1
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/commands/enable.py +2 -1
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/commands/game.py +5 -3
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/commands/help.py +4 -1
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/commands/reset.py +2 -1
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/commands/search.py +4 -1
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/config.py +1 -1
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/games/rock_paper_scissor.py +1 -1
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/games/tic_tac_toe.py +2 -2
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/resources/config.example.yml +2 -2
- easterobot-1.1.2/entrypoint.sh +6 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/pyproject.toml +1 -1
- {easterobot-1.1.1 → easterobot-1.1.2}/uv.lock +1 -1
- easterobot-1.1.1/entrypoint.sh +0 -6
- {easterobot-1.1.1 → easterobot-1.1.2}/.editorconfig +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/.github/actions/setup-project/action.yml +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/.github/workflows/docs.yml +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/.github/workflows/lint.yml +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/.github/workflows/publish.yml +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/.gitignore +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/.pre-commit-config.yaml +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/.vscode/extensions.json +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/.vscode/ltex.dictionary.en-US.txt +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/.vscode/ltex.hiddenFalsePositives.en-US.txt +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/.vscode/settings.json +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/LICENSE +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/conftest.py +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/docker-compose.yml +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/docs/conf.py +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/docs/index.rst +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/docs/references.rst +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/docs/resources/favicon.png +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/__init__.py +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/__main__.py +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/alembic/env.py +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/alembic/script.py.mako +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/alembic/versions/2f0d4305e320_init_database.py +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/alembic/versions/940c3b9c702d_add_lock_on_eggs.py +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/bot.py +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/cli.py +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/commands/__init__.py +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/commands/base.py +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/commands/basket.py +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/commands/top.py +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/games/__init__.py +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/games/connect.py +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/games/game.py +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/hunts/__init__.py +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/hunts/hunt.py +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/hunts/rank.py +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/info.py +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/logger.py +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/models.py +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/py.typed +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/resources/alembic.ini +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/resources/credits.txt +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/resources/emotes/eggs/egg_01.png +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/resources/emotes/eggs/egg_02.png +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/resources/emotes/eggs/egg_03.png +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/resources/emotes/eggs/egg_04.png +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/resources/emotes/eggs/egg_05.png +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/resources/emotes/eggs/egg_06.png +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/resources/emotes/eggs/egg_07.png +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/resources/emotes/eggs/egg_08.png +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/resources/emotes/eggs/egg_09.png +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/resources/emotes/eggs/egg_10.png +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/resources/emotes/eggs/egg_11.png +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/resources/emotes/eggs/egg_12.png +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/resources/emotes/eggs/egg_13.png +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/resources/emotes/eggs/egg_14.png +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/resources/emotes/eggs/egg_15.png +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/resources/emotes/eggs/egg_16.png +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/resources/emotes/eggs/egg_17.png +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/resources/emotes/eggs/egg_18.png +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/resources/emotes/eggs/egg_19.png +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/resources/emotes/eggs/egg_20.png +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/resources/emotes/icons/arrow.png +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/resources/emotes/icons/end.png +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/resources/emotes/icons/versus.png +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/resources/emotes/icons/wait.png +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/resources/logging.conf +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/easterobot/resources/logo.png +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/tests/__init__.py +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/tests/test_cli.py +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/tests/test_config.py +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/tools/chatgpt.txt +0 -0
- {easterobot-1.1.1 → easterobot-1.1.2}/tools/cropping.py +0 -0
@@ -37,3 +37,16 @@ jobs:
|
|
37
37
|
|
38
38
|
- name: Run tests
|
39
39
|
run: uv run poe test
|
40
|
+
docker:
|
41
|
+
name: Docker build
|
42
|
+
runs-on: ubuntu-latest
|
43
|
+
|
44
|
+
steps:
|
45
|
+
- name: Checkout code
|
46
|
+
uses: actions/checkout@v4
|
47
|
+
|
48
|
+
- name: Set up Docker
|
49
|
+
uses: docker/setup-buildx-action@v3
|
50
|
+
|
51
|
+
- name: Build services with Docker Compose
|
52
|
+
run: docker compose -f docker-compose.yml build
|
@@ -2,8 +2,8 @@
|
|
2
2
|
FROM python:3.12-slim
|
3
3
|
|
4
4
|
# Metadata for clarity and documentation
|
5
|
-
LABEL maintainer="
|
6
|
-
LABEL description="Docker image for easterobot
|
5
|
+
LABEL maintainer="dashstrom.pro@gmail.com"
|
6
|
+
LABEL description="Docker image for easterobot, a discord bot for easter events"
|
7
7
|
|
8
8
|
# Add the UV binary
|
9
9
|
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
|
@@ -17,9 +17,6 @@ RUN mkdir /data
|
|
17
17
|
# Make it read-only
|
18
18
|
RUN chown easterobot:easterobot /data
|
19
19
|
|
20
|
-
# Use non-root user for security
|
21
|
-
USER easterobot
|
22
|
-
|
23
20
|
# Change the working directory to the `src` directory
|
24
21
|
WORKDIR /src
|
25
22
|
|
@@ -32,8 +29,16 @@ RUN uv sync --frozen --no-install-project
|
|
32
29
|
# Copy the project into the image
|
33
30
|
COPY . .
|
34
31
|
|
32
|
+
# Fix permissions
|
33
|
+
RUN find /src -type d -exec chmod 755 {} \;
|
34
|
+
RUN find /src -type f -exec chmod 644 {} \;
|
35
|
+
RUN chmod +x /src/entrypoint.sh
|
36
|
+
|
35
37
|
# Sync the project
|
36
38
|
RUN uv sync --frozen
|
37
39
|
|
40
|
+
# Use non-root user for security
|
41
|
+
USER easterobot
|
42
|
+
|
38
43
|
# Default command (use exec form for signal handling)
|
39
44
|
CMD ["/src/entrypoint.sh"]
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: easterobot
|
3
|
-
Version: 1.1.
|
3
|
+
Version: 1.1.2
|
4
4
|
Summary: Discord bot for Easter.
|
5
5
|
Project-URL: Homepage, https://github.com/Dashstrom/easterobot
|
6
6
|
Project-URL: Repository, https://github.com/Dashstrom/easterobot
|
@@ -121,6 +121,11 @@ from `PyPI <https://pypi.org/project>`_
|
|
121
121
|
cd easterobot
|
122
122
|
echo "DISCORD_TOKEN=YOU_MUST_PUT_YOUR_TOKEN_HERE" > .env
|
123
123
|
|
124
|
+
# Can be unsafe
|
125
|
+
chmod -R 700 .
|
126
|
+
mkdir data
|
127
|
+
chmod 777 data
|
128
|
+
|
124
129
|
# Run the docker container
|
125
130
|
docker compose up -d
|
126
131
|
|
@@ -9,7 +9,8 @@ from .base import Context, controlled_command, egg_command_group
|
|
9
9
|
|
10
10
|
|
11
11
|
@egg_command_group.command(
|
12
|
-
name="disable",
|
12
|
+
name="disable",
|
13
|
+
description="Désactiver la chasse aux œufs dans le salon"
|
13
14
|
)
|
14
15
|
@controlled_command(cooldown=True, manage_channels=True)
|
15
16
|
async def disable_command(ctx: Context) -> None:
|
@@ -13,7 +13,8 @@ from .base import Context, controlled_command, egg_command_group
|
|
13
13
|
|
14
14
|
|
15
15
|
@egg_command_group.command(
|
16
|
-
name="edit",
|
16
|
+
name="edit",
|
17
|
+
description="Editer le nombre d'œufs d'un membre",
|
17
18
|
)
|
18
19
|
@controlled_command(cooldown=True, administrator=True)
|
19
20
|
async def edit_command(
|
@@ -9,7 +9,8 @@ from .base import Context, controlled_command, egg_command_group
|
|
9
9
|
|
10
10
|
|
11
11
|
@egg_command_group.command(
|
12
|
-
name="enable",
|
12
|
+
name="enable",
|
13
|
+
description="Activer la chasse dans le salon"
|
13
14
|
)
|
14
15
|
@controlled_command(
|
15
16
|
cooldown=True,
|
@@ -148,7 +148,8 @@ async def game_dual( # noqa: C901, D103, PLR0912
|
|
148
148
|
|
149
149
|
|
150
150
|
@egg_command_group.command(
|
151
|
-
name="connect4",
|
151
|
+
name="connect4",
|
152
|
+
description="Lancer une partie de puissance 4"
|
152
153
|
)
|
153
154
|
@controlled_command(cooldown=True, channel_permissions={"send_messages": True})
|
154
155
|
async def connect4_command(
|
@@ -161,7 +162,8 @@ async def connect4_command(
|
|
161
162
|
|
162
163
|
|
163
164
|
@egg_command_group.command(
|
164
|
-
name="tictactoe",
|
165
|
+
name="tictactoe",
|
166
|
+
description="Lancer une partie de morpion"
|
165
167
|
)
|
166
168
|
@controlled_command(cooldown=True)
|
167
169
|
async def tictactoe_command(
|
@@ -175,7 +177,7 @@ async def tictactoe_command(
|
|
175
177
|
|
176
178
|
@egg_command_group.command(
|
177
179
|
name="rockpaperscissor",
|
178
|
-
description="Lancer une partie de pierre papier ciseaux
|
180
|
+
description="Lancer une partie de pierre papier ciseaux",
|
179
181
|
)
|
180
182
|
@controlled_command(cooldown=True)
|
181
183
|
async def rockpaperscissor_command(
|
@@ -7,7 +7,10 @@ from easterobot.hunts.hunt import embed
|
|
7
7
|
from .base import Context, controlled_command, egg_command_group
|
8
8
|
|
9
9
|
|
10
|
-
@egg_command_group.command(
|
10
|
+
@egg_command_group.command(
|
11
|
+
name="help",
|
12
|
+
description="Obtenir l'aide des commandes"
|
13
|
+
)
|
11
14
|
@controlled_command(cooldown=True)
|
12
15
|
async def help_command(ctx: Context) -> None:
|
13
16
|
"""Help command."""
|
@@ -14,7 +14,8 @@ from .base import Context, Interaction, controlled_command, egg_command_group
|
|
14
14
|
|
15
15
|
|
16
16
|
@egg_command_group.command(
|
17
|
-
name="reset",
|
17
|
+
name="reset",
|
18
|
+
description="Réinitialiser la chasse aux œufs"
|
18
19
|
)
|
19
20
|
@controlled_command(cooldown=True, administrator=True)
|
20
21
|
async def reset_command(ctx: Context) -> None:
|
@@ -21,7 +21,10 @@ from .base import (
|
|
21
21
|
logger = logging.getLogger("easterobot")
|
22
22
|
|
23
23
|
|
24
|
-
@egg_command_group.command(
|
24
|
+
@egg_command_group.command(
|
25
|
+
name="search",
|
26
|
+
description="Rechercher un œuf"
|
27
|
+
)
|
25
28
|
@controlled_command(cooldown=True, channel_permissions={"send_messages": True})
|
26
29
|
async def search_command(ctx: Context) -> None:
|
27
30
|
"""Search command."""
|
@@ -30,7 +30,7 @@ V = TypeVar("V")
|
|
30
30
|
Members = Union[discord.Member, list[discord.Member]]
|
31
31
|
|
32
32
|
HERE = pathlib.Path(__file__).parent.resolve()
|
33
|
-
RESOURCES =
|
33
|
+
RESOURCES = HERE / "resources"
|
34
34
|
DEFAULT_CONFIG_PATH = pathlib.Path("config.yml")
|
35
35
|
EXAMPLE_CONFIG_PATH = RESOURCES / "config.example.yml"
|
36
36
|
|
@@ -166,7 +166,7 @@ class RockPaperScissor(Game):
|
|
166
166
|
if not self.timeout:
|
167
167
|
await self.set_winner(final_winner)
|
168
168
|
else:
|
169
|
-
dt = self.start_timer(
|
169
|
+
dt = self.start_timer(32)
|
170
170
|
embed.description += f"\n\n{info}\n\nFin du tour {dt}"
|
171
171
|
embed.set_author(name=header, icon_url=icon_url)
|
172
172
|
await self.message.edit(embed=embed, view=self.view, content="")
|
@@ -85,7 +85,7 @@ class TicTacToe(Game):
|
|
85
85
|
content += footer
|
86
86
|
|
87
87
|
if not self.terminate:
|
88
|
-
now = datetime.datetime.now() + datetime.timedelta(seconds=
|
88
|
+
now = datetime.datetime.now() + datetime.timedelta(seconds=32) # noqa: DTZ005
|
89
89
|
content += f"\n\nFin du tour {format_dt(now, style='R')}"
|
90
90
|
|
91
91
|
embed = discord.Embed(description=content, color=self.color(user))
|
@@ -142,7 +142,7 @@ class TicTacToe(Game):
|
|
142
142
|
await self.set_winner(None)
|
143
143
|
else:
|
144
144
|
self.turn += 1
|
145
|
-
self.start_timer(
|
145
|
+
self.start_timer(30)
|
146
146
|
await self.update()
|
147
147
|
|
148
148
|
@override
|
easterobot-1.1.1/entrypoint.sh
DELETED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{easterobot-1.1.1 → easterobot-1.1.2}/easterobot/alembic/versions/2f0d4305e320_init_database.py
RENAMED
File without changes
|
{easterobot-1.1.1 → easterobot-1.1.2}/easterobot/alembic/versions/940c3b9c702d_add_lock_on_eggs.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|