|
|
@@ -34,8 +34,8 @@ from wbb.utils.filter_groups import chatbot_group
|
|
|
|
|
|
__MODULE__ = "ChatBot"
|
|
|
__HELP__ = """
|
|
|
-/chatbot [ON|OFF] To Enable Or Disable ChatBot In Your Chat.
|
|
|
-.chatbot [ON|OFF] To Do The Same For Userbot."""
|
|
|
+/chatbot [ENABLE|DISABLE] To Enable Or Disable ChatBot In Your Chat.
|
|
|
+.chatbot [ENABLE|DISABLE] To Do The Same For Userbot."""
|
|
|
|
|
|
active_chats_bot = []
|
|
|
active_chats_ubot = []
|
|
|
@@ -44,18 +44,15 @@ active_chats_ubot = []
|
|
|
async def chat_bot_toggle(db, message: Message):
|
|
|
status = message.text.split(None, 1)[1].lower()
|
|
|
chat_id = message.chat.id
|
|
|
- if status == "on":
|
|
|
+ if status == "enable":
|
|
|
if chat_id not in db:
|
|
|
db.append(chat_id)
|
|
|
- text = (
|
|
|
- "Chatbot Enabled Reply To Any Message "
|
|
|
- + "Of Mine To Get A Reply"
|
|
|
- )
|
|
|
+ text = "Chatbot Enabled!"
|
|
|
return await edit_or_reply(message, text=text)
|
|
|
await edit_or_reply(
|
|
|
message, text="ChatBot Is Already Enabled."
|
|
|
)
|
|
|
- elif status == "off":
|
|
|
+ elif status == "disable":
|
|
|
if chat_id in db:
|
|
|
db.remove(chat_id)
|
|
|
return await edit_or_reply(
|
|
|
@@ -66,7 +63,7 @@ async def chat_bot_toggle(db, message: Message):
|
|
|
)
|
|
|
else:
|
|
|
await edit_or_reply(
|
|
|
- message, text="**Usage**\n/chatbot [ON|OFF]"
|
|
|
+ message, text="**Usage**\n/chatbot [ENABLE|DISABLE]"
|
|
|
)
|
|
|
|
|
|
|
|
|
@@ -78,7 +75,7 @@ async def chat_bot_toggle(db, message: Message):
|
|
|
async def chatbot_status(_, message: Message):
|
|
|
if len(message.command) != 2:
|
|
|
return await edit_or_reply(
|
|
|
- message, text="**Usage**\n/chatbot [ON|OFF]"
|
|
|
+ message, text="**Usage**\n/chatbot [ENABLE|DISABLE]"
|
|
|
)
|
|
|
await chat_bot_toggle(active_chats_bot, message)
|
|
|
|
|
|
@@ -129,7 +126,7 @@ async def chatbot_talk(_, message: Message):
|
|
|
async def chatbot_status_ubot(_, message: Message):
|
|
|
if len(message.text.split()) != 2:
|
|
|
return await edit_or_reply(
|
|
|
- message, text="**Usage**\n.chatbot [ON|OFF]"
|
|
|
+ message, text="**Usage**\n.chatbot [ENABLE|DISABLE]"
|
|
|
)
|
|
|
await chat_bot_toggle(active_chats_ubot, message)
|
|
|
|