Skip to content

Commit

Permalink
Update 4 files
Browse files Browse the repository at this point in the history
  • Loading branch information
SantiiRepair committed Aug 4, 2023
1 parent 84b18c8 commit 65fa6d1
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion tlg_bot/kreacher/plugins/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ async def help(event):
[
Button.url(
"Help and Commands!",
"t.me/{}?start=help".format(Config().BOT_USERNAME),
"t.me/{}?start=help".format(config.BOT_USERNAME),
)
]
],
Expand Down
4 changes: 2 additions & 2 deletions tlg_bot/kreacher/plugins/join.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from kreacher import call_py, kreacher
from kreacher import call_py, kreacher
from telethon import events


@kreache.on(events.NewMessage(pattern="[!?/]join"))
@kreacher.on(events.NewMessage(pattern="[!?/]join"))
async def join_handler(event):
chat = await event.get_chat()
await call_py.start(chat.id)
11 changes: 9 additions & 2 deletions tlg_bot/kreacher/plugins/play_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,20 @@ async def skip_item(chat_id: int, x: int):
async def _(event):
await event.delete()


@kreacher.on(events.callbackquery.CallbackQuery(data="cls"))
async def _(event):
await event.delete()
btnn = [[Button.inline("cʟᴏꜱᴇ", data="cls")]]

ctrl = [
[Button.inline("ᴀᴅᴍɪɴ", data="admin"), Button.inline("ᴘʟᴀʏ", data="play")],
[Button.inline("ʜᴏᴍᴇ", data="start")],
]


@kreacher.on(events.NewMessage(pattern="^[?!/]play_video"))
async def play_video(event):
msg = await event.reply("🔄 `Processing ...`")
msg = await event.reply("🔄 <i>Processing ...</i>", parse_mode="HTML")
chat_id = event.chat.id
media = await event.get_reply_message()
if not media and not ' ' in event.message.message:
Expand Down
4 changes: 2 additions & 2 deletions tlg_bot/kreacher/plugins/speedtest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from telethon import events
from kreacher import *
from kreacher import kreacher
import asyncio
import speedtest

Expand All @@ -22,7 +22,7 @@ def testspeed(m):
Running Speedtest...</i> \U0001F4F6"""


@kreacher.on(events.NewMessage(pattern="^/speedtest"))
@kreacher.on(events.NewMessage(pattern="[!?/]speedtest"))
async def speedtest_function(message):
m = await message.reply(msg_running, parse_mode="HTML")
loop = asyncio.get_event_loop()
Expand Down

0 comments on commit 65fa6d1

Please sign in to comment.