From d6dd276a9297a9f0b7ca95eedab2f23267b8b4be Mon Sep 17 00:00:00 2001 From: Migatu Date: Tue, 29 Aug 2023 12:05:47 +0200 Subject: [PATCH] Mention conjurer --- .trunk/.gitignore | 2 +- .trunk/trunk.yaml | 12 ++++++------ bot.py | 6 +++++- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.trunk/.gitignore b/.trunk/.gitignore index 695b519..1e24652 100644 --- a/.trunk/.gitignore +++ b/.trunk/.gitignore @@ -2,7 +2,7 @@ *logs *actions *notifications +*tools plugins user_trunk.yaml user.yaml -tools diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml index 0e9269c..4473760 100644 --- a/.trunk/trunk.yaml +++ b/.trunk/trunk.yaml @@ -1,19 +1,19 @@ version: 0.1 cli: - version: 1.12.3 + version: 1.14.2 plugins: sources: - id: trunk - ref: v0.0.22 + ref: v1.2.1 uri: https://github.com/trunk-io/plugins lint: enabled: - - checkov@2.3.75 - - yamllint@1.26.3 + - checkov@2.4.9 + - yamllint@1.32.0 - actionlint@1.6.25 - markdownlint@0.35.0 - - trivy@0.43.1 - - trufflehog@3.44.0 + - trivy@0.44.1 + - trufflehog@3.54.0 - pylint - codespell - cspell diff --git a/bot.py b/bot.py index 38e4f77..9465cc2 100644 --- a/bot.py +++ b/bot.py @@ -270,8 +270,12 @@ async def on_message(message): word_reactions[word][2] = datetime.now() # TODO: drobne literówki, mentiony, spacja przed dwukropkiem. napraw. + kondziu_mentioned = False + for mention in message.mentions: + if mention == client.user: + kondziu_mentioned = True - if "conjurer:" in message.content: + if kondziu_mentioned or "conjurer:" in message.content: async with channel.typing(): logger.debug("Procedura chatu") message.content = message.content.replace("conjurer: ", "")