forked from mrismanaziz/File-Sharing-Man
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* flexible button adapts to var * update and improvements Signed-off-by: mrismanaziz <[email protected]>
- Loading branch information
1 parent
396aa16
commit 1e9c101
Showing
9 changed files
with
173 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
# Credits: @mrismanaziz | ||
# FROM File-Sharing-Man <https://github.com/mrismanaziz/File-Sharing-Man/> | ||
# t.me/SharingUserbot & t.me/Lunatic0de | ||
|
||
from config import FORCE_SUB_CHANNEL, FORCE_SUB_GROUP | ||
from pyrogram.types import InlineKeyboardButton | ||
|
||
|
||
def start_button(client): | ||
if not FORCE_SUB_CHANNEL and not FORCE_SUB_GROUP: | ||
buttons = [ | ||
[ | ||
InlineKeyboardButton(text="• ᴛᴇɴᴛᴀɴɢ sᴀʏᴀ •", callback_data="about"), | ||
InlineKeyboardButton(text="• ᴛᴜᴛᴜᴘ •", callback_data="close"), | ||
], | ||
] | ||
return buttons | ||
if not FORCE_SUB_CHANNEL and FORCE_SUB_GROUP: | ||
buttons = [ | ||
[ | ||
InlineKeyboardButton(text="𝗚𝗥𝗢𝗨𝗣", url=client.invitelink2), | ||
], | ||
[ | ||
InlineKeyboardButton(text="• ᴛᴇɴᴛᴀɴɢ sᴀʏᴀ •", callback_data="about"), | ||
InlineKeyboardButton(text="• ᴛᴜᴛᴜᴘ •", callback_data="close"), | ||
], | ||
] | ||
return buttons | ||
if FORCE_SUB_CHANNEL and not FORCE_SUB_GROUP: | ||
buttons = [ | ||
[ | ||
InlineKeyboardButton(text="𝗖𝗛𝗔𝗡𝗡𝗘𝗟", url=client.invitelink), | ||
], | ||
[ | ||
InlineKeyboardButton(text="• ᴛᴇɴᴛᴀɴɢ sᴀʏᴀ •", callback_data="about"), | ||
InlineKeyboardButton(text="• ᴛᴜᴛᴜᴘ •", callback_data="close"), | ||
], | ||
] | ||
return buttons | ||
if FORCE_SUB_CHANNEL and FORCE_SUB_GROUP: | ||
buttons = [ | ||
[ | ||
InlineKeyboardButton(text="• ᴛᴇɴᴛᴀɴɢ sᴀʏᴀ •", callback_data="about"), | ||
], | ||
[ | ||
InlineKeyboardButton(text="𝗖𝗛𝗔𝗡𝗡𝗘𝗟", url=client.invitelink), | ||
InlineKeyboardButton(text="𝗚𝗥𝗢𝗨𝗣", url=client.invitelink2), | ||
], | ||
[InlineKeyboardButton(text="• ᴛᴜᴛᴜᴘ •", callback_data="close")], | ||
] | ||
return buttons | ||
|
||
|
||
def fsub_button(client, message): | ||
if not FORCE_SUB_CHANNEL and FORCE_SUB_GROUP: | ||
buttons = [ | ||
[ | ||
InlineKeyboardButton(text="𝗚𝗥𝗢𝗨𝗣", url=client.invitelink2), | ||
], | ||
] | ||
try: | ||
buttons.append( | ||
[ | ||
InlineKeyboardButton( | ||
text="ᴄᴏʙᴀ ʟᴀɢɪ", | ||
url=f"https://t.me/{client.username}?start={message.command[1]}", | ||
) | ||
] | ||
) | ||
except IndexError: | ||
pass | ||
return buttons | ||
if FORCE_SUB_CHANNEL and not FORCE_SUB_GROUP: | ||
buttons = [ | ||
[ | ||
InlineKeyboardButton(text="𝗖𝗛𝗔𝗡𝗡𝗘𝗟", url=client.invitelink), | ||
], | ||
] | ||
try: | ||
buttons.append( | ||
[ | ||
InlineKeyboardButton( | ||
text="ᴄᴏʙᴀ ʟᴀɢɪ", | ||
url=f"https://t.me/{client.username}?start={message.command[1]}", | ||
) | ||
] | ||
) | ||
except IndexError: | ||
pass | ||
return buttons | ||
if FORCE_SUB_CHANNEL and FORCE_SUB_GROUP: | ||
buttons = [ | ||
[ | ||
InlineKeyboardButton(text="𝗖𝗛𝗔𝗡𝗡𝗘𝗟", url=client.invitelink), | ||
InlineKeyboardButton(text="𝗚𝗥𝗢𝗨𝗣", url=client.invitelink2), | ||
], | ||
] | ||
try: | ||
buttons.append( | ||
[ | ||
InlineKeyboardButton( | ||
text="ᴄᴏʙᴀ ʟᴀɢɪ", | ||
url=f"https://t.me/{client.username}?start={message.command[1]}", | ||
) | ||
] | ||
) | ||
except IndexError: | ||
pass | ||
return buttons |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters