Skip to content

Commit bba4684

Browse files
committed
docs: rebrand
1 parent 73623eb commit bba4684

File tree

10 files changed

+48
-137
lines changed

10 files changed

+48
-137
lines changed

docs/src/Guides/01 Getting Started.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Introduction
22

3-
Hi! So you want to make a bot starting from naffing. This guide aims to get you started as fast as possible, for more advanced use-cases check out the other guides.
3+
Ready to get your Python on and create a Discord bot? This guide's got you covered with installation options and a basic bot code example.
44

55
### Requirements
66

@@ -70,12 +70,12 @@ There are two different ways to install this library and create your bot.
7070

7171
=== ":material-linux: Linux"
7272
```shell
73-
python3 -m pip install naff --upgrade
73+
python3 -m pip install discord-py-interactions --upgrade
7474
```
7575

7676
=== ":material-microsoft-windows: Windows"
7777
```shell
78-
py -3 -m pip install naff --upgrade
78+
py -3 -m pip install discord-py-interactions --upgrade
7979
```
8080

8181
### Basic bot

docs/src/Guides/10 Events.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ bot = Client(intents=Intents.DEFAULT)
1212
bot.start("Put your token here")
1313
```
1414

15-
For more information, please visit the API reference [here](/interactions.py/API Reference/API Reference/models/Discord/enums/#naff.models.discord.enums.Intents).
15+
For more information, please visit the API reference [here](/interactions.py/API Reference/API Reference/models/Discord/enums/#internal.models.discord.enums.Intents).
1616

1717
## Hey Listen!!!
1818

Lines changed: 1 addition & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -1,110 +1 @@
1-
# 1.x -> 2.x Migration Guide
2-
2.x Was a rewrite of various parts of Naff, and as such, there are a few breaking changes. This guide will help you migrate your code from 1.x to 2.x.
3-
4-
Please note; there are other additions to 2.x, but they are not breaking changes, and as such, are not covered in this guide.
5-
6-
## Misc.
7-
- All `edit` methods are now keyword arguments only.
8-
- The exception is `content` on message edits, which is positional.
9-
- `context.interaciton_id` is now an `int` instead of a `str`.
10-
11-
## Selects
12-
To simplify SelectMenus, NAFF made some changes to how SelectMenus are used.
13-
- Options can now be and *reasonable* type, be it `SelectOption`, `dict`, `iterable` or `str`
14-
- All parameters are now keyword only, excpet for `options` which remains positional or keyword
15-
- `Select` was renamed to `StringSelectMenu`
16-
- New select menus were implemented to support API changes
17-
- https://discord.com/developers/docs/interactions/message-components#select-menus
18-
- `UserSelectMenu`
19-
- `RoleSelectMenu`
20-
- `MentionableSelectMenu`
21-
- `ChannelSelectMenu`
22-
- `ChannelSelectMenu`
23-
24-
### Before
25-
```python
26-
from naff import Select, SelectOption
27-
await channel.send(
28-
"Old SelectUX",
29-
components=Select(
30-
options=[
31-
SelectOption("test1", "test1"),
32-
SelectOption("test2", "test2"),
33-
SelectOption("test3", "test3"),
34-
],
35-
placeholder="test",
36-
),
37-
)
38-
```
39-
40-
### After
41-
```python
42-
from naff import StringSelectMenu
43-
44-
await channel.send(
45-
"New SelectMenu Menu UX test", components=StringSelectMenu(["test1", "test2", "test3"], placeholder="test")
46-
)
47-
```
48-
49-
## Listeners
50-
Listeners have received a series of ease-of-use updates for both extension and bot developers alike.
51-
52-
- All internal listeners now have a `is_default_listener` attribute to make it easier to differentiate between the library's listeners and user defined listeners.
53-
- `override_default_listeners` allows you to completely override the library's listeners with your own.
54-
- Note it might be worth looking into processors if you're doing this; as they allow acting on the raw-payloads before they're processed by the library.
55-
- All event objects now have a shortcut to listen to them via `BaseEvent.listen(coro, Client)`
56-
- Listeners can now be delayed until the client is ready with a `delay_until_ready` argument.
57-
58-
## Events
59-
- All event objects now have a shortcut to listen to them via `BaseEvent.listen(coro, Client)`
60-
- New Events!
61-
- `ComponentCompletion` - Dispatched after the library ran any component callback.
62-
- `AutocompleteCompletion` - Dispatched after the library ran any autocomplete callback.
63-
- `ModalCompletion` - Dispatched after the library ran any modal callback.
64-
- `Error` - Dispatched whenever the libray encounters an unhandled exception.
65-
- Previously this was done by overriding the `on_error` method on the client, or in extensions
66-
- `CommandError` - Dispatched whenever a command encounters an unhandled exception.
67-
- `ComponentError` - Dispatched whenever a component encounters an unhandled exception.
68-
- `AutocompleteError` - Dispatched whenever an autocomplete encounters an unhandled exception.
69-
- `ModalError` - Dispatched whenever a modal encounters an unhandled exception.
70-
- `NewThreadCreate` - Dispatched whenever a thread is newly created
71-
- `GuildAvailable` - Dispatched whenever a guild becomes available
72-
- note this requires the guild cache to be enabled
73-
- `ApplicationCommandPermissionsUpdate` - Dispatched whenever a guild's application command permissions are updated
74-
- `VoiceUserDeafen` - Dispatched whenever a user's deafen status changes
75-
- `VoiceUserJoin` - Dispatched whenever a user joins a voice channel
76-
- `VoiceUserLeave` - Dispatched whenever a user leaves a voice channel
77-
- `VoiceUserMove` - Dispatched whenever a user moves to a different voice channel
78-
- `VoiceUserMute` - Dispatched whenever a user's mute status changes
79-
- Event Renamed
80-
- `Button` has been renamed to `ButtonPressed` to avoid naming conflicts
81-
- All events with a `context` attribute have had it renamed to `ctx` for consistency
82-
83-
## Client Changes
84-
- dm commands can now be disabled completely via the `disable_dm_commands` kwarg
85-
- `Client.interaction_tree` offers a command tree of all application commands registered to the client
86-
- The `Client` now sanity checks the cache configuration
87-
- The `Client` will no longer warn you if a cache timeout occurs during startup
88-
- These are caused by T&S shadow-deleting guilds, and are not a concern
89-
- `async_startup_tasks` are now performed as soon as the client successfully connects to the REST API
90-
- Note this is before the gateway connection is established, use a `on_ready` listener if you need to wait for the gateway connection
91-
- Application Command syncing is now more error tolerant
92-
93-
## Extensions
94-
- Extensions no longer require a `setup` entrypoint function.
95-
- For complex setups, I would still advise using an entrypoint function
96-
97-
## Caching
98-
- A `NullCache` object is now used to represent a disabled cache, to use it use `create_cache(0, 0, 0)` in a client kwarg as before
99-
- This is a very niche-use-case and most people won't need to use it
100-
- The `Client` will log a warning if `NullCache` is used for sanity checking
101-
- The serializer now respects `no_export` metadata when using `as_dict`
102-
103-
## Forums
104-
- Forums now utilise the new API spec instead of the private-beta API
105-
- A new `NewThreadCreate` event is now dispatched for brand new threads
106-
- Add various helper methods to `Forum` objects
107-
- `create_post` now handles `str`, `int` `Tag` objects for available tags
108-
109-
## Emoji
110-
- `PartialEmoji.from_str` can now return None if no emoji is found
1+
!!! Placeholder for 2.x migration guide

docs/src/Guides/99 Migration From D.py.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Migration From discord.py
22

33
1. interactions.py requires python 3.10 (as compared to dpy's 3.5), you may need to upgrade python.
4-
- If you see `ERROR: Could not find a version that satisfies the requirement naff (from versions: none)` when trying to `pip install NAFF`, this is your problem.
4+
- If you see `ERROR: Could not find a version that satisfies the requirement discord-py-interactions (from versions: none)` when trying to `pip install discord-py-interactions`, this is your problem.
55

66
2. Classes/Models
77
- Your client is `interactions.Client`.

docs/src/Guides/index.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,25 @@ These guides are meant to help you get started with the library and offer a poin
77

88
---
99

10-
So you want to make a bot starting from naffing. This guide aims to get you started as fast as possible.
10+
Ready to get your Python on and create a Discord bot? This guide's got you covered with installation options and a basic bot code example.
1111

1212
- [__:material-hammer-screwdriver: Creating Your Bot__](02 Creating Your Bot.md)
1313

1414
---
1515

16-
How to make a bot on the Discord Developer Dashboard.
16+
Want to create your own bot but don't know where to start? This guide has you covered from bot-tom to top!
1717

1818
- [__:material-slash-forward-box: Slash Commands__](03 Creating Commands.md)
1919

2020
---
2121

22-
So you want to make a slash command (or interaction, as they are officially called), but don't know how to get started? Then this is the right place for you.
22+
Slash commands are a cut above the rest - this guide will show you how to create your very own slash commands.
2323

2424
- [__:material-menu-open: Context Menus__](04 Context Menus.md)
2525

2626
---
2727

28-
Interact with users in a more natural way. Just use the second button on your mouse.
28+
Create menus that are so good, they'll have your users right-clicking for more.
2929

3030
- [__:material-button-cursor: Components__](05 Components.md)
3131

@@ -37,7 +37,7 @@ These guides are meant to help you get started with the library and offer a poin
3737

3838
---
3939

40-
As everyone knows from surfing the web, popups are really great. Everyone loves them and they make for a great UX. Luckily for you, you have the option to regale your users love for them by using modals.
40+
Ready to pop-up your user interface game? This guide will show you how to create modals.
4141

4242
- [__:material-account-convert: Converters__](08 Converters.md)
4343

@@ -110,7 +110,7 @@ These guides are meant to help you get started with the library and offer a poin
110110

111111
---
112112

113-
How do I migrate from 1.x to 2.x?
113+
How do I migrate from i.py v4.4 to v5?
114114

115115

116116
</div>

docs/src/images/favicon.png

-262 KB
Loading

docs/src/images/logo.png

3.6 MB
Loading

docs/src/index.md

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,25 @@ hide:
77
!!! danger "Remember"
88
These docs are not completed. Please do not panic if something is missing or inaccurate.
99

10+
We hope this documentation is helpful for you, but don't just ++ctrl+c++ and ++ctrl+v++.
11+
1012
A highly extensible, easy to use, and feature complete framework for Discord.
1113

1214
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.
1315

1416
## Key Features
1517
interactions.py offers a wide range of features for building Python-powered Discord bots and web applications alike:
18+
1619
- ✅ 100% coverage of the Discord API
20+
1721
- ✅ Dynamic cache with TTL support
22+
1823
- ✅ Modern and Pythonic API for easy interaction with Discord
24+
1925
- ✅ Proper rate-limit handling
26+
2027
- ✅ Feature parity with most other Discord API wrappers
28+
2129
- ✅ Fully automated command synchronisation
2230

2331
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.
@@ -28,30 +36,30 @@ So the base library doesn't do what you want? No problem! With builtin extension
2836

2937
Just type `bot.load("extension")`
3038

31-
<details>
32-
<summary>Extensions</summary>
39+
---
3340

34-
### Prefixed Commands
41+
### Prefixed Commands
3542

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+
Prefixed commands, message commands, or legacy commands.
44+
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
3845

39-
- ✅ Automatic command registration
40-
- ✅ Annotation support
46+
- ✅ Automatic command registration
4147

42-
### Debug Ext
48+
- ✅ Annotation support
4349

44-
A fully featured debug and utilities suite to help you get your bots made
50+
### Debug Ext
4551

46-
### Jurigged
52+
A fully featured debug and utilities suite to help you get your bots made
4753

48-
A hot reloading extension allowing you to automagically update your bot without reboots
54+
### Jurigged
4955

50-
### Sentry
56+
A hot reloading extension allowing you to automagically update your bot without reboots
5157

52-
Integrates Sentry.io error tracking into your bot with a single line
58+
### Sentry
5359

54-
</details>
60+
Integrates Sentry.io error tracking into your bot with a single line
61+
62+
---
5563

5664
## Where do I start?
5765

docs/src/scripts/feedback.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
var feedback = document.forms.feedback
2+
feedback.addEventListener("submit", function (ev) {
3+
ev.preventDefault()
4+
5+
/* Retrieve page and feedback value */
6+
var page = document.location.pathname
7+
var data = ev.submitter.getAttribute("data-md-value")
8+
9+
/* Send feedback value */
10+
console.log(page, data)
11+
})

mkdocs.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ theme:
4949
font:
5050
code: Roboto Mono
5151

52+
watch:
53+
- interactions
54+
5255

5356
extra:
5457
social:
@@ -119,8 +122,6 @@ plugins:
119122
group_by_category: False
120123
heading_level: 3
121124
show_if_no_docstring: False # temporary, this will be reverted to False once we're done with docs
122-
watch:
123-
- interactions
124125
- minify:
125126
minify_html: true
126127
# keep these at the bottom of the plugins list

0 commit comments

Comments
 (0)