Skip to content

Commit

Permalink
typo, added commands
Browse files Browse the repository at this point in the history
  • Loading branch information
subinps committed Jun 5, 2021
1 parent f75e6f5 commit 36c9e97
Show file tree
Hide file tree
Showing 7 changed files with 86 additions and 14 deletions.
77 changes: 75 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
#SOFTWARE.

from pyrogram.raw import functions, types
from pyrogram import Client, idle
from pyromod import listen
from config import Config
Expand All @@ -35,6 +35,7 @@
plugins=dict(root="plugins")
)


async def main():
async with bot:
await bot.download_media(Config.INSTA_SESSIONFILE_ID, file_name=f"./{Config.USER}")
Expand All @@ -44,5 +45,77 @@ async def main():
if Config.INSTA_SESSIONFILE_ID:
bot.run(main())

bot.start()
bot.send(
functions.bots.SetBotCommands(
commands=[
types.BotCommand(
command="start",
description="Check if bot alive"
),
types.BotCommand(
command="help",
description="How to use"
),
types.BotCommand(
command="login",
description="login into your Instagram account"
),
types.BotCommand(
command="logout",
description="Logout from Instagram"
),
types.BotCommand(
command="account",
description="Shows details of logged in account"
),
types.BotCommand(
command="posts",
description="Download all posts from given username"
),
types.BotCommand(
command="feed",
description="Download posts in your feed"
),
types.BotCommand(
command="igtv",
description="Download IGTV videos of given username"
),
types.BotCommand(
command="saved",
description="Download specified number of posts from your saved posts "
),
types.BotCommand(
command="story",
description="Download stories of given username"
),
types.BotCommand(
command="stories",
description="Downloads stories off all your followees"
),
types.BotCommand(
command="followers",
description="Sends a list of followers of given username"
),
types.BotCommand(
command="followees",
description="Sends a list followees of given username"
),
types.BotCommand(
command="tagged",
description="Download all posts tagged with given username"
),
types.BotCommand(
command="highlights",
description="Downloads highlights from given username"
),
types.BotCommand(
command="restart",
description="Stop all processes and restart bot"
),
]
)
)

bot.run()
idle()
bot.stop()
2 changes: 1 addition & 1 deletion plugins/callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ async def cb_handler(bot: Client, query: CallbackQuery):
[
[
InlineKeyboardButton("👨🏼‍💻Developer", url='https://t.me/subinps'),
InlineKeyboardButton("🤖Othor Bots", url="https://t.me/subin_works/122"),
InlineKeyboardButton("🤖Other Bots", url="https://t.me/subin_works/122"),
InlineKeyboardButton("⚙️Update Channel", url="https://t.me/subin_works")
],
[
Expand Down
9 changes: 4 additions & 5 deletions plugins/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ async def start(bot, cmd):
[
[
InlineKeyboardButton("👨🏼‍💻Developer", url='https://t.me/subinps'),
InlineKeyboardButton("🤖Othor Bots", url="https://t.me/subin_works/122"),
InlineKeyboardButton("⚙️Update Channel", url="https://t.me/subin_works")
InlineKeyboardButton("🤖Other Bots", url="https://t.me/subin_works/122")
],
[
InlineKeyboardButton("🔗Source Code", url="https://github.com/subinps/Instagram-Bot"),
Expand All @@ -68,7 +67,7 @@ async def start(bot, cmd):
[
[
InlineKeyboardButton("👨🏼‍💻Developer", url='https://t.me/subinps'),
InlineKeyboardButton("🤖Othor Bots", url="https://t.me/subin_works/122"),
InlineKeyboardButton("🤖Other Bots", url="https://t.me/subin_works/122"),
],
[
InlineKeyboardButton("🔗Source Code", url="https://github.com/subinps/Instagram-Bot")
Expand All @@ -93,7 +92,7 @@ async def help(bot, cmd):
[
[
InlineKeyboardButton("👨🏼‍💻Developer", url='https://t.me/subinps'),
InlineKeyboardButton("🤖Othor Bots", url="https://t.me/subin_works/122"),
InlineKeyboardButton("🤖Other Bots", url="https://t.me/subin_works/122"),
InlineKeyboardButton("⚙️Update Channel", url="https://t.me/subin_works")

],
Expand All @@ -115,7 +114,7 @@ async def stop(bot, cmd):
[
[
InlineKeyboardButton("👨🏼‍💻Developer", url='https://t.me/subinps'),
InlineKeyboardButton("🤖Othor Bots", url="https://t.me/subin_works/122")
InlineKeyboardButton("🤖Other Bots", url="https://t.me/subin_works/122")
],
[
InlineKeyboardButton("🔗Source Code", url="https://github.com/subinps/Instagram-Bot"),
Expand Down
2 changes: 1 addition & 1 deletion plugins/insta_cmds.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
[
[
InlineKeyboardButton("👨🏼‍💻Developer", url='https://t.me/subinps'),
InlineKeyboardButton("🤖Othor Bots", url="https://t.me/subin_works/122")
InlineKeyboardButton("🤖Other Bots", url="https://t.me/subin_works/122")
],
[
InlineKeyboardButton("🔗Source Code", url="https://github.com/subinps/Instagram-Bot"),
Expand Down
4 changes: 2 additions & 2 deletions plugins/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ async def login(bot, message):
[
[
InlineKeyboardButton("👨🏼‍💻Developer", url='https://t.me/subinps'),
InlineKeyboardButton("🤖Othor Bots", url="https://t.me/subin_works/122")
InlineKeyboardButton("🤖Other Bots", url="https://t.me/subin_works/122")
],
[
InlineKeyboardButton("🔗Source Code", url="https://github.com/subinps/Instagram-Bot"),
Expand Down Expand Up @@ -174,7 +174,7 @@ async def logout(bot, message):
[
[
InlineKeyboardButton("👨🏼‍💻Developer", url='https://t.me/subinps'),
InlineKeyboardButton("🤖Othor Bots", url="https://t.me/subin_works/122")
InlineKeyboardButton("🤖Other Bots", url="https://t.me/subin_works/122")
],
[
InlineKeyboardButton("🔗Source Code", url="https://github.com/subinps/Instagram-Bot"),
Expand Down
4 changes: 2 additions & 2 deletions plugins/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async def account(bot, message):
[
[
InlineKeyboardButton("👨🏼‍💻Developer", url='https://t.me/subinps'),
InlineKeyboardButton("🤖Othor Bots", url="https://t.me/subin_works/122"),
InlineKeyboardButton("🤖Other Bots", url="https://t.me/subin_works/122"),

],
[
Expand Down Expand Up @@ -130,7 +130,7 @@ async def _insta_post_batch(bot, message):
[
[
InlineKeyboardButton("👨🏼‍💻Developer", url='https://t.me/subinps'),
InlineKeyboardButton("🤖Othor Bots", url="https://t.me/subin_works/122"),
InlineKeyboardButton("🤖Other Bots", url="https://t.me/subin_works/122"),

],
[
Expand Down
2 changes: 1 addition & 1 deletion utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ async def upload(m, bot, chat_id, dir):
[
[
InlineKeyboardButton("👨🏼‍💻Developer", url='https://t.me/subinps'),
InlineKeyboardButton("🤖Othor Bots", url="https://t.me/subin_works/122")
InlineKeyboardButton("🤖Other Bots", url="https://t.me/subin_works/122")
],
[
InlineKeyboardButton("🔗Source Code", url="https://github.com/subinps/Instagram-Bot"),
Expand Down

0 comments on commit 36c9e97

Please sign in to comment.