Skip to main content

A library to assist with Discord.py development

Project description

RolePanel for discord.py Library

PyPI version Python version License


📦 概要

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()  # どこでエラーが発生したか表示

管理者用

更新方法
Remove-Item -Recurse -Force .\dist\
py setup.py sdist
py setup.py bdist_wheel
py -m twine upload --repository testpypi dist/*
py -m twine upload --repository pypi dist/*

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

discord_py_role_panel_lib-0.0.22.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

discord_py_role_panel_lib-0.0.22-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file discord_py_role_panel_lib-0.0.22.tar.gz.

File metadata

File hashes

Hashes for discord_py_role_panel_lib-0.0.22.tar.gz
Algorithm Hash digest
SHA256 d747af26ac2268e69a3d3c3cc6c3699720f75e49a4ef87d51008076e2f1b7ac7
MD5 df1ef2713534558a9f745d03b62fcbda
BLAKE2b-256 abb02c812cb4502287c4c9d5fa36763b4e2a0e573a234d2078b0cf61c941b0e8

See more details on using hashes here.

File details

Details for the file discord_py_role_panel_lib-0.0.22-py3-none-any.whl.

File metadata

File hashes

Hashes for discord_py_role_panel_lib-0.0.22-py3-none-any.whl
Algorithm Hash digest
SHA256 f7b44b6995add196e0b2a5c980dc9e73cc30b2bac300924fcf3ade01cd53e390
MD5 d3ad96f5b5c2c4c67dc30df25300d9ec
BLAKE2b-256 6dd5f6a06fa56ef618d5a061da1405c8672f4261ac774e297e87b2766554fa29

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page