Skip to content

Commit f2cd99b

Browse files
Update the pinned dependency version and resolve GH Action workflow issue (#32)
* update deps * always run the linter action * fall back replies to ctx.message
1 parent df58de7 commit f2cd99b

File tree

3 files changed

+16
-17
lines changed

3 files changed

+16
-17
lines changed

.github/workflows/coverage_and_lint.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ jobs:
7171
no-comments: ${{ matrix.python-version != '3.x' }}
7272

7373
- name: Lint
74-
if: ${{ always() && steps.install-deps.outcome == 'success' }}
7574
uses: github/super-linter/slim@v4
7675
env:
7776
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

core/context.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,18 @@
2424

2525
class Context(commands.Context["Bot"]):
2626
@discord.utils.cached_property
27-
def replied_reference(self) -> discord.MessageReference | None:
27+
def replied_reference(self) -> discord.MessageReference | discord.Message:
2828
ref = self.message.reference
2929
if ref and isinstance(ref.resolved, discord.Message):
30-
return ref.resolved.to_reference()
31-
return None
30+
return ref.resolved.to_reference(fail_if_not_exists=False)
31+
return self.message
3232

3333
@discord.utils.cached_property
34-
def replied_message(self) -> discord.Message | None:
34+
def replied_message(self) -> discord.Message | discord.Message:
3535
ref = self.message.reference
3636
if ref and isinstance(ref.resolved, discord.Message):
3737
return ref.resolved
38-
return None
38+
return self.message
3939

4040
def author_is_mod(self) -> bool:
4141
member: discord.Member

poetry.lock

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)