Skip to content

Commit

Permalink
fix: failed to export emoji
Browse files Browse the repository at this point in the history
  • Loading branch information
JamzumSum committed Nov 28, 2023
1 parent 8df79f0 commit 5dac334
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "Qzone3TG"
version = "0.9.5.dev9"
version = "0.9.5.dev10"
description = "Forward Qzone feeds to telegram."
authors = ["aioqzone <zzzzss990315@gmail.com>"]
readme = "README.md"
Expand Down
6 changes: 6 additions & 0 deletions src/qzone3tg/app/interact/_conversation/comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

import asyncio
import typing as t
from contextlib import suppress

from aiogram import F, Router
from aiogram.exceptions import TelegramBadRequest
from aiogram.filters import or_f
from aiogram.filters.command import Command as CommandFilter
from aiogram.filters.command import CommandObject
Expand Down Expand Up @@ -58,12 +60,16 @@ async def input_content(self: InteractApp, message: Message, state: FSMContext):
data = await state.get_data()
feed_message = data["query_message"]
await comment_core(self, feed_message, message, message.text, state)
with suppress(TelegramBadRequest):
await message.delete_reply_markup()


async def cancel_custom(message: Message, state: FSMContext):
if await state.get_state() is None:
return
await message.reply("Cancelled.", reply_markup=None)
with suppress(TelegramBadRequest):
await message.delete_reply_markup()
await state.clear()


Expand Down
2 changes: 1 addition & 1 deletion src/qzone3tg/app/interact/_conversation/emoji.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ async def em(self: InteractApp, message: Message, state: FSMContext) -> None:
assert message.text is not None

match message.text.split()[1:]:
case "export":
case ["export"]:
await qe.export(Path("data/emoji.yml"))
await message.reply(**Text("已导出到", Pre("data/emoji.yml")).as_kwargs())
case [eid] if str.isdigit(eid):
Expand Down

0 comments on commit 5dac334

Please sign in to comment.