-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* changed code to work with latest ptbv20 library * removed broken links
- Loading branch information
artis7eer
committed
Jan 21, 2023
1 parent
5b01bb2
commit 60a708c
Showing
13 changed files
with
137 additions
and
262 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,45 @@ | ||
# ForwardTagRemoverBot - A Telegram Bot To Hide Forward Source | ||
#Copyright (C) 2020 by Rasak <https://github.com/Artis7eeR> | ||
#ForwardTagRemoverBot is free software: you can redistribute it and/or modify | ||
#it under the terms of the GNU General Public License as published by | ||
#the Free Software Foundation, either version 3 of the License, or | ||
#(at your option) any later version. | ||
|
||
#ForwardTagRemoverBot is distributed in the hope that it will be useful, | ||
#but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
#GNU General Public License for more details. | ||
|
||
#You should have received a copy of the GNU General Public License | ||
#along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
|
||
from telegram.ext import Filters,Updater,MessageHandler,CommandHandler | ||
from commands.commands import * | ||
from functions.functions import * | ||
from caption.setCaption import setCaption | ||
import os | ||
# Copyright (C) 2023 by Abdul Razaq <https://github.com/Artis7eeR> | ||
# ForwardTagRemoverBot is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
|
||
# ForwardTagRemoverBot is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
|
||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
|
||
import logging | ||
from telegram.ext import ( | ||
filters, | ||
ApplicationBuilder, | ||
CommandHandler, | ||
MessageHandler | ||
) | ||
|
||
from plugins.__main__ import * | ||
from config import Config | ||
|
||
updater=Updater(Config.TOKEN,use_context=True) | ||
dp=updater.dispatcher | ||
logging.basicConfig( | ||
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', | ||
level=logging.INFO | ||
) | ||
|
||
|
||
#/start | ||
dp.add_handler(CommandHandler('start',startMessage)) | ||
#/help | ||
dp.add_handler(CommandHandler('help',helpMessage)) | ||
def main(): | ||
bot = ApplicationBuilder().token(Config.BOT_TOKEN).build() | ||
bot.add_handler(CommandHandler('start', startMessage)) | ||
bot.add_handler(CommandHandler('help', helpMessage)) | ||
bot.add_handler(MessageHandler(filters.REPLY, handleCaption)) | ||
bot.add_handler(MessageHandler( | ||
filters.ALL & ~filters.COMMAND, handleMessage)) | ||
bot.run_polling() | ||
|
||
#Files | ||
dp.add_handler(MessageHandler(Filters.document,sendFile)) | ||
|
||
#Media | ||
dp.add_handler(MessageHandler(Filters.video,sendMedia)) | ||
|
||
#Photos | ||
dp.add_handler(MessageHandler(Filters.photo,sendPhoto)) | ||
|
||
#Text & Caption | ||
dp.add_handler(MessageHandler(Filters.text,setCaption)) | ||
|
||
#Stickers | ||
dp.add_handler(MessageHandler(Filters.sticker,sendSticker)) | ||
|
||
#Voice | ||
dp.add_handler(MessageHandler(Filters.voice,sendVoice)) | ||
|
||
#Audio | ||
dp.add_handler(MessageHandler(Filters.audio,sendAudio)) | ||
|
||
updater.start_polling() | ||
updater.idle() | ||
if __name__ == '__main__': | ||
main() |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,25 +1,30 @@ | ||
# ForwardTagRemoverBot - A Telegram Bot To Hide Forward Source | ||
#Copyright (C) 2020 by Rasak <https://github.com/Artis7eeR> | ||
#ForwardTagRemoverBot is free software: you can redistribute it and/or modify | ||
#it under the terms of the GNU General Public License as published by | ||
#the Free Software Foundation, either version 3 of the License, or | ||
#(at your option) any later version. | ||
# Copyright (C) 2023 by Abdul Razaq <https://github.com/Artis7eeR> | ||
# ForwardTagRemoverBot is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
|
||
#ForwardTagRemoverBot is distributed in the hope that it will be useful, | ||
#but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
#GNU General Public License for more details. | ||
# ForwardTagRemoverBot is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
|
||
#You should have received a copy of the GNU General Public License | ||
#along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
|
||
import os | ||
from dotenv import load_dotenv | ||
|
||
load_dotenv() | ||
|
||
class Config: | ||
|
||
TOKEN=os.environ.get("BOT_TOKEN",None) | ||
SOURCE="https://github.com/Artis7eeR/ForwardTagRemoverBot" | ||
START_TEXT="Hi [{}](tg://user?id={})\nI am A Forward Tag remover Bot.Send /help To Know What I Can Do \n ©Artis7eeR" | ||
HELP_TEXT="Forward Me A File,Video,Audio,Photo or Anything And \nI will Send You the File Back\n\n`How to Set Caption?`\nReply Caption to a File,Photo,Audio,Media" | ||
|
||
|
||
BOT_TOKEN = os.environ.get("BOT_TOKEN", None) | ||
SOURCE = "https://github.com/Artis7eeR/ForwardTagRemoverBot" | ||
START_TEXT = """ | ||
Hi [{}](tg://user?id={}) | ||
I am A Forward Tag remover Bot. | ||
Send /help to know more ©[Abdul Razaq](https://github.com/artis7eer)""" | ||
HELP_TEXT = "Forward Me A File,Video,Audio,Photo or Anything And \nI will Send You the File Back\n\n`How to Set Caption?`\nReply Caption to a File,Photo,Audio,Media" |
Oops, something went wrong.