2024-08-17 01:27:57 +08:00
|
|
|
---
|
|
|
|
home: true
|
|
|
|
icon: home
|
|
|
|
title: Home
|
|
|
|
heroImage: https://cdn.liteyuki.icu/static/svg/lylogo-full.svg
|
|
|
|
heroImageDark: https://cdn.liteyuki.icu/static/svg/lylogo-full-dark.svg
|
|
|
|
bgImage:
|
|
|
|
bgImageDark:
|
|
|
|
bgImageStyle:
|
|
|
|
background-attachment: fixed
|
|
|
|
heroText: LiteyukiBot
|
|
|
|
tagline: LiteyukiBot A high-performance, easy-to-use chatbot framework and application
|
|
|
|
|
|
|
|
actions:
|
|
|
|
- text: Get Started
|
|
|
|
icon: rocket
|
|
|
|
link: ./deployment/install.html
|
|
|
|
type: primary
|
|
|
|
|
|
|
|
- text: Usage
|
|
|
|
icon: book
|
|
|
|
link: ./usage/basic_command.html
|
|
|
|
|
|
|
|
highlights:
|
|
|
|
- header: Simple and Efficient
|
|
|
|
image: /assets/image/layout.svg
|
|
|
|
bgImage: https://theme-hope-assets.vuejs.press/bg/2-light.svg
|
|
|
|
bgImageDark: https://theme-hope-assets.vuejs.press/bg/2-dark.svg
|
|
|
|
bgImageStyle:
|
|
|
|
background-repeat: repeat
|
|
|
|
background-size: initial
|
|
|
|
features:
|
2024-08-17 02:24:25 +08:00
|
|
|
- title: Multi-Framework Support
|
2024-08-17 01:27:57 +08:00
|
|
|
icon: robot
|
2024-08-17 02:24:25 +08:00
|
|
|
details: Compatible with nonebot, melobot, etc., with good ecological support
|
2024-08-17 01:27:57 +08:00
|
|
|
link: https://nonebot.dev/
|
|
|
|
|
2024-08-17 02:24:25 +08:00
|
|
|
- title: Convenient Management
|
2024-08-17 01:27:57 +08:00
|
|
|
icon: plug
|
2024-08-17 02:24:25 +08:00
|
|
|
details: Use package manager to manage plugins and resource packs
|
2024-08-17 01:27:57 +08:00
|
|
|
|
2024-08-17 02:24:25 +08:00
|
|
|
- title: Custom Themes Support
|
2024-08-17 01:27:57 +08:00
|
|
|
icon: paint-brush
|
2024-08-17 02:24:25 +08:00
|
|
|
details: Fully customize the appearance with resource packs
|
2024-08-17 01:27:57 +08:00
|
|
|
link: https://bot.liteyuki.icu/usage/resource_pack.html
|
|
|
|
|
2024-08-17 02:24:25 +08:00
|
|
|
- title: i18n
|
2024-08-17 01:27:57 +08:00
|
|
|
icon: globe
|
2024-08-17 02:24:25 +08:00
|
|
|
details: Support multiple languages through resource packs
|
2024-08-17 01:27:57 +08:00
|
|
|
link: https://baike.baidu.com/item/i18n/6771940
|
|
|
|
|
2024-08-17 02:24:25 +08:00
|
|
|
- title: Easy to Use
|
2024-08-17 01:27:57 +08:00
|
|
|
icon: cog
|
2024-08-17 02:24:25 +08:00
|
|
|
details: No need for cumbersome pre-processes, ready to use
|
2024-08-17 01:27:57 +08:00
|
|
|
link: https://bot.liteyuki.icu/deployment/config.html
|
|
|
|
|
2024-08-17 02:24:25 +08:00
|
|
|
- title: High Performance
|
2024-08-17 01:27:57 +08:00
|
|
|
icon: tachometer-alt
|
2024-08-17 02:24:25 +08:00
|
|
|
details: 500 plugins, start within 2s
|
2024-08-17 01:27:57 +08:00
|
|
|
|
2024-08-17 02:24:25 +08:00
|
|
|
- title: Rolling Update
|
2024-08-17 01:27:57 +08:00
|
|
|
icon: cloud-download
|
2024-08-17 02:24:25 +08:00
|
|
|
details: Keep your bot up to date
|
2024-08-17 01:27:57 +08:00
|
|
|
|
2024-08-17 02:24:25 +08:00
|
|
|
- title: OpenSource
|
2024-08-17 01:27:57 +08:00
|
|
|
icon: code
|
2024-08-17 02:24:25 +08:00
|
|
|
details: MIT LICENCE open source project, welcome your contribution
|
2024-08-17 01:27:57 +08:00
|
|
|
|
2024-08-17 02:24:25 +08:00
|
|
|
- header: Quick Start
|
2024-08-17 01:27:57 +08:00
|
|
|
image: /assets/image/box.svg
|
|
|
|
bgImage: https://theme-hope-assets.vuejs.press/bg/3-light.svg
|
|
|
|
bgImageDark: https://theme-hope-assets.vuejs.press/bg/3-dark.svg
|
|
|
|
highlights:
|
2024-08-17 02:24:25 +08:00
|
|
|
- title: Install Git and Python3.10+ environment
|
|
|
|
- title: Use <code>git clone https://github.com/LiteyukiStudio/LiteyukiBot --depth=1</code> to clone the project locally
|
|
|
|
- title: Use <code>cd LiteyukiBot</code> to change the directory to the project root
|
|
|
|
- title: Use <code>pip install -r requirements.txt</code> install the project dependencies
|
|
|
|
details: If you have multiple Python environments, please use <code>pythonx -m pip install -r requirements.txt</code>.
|
|
|
|
- title: Start bot with <code>python main.py</code>.
|
2024-08-17 01:27:57 +08:00
|
|
|
copyright: © 2021-2024 SnowyKami All Rights Reserved
|
|
|
|
|
|
|
|
---
|
2024-08-17 02:24:25 +08:00
|
|
|
<script>
|
|
|
|
// 定义全局变量来存储数据
|
|
|
|
let globalTotal = 0;
|
|
|
|
let globalOnline = 0;
|
|
|
|
|
|
|
|
// 从API获取数据并更新全局变量
|
|
|
|
function fetchAndUpdateData() {
|
|
|
|
Promise.all([
|
|
|
|
fetch("https://api.liteyuki.icu/count").then(res => res.json()),
|
|
|
|
fetch("https://api.liteyuki.icu/online").then(res => res.json())
|
|
|
|
])
|
|
|
|
.then(([countRes, onlineRes]) => {
|
|
|
|
globalTotal = countRes.register;
|
|
|
|
globalOnline = onlineRes.online;
|
|
|
|
})
|
|
|
|
.catch(err => {
|
|
|
|
console.error("Error fetching data:", err);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
// 更新页面显示,使用全局变量中的数据
|
|
|
|
function updatePageDisplay() {
|
|
|
|
let countInfo = document.getElementById("count-info");
|
|
|
|
if (!countInfo) {
|
|
|
|
let info = `<div id="count-info" style="text-align: center; font-size: 20px; font-weight: 500">
|
|
|
|
Instances: <span id="total">${globalTotal}</span> Online: <span id="online">${globalOnline}</span></div>`;
|
|
|
|
let mainDescription = document.querySelector("#main-description");
|
|
|
|
if (mainDescription) {
|
|
|
|
mainDescription.insertAdjacentHTML('afterend', info);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// 初始调用更新数据
|
|
|
|
fetchAndUpdateData();
|
|
|
|
updatePageDisplay();
|
|
|
|
|
|
|
|
// 设置定时器,分别以不同频率调用更新数据和更新页面的函数
|
|
|
|
setInterval(fetchAndUpdateData, 10000); // 每10秒更新一次数据
|
|
|
|
setInterval(updatePageDisplay, 1000); // 每1秒更新一次页面显示
|
|
|
|
</script>
|