-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
137 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved | ||
@Time : 2024/8/22 上午9:06 | ||
@Author : snowykami | ||
@Email : [email protected] | ||
@File : anti_dislink.py | ||
@Software: PyCharm | ||
""" | ||
import random | ||
from liteyuki.plugin import PluginMetadata, PluginType | ||
|
||
from liteyuki.message.on import on_keywords | ||
|
||
__plugin_meta__ = PluginMetadata( | ||
name="严禁断联化", | ||
type=PluginType.APPLICATION | ||
) | ||
|
||
|
||
@on_keywords(["看看你的", "看看j", "给我看看"]).handle() | ||
async def _(event): | ||
event.reply(random.choice(["No dislink", "严禁断联化"])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved | ||
@Time : 2024/8/22 上午8:37 | ||
@Author : snowykami | ||
@Email : [email protected] | ||
@File : ts_chan_main.py | ||
@Software: PyCharm | ||
""" | ||
import asyncio | ||
|
||
from liteyuki.comm import Channel, set_channel, get_channel | ||
from liteyuki import get_bot | ||
|
||
set_channel("chan-main", Channel("chan-main")) | ||
set_channel("chan-sub", Channel("chan-sub")) | ||
|
||
chan_main = get_channel("chan-main") | ||
|
||
|
||
# @get_bot().on_after_start | ||
# async def _(): | ||
# while True: | ||
# chan_main.send("Hello, World!") | ||
# await asyncio.sleep(5) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved | ||
@Time : 2024/8/22 上午8:39 | ||
@Author : snowykami | ||
@Email : [email protected] | ||
@File : ts_chan_sub.py | ||
@Software: PyCharm | ||
""" | ||
import asyncio | ||
|
||
from liteyuki.comm import Channel, get_channel | ||
from nonebot import get_bot | ||
from nonebot.adapters.onebot.v11 import Bot | ||
chan_main = get_channel("chan-main") | ||
|
||
|
||
# @chan_main.on_receive() | ||
# async def _(data: str): | ||
# print("Received data from chan-main:", data) | ||
# try: | ||
# bot: Bot = get_bot("2443429204") # type: ignore | ||
# | ||
# def send_msg(): | ||
# | ||
# bot.send_msg(message_type="private", user_id=2443429204, message=data) | ||
# | ||
# print("tsA") | ||
# print("tsA1") | ||
# await asyncio.ensure_future(c) | ||
# print("tsB") | ||
# except Exception as e: | ||
# print(e) | ||
# pass |