Fix typo
This commit is contained in:
parent
8efd93f596
commit
f8179c8c32
|
|
@ -23,7 +23,7 @@ ENV LANGUAGE en_US:en
|
|||
ENV LC_ALL en_US.UTF-8
|
||||
COPY . .
|
||||
COPY .netrc /root/.netrc
|
||||
Run chmod 600 /usr/src/app/.netrc
|
||||
RUN chmod 600 /usr/src/app/.netrc
|
||||
RUN chmod +x aria.sh
|
||||
|
||||
CMD ["bash","start.sh"]
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ def stats(update, context):
|
|||
@run_async
|
||||
def start(update, context):
|
||||
start_string = f'''
|
||||
This bot can mirror all your links to Google drive!
|
||||
This bot can mirror all your links to Google Drive!
|
||||
Type /{BotCommands.HelpCommand} to get a list of available commands
|
||||
'''
|
||||
buttons = button_build.ButtonMaker()
|
||||
|
|
@ -220,7 +220,6 @@ def main():
|
|||
chat_id, msg_id = map(int, f)
|
||||
bot.edit_message_text("Restarted successfully!", chat_id, msg_id)
|
||||
os.remove(".restartmsg")
|
||||
|
||||
bot.set_my_commands(botcmds)
|
||||
|
||||
start_handler = CommandHandler(BotCommands.StartCommand, start)
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ from bot.helper.ext_utils.db_handler import DbManger
|
|||
|
||||
|
||||
@run_async
|
||||
def authorize(update,context):
|
||||
def authorize(update, context):
|
||||
reply_message = None
|
||||
message_ = None
|
||||
reply_message = update.message.reply_to_message
|
||||
|
|
@ -41,7 +41,7 @@ def authorize(update,context):
|
|||
|
||||
|
||||
@run_async
|
||||
def unauthorize(update,context):
|
||||
def unauthorize(update, context):
|
||||
reply_message = None
|
||||
message_ = None
|
||||
reply_message = update.message.reply_to_message
|
||||
|
|
@ -71,7 +71,7 @@ def unauthorize(update,context):
|
|||
|
||||
|
||||
@run_async
|
||||
def addSudo(update,context):
|
||||
def addSudo(update, context):
|
||||
reply_message = None
|
||||
message_ = None
|
||||
reply_message = update.message.reply_to_message
|
||||
|
|
@ -96,7 +96,7 @@ def addSudo(update,context):
|
|||
|
||||
|
||||
@run_async
|
||||
def removeSudo(update,context):
|
||||
def removeSudo(update, context):
|
||||
reply_message = None
|
||||
message_ = None
|
||||
reply_message = update.message.reply_to_message
|
||||
|
|
@ -120,7 +120,7 @@ def removeSudo(update,context):
|
|||
|
||||
|
||||
@run_async
|
||||
def sendAuthChats(update,context):
|
||||
def sendAuthChats(update, context):
|
||||
user = sudo = ''
|
||||
user += '\n'.join(str(id) for id in AUTHORIZED_CHATS)
|
||||
sudo += '\n'.join(str(id) for id in SUDO_USERS)
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ from bot import dispatcher
|
|||
|
||||
|
||||
@new_thread
|
||||
def cloneNode(update,context):
|
||||
args = update.message.text.split(" ",maxsplit=1)
|
||||
def cloneNode(update, context):
|
||||
args = update.message.text.split(" ", maxsplit=1)
|
||||
if update.message.from_user.username:
|
||||
uname = f"@{update.message.from_user.username}"
|
||||
else:
|
||||
|
|
@ -18,16 +18,16 @@ def cloneNode(update,context):
|
|||
cc = f'\n\ncc: {uname}'
|
||||
if len(args) > 1:
|
||||
link = args[1]
|
||||
msg = sendMessage(f"Cloning: <code>{link}</code>",context.bot,update)
|
||||
msg = sendMessage(f"Cloning: <code>{link}</code>", context.bot, update)
|
||||
gd = GoogleDriveHelper()
|
||||
result, button = gd.clone(link)
|
||||
deleteMessage(context.bot,msg)
|
||||
if button == "":
|
||||
sendMessage(result,context.bot,update)
|
||||
sendMessage(result, context.bot, update)
|
||||
else:
|
||||
sendMarkup(result + cc,context.bot,update,button)
|
||||
sendMarkup(result + cc, context.bot, update, button)
|
||||
else:
|
||||
sendMessage("Provide G-Drive Shareable Link to Clone.",context.bot,update)
|
||||
sendMessage("Provide G-Drive Shareable Link to Clone.", context.bot, update)
|
||||
|
||||
clone_handler = CommandHandler(BotCommands.CloneCommand,cloneNode,filters=CustomFilters.authorized_chat | CustomFilters.authorized_user)
|
||||
clone_handler = CommandHandler(BotCommands.CloneCommand, cloneNode, filters=CustomFilters.authorized_chat | CustomFilters.authorized_user)
|
||||
dispatcher.add_handler(clone_handler)
|
||||
|
|
|
|||
|
|
@ -5,18 +5,19 @@ from bot.helper.telegram_helper.filters import CustomFilters
|
|||
from bot.helper.telegram_helper.bot_commands import BotCommands
|
||||
from bot import dispatcher
|
||||
|
||||
|
||||
@run_async
|
||||
def countNode(update,context):
|
||||
args = update.message.text.split(" ",maxsplit=1)
|
||||
def countNode(update, context):
|
||||
args = update.message.text.split(" ", maxsplit=1)
|
||||
if len(args) > 1:
|
||||
link = args[1]
|
||||
msg = sendMessage(f"Counting: <code>{link}</code>",context.bot,update)
|
||||
msg = sendMessage(f"Counting: <code>{link}</code>", context.bot, update)
|
||||
gd = GoogleDriveHelper()
|
||||
result = gd.count(link)
|
||||
deleteMessage(context.bot,msg)
|
||||
sendMessage(result,context.bot,update)
|
||||
deleteMessage(context.bot, msg)
|
||||
sendMessage(result, context.bot, update)
|
||||
else:
|
||||
sendMessage("Provide G-Drive Shareable Link to Count.",context.bot,update)
|
||||
sendMessage("Provide G-Drive Shareable Link to Count.", context.bot, update)
|
||||
|
||||
count_handler = CommandHandler(BotCommands.CountCommand,countNode,filters=CustomFilters.authorized_chat | CustomFilters.authorized_user)
|
||||
count_handler = CommandHandler(BotCommands.CountCommand, countNode, filters=CustomFilters.authorized_chat | CustomFilters.authorized_user)
|
||||
dispatcher.add_handler(count_handler)
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import threading
|
|||
from bot.helper.telegram_helper.bot_commands import BotCommands
|
||||
|
||||
@run_async
|
||||
def list_drive(update,context):
|
||||
def list_drive(update, context):
|
||||
try:
|
||||
search = update.message.text.split(' ',maxsplit=1)[1]
|
||||
LOGGER.info(f"Searching: {search}")
|
||||
|
|
|
|||
|
|
@ -8,8 +8,9 @@ from bot.helper.telegram_helper.filters import CustomFilters
|
|||
from bot.helper.telegram_helper.bot_commands import BotCommands
|
||||
import threading
|
||||
|
||||
|
||||
@run_async
|
||||
def mirror_status(update,context):
|
||||
def mirror_status(update, context):
|
||||
message = get_readable_message()
|
||||
if len(message) == 0:
|
||||
message = "No active downloads"
|
||||
|
|
@ -21,8 +22,8 @@ def mirror_status(update,context):
|
|||
if index in status_reply_dict.keys():
|
||||
deleteMessage(bot, status_reply_dict[index])
|
||||
del status_reply_dict[index]
|
||||
sendStatusMessage(update,context.bot)
|
||||
deleteMessage(context.bot,update.message)
|
||||
sendStatusMessage(update, context.bot)
|
||||
deleteMessage(context.bot, update.message)
|
||||
|
||||
|
||||
mirror_status_handler = CommandHandler(BotCommands.StatusCommand, mirror_status,
|
||||
|
|
|
|||
|
|
@ -329,21 +329,6 @@ def kang(update: Update, context: CallbackContext):
|
|||
os.remove("kangsticker.tgs")
|
||||
|
||||
|
||||
@run_async
|
||||
def delsticker(update, context):
|
||||
msg = update.effective_message
|
||||
if msg.reply_to_message and msg.reply_to_message.sticker:
|
||||
file_id = msg.reply_to_message.sticker.file_id
|
||||
context.bot.delete_sticker_from_set(file_id)
|
||||
msg.reply_text(
|
||||
"Deleted!"
|
||||
)
|
||||
else:
|
||||
update.effective_message.reply_text(
|
||||
"Please reply to sticker message to del sticker"
|
||||
)
|
||||
|
||||
|
||||
def makepack_internal(
|
||||
update,
|
||||
context,
|
||||
|
|
@ -412,6 +397,21 @@ def makepack_internal(
|
|||
"Failed to create sticker pack. Possibly due to blek mejik.")
|
||||
|
||||
|
||||
@run_async
|
||||
def delsticker(update, context):
|
||||
msg = update.effective_message
|
||||
if msg.reply_to_message and msg.reply_to_message.sticker:
|
||||
file_id = msg.reply_to_message.sticker.file_id
|
||||
context.bot.delete_sticker_from_set(file_id)
|
||||
msg.reply_text(
|
||||
"Sticker deleted!"
|
||||
)
|
||||
else:
|
||||
update.effective_message.reply_text(
|
||||
"Please reply to sticker message to del sticker"
|
||||
)
|
||||
|
||||
|
||||
@run_async
|
||||
def stickhelp(update, context):
|
||||
help_string = '''
|
||||
|
|
|
|||
Loading…
Reference in New Issue