Skip to content

Commit

Permalink
Bump pyromod, python version and removed force sub
Browse files Browse the repository at this point in the history
  • Loading branch information
AnonymousX1025 authored Apr 24, 2023
1 parent 8ff1dec commit f7b72f7
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 54 deletions.
10 changes: 5 additions & 5 deletions StringGenBot/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ async def generate_session(bot: Client, msg: Message, telethon=False, is_bot: bo
ty += " ʙᴏᴛ"
await msg.reply(f"» ᴛʀʏɪɴɢ ᴛᴏ sᴛᴀʀᴛ **{ty}** sᴇssɪᴏɴ ɢᴇɴᴇʀᴀᴛᴏʀ...")
user_id = msg.chat.id
api_id_msg = await bot.ask(user_id, "ᴩʟᴇᴀsᴇ sᴇɴᴅ ʏᴏᴜʀ **ᴀᴩɪ_ɪᴅ** ᴛᴏ ᴩʀᴏᴄᴇᴇᴅ.\n\nᴄʟɪᴄᴋ ᴏɴ /skip ғᴏʀ ᴜsɪɴɢ ʙᴏᴛ's ᴀᴘɪ.", filters=filters.text)
api_id_msg = await msg.chat.ask("ᴩʟᴇᴀsᴇ sᴇɴᴅ ʏᴏᴜʀ **ᴀᴩɪ_ɪᴅ** ᴛᴏ ᴩʀᴏᴄᴇᴇᴅ.\n\nᴄʟɪᴄᴋ ᴏɴ /skip ғᴏʀ ᴜsɪɴɢ ʙᴏᴛ's ᴀᴘɪ.", filters=filters.text)
if await cancelled(api_id_msg):
return
if api_id_msg.text == "/skip":
Expand All @@ -72,15 +72,15 @@ async def generate_session(bot: Client, msg: Message, telethon=False, is_bot: bo
except ValueError:
await api_id_msg.reply("**ᴀᴩɪ_ɪᴅ** ᴍᴜsᴛ ʙᴇ ᴀɴ ɪɴᴛᴇɢᴇʀ, sᴛᴀʀᴛ ɢᴇɴᴇʀᴀᴛɪɴɢ ʏᴏᴜʀ sᴇssɪᴏɴ ᴀɢᴀɪɴ.", quote=True, reply_markup=InlineKeyboardMarkup(gen_button))
return
api_hash_msg = await bot.ask(user_id, "» ɴᴏᴡ ᴩʟᴇᴀsᴇ sᴇɴᴅ ʏᴏᴜʀ **ᴀᴩɪ_ʜᴀsʜ** ᴛᴏ ᴄᴏɴᴛɪɴᴜᴇ", filters=filters.text)
api_hash_msg = await msg.chat.ask("» ɴᴏᴡ ᴩʟᴇᴀsᴇ sᴇɴᴅ ʏᴏᴜʀ **ᴀᴩɪ_ʜᴀsʜ** ᴛᴏ ᴄᴏɴᴛɪɴᴜᴇ", filters=filters.text)
if await cancelled(api_hash_msg):
return
api_hash = api_hash_msg.text
if not is_bot:
t = "» ᴩʟᴇᴀsᴇ sᴇɴᴅ ʏᴏᴜʀ **ᴩʜᴏɴᴇ_ɴᴜᴍʙᴇʀ** ᴡɪᴛʜ ᴄᴏᴜɴᴛʀʏ ᴄᴏᴅᴇ ғᴏʀ ᴡʜɪᴄʜ ʏᴏᴜ ᴡᴀɴᴛ ᴛᴏ ɢᴇɴᴇʀᴀᴛᴇ sᴇssɪᴏɴ. \nᴇxᴀᴍᴩʟᴇ : `+910000000000`'"
else:
t = "ᴩʟᴇᴀsᴇ sᴇɴᴅ ʏᴏᴜʀ **ʙᴏᴛ_ᴛᴏᴋᴇɴ** ᴛᴏ ᴄᴏɴᴛɪɴᴜᴇ.\nᴇxᴀᴍᴩʟᴇ : `5432198765:abcdanonymousterabaaplol`'"
phone_number_msg = await bot.ask(user_id, t, filters=filters.text)
phone_number_msg = await msg.chat.ask(t, filters=filters.text)
if await cancelled(phone_number_msg):
return
phone_number = phone_number_msg.text
Expand Down Expand Up @@ -113,7 +113,7 @@ async def generate_session(bot: Client, msg: Message, telethon=False, is_bot: bo
try:
phone_code_msg = None
if not is_bot:
phone_code_msg = await bot.ask(user_id, "» ᴩʟᴇᴀsᴇ sᴇɴᴅ ᴛʜᴇ **ᴏᴛᴩ** ᴛʜᴀᴛ ʏᴏᴜ'ᴠᴇ ʀᴇᴄᴇɪᴠᴇᴅ ғʀᴏᴍ ᴛᴇʟᴇɢʀᴀᴍ ᴏɴ ʏᴏᴜʀ ᴀᴄᴄᴏᴜɴᴛ.\nɪғ ᴏᴛᴩ ɪs `12345`, **ᴩʟᴇᴀsᴇ sᴇɴᴅ ɪᴛ ᴀs** `1 2 3 4 5`.", filters=filters.text, timeout=600)
phone_code_msg = await msg.chat.ask("» ᴩʟᴇᴀsᴇ sᴇɴᴅ ᴛʜᴇ **ᴏᴛᴩ** ᴛʜᴀᴛ ʏᴏᴜ'ᴠᴇ ʀᴇᴄᴇɪᴠᴇᴅ ғʀᴏᴍ ᴛᴇʟᴇɢʀᴀᴍ ᴏɴ ʏᴏᴜʀ ᴀᴄᴄᴏᴜɴᴛ.\nɪғ ᴏᴛᴩ ɪs `12345`, **ᴩʟᴇᴀsᴇ sᴇɴᴅ ɪᴛ ᴀs** `1 2 3 4 5`.", filters=filters.text, timeout=600)
if await cancelled(phone_code_msg):
return
except TimeoutError:
Expand All @@ -134,7 +134,7 @@ async def generate_session(bot: Client, msg: Message, telethon=False, is_bot: bo
return
except (SessionPasswordNeeded, SessionPasswordNeededError):
try:
two_step_msg = await bot.ask(user_id, "» ᴩʟᴇᴀsᴇ ᴇɴᴛᴇʀ ʏᴏᴜʀ **ᴛᴡᴏ sᴛᴇᴩ ᴠᴇʀɪғɪᴄᴀᴛɪᴏɴ** ᴩᴀssᴡᴏʀᴅ ᴛᴏ ᴄᴏɴᴛɪɴᴜᴇ.", filters=filters.text, timeout=300)
two_step_msg = await msg.chat.ask("» ᴩʟᴇᴀsᴇ ᴇɴᴛᴇʀ ʏᴏᴜʀ **ᴛᴡᴏ sᴛᴇᴩ ᴠᴇʀɪғɪᴄᴀᴛɪᴏɴ** ᴩᴀssᴡᴏʀᴅ ᴛᴏ ᴄᴏɴᴛɪɴᴜᴇ.", filters=filters.text, timeout=300)
except TimeoutError:
await msg.reply("» ᴛɪᴍᴇ ʟɪᴍɪᴛ ʀᴇᴀᴄʜᴇᴅ ᴏғ 5 ᴍɪɴᴜᴛᴇs.\n\nᴩʟᴇᴀsᴇ sᴛᴀʀᴛ ɢᴇɴᴇʀᴀᴛɪɴɢ ʏᴏᴜʀ sᴇssɪᴏɴ ᴀɢᴀɪɴ.", reply_markup=InlineKeyboardMarkup(gen_button))
return
Expand Down
36 changes: 0 additions & 36 deletions StringGenBot/must_join.py

This file was deleted.

10 changes: 0 additions & 10 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@
}],
"repository": "https://github.com/AnonymousX1025/StringGenBot",
"env": {
"ENVIRONMENT": {
"description": "Don't change ANYTHING.",
"required": true,
"value": "ANYTHING"
},
"API_ID": {
"description": "Get this value from my.telegram.org/apps.",
"required": true,
Expand All @@ -38,11 +33,6 @@
"required": true,
"value": ""
},
"MUST_JOIN": {
"description": "Username of a group or channel for which you want to set force sub.(without @)",
"required": true,
"value": "DevilsHeavenMF"
},
"BOT_TOKEN": {
"description": "Get this value from @BotFather",
"required": true,
Expand Down
1 change: 0 additions & 1 deletion config.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@
OWNER_ID = int(getenv("OWNER_ID"))

MONGO_DB_URI = getenv("MONGO_DB_URI")
MUST_JOIN = getenv("MUST_JOIN", None)
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
motor==3.1.2
psutil==5.9.5
pyromod==1.5
pyromod==2.0.0
pyrogram==2.0.104
python-dotenv==1.0.0
telethon==1.28.5
Expand Down
2 changes: 1 addition & 1 deletion runtime.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python-3.10.9
python-3.11.3

0 comments on commit f7b72f7

Please sign in to comment.