dcchbot 1.8.3__tar.gz → 1.8.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dcchbot-1.8.3 → dcchbot-1.8.4}/PKG-INFO +1 -1
- {dcchbot-1.8.3 → dcchbot-1.8.4}/dcchbot/main.py +10 -15
- {dcchbot-1.8.3 → dcchbot-1.8.4}/dcchbot.egg-info/PKG-INFO +1 -1
- {dcchbot-1.8.3 → dcchbot-1.8.4}/pyproject.toml +1 -1
- {dcchbot-1.8.3 → dcchbot-1.8.4}/LICENSE +0 -0
- {dcchbot-1.8.3 → dcchbot-1.8.4}/README.md +0 -0
- {dcchbot-1.8.3 → dcchbot-1.8.4}/dcchbot/__init__.py +0 -0
- {dcchbot-1.8.3 → dcchbot-1.8.4}/dcchbot/__main__.py +0 -0
- {dcchbot-1.8.3 → dcchbot-1.8.4}/dcchbot.egg-info/SOURCES.txt +0 -0
- {dcchbot-1.8.3 → dcchbot-1.8.4}/dcchbot.egg-info/dependency_links.txt +0 -0
- {dcchbot-1.8.3 → dcchbot-1.8.4}/dcchbot.egg-info/entry_points.txt +0 -0
- {dcchbot-1.8.3 → dcchbot-1.8.4}/dcchbot.egg-info/requires.txt +0 -0
- {dcchbot-1.8.3 → dcchbot-1.8.4}/dcchbot.egg-info/top_level.txt +0 -0
- {dcchbot-1.8.3 → dcchbot-1.8.4}/setup.cfg +0 -0
@@ -85,7 +85,7 @@ def run():
|
|
85
85
|
if bot:
|
86
86
|
bot.loop.create_task(bot.close())
|
87
87
|
elif shell_command == "!!version":
|
88
|
-
print("dcchbot 1.8.
|
88
|
+
print("dcchbot 1.8.4")
|
89
89
|
elif shell_command == "!!log":
|
90
90
|
logger.info(input( "請輸入要記錄的內容:\n> ").strip())
|
91
91
|
else:
|
@@ -227,7 +227,7 @@ def run():
|
|
227
227
|
|
228
228
|
@bot.tree.command(name="version", description="顯示機器人版本")
|
229
229
|
async def version(interaction: discord.Interaction):
|
230
|
-
await interaction.response.send_message("dcchbot 1.8.
|
230
|
+
await interaction.response.send_message("dcchbot 1.8.4")
|
231
231
|
@bot.tree.command(name="deop", description="移除管理員權限(限管理員)")
|
232
232
|
@app_commands.describe(member="要移除管理員權限的使用者")
|
233
233
|
async def deop(interaction: discord.Interaction, member: discord.Member):
|
@@ -243,17 +243,17 @@ def run():
|
|
243
243
|
try:
|
244
244
|
logger.info("正在啟動機器人...")
|
245
245
|
bot.run(token)
|
246
|
+
while True:
|
247
|
+
try:
|
248
|
+
shell_command = input("請輸入 shell 命令(輸入 !!help 查看):\n> ").strip()
|
249
|
+
shell(shell_command)
|
250
|
+
except (KeyboardInterrupt, EOFError):
|
251
|
+
print("E:Shell 已關閉")
|
252
|
+
break
|
246
253
|
except discord.LoginFailure:
|
247
254
|
logger.error("Token 無效,請重新確認。")
|
248
255
|
except Exception as e:
|
249
256
|
logger.exception(f"發生錯誤:{e}")
|
250
|
-
while True:
|
251
|
-
try:
|
252
|
-
shell_command = input("請輸入 shell 命令(輸入 !!help 查看):\n> ").strip()
|
253
|
-
shell(shell_command)
|
254
|
-
except (KeyboardInterrupt, EOFError):
|
255
|
-
print("E:Shell 已關閉")
|
256
|
-
break
|
257
257
|
|
258
258
|
# ─── GUI 面板 ──────────────────────────────────────────────────
|
259
259
|
class ModerationView(discord.ui.View):
|
@@ -286,11 +286,6 @@ class ModerationView(discord.ui.View):
|
|
286
286
|
await self.member.ban(reason="由管理員 GUI 操作封鎖")
|
287
287
|
await interaction.response.send_message(f"{self.member.mention} 已被封鎖。", ephemeral=True)
|
288
288
|
|
289
|
-
# ─── Shell 控制 ─────────────────────────────────────────────────
|
290
|
-
|
291
|
-
|
292
289
|
# ─── 啟動 ──────────────────────────────────────────────────────
|
293
290
|
if __name__ == "__main__":
|
294
|
-
run()
|
295
|
-
|
296
|
-
|
291
|
+
run()
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|