mirror of
https://github.com/Xtao-Labs/misskey2telegram.git
synced 2024-11-26 23:22:39 +00:00
18 lines
499 B
Python
18 lines
499 B
Python
from pyrogram import Client, filters
|
|
from pyrogram.types import Message
|
|
|
|
from misskey_init import misskey_bot
|
|
|
|
|
|
@Client.on_message(filters.incoming & filters.private & filters.text &
|
|
filters.command(["post"]))
|
|
async def post_command(_: Client, message: Message):
|
|
"""
|
|
发送新贴
|
|
"""
|
|
if text := message.text[6:].strip():
|
|
await misskey_bot.core.api.note.action.send(text)
|
|
await message.reply("发送成功", quote=True)
|
|
else:
|
|
return
|