dubiousdiscord-0.5.3
توضیحات
A python wrapper for the Discord API that takes advantage of Discord Interactions.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | dubiousdiscord-0.5.3 |
| نام | dubiousdiscord |
| نسخه کتابخانه | 0.5.3 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | lapras |
| ایمیل نویسنده | carl.likes.lua@gmail.com |
| آدرس صفحه اصلی | https://github.com/lapraswastaken/dubiousdiscord |
| آدرس اینترنتی | https://pypi.org/project/dubiousdiscord/ |
| مجوز | - |
# dubiousdiscord
A (yet to be fully-featured) Python package that wraps the official Discord API.
Provides an easy way to define application commands and other callbacks.
```python
import dubious as dd
from dubious import enums, api
class mu2OS(dd.Pory2):
@dd.Command.make("ping", "Responds with 'Pong!'")
async def ping(self, ixn: dd.Ixn):
await ixn.respond("Pong!")
@dd.Command.make("cat", "Repeats a given message.", [
dd.Option.make("message", "The message to repeat.", enums.CommandOptionTypes.String)
])
async def cat(self, ixn: dd.Ixn, message: str):
await ixn.respond(message)
@dd.Command.make("greet", "Says \"Hello!\" to another user.", [
dd.Option.make("user", "The user to greet.", enums.CommandOptionTypes.User)
])
async def greet(self, ixn: dd.Ixn, user: api.User):
await ixn.respond(f"Hello, <@{user.username}>!", silent=True)
if __name__ == "__main__":
with open("./key.txt", "r") as f:
token = f.read()
chip = Chip()
mu2OS().use(chip)
chip.start(
token,
enums.Intents.Guilds
)
```
Install with
```console
(.env) $ python -m pip install dubiousdiscord
```
نیازمندی
| مقدار | نام |
|---|---|
| - | aiohttp[speedups] |
| - | websockets |
| - | pydantic |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.10 | Python |
نحوه نصب
نصب پکیج whl dubiousdiscord-0.5.3:
pip install dubiousdiscord-0.5.3.whl
نصب پکیج tar.gz dubiousdiscord-0.5.3:
pip install dubiousdiscord-0.5.3.tar.gz