-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathyg_sendmsg.py
35 lines (26 loc) · 1.48 KB
/
yg_sendmsg.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
__version__ = (1, 4, 8, 8)
# This file is a part of Hikka Userbot
# Code is NOT licensed under CC-BY-NC-ND 4.0 unless otherwise specified.
# 🌐 https://github.com/hikariatama/Hikka
# You CAN edit this file without direct permission from the author.
# You can redistribute this file with any modifications.
# meta developer: @yg_modules
# scope: hikka_only
# scope: hikka_min 1.6.3
# █▄█ █░█ █▀▄▀█ █▀▄▀█ █▄█ █▀▄▀█ █▀█ █▀▄ █▀
# ░█░ █▄█ █░▀░█ █░▀░█ ░█░ █░▀░█ █▄█ █▄▀ ▄█
from .. import loader, utils
@loader.tds
class yg_sendmsg(loader.Module):
"""Модуль для отправки сообщений на указанный юзернейм"""
strings = {"name": "yg_sendmsg"}
async def sendmsgcmd(self, message):
"""<username> <word> oтправляет сообщение на указанный юзернейм"""
args = utils.get_args(message)
if len(args) < 2:
await message.edit("<b>Неверный формат.</b> <i>Используйте</i> <code>.sendmsg username word</code>")
return
username = args[0]
word = " ".join(args[1:])
await message.client.send_message(username, word)
await message.edit(f"<b>Сообщение отправлено сюда:</b> <code>{username}</code><b>, слово:</b> <code>{word}</code>")