|
7 | 7 | !!! danger "Remember" |
8 | 8 | These docs are not completed. Please do not panic if something is missing or inaccurate. |
9 | 9 |
|
10 | | -We hope this documentation is helpful for you, but don't just ++ctrl+c++ and ++ctrl+v++. |
| 10 | +A highly extensible, easy to use, and feature complete framework for Discord. |
11 | 11 |
|
12 | | -___ |
13 | | -Ever since December 2019, this open-source project has become the culmination of dedication and research towards figuring out the best way to bring interactions from Discord to you: we are an easy, simple, scalable and modular library for Discord interactions. |
| 12 | +interactions.py is the culmination of years of experience with Discord's APIs and bot development. This framework has been built from the ground up with community feedback and suggestions in mind. Our framework provides a modern and intuitive set of language bindings for easy interaction with Discord. |
14 | 13 |
|
15 | | -- Tired of using numerous module dependencies for slash commands and buttons? |
16 | | -- Looking for a compatible library that implements all interactions? |
17 | | -- Itching to get your hands on slash commands, but in a simple manner? |
| 14 | +## Key Features |
| 15 | +interactions.py offers a wide range of features for building Python-powered Discord bots and web applications alike: |
| 16 | +- ✅ 100% coverage of the Discord API |
| 17 | +- ✅ Dynamic cache with TTL support |
| 18 | +- ✅ Modern and Pythonic API for easy interaction with Discord |
| 19 | +- ✅ Proper rate-limit handling |
| 20 | +- ✅ Feature parity with most other Discord API wrappers |
| 21 | +- ✅ Fully automated command synchronisation |
18 | 22 |
|
19 | | -Look no more! The goal of this library is to make all three of these questions go from possibilities to trivial matters. |
| 23 | +In addition to core functionality, interactions.py provides a range of optional extensions, allowing you to further customize your bot and add new features with ease. |
20 | 24 |
|
21 | | -### What can we do? |
22 | | -Our library---inside and out, offers numerous benefits and presents itself as a worthy module in your bot's dependencies: |
| 25 | +## Extensibility |
23 | 26 |
|
24 | | -The base features of our library, built with our API include: |
| 27 | +So the base library doesn't do what you want? No problem! With builtin extensions, you are able to extend the functionality of the library. And if none of those pique your interest, there are a myriad of other extension libraries available. |
25 | 28 |
|
26 | | -- **Dynamic object data generation**: all event data dispatched from the Gateway is dynamically transformed and generated into two-way serializable JSON objects. |
27 | | -- **Sane rate limiting**: our HTTP client implements pre-emptive rate limit avoidance, so your bot is guaranteed to never hit HTTP ``429``. |
28 | | -- **On-demand cache**: every HTTP request and Gateway event made is cached when needed, so you never have to save information yourself. |
29 | | -- **Simplified data models**: every object presented is accessible as either a raw dictionary/``application/json`` or list of recursive attributes. |
| 29 | +Just type `bot.load("extension")` |
30 | 30 |
|
31 | | -Some more unique features that are exclusive to our interactions include: |
| 31 | +<details> |
| 32 | + <summary>Extensions</summary> |
32 | 33 |
|
33 | | -- **Event-triggered callbacks**: whether a component, application command or interaction response, you'll never need to worry about bridging responses. |
34 | | -- **Dual-way decorator logic**: a decorator can act as both a constructor for an interaction, as well as a callback. |
35 | | -- **API-strict naming**: no more confusion with the naming approach of many libraries; we follow the naming style of interactions from the officially curated Discord Developers documentation. |
36 | | -- **Extensive framework structure**: build your own tools and technologies for our library to develop and integrate community creations. |
| 34 | + ### Prefixed Commands |
37 | 35 |
|
38 | | -### What do we not offer? |
39 | | -While we certainly offer a lot of benefits, we unfortunately have our own downsides: |
40 | | -!!! note |
41 | | - This list is subject to change as time goes on: |
42 | | - some of these items may be added to the core of the library in the future. |
| 36 | + Prefixed commands, message commands, or legacy commands. |
| 37 | + Whatever you want to call them, by default the `interactions.py` library will not handle these. But rest assured this extension will get you going |
43 | 38 |
|
44 | | -- No native cooldown decorator/method. |
45 | | -- Lack of automatic sharding and voice clients. |
| 39 | + - ✅ Automatic command registration |
| 40 | + - ✅ Annotation support |
| 41 | + |
| 42 | + ### Debug Ext |
| 43 | + |
| 44 | + A fully featured debug and utilities suite to help you get your bots made |
| 45 | + |
| 46 | + ### Jurigged |
| 47 | + |
| 48 | + A hot reloading extension allowing you to automagically update your bot without reboots |
| 49 | + |
| 50 | + ### Sentry |
| 51 | + |
| 52 | + Integrates Sentry.io error tracking into your bot with a single line |
| 53 | + |
| 54 | +</details> |
| 55 | + |
| 56 | +## Where do I start? |
| 57 | + |
| 58 | +Getting started with interactions.py is easy! Simply install it via `pip` and start building your Discord application in Python: |
| 59 | + |
| 60 | +`pip install -U discord-py-interactions` |
| 61 | +```python |
| 62 | +import interactions |
| 63 | + |
| 64 | +bot = interactions.Client() |
| 65 | + |
| 66 | +@interactions.listen() |
| 67 | +async def on_start(): |
| 68 | + print("Bot is ready!") |
| 69 | + |
| 70 | +bot.start("token") |
| 71 | +``` |
0 commit comments