teamx-cloner commited on
Commit
125a01a
·
1 Parent(s): 45f22b5

Update and rename bot.py to _bot.py

Browse files
Files changed (1) hide show
  1. plugins/{bot.py → _bot.py} +1 -97
plugins/{bot.py → _bot.py} RENAMED
@@ -32,7 +32,7 @@ except ImportError:
32
  Repo = None
33
 
34
  from telethon.utils import resolve_bot_file_id
35
- from config import Var
36
  from . import (
37
  ATRA_COL,
38
  LOGS,
@@ -92,102 +92,6 @@ async def alive(event):
92
  await event.answer(text, alert=True)
93
 
94
 
95
- """@ultroid_cmd(
96
- pattern="alive( (.*)|$)",
97
- )
98
- async def lol(ult):
99
- match = ult.pattern_match.group(1).strip()
100
- inline = None
101
- if match in ["inline", "i"]:
102
- try:
103
- res = await ult.client.inline_query(asst.me.username, "alive")
104
- return await res[0].click(ult.chat_id)
105
- except BotMethodInvalidError:
106
- pass
107
- except BaseException as er:
108
- LOGS.exception(er)
109
- inline = True
110
- pic = udB.get_key("ALIVE_PIC")
111
- if isinstance(pic, list):
112
- pic = choice(pic)
113
- uptime = time_formatter((time.time() - start_time) * 1000)
114
- header = udB.get_key("ALIVE_TEXT") or get_string("bot_1")
115
- y = Repo().active_branch
116
- xx = Repo().remotes[0].config_reader.get("url")
117
- rep = xx.replace(".git", f"/tree/{y}")
118
- kk = f" `[{y}]({rep})` "
119
- if inline:
120
- kk = f"<a href={rep}>{y}</a>"
121
- parse = "html"
122
- als = in_alive.format(
123
- header,
124
- f"{ultroid_version} [{HOSTED_ON}]",
125
- UltVer,
126
- pyver(),
127
- uptime,
128
- kk,
129
- )
130
-
131
- if _e := udB.get_key("ALIVE_EMOJI"):
132
- als = als.replace("🌀", _e)
133
- else:
134
- parse = "md"
135
- als = (get_string("alive_1")).format(
136
- header,
137
- OWNER_NAME,
138
- f"{ultroid_version} [{HOSTED_ON}]",
139
- UltVer,
140
- uptime,
141
- pyver(),
142
- __version__,
143
- kk,
144
- )
145
-
146
- if a := udB.get_key("ALIVE_EMOJI"):
147
- als = als.replace("✵", a)
148
- if pic:
149
- try:
150
- await ult.reply(
151
- als,
152
- file=pic,
153
- parse_mode=parse,
154
- link_preview=False,
155
- buttons=buttons if inline else None,
156
- )
157
- return await ult.try_delete()
158
- except ChatSendMediaForbiddenError:
159
- pass
160
- except BaseException as er:
161
- LOGS.exception(er)
162
- try:
163
- await ult.reply(file=pic)
164
- await ult.reply(
165
- als,
166
- parse_mode=parse,
167
- buttons=buttons if inline else None,
168
- link_preview=False,
169
- )
170
- return await ult.try_delete()
171
- except BaseException as er:
172
- LOGS.exception(er)
173
- await eor(
174
- ult,
175
- als,
176
- parse_mode=parse,
177
- link_preview=False,
178
- buttons=buttons if inline else None,
179
- )
180
-
181
-
182
- @ultroid_cmd(pattern="ping$", chats=[], type=["official", "assistant"])
183
- async def _(event):
184
- start = time.time()
185
- x = await event.eor("Pong !")
186
- end = round((time.time() - start) * 1000)
187
- uptime = time_formatter((time.time() - start_time) * 1000)
188
- await x.edit(get_string("ping").format(end, uptime))
189
- """
190
-
191
  @ultroid_cmd(
192
  pattern="cmds$",
193
  )
 
32
  Repo = None
33
 
34
  from telethon.utils import resolve_bot_file_id
35
+ from xteam.configs import Var
36
  from . import (
37
  ATRA_COL,
38
  LOGS,
 
92
  await event.answer(text, alert=True)
93
 
94
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
95
  @ultroid_cmd(
96
  pattern="cmds$",
97
  )