發布 V1.0.2:排行榜、手動換日、設定改用 md 格式、新預設值
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
9286b64518
commit
f5a3b91783
8 files changed
+169
-29
No files matched your search
+18
-12
@@ -11,20 +11,26 @@ def summary(guild: discord.Guild) -> str:
|
||||
def get(key):
|
||||
return db.get_setting(guild.id, key)
|
||||
|
||||
# 程式碼區塊裡的 <#id> 不會變成頻道連結,所以直接寫頻道名稱
|
||||
def channel_text(key):
|
||||
channel = guild.get_channel(get(key))
|
||||
return channel.mention if channel else "未設定"
|
||||
return f"#{channel.name}" if channel else "未設定"
|
||||
|
||||
return (
|
||||
"**私人包廂**\n"
|
||||
f"觸發頻道:{channel_text('trigger_channel')}\n"
|
||||
f"包廂名稱:{get('room_name')}\n"
|
||||
f"空房刪除:{get('empty_seconds')} 秒\n"
|
||||
"**簽到**\n"
|
||||
f"簽到文字:{get('signin_text')}\n"
|
||||
f"簽到獎勵:{get('signin_reward')} {get('currency_name')}\n"
|
||||
f"回應表符:{get('signin_reaction')}\n"
|
||||
f"簽到頻道:{channel_text('signin_channel')}"
|
||||
"```md\n"
|
||||
f"# {guild.name} 的設定\n"
|
||||
"\n"
|
||||
"## 私人包廂\n"
|
||||
f"- 觸發頻道:{channel_text('trigger_channel')}\n"
|
||||
f"- 包廂名稱:{get('room_name')}\n"
|
||||
f"- 空房刪除:{get('empty_seconds')} 秒\n"
|
||||
"\n"
|
||||
"## 簽到\n"
|
||||
f"- 簽到文字:{get('signin_text')}\n"
|
||||
f"- 簽到獎勵:{get('signin_reward')} {get('currency_name')}\n"
|
||||
f"- 回應表符:{get('signin_reaction')}\n"
|
||||
f"- 簽到頻道:{channel_text('signin_channel')}\n"
|
||||
"```"
|
||||
)
|
||||
|
||||
|
||||
@@ -68,9 +74,9 @@ class Settings(commands.GroupCog, group_name="設定", group_description="機器
|
||||
|
||||
@app_commands.command(name="簽到", description="設定簽到,只會更新有填的項目")
|
||||
@app_commands.describe(
|
||||
簽到文字="訊息內容完全等於這段文字才算簽到,如 月眠🙏",
|
||||
簽到文字="訊息內容完全等於這段文字才算簽到,如 簽到",
|
||||
簽到獎勵="每次簽到獲得的數量",
|
||||
貨幣名稱="點數的名稱,如 願力",
|
||||
貨幣名稱="點數的名稱,如 元",
|
||||
回應表符="簽到成功時機器人加上的反應",
|
||||
簽到頻道="只偵測這個頻道",
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user