Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Marie-2.0-English
# Naveen marie 2.0
A modular telegram Python bot running on python3 with an sqlalchemy database.

Originally a simple group management bot with multiple admin features, it has evolved, becoming extremely modular and
Expand Down
14 changes: 7 additions & 7 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
},
"TOKEN": {
"description": "Your bot token, as a string.",
"value": ""
"value": "1179727280:AAHgf4gXexo8ODJsMweZxBbt1TyhmfdcYb4"
},
"OWNER_ID": {
"description": "An integer of consisting of your owner ID",
"value": "683538773"
"value": "1337144652"
},
"OWNER_USERNAME": {
"description": "Your username",
"value": "ViruZs"
"value": "Ns_AnoNymouS"
},
"WEBHOOK": {
"description": "Setting this to ANYTHING will enable webhooks when in env mode messages",
Expand All @@ -41,19 +41,19 @@
},
"SUDO_USERS": {
"description": "A space separated list of user_ids which should be considered sudo users",
"value": "254318997 683538773 570400686 466337795"
"value": "1337144652"
},
"SUPPORT_USERS": {
"description": "A space separated list of user_ids which should be considered support users (can gban/ungban, nothing else)",
"value": "254318997 683538773 570400686 466337795"
"value": "1337144652"
},
"WHITELIST_USERS": {
"description": "A space separated list of user_ids which should be considered whitelisted - they can't be banned.",
"value": "254318997 683538773 570400686 466337795"
"value": "1337144652"
},
"DONATION_LINK": {
"description": "Optional: link where you would like to receive donations.",
"value": "https://www.paypal.me/Your_id_here"
"value": "https://www.paypal.me/1337144652"
},
"PORT": {
"description": "Port to use for your webhooks",
Expand Down
22 changes: 4 additions & 18 deletions tg_bot/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,18 @@
from tg_bot.modules.helper_funcs.misc import paginate_modules

PM_START_TEXT = """
hoi {}, my name is {}! if you have any questions about how to use me please give me /help...

im a group manager bot maintained by [this person](tg://user?id={}).
Hello {}, Iam a bot and my name is {}. I am a group manager bot maintained by [Anonymous 👨‍💻](tg://user?id={}).

My future updates will be put into This Channel - @MarieChechi & My Support Group @InFoTelGroup.
I am not vijay deverkonda I am a robot created by [Anonymous 👨‍💻](tg://user?id={}).I will not reply for You.

This is my [Deploy Code](https://heroku.com/deploy?template=https://github.com/TGExplore/Marie-2.0-English),
you can create clone same like me..

For more commands click /help...

**Keep in mind that any changes you DO do to the source have to be on github, as per the license.**

"""
**you are not able to do any thing in this so be silent.**

HELP_STRINGS = """

Hello! my name *{}*.

*Main* available commands:
- /start: Start the bot...
- /help: help....
- /donate: To find out more about donating!
- /settings:
- in PM: To find out what SETTINGS you have set....
- in a group:
I told u that there is no use but why you are trying again waste fello

{}
And the following:
Expand Down
4 changes: 2 additions & 2 deletions tg_bot/modules/afk.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def afk(bot: Bot, update: Update):
reason = ""

sql.set_afk(update.effective_user.id, reason)
update.effective_message.reply_text("{} is away from the keyboard ! ".format(update.effective_user.first_name))
update.effective_message.reply_text("{} is away from the keyboard 🚶‍♂️ ⌨! ".format(update.effective_user.first_name))


@run_async
Expand Down Expand Up @@ -74,7 +74,7 @@ def reply_afk(bot: Bot, update: Update):
When marked as AFK, any mentions will be replied to with a message to say you're not available!
"""

__mod_name__ = "AFK"
__mod_name__ = "AFK 💻"

AFK_HANDLER = DisableAbleCommandHandler("afk", afk)
AFK_REGEX_HANDLER = DisableAbleRegexHandler("(?i)brb", afk, friendly="afk")
Expand Down
2 changes: 1 addition & 1 deletion tg_bot/modules/notes.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ def __chat_settings__(chat_id, user_id):
- /clear <notename>: clear note with this name
"""

__mod_name__ = "Notes"
__mod_name__ = "Notes 📝"

GET_HANDLER = CommandHandler("get", cmd_get, pass_args=True)
HASH_GET_HANDLER = RegexHandler(r"^#[^\s]+", hash_get)
Expand Down
4 changes: 2 additions & 2 deletions tg_bot/modules/translation.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ def translate(bot: Bot, update: Update):
- /t: while replying to a message, will reply with a grammar corrected version
"""

__mod_name__ = "Translator"
__mod_name__ = "Translator"


TRANSLATE_HANDLER = CommandHandler('t', translate)

dispatcher.add_handler(TRANSLATE_HANDLER)
dispatcher.add_handler(TRANSLATE_HANDLER)
2 changes: 1 addition & 1 deletion tg_bot/modules/userinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def __user_info__(user_id):
- /me: will get your or another user's info
"""

__mod_name__ = "Bios and Abouts"
__mod_name__ = "Bios and Abouts 😎"

SET_BIO_HANDLER = DisableAbleCommandHandler("setbio", set_about_bio)
GET_BIO_HANDLER = DisableAbleCommandHandler("bio", about_bio, pass_args=True)
Expand Down
22 changes: 11 additions & 11 deletions tg_bot/modules/warns.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
# Not async
def warn(user: User, chat: Chat, reason: str, message: Message, warner: User = None) -> str:
if is_user_admin(chat, user.id):
message.reply_text("Damn admins, can't even be warned!")
message.reply_text("Oops 🤭, Admins cannot be warned")
return ""

if warner:
Expand Down Expand Up @@ -64,12 +64,12 @@ def warn(user: User, chat: Chat, reason: str, message: Message, warner: User = N

else:
keyboard = InlineKeyboardMarkup(
[[InlineKeyboardButton("Remove warn", callback_data="rm_warn({})".format(user.id))]])
[[InlineKeyboardButton("Remove warn (admins only 🙍‍♂️)", callback_data="rm_warn({})".format(user.id))]])

reply = "{} has {}/{} warnings... watch out!".format(mention_html(user.id, user.first_name), num_warns,
reply = "{} has {}/{} warnings... 🙆‍♂️ ".format(mention_html(user.id, user.first_name), num_warns,
limit)
if reason:
reply += "\nReason for last warn:\n{}".format(html.escape(reason))
reply += "\nReason for last warn ⚠️:\n{}".format(html.escape(reason))

log_reason = "<b>{}:</b>" \
"\n#WARN" \
Expand Down Expand Up @@ -106,7 +106,7 @@ def button(bot: Bot, update: Update) -> str:
res = sql.remove_warn(user_id, chat.id)
if res:
update.effective_message.edit_text(
"Warn removed by {}.".format(mention_html(user.id, user.first_name)),
"Warn removed by 🤴 {}, Don't Repeat it again 🧏‍♂️.".format(mention_html(user.id, user.first_name)),
parse_mode=ParseMode.HTML)
user_member = chat.get_member(user_id)
return "<b>{}:</b>" \
Expand Down Expand Up @@ -182,7 +182,7 @@ def warns(bot: Bot, update: Update, args: List[str]):
limit, soft_warn = sql.get_warn_setting(chat.id)

if reasons:
text = "This user has {}/{} warnings, for the following reasons:".format(num_warns, limit)
text = "This user has {}/{} warnings....🙆‍♂️, for the following reasons:".format(num_warns, limit)
for reason in reasons:
text += "\n - {}".format(reason)

Expand All @@ -191,7 +191,7 @@ def warns(bot: Bot, update: Update, args: List[str]):
update.effective_message.reply_text(msg)
else:
update.effective_message.reply_text(
"User has {}/{} warnings, but no reasons for any of them.".format(num_warns, limit))
"User has {}/{} warnings, but no reasons for any of them 🤔.".format(num_warns, limit))
else:
update.effective_message.reply_text("This user hasn't got any warnings!")

Expand Down Expand Up @@ -248,16 +248,16 @@ def remove_warn_filter(bot: Bot, update: Update):
chat_filters = sql.get_chat_warn_triggers(chat.id)

if not chat_filters:
msg.reply_text("No warning filters are active here!")
msg.reply_text("No warning filters are active here!🤷‍♂️")
return

for filt in chat_filters:
if filt == to_remove:
sql.remove_warn_filter(chat.id, to_remove)
msg.reply_text("Yep, I'll stop warning people for that.")
msg.reply_text("Ok Boss 🙋‍♂️, I'll stop warning people for that ")
raise DispatcherHandlerStop

msg.reply_text("That's not a current warning filter - run /warnlist for all active warning filters.")
msg.reply_text("That's not a current warning filter 🤦‍♂️ - run /warnlist for all active warning filters.")


@run_async
Expand Down Expand Up @@ -406,7 +406,7 @@ def __chat_settings__(chat_id, user_id):
- /strongwarn <on/yes/off/no>: If set to on, exceeding the warn limit will result in a ban. Else, will just kick.
"""

__mod_name__ = "Warnings"
__mod_name__ = "Warns ⚠️"

WARN_HANDLER = CommandHandler("warn", warn_user, pass_args=True, filters=Filters.group)
RESET_WARN_HANDLER = CommandHandler(["resetwarn", "resetwarns"], reset_warns, pass_args=True, filters=Filters.group)
Expand Down
2 changes: 1 addition & 1 deletion tg_bot/modules/welcome.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ def __chat_settings__(chat_id, user_id):

""".format(WELC_HELP_TXT)

__mod_name__ = "Welcomes/Goodbyes"
__mod_name__ = "Welcome/Goodbye 💬"

NEW_MEM_HANDLER = MessageHandler(Filters.status_update.new_chat_members, new_member)
LEFT_MEM_HANDLER = MessageHandler(Filters.status_update.left_chat_member, left_member)
Expand Down