dcchbot 1.8.3__py3-none-any.whl → 1.8.4__py3-none-any.whl

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/main.py CHANGED
@@ -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.3")
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.3")
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()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dcchbot
3
- Version: 1.8.3
3
+ Version: 1.8.4
4
4
  Summary: 一個簡單的中文 Discord 管理機器人,支援 GUI 按鈕封鎖/禁言/警告
5
5
  Author-email: I_am_from_taiwan <102109040j@gmail.com>
6
6
  License: MIT
@@ -0,0 +1,9 @@
1
+ dcchbot/__init__.py,sha256=zp5WAMYJ8lMGsJsMRvHCjvTXVR426Satbz_orCtk990,105
2
+ dcchbot/__main__.py,sha256=5FwoJspcKFt5_1AlXoxlWROiQSp9wgnFEltU6ufz9QE,30
3
+ dcchbot/main.py,sha256=PoPt38MISd8ALxQn8c9IltPsCvNQbUxgm0U0xP6hh0g,15812
4
+ dcchbot-1.8.4.dist-info/licenses/LICENSE,sha256=l3hyIOCB7NYorC-bjV5yZM0PgAJbMgAWNLE644dR7H4,1065
5
+ dcchbot-1.8.4.dist-info/METADATA,sha256=5ZlEdfIqyCDmpkDemprbyjlYi2zyAb08g9m6u2hkXkA,446
6
+ dcchbot-1.8.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
7
+ dcchbot-1.8.4.dist-info/entry_points.txt,sha256=90T16CGc_Tx-4pFaLCcbuuh7Vi9l4gsLovBkydqxP9Y,45
8
+ dcchbot-1.8.4.dist-info/top_level.txt,sha256=jiDTz8UmwZgXN9KzokwDRYhoWxsVmWcnqmrANeTFMck,8
9
+ dcchbot-1.8.4.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- dcchbot/__init__.py,sha256=zp5WAMYJ8lMGsJsMRvHCjvTXVR426Satbz_orCtk990,105
2
- dcchbot/__main__.py,sha256=5FwoJspcKFt5_1AlXoxlWROiQSp9wgnFEltU6ufz9QE,30
3
- dcchbot/main.py,sha256=66FMZZo-D8ZJsDXy1U57Y-mKrEsY_SP0U-ZBhBdcFYk,15971
4
- dcchbot-1.8.3.dist-info/licenses/LICENSE,sha256=l3hyIOCB7NYorC-bjV5yZM0PgAJbMgAWNLE644dR7H4,1065
5
- dcchbot-1.8.3.dist-info/METADATA,sha256=sp9XnuLGsyY98-kLqbWkI_F2wvxpcdVAjTn1lx0VJU8,446
6
- dcchbot-1.8.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
7
- dcchbot-1.8.3.dist-info/entry_points.txt,sha256=90T16CGc_Tx-4pFaLCcbuuh7Vi9l4gsLovBkydqxP9Y,45
8
- dcchbot-1.8.3.dist-info/top_level.txt,sha256=jiDTz8UmwZgXN9KzokwDRYhoWxsVmWcnqmrANeTFMck,8
9
- dcchbot-1.8.3.dist-info/RECORD,,