discsocket-test-1.0.9
توضیحات
Python framework for Discord interactions.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | discsocket-test-1.0.9 |
| نام | discsocket-test |
| نسخه کتابخانه | 1.0.9 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Tadeo Murillo |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | https://github.com/murillotadeo/discsocket |
| آدرس اینترنتی | https://pypi.org/project/discsocket-test/ |
| مجوز | MIT |
# discsocket
Python framework for Discord interactions.
# Installation
`pip install discsocket`
# Introduction
This is the code needed for a minimal application with an on_ready event
```py
import discsocket
socket = discsocket.Socket()
# Event names go in the event decorator
# The function can be named whatever
@socket.event('ready')
async def ready():
print(f"{socket.user.username} is connected")
socket.run('token')
```
# Extensions (Cogs)
If you're familiar with discord.py then you know about cogs. However in discsockets extensions don't inherit from a cog class.
```py
import discsocket
@discsocket.command('boop', 1)
async def boop_command(ctx):
await ctx.callback('https://tenor.com/view/boop-gif-18601298')
```
Lets pretend that the file is called boop.py and is in a folder called extensions
```py
# It would be loaded into the client like this
socket.add_extension('extensions.boop')
```
نیازمندی
| مقدار | نام |
|---|---|
| <3.8.0,>=3.6.0 | aiohttp |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.8.0 | Python |
نحوه نصب
نصب پکیج whl discsocket-test-1.0.9:
pip install discsocket-test-1.0.9.whl
نصب پکیج tar.gz discsocket-test-1.0.9:
pip install discsocket-test-1.0.9.tar.gz