91 Commits

Author SHA1 Message Date
Rapptz
3530a0f2a8 Fix advanced startup example 2023-09-16 20:32:09 -04:00
Rapptz
f793af0456 Add item parameter to DynamicItem.from_custom_id 2023-09-03 02:52:05 -04:00
Rapptz
418230641c Add dynamic counter example 2023-09-03 02:52:05 -04:00
Rapptz
a852f90358 Add support for dynamic items that parse custom_id for state 2023-09-03 02:52:05 -04:00
sgtlaggy
5124b73d14 Add extra error handling to converters example 2023-01-14 18:56:38 -05:00
sgtlaggy
dd2125e6b6 Make error handler in modal example more helpful 2023-01-14 18:56:38 -05:00
Abe Hanoka
4adfde1a7b
Fix missing word in persistent view example 2022-12-14 19:09:45 -05:00
Rapptz
2bf2bfc9b4 Add utils.setup_logging to help set up logging outside of Client.run 2022-08-17 22:53:03 -04:00
Willy
84c233eb0e
Remove outdated comment in secret.py example 2022-08-16 20:08:48 -04:00
Rapptz
c92422d185 Add app commands transformer example
Closes #7984
2022-08-15 11:32:49 -04:00
Rapptz
6886f1d01a Move modal example to its own folder 2022-08-15 10:54:52 -04:00
Rapptz
df54da8bc9 Fix secret example requiring more intents than necessary 2022-08-09 10:42:15 -04:00
Michael H
a8a6bf4f6c
Add advanced startup example
shows setup_hook and async context manager use with examples
approximating real world use cases
2022-07-08 03:07:32 -04:00
Kellenn
64849ebcc8 Remove unused import in dropdown example 2022-06-17 23:18:16 -04:00
Rapptz
ee71366f72 Fetch application_info on login
This allows users to no longer pass application_id when calling sync
inside setup_hook
2022-05-22 19:52:50 -04:00
Rapptz
b2929513cc Update modal example for latest changes 2022-05-08 04:46:40 -04:00
Narmy
8e9e25246e
Add an example for app_commands.rename()
Co-authored-by: Danny <Rapptz@users.noreply.github.com>
2022-04-30 18:45:17 -04:00
GoogleGenius
61105ce925
Fix minor convention mistakes in basic examples
Co-authored-by: Narmy <67862800+NarmyOnDiscord@users.noreply.github.com>
2022-04-30 18:40:42 -04:00
Narmy
14e83dff0e
Adds two basic context menus for members and messages
Co-authored-by: Danny <Rapptz@users.noreply.github.com>
2022-04-30 09:37:37 -04:00
Narmy
d437f494db
Add basic slash command example
Co-authored-by: Danny <Rapptz@users.noreply.github.com>
2022-04-30 03:55:29 -04:00
Rapptz
abeea73734 Fix remaining things not explicitly passing the intents kwarg 2022-04-05 23:15:40 -04:00
Rapptz
8591cfc5e7 Run black on all examples and require it for CI 2022-03-24 23:40:59 -04:00
Rapptz
968a1f366f Change View callback order to (self, interaction, item)
This is more consistent with the rest of the library which always has
the interaction as the first parameter. This has been done before in
the command extension as well, the first parameter is always either
self or the context.
2022-03-24 23:00:50 -04:00
Omkaar
beafaa8a8b
Change intent comments to be consistent in the examples 2022-03-15 07:38:34 -04:00
Rapptz
bc70ec5cfd Change persistent view example to use new setup_hook 2022-03-14 06:12:58 -04:00
Rapptz
c95c163266 Fix background task examples 2022-03-14 06:08:54 -04:00
Josh
a1c618215e
[commads] Change cog/extension load/unload methods to be async 2022-03-13 21:03:45 -04:00
Omkaar
d22a7fb793
Fix intents typo in new_member example 2022-03-10 06:20:33 -05:00
Robin
15885ea728
Add an example for the new modals 2022-03-09 20:45:37 -05:00
Stocker
e63c9bad85
Use display_avatar instead of avatar in converters example 2022-03-06 23:05:06 -05:00
Austin
5780ff5ef0
Add message content intent to examples 2022-03-06 23:04:48 -05:00
Robin5605
78aea51f50
Add an example for the new dropdowns 2021-07-28 19:53:06 -04:00
Ay355
fc51736b34
Add a new view example for link buttons 2021-07-22 10:02:42 -04:00
Nadir Chowdhury
7d0bd7ed20
add persistent view in on_ready to avoid loop issues 2021-06-29 20:02:55 -04:00
Rapptz
7386a971f8 Add examples for how to use views 2021-06-29 04:19:12 -04:00
pikaninja
caa9512a8a
Make on_ready examples consistent 2021-06-27 23:59:17 -04:00
Aman Kumar
9e4bcd3df7
Fix some typos in custom_context example
Also adds PyNaCl PyPI link in README
2021-06-02 06:31:58 -04:00
apple502j
127b3239e9
Fix AttributeError in examples 2021-04-27 08:09:01 -04:00
pikaninja
1952060e1a
make examples on_ready consistent 2021-04-09 18:05:33 -04:00
Rapptz
99fc950510 Use f-strings in more places that were missed. 2021-04-08 06:02:47 -04:00
N-i-c-k-007
c3e0b6e123
Update joined command in basic_bot to use f-strings 2021-04-08 04:33:42 -04:00
Rapptz
9d39b135f4 Modernize code to use f-strings
This also removes the encoding on the top, since Python 3 does it by
default. It also changes some methods to use `yield from`.
2021-04-04 07:03:53 -04:00
Nadir Chowdhury
e961fdeae0
Rework the reaction roles example 2021-04-03 22:52:11 -04:00
Rapptz
8a24a93010 Bring back older background task example under a new name 2021-03-30 20:29:03 -04:00
Rapptz
e359aeb122 Fix background_task example to actually work 2021-03-30 20:28:41 -04:00
Sebastian Law
5ed47cacc7
Update background_task example to use ext.tasks 2021-03-30 20:24:28 -04:00
Alex Nørgaard
7f05f7f6c0
Add converter example 2021-02-23 03:54:31 -05:00
Nadir Chowdhury
6c08f3d344
Add "Secret" channel/emoji example 2021-02-21 00:16:37 -05:00
Byambadalai Sumiya
35db712c16
Fix reaction_roles example logic 2020-12-22 02:05:41 -05:00
Kippiii
96059e5365
Add reaction roles example 2020-12-03 18:16:39 -05:00