from asyncio import sleep
from Pyrogram import Client, filters #pip install tgcrypto, pip install pyrogram
app = Client("my_account")
spam_text = 'spam'
delay = 0.25
@app.on_message(filters.command('spam', prefixes='.') & filters.me)
async def enable_spam(_, message):
await message.delete()
cmd = message.text.split()
for i in range(int(cmd[1])):
await message.reply_text(spam_text)
await sleep(delay)
app.run()
pip 没有帮助,不知道该怎么办-我安装了一个模块!-
Traceback (most recent call last):
File "c:\Users\ilyas\OneDrive\Рабочий стол\Bomber Telegram\main.py", li
ne 2, in <module>
from Pyrogram import Client, filters #pip install tgcrypto, pip insta
ll pyrogram
ModuleNotFoundError: No module named 'Pyrogram'
我怀疑你对导入模块的名称有一点错误:从模块页面上判断
PyPI
,你需要用小写字母来调用它,像这样:是的,@ZxNuClear 同志是第一个提出这个想法的人,所以在因果报应中向他 + :)