디스코드 봇 커스텀 커맨드 생성기
pip install CustomCommands
from CustomCommand import Commands
import discord, json
from discord.ext import commands
class CustomCommands(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.command()
async def 커맨드추가(self, ctx, a, b):
Commands.Custom("Custom", ctx.author.id, a, b)
await ctx.send(f"`{a}` 라고 하시면 `{b}` 라고 할게요!")
@commands.Cog.listener()
async def on_message(self, message):
with open("Custom.json", 'r', encoding="UTF-8") as f:
data = json.load(f)
if message.content.startswith(""):
msg = message.content[0:]
try:
for i in data[str(message.author.id)]:
if i == msg:
await message.channel.send(data[str(message.author.id)][msg])
except:
pass
def setup(bot):
bot.add_cog(CustomCommands(bot))
Licence
- 도움말이나, 임베드 Footer에 크레딧을 남겨주세요.
- ex) 도움 : STORM#9999
Contact
Metadata
Release files for CustomCommands 1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| CustomCommands-1.0.tar.gz | 2.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| CustomCommands-1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 4.5 kB
Release files / CustomCommands-1.0.tar.gz
| Download URL | CustomCommands-1.0.tar.gz |
|---|---|
| Size | 2.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8f0c423adb7adacedcac99efa25af3f90e60c7f6ca3ecabc0987c520f178a7f4
|
|
BLAKE2b-256 checksum How to use checksums |
fdda022b1585c4b2295bb263909768bd3b18bfeacd8f2fc572da5bb139417744
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.5
|
Release files / CustomCommands-1.0-py3-none-any.whl
| Download URL | CustomCommands-1.0-py3-none-any.whl |
|---|---|
| Size | 2.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a18065863346d8918b8f9fead791eae9217b60b0f4d55c67a99b929ce80b1cee
|
|
BLAKE2b-256 checksum How to use checksums |
c33681964b606c6d25683128d99f59a33061a3cf2a883944f0420d2134a94827
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.5
|
Security for CustomCommands 1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.