2025-08-03 13:53:51 +03:00
|
|
|
# Copyright 2025 - Solely by BrotherBoard
|
|
|
|
|
# Intended for personal use only
|
|
|
|
|
# Bug? Feedback? Telegram >> @BroBordd
|
2024-05-16 18:44:57 +03:00
|
|
|
|
2025-08-03 13:53:51 +03:00
|
|
|
"""
|
|
|
|
|
TopMsg v1.1.2 - Chat top right
|
2024-05-16 16:07:23 +00:00
|
|
|
|
2025-08-03 13:53:51 +03:00
|
|
|
When chat is muted, shows chat messages top right.
|
|
|
|
|
Prevents spam and flooding screen.
|
|
|
|
|
Does not repeat messages.
|
|
|
|
|
"""
|
2025-06-23 19:27:10 +00:00
|
|
|
|
2025-08-03 13:53:51 +03:00
|
|
|
from babase import app, Plugin
|
|
|
|
|
from bascenev1 import (
|
|
|
|
|
get_chat_messages as gcm,
|
|
|
|
|
broadcastmessage as push,
|
|
|
|
|
apptimer as z
|
|
|
|
|
)
|
2025-06-23 19:27:10 +00:00
|
|
|
|
2025-08-03 13:53:51 +03:00
|
|
|
# ba_meta require api 9
|
|
|
|
|
# ba_meta export babase.Plugin
|
|
|
|
|
class byBordd(Plugin):
|
|
|
|
|
__init__ = lambda s: (setattr(s,'la',None),z(5,s.ear))[1]
|
2024-05-16 18:44:57 +03:00
|
|
|
def ear(s):
|
|
|
|
|
a = gcm()
|
|
|
|
|
if a and s.la != a[-1]:
|
2024-05-16 16:07:23 +00:00
|
|
|
if app.config.resolve('Chat Muted'):
|
2025-08-03 13:53:51 +03:00
|
|
|
push(a[-1],(1,1,1),True)
|
2024-05-16 18:44:57 +03:00
|
|
|
s.la = a[-1]
|
|
|
|
|
z(0.1, s.ear)
|
2024-05-16 16:07:23 +00:00
|
|
|
|