Skip to content
This repository has been archived by the owner on Aug 25, 2023. It is now read-only.

Update __main__.py #11

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 41 additions & 47 deletions SophiaBot/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,42 +74,42 @@ def get_readable_time(seconds: int) -> str:
return ping_time


PM_START_TEXT = """Hey there 👋! My name is *Sophia*.\n\nI can help manage your groups with useful features, feel free to add me to your groups!."""
PM_START_TEXT = """Hey there My name is *Thunder GoHelp*.\n\nI can help manage your groups with useful features, feel free to add me to your groups!."""

STICKERS = (
"CAACAgUAAx0CTpRfGwACF41hMfagTfWdHNFici1VtOCQVVNYmgACgh8AAsZRxhU6tKJa_ySnnCAE",
"CAACAgUAAx0CTpRfGwACF5phMfi5vgKwQFg6KuzHiEc79QFT0QACCR4AAsZRxhVu32VqEb3_1SAE",
"CAACAgUAAx0CTpRfGwACGIBhQcGJDHuuXsU5el3I86SEx3nTpgAC2R8AAsZRxhUpEe6EcVukQCAE",
"CAACAgIAAxkBAAEDTcxhlHQv5xV8Xk0s9zL9JCGTuvsSegACSBIAAp4noUgaBYRWyReyTSIE",
"CAACAgIAAxkBAAEDTcxhlHQv5xV8Xk0s9zL9JCGTuvsSegACSBIAAp4noUgaBYRWyReyTSIE",
"CAACAgIAAxkBAAEDTcxhlHQv5xV8Xk0s9zL9JCGTuvsSegACSBIAAp4noUgaBYRWyReyTSIE",
)


buttons = [
[
InlineKeyboardButton(text=" Commands Help ❓", callback_data="help_back"),
InlineKeyboardButton(text=" Commands", callback_data="help_back"),
],
[
InlineKeyboardButton(text="Info & About 🙋‍", callback_data="source_"),
InlineKeyboardButton(text="Info & About‍", callback_data="source_"),
InlineKeyboardButton(
text="System Stats 💻", callback_data="stats_callback"
text="System Stats", callback_data="stats_callback"
),
],
[
InlineKeyboardButton(text=" Sophia News 🙋‍♀️ ", url=f"https://t.me/SophiaUpdates"),
InlineKeyboardButton(text=" Support Group 💬 ", url=f"https://t.me/SophiaSupport_Official"),
InlineKeyboardButton(text=" Thunder GoHelp News ", url=f"https://t.me/thundergotechnology"),
InlineKeyboardButton(text=" Support Group ", url=f"https://t.me/thundergotechnology"),
],
[
InlineKeyboardButton(text="➕ Add Sophia to your Group ➕", url="t.me/SophiaSLBot?startgroup=true"),
InlineKeyboardButton(text="➕ Add Sophia to your Group ➕", url="t.me/thunder_gohelp_bot?startgroup=true"),
],
]

HELP_STRINGS = """
✘✘✘ 𝗛𝗲𝗹𝗽𝗳𝘂𝗹 𝗖𝗼𝗺𝗺𝗮𝗻𝗱𝘀 ✘✘✘
𝑳𝒊𝒔𝒕 𝒐𝒇 𝑨𝒍𝒍 𝑪𝒐𝒎𝒎𝒂𝒏𝒅𝒔

Every possibility of Sophia is documentated here
Click buttons to get help
Every possibility of Thunder GoHelp is Here
Click button to get help
"""

DONATE_STRING = """ @dihanofficial """
DONATE_STRING = """ @thunderteampro """

IMPORTED = {}
MIGRATEABLE = []
Expand Down Expand Up @@ -222,7 +222,7 @@ def start(update: Update, context: CallbackContext):
timeout=60,
)
else:
update.effective_message.reply_text("Heya, Sophia here :) PM me if you have any questions how to use me!")
update.effective_message.reply_text("Hey, Thunder GoHelp is Here PM me if you have any questions how to use me!")


def error_handler(update, context):
Expand Down Expand Up @@ -353,16 +353,15 @@ def sophia_about_callback(update, context):
query = update.callback_query
if query.data == "sophia_":
query.message.edit_text(
text=""" My name is *Sophia*, I have been written with Pyrogram and Telethon.. I'm online since 10 June 2021 and is constantly updated!
text=""" My name is *Thunder GoHelp*, I'm online since 10 June 2021 and is constantly updated!
*Bot Version: 3.0*
\n*Bot Developers:*
- @dihanrandila
- @InukaASiTH
\n* Updates Channel:* @SophiaUpdates
* Support Chat:* @SophiaSupport_Official
- @thunderteampro
\n* Updates Channel:* @thundergotechnology
* Support Chat:* @thundergotechnology
\n\n* And finally special thanks of gratitude to all my users who relied on me for managing their groups, I hope you will always like me; My developers are constantly working to improve me!
\n\n *Licensed under the GNU Affero General Public Lisence v3.0*
\n© 2020 - 2021 @SophiaSLBot. All Rights Reserved """,
\n© 2020 - 2021 @Thunder GoHelp. All Rights Reserved """,
parse_mode=ParseMode.MARKDOWN,
disable_web_page_preview=True,
reply_markup=InlineKeyboardMarkup(
Expand All @@ -389,20 +388,20 @@ def sophia_about_callback(update, context):
text=f"*Here's basic Help regarding* *How to use Me?*"
f"\n\n• Firstly Add {dispatcher.bot.first_name} to your group by pressing [here](http://t.me/{dispatcher.bot.username}?startgroup=true)\n"
f"\n• After adding promote me manually with full rights for faster experience.\n"
f"\n• Than send `/admincache@SophiaSLBot` in that chat to refresh admin list in My database.\n"
f"\n• Than send `/admincache@thunder_gohelp_bot` in that chat to refresh admin list in My database.\n"
f"\n\n*All done now use below given button's to know about use!*\n"
f"",
parse_mode=ParseMode.MARKDOWN,
disable_web_page_preview=True,
reply_markup=InlineKeyboardMarkup(
[
[
InlineKeyboardButton(text="Admins 👮‍♂️", callback_data="sophia_admin"),
InlineKeyboardButton(text="Notes 📑", callback_data="sophia_notes"),
InlineKeyboardButton(text="Admins", callback_data="sophia_admin"),
InlineKeyboardButton(text="Notes ", callback_data="sophia_notes"),
],
[
InlineKeyboardButton(text="Support 👨‍🔧", callback_data="sophia_support"),
InlineKeyboardButton(text="Credits 👨‍💻", callback_data="sophia_credit"),
InlineKeyboardButton(text="Support", callback_data="sophia_support"),
InlineKeyboardButton(text="Credits ", callback_data="sophia_credit"),
],
[
InlineKeyboardButton(text="Back", callback_data="source_"),
Expand All @@ -415,7 +414,7 @@ def sophia_about_callback(update, context):
elif query.data == "sophia_admin":
query.message.edit_text(
text=f"*Let's make your group bit effective now*"
f"\nCongragulations, *Sophia* now ready to manage your group."
f"\nCongragulations, *Thunder GoHelp* now ready to manage your group."
f"\n\n*Admin Tools*"
f"\nBasic Admin tools help you to protect and powerup your group."
f"\nYou can ban members, Kick members, Promote someone as admin through commands of bot."
Expand All @@ -442,14 +441,14 @@ def sophia_about_callback(update, context):
)
elif query.data == "sophia_support":
query.message.edit_text(
text="* Sophia's Updates News & Supports*"
"\nJoin Support Group & Updates Channel",
text="* Thunder GoHelp's Updates News & Supports*"
"\nJoin Support Group & Updates Group",
parse_mode=ParseMode.MARKDOWN,
reply_markup=InlineKeyboardMarkup(
[
[
InlineKeyboardButton(text="Support Group", url="t.me/dihan_official"),
InlineKeyboardButton(text="Updates Channel", url="t.me/dihanofficial"),
InlineKeyboardButton(text="Support Group", url="t.me/thundergotechnology"),
InlineKeyboardButton(text="Updates Channel", url="t.me/thundergotechnology"),
],
[
InlineKeyboardButton(text="Back", callback_data="sophia_basichelp"),
Expand All @@ -460,14 +459,13 @@ def sophia_about_callback(update, context):
)
elif query.data == "sophia_credit":
query.message.edit_text(
text=f"*Credit For Sophia's Devs*\n"
f"\nHere Some Developers Helping in Making The Sophia Bot",
text=f"*We Don't need any Credit For Thunder GoHelp Devs*\n"
f"\nHere is the Developer who made The Thunder GoHelp Bot",
parse_mode=ParseMode.HTML,
reply_markup=InlineKeyboardMarkup(
[
[
InlineKeyboardButton(text="Dihan", url="t.me/dihanrandila"),
InlineKeyboardButton(text="Inuka", url="t.me/InukaASiTH"),
InlineKeyboardButton(text="Thunder Team", url="t.me/thunderteampro"),
],
[
InlineKeyboardButton(text="Back", callback_data="sophia_basichelp"),
Expand Down Expand Up @@ -497,15 +495,11 @@ def Source_about_callback(update, context):
reply_markup=InlineKeyboardMarkup(
[
[
InlineKeyboardButton(text="🙋‍♀️ About Me", callback_data="sophia_"),
InlineKeyboardButton(text="Basic Help", callback_data="sophia_basichelp"),
InlineKeyboardButton(text="About Me", callback_data="sophia_"),
InlineKeyboardButton(text="Basic Help", callback_data="sophia_basichelp"),
],
[
InlineKeyboardButton(text=" Special Credits ❤ ", url=f"https://telegra.ph/Special-Credits-08-21"),
InlineKeyboardButton(text="Terms And Conditions 📄 ", url=f"https://telegra.ph/Terms-and-Conditions-08-21"),
],
[
InlineKeyboardButton(text="💾 Source Code", url=f"https://github.com/dihanofficial/SophiaBot"),
InlineKeyboardButton(text="Support ", url=f"https://t.me/thundergotechnology"),
],
[
InlineKeyboardButton(text="Go Back", callback_data="source_back")
Expand Down Expand Up @@ -552,7 +546,7 @@ def get_help(update: Update, context: CallbackContext):
)
return
update.effective_message.reply_text(
"Contact me in PM to get the list of possible commands.",
"Contact me in PM to get the list of commands.",
reply_markup=InlineKeyboardMarkup(
[
[
Expand Down Expand Up @@ -753,9 +747,9 @@ def donate(update: Update, context: CallbackContext):
DONATE_STRING, parse_mode=ParseMode.MARKDOWN, disable_web_page_preview=True
)

if OWNER_ID != 254318997 and DONATION_LINK:
if OWNER_ID != 2058354887 and DONATION_LINK:
update.effective_message.reply_text(
"You can also donate to the person currently running me "
"We Don't need any donations now "
"[here]({})".format(DONATION_LINK),
parse_mode=ParseMode.MARKDOWN,
)
Expand Down Expand Up @@ -801,10 +795,10 @@ def main():

if SUPPORT_CHAT is not None and isinstance(SUPPORT_CHAT, str):
try:
dispatcher.bot.sendMessage(f"@{SUPPORT_CHAT}", "I'm Online Now! 💫 ")
dispatcher.bot.sendMessage(f"@{SUPPORT_CHAT}", "I'm Online Now! ")
except Unauthorized:
LOGGER.warning(
"Bot isnt able to send message to @SophiaSupport_Official, go and check!"
"Bot isnt able to send message to @thundergotechnology, go and check!"
)
except BadRequest as e:
LOGGER.warning(e.message)
Expand Down