Skip to content

Commit c049cb3

Browse files
authored
Merge pull request #3834 from dev-hato/add_waiting_action
Misskey: 受理した旨のリアクションを付けるようにする
2 parents f46af9e + c5882a0 commit c049cb3

4 files changed

Lines changed: 6 additions & 2 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464

6565
MISSKEY_API_TOKENにMisskeyのBotのアクセストークンを指定します。
6666

67-
MISSKEY_API_TOKENには `ドライブを操作する`, `ノートを作成・削除する`, `アカウントの情報を見る` の権限が必要です。
67+
MISSKEY_API_TOKENには `ドライブを操作する`, `ノートを作成・削除する`, `アカウントの情報を見る`, `リアクションを操作する` の権限が必要です。
6868

6969
6. docker composeで鳩botとPostgreSQLを起動します。
7070

README.template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464

6565
MISSKEY_API_TOKENにMisskeyのBotのアクセストークンを指定します。
6666

67-
MISSKEY_API_TOKENには `ドライブを操作する`, `ノートを作成・削除する`, `アカウントの情報を見る` の権限が必要です。
67+
MISSKEY_API_TOKENには `ドライブを操作する`, `ノートを作成・削除する`, `アカウントの情報を見る`, `リアクションを操作する` の権限が必要です。
6868

6969
6. docker composeで鳩botとPostgreSQLを起動します。
7070

library/clientclass.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,3 +184,6 @@ def get_send_user_name(self):
184184
def get_type():
185185
"""misskey"""
186186
return "misskey"
187+
188+
def add_waiting_reaction(self):
189+
self.client.notes_reactions_create(note_id=self.message["id"], reaction="👀")

run.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ async def misskey_runner():
239239

240240
if cred is not None and cred["id"] in mentions:
241241
client = MisskeyClient(misskey_client, note)
242+
client.add_waiting_reaction()
242243
try:
243244
analyze.analyze_message(
244245
note["text"]

0 commit comments

Comments
 (0)