Skip to content

Commit 6bedd1e

Browse files
authored
Merge branch 'main' into pre-commit-ci-update-config
2 parents b0dfefb + 909b1b2 commit 6bedd1e

File tree

5 files changed

+13
-18
lines changed

5 files changed

+13
-18
lines changed

.pre-commit-config.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,12 @@ repos:
4444
- id: ruff-format
4545

4646
# 5. Project Config / Dependency Checks
47-
- repo: https://github.com/python-poetry/poetry
48-
rev: 2.1.3 # Use the latest tag from the repo
49-
hooks:
50-
- id: poetry-check
47+
# TODO: Disabled due to a issue with "No module named 'jinja2'"
48+
# relevant: https://github.com/mtkennerly/poetry-dynamic-versioning/issues/13
49+
#- repo: https://github.com/python-poetry/poetry
50+
# rev: 2.1.3 # Use the latest tag from the repo
51+
# hooks:
52+
# - id: poetry-check
5153

5254
# 6. Security Check
5355
- repo: https://github.com/gitleaks/gitleaks

poetry.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,6 @@ version = "0.0.0"
2222
enable = true
2323
metadata = true
2424
dirty = true
25-
# TODO: dirty causes issues with dockerization and always returns true, disabling for now
26-
#format-jinja = """
27-
# {%- if distance == 0 -%}
28-
# {{ serialize_pep440(base, stage, revision, metadata=[] + (["dirty"] if dirty else [])) }}
29-
# {%- elif branch == "main" -%}
30-
# {{ serialize_pep440(base, stage, revision, dev=distance, metadata=[commit] + (["dirty"] if dirty else [])) }}
31-
# {%- else -%}
32-
# {{ serialize_pep440(base, stage, revision, dev=distance, metadata=[commit, branch_escaped] + (["dirty"] if dirty else [])) }}
33-
# {%- endif -%}
34-
#"""
3525
format-jinja = """
3626
{%- if distance == 0 -%}
3727
{{ serialize_pep440(base, stage, revision) }}
@@ -78,6 +68,7 @@ watchdog = "^6.0.0"
7868
arrow = "^1.3.0"
7969
click = "^8.1.8"
8070
levenshtein = "^0.27.1"
71+
jinja2 = "^3.1.6"
8172

8273
[tool.poetry.group.dev.dependencies]
8374
pre-commit = ">=4.0.0"

tux/cogs/services/influxdblogger.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ async def logger(self) -> None:
6666
guild_id = int(guild.guild_id)
6767

6868
# Collect data by querying controllers
69-
starboard_stats = await self.db.starboard.find_many(where={"guild_id": guild_id})
69+
starboard_stats = await self.db.starboard_message.find_many(where={"guild_id": guild_id})
7070

7171
snippet_stats = await self.db.snippet.find_many(where={"guild_id": guild_id})
7272

tux/cogs/utility/afk.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,14 @@ async def afk(
5353

5454
await add_afk(self.db, shortened_reason, target, ctx.guild.id, False)
5555

56-
await ctx.send(
56+
await ctx.reply(
5757
content="\N{SLEEPING SYMBOL} || You are now afk! " + f"Reason: `{shortened_reason}`",
5858
allowed_mentions=discord.AllowedMentions(
5959
users=False,
6060
everyone=False,
6161
roles=False,
6262
),
63+
ephemeral=True,
6364
)
6465

6566
@commands.hybrid_command(name="permafk")
@@ -84,7 +85,7 @@ async def permafk(self, ctx: commands.Context[Tux], *, reason: str = "No reason.
8485
entry = await self.db.afk.get_afk_member(target.id, guild_id=ctx.guild.id)
8586
if entry is not None:
8687
await del_afk(self.db, target, entry.nickname)
87-
await ctx.send("Welcome back!")
88+
await ctx.send("Welcome back!", ephemeral=True)
8889
return
8990

9091
shortened_reason = textwrap.shorten(reason, width=100, placeholder="...")
@@ -99,6 +100,7 @@ async def permafk(self, ctx: commands.Context[Tux], *, reason: str = "No reason.
99100
everyone=False,
100101
roles=False,
101102
),
103+
ephemeral=True,
102104
)
103105

104106
@commands.Cog.listener("on_message")

0 commit comments

Comments
 (0)