A library to assist with Discord.py development
Project description
RolePanel for discord.py Library
📦 概要
discord-py-role-panel-lib は、discord.pyで役職パネルを簡単に実装するための Python ライブラリです。
主な機能は以下のとおりです:
/役職パネルコマンド/役職パネル 編集コマンド- 役職パネル機能
✨ 特徴
- ✅ 簡単に使用が可能
🔧 インストール
PyPIからインストール:
pip install discord-py-role-panel-lib
githubからインストール:
pip install git+https://github.com/hashimotok-ecsv/discord_py_role_panel_lib.git
使い方
from discord_py_role_panel_lib.cm import role_panel_cm
from discord_py_role_panel_lib.cmds import role_panel_cmd
from discord_py_role_panel_lib.events import button_click_event as role_panel_button_click_event
# ~~~~~~~~~~~~
async def setup_hook(self):
for cog in CMD_COGS:
try:
await self.load_extension(cog)
except Exception:
traceback.print_exc()
for cog in EVENT_COGS:
try:
await self.load_extension(cog)
except Exception:
traceback.print_exc()
for cog in CM_COGS:
try:
await self.load_extension(cog)
except Exception:
traceback.print_exc()
# スラッシュコマンドの同期をここで実行
try:
cog = role_panel_cm.RolePanelLibRolePanelContextMenuCog(self)
await self.add_cog(cog)
cog = role_panel_cmd.RolePanelLibRolePanelCommandCog(self)
await self.add_cog(cog)
cog = role_panel_button_click_event.RolePanelLibButtonClickCog(self)
await self.add_cog(cog)
except Exception:
traceback.print_exc()
try:
await self.load_extension("task")
synced = await self.tree.sync(guild=None)
print(f"Synced global commands. {synced}")
for guild in self.guilds:
synced = await self.tree.sync(guild=discord.Object(id=guild.id))
print(f"Synced guild command(id={str(guild.id)}). {synced}")
except Exception:
traceback.print_exc() # どこでエラーが発生したか表示
管理者用
更新方法
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file discord_py_role_panel_lib-0.0.14.tar.gz.
File metadata
- Download URL: discord_py_role_panel_lib-0.0.14.tar.gz
- Upload date:
- Size: 12.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c69d41483c6f153b47e35d2801bd3af058003c4f742c28c9bbc480f5e1bb78b
|
|
| MD5 |
bb2bbb1b15750104702254a70f6f0093
|
|
| BLAKE2b-256 |
6747e301b2ad3a7ec9f0cd67b6c3d1bd82825fdeb7299f3cf194007f7ff76790
|
File details
Details for the file discord_py_role_panel_lib-0.0.14-py3-none-any.whl.
File metadata
- Download URL: discord_py_role_panel_lib-0.0.14-py3-none-any.whl
- Upload date:
- Size: 14.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
299b252e03714d1c87c32cd9514c3b489d1673f40b830a558e009c6a3905e734
|
|
| MD5 |
6a2045549f8450f17124a6231bbadd4f
|
|
| BLAKE2b-256 |
e2f67917f63daacb23003f1b47a95b4b254b52c7ffa926f38d69a1e9c0052b8b
|