Skip to content

Commit

Permalink
feat(help): update the help card message, version 0.4.4 release
Browse files Browse the repository at this point in the history
  • Loading branch information
shuyangzhang committed Jun 11, 2022
1 parent d72c897 commit 84f90ca
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 4 deletions.
35 changes: 32 additions & 3 deletions app/CardStorage.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import datetime

from typing import Dict
from khl.card import Card
from khl.card.module import Module
from khl.card.interface import Types
from khl.card.interface import Types, _Module
from khl.card.element import Element
from khl.card.struct import Struct
from khl.card.color import Color
Expand All @@ -23,6 +24,20 @@ class __MusicListIndex(Enum):
__MUSIC_LIST_PLAYING_MUSIC_COLOR = "#a29bfe"


class InviteModule(_Module):
_tyep = "invite"

def __init__ (self):
super().__init__(Types.Theme.NA, Types.Size.NA)

@property
def _repr(self) -> Dict:
return {
"type": "invite",
"code": "https://kaihei.co/oHRMIL"
}


def NowMusicCard(music_list:list) -> Card:
# playing music card
first_music = music_list[0]
Expand Down Expand Up @@ -127,7 +142,7 @@ def MusicListCard(music_list:list) -> Tuple[Card,Card]:
def HelpCard() -> Card:
card = Card(theme=Types.Theme.INFO, size=Types.Size.LG)
# title
card.append(Module.Header(":watermelon: 镜华Kyouka 操作指南 v0.4.3 20220611 :watermelon:"))
card.append(Module.Header(":watermelon: 镜华Kyouka 操作指南 v0.4.4 20220612 :watermelon:"))
card.append(Module.Section(Element.Text(":bangbang: 播放歌曲前务必先绑定语音频道哦!")))

# base command
Expand Down Expand Up @@ -159,8 +174,22 @@ def HelpCard() -> Card:
`/import {playlist_url}` - 导入网易云音乐歌单
`/remove {list_id}` - 删除歌单中的歌曲
`/top {list_id}` - 播放列表中的歌曲置顶
"""
, type=Types.Text.KMD
)
)
)

card.append(
InviteModule()
)

> [邀请 镜华Kyouka 到你的服务器](https://www.kaiheila.cn/app/oauth2/authorize?id=11188&permissions=150992896&client_id=4sZmSkS9Ex2SOlFv&redirect_uri=&scope=bot)
card.append(
Module.Context(
Element.Text(
"""
如有任何问题、意见、建议,或需要邀请、私人部署,或想一起开发镜华Kyouka,欢迎加入 镜华Kyouka 点歌机器人 官方服务器
或 联系开发者 (met)693543263(met)
"""
, type=Types.Text.KMD
)
Expand Down
2 changes: 1 addition & 1 deletion app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import app.CardStorage as CS


__version__ = "0.4.3"
__version__ = "0.4.4"

# logger
if settings.file_logger:
Expand Down

0 comments on commit 84f90ca

Please sign in to comment.