zhenxun_bot/plugins/server_ip.py

38 lines
1.6 KiB
Python
Raw Normal View History

2021-05-20 19:27:31 +08:00
from nonebot import on_command
from nonebot.adapters.cqhttp import Bot, PrivateMessageEvent, GroupMessageEvent
from nonebot.typing import T_State
from nonebot.rule import to_me
__plugin_name__ = '服务器'
__plugin_usage__ = '用法: 无'
server_ip = on_command("服务器", aliases={'ip'}, rule=to_me(), priority=5, block=True)
@server_ip.handle()
async def _(bot: Bot, event: PrivateMessageEvent, state: T_State):
await server_ip.finish("|* 请不要发给其他人! *|\n"
2021-05-26 20:08:13 +08:00
"\t121.40.195.22\n"
2021-05-20 19:27:31 +08:00
"|* 请不要发给其他人! *|\n"
2021-05-26 20:08:13 +08:00
"csgo ~号键控制台输入 connect 121.40.195.22 进入服务器\n"
2021-05-20 19:27:31 +08:00
"然后再公屏输入 !diy 来使用皮肤(英文感叹号,注意)\n"
2021-06-04 18:01:33 +08:00
"【说不定可以凑到内战噢,欢迎~{娱乐为主}", at_sender=True)
2021-05-20 19:27:31 +08:00
2021-05-26 20:08:13 +08:00
@server_ip.handle()
async def _(bot: Bot, event: GroupMessageEvent, state: T_State):
if event.group_id == 698279647:
await server_ip.finish("嗨呀!当前服务器地址是:"
2021-06-04 18:01:33 +08:00
"\ncsgo:\n\tay: 121.40.195.22\n\t"
"wzt: 101.200.199.143\n\t夜之北枭: 101.132.170.254\n我的世界:\n\t47.111.1.22025565")
2021-05-26 20:08:13 +08:00
elif event.group_id == 1046451860:
await server_ip.finish("嗨呀!当前服务器地址是:\n121.40.195.22\n !diy")
else:
await server_ip.finish("不好意思呀小真寻不能为你使用此功能因为服务器IP是真寻的小秘密呀", at_sender=True)
2021-05-20 19:27:31 +08:00