Make bot respond to the /start command

This commit is contained in:
neko 2025-01-21 20:02:53 +05:00
parent 7a160d5e02
commit 661d10415a
2 changed files with 6 additions and 9 deletions

View File

@ -1,9 +0,0 @@
# TODO
## Planned
* Add /replace command
* Make every filename random to prevent issues with the same filename
## In progress
* Add /start command
* Make sure that unoserver restarts https://stackoverflow.com/questions/72146908/how-to-restart-subprocess-if-it-crashes

View File

@ -97,5 +97,11 @@ async def documentFetcher(client, message):
else: else:
return # Hopefully message will get ignored and no futher resources will be used return # Hopefully message will get ignored and no futher resources will be used
@app.on_message(filters.command("start"))
async def startResponder(client, message):
startMessage = "This bot converts any document libreoffice supports into a pdf\nYou can add it into your group and it should detect the appropriate files automatically\nList of supported file formats:\n.doc .docx .doc\n.xls .xlsx\n.odt .ods\n.rtf .txt\n.html .csv .tsv\n.epub\n.odp .odp\n.odg\n.vsd .svg\n.ppt .pptx\n.abw .wps\n.tex"
await message.reply(startMessage, reply_to_message_id=message.id)
unoStart() unoStart()
app.run() app.run()