64 Commits

Author SHA1 Message Date
Astrea
cd4bb296f3
Merge pull request #58
* FIxed `userinfo` command not returning an avatar...

* Quick merge conflict fix

* Merge branch '2.0' into converter-example-fix

* Fix code style issues with Black
2021-09-21 11:52:55 -07:00
Gnome!
1957fa6011
Implement a least breaking approach to slash commands (#39)
* Most slash command support completed, needs some debugging (and reindent)

* Implement a ctx.send helper for slash commands

* Add group command support

* Add Option converter, fix default optional, fix help command

* Add client.setup and move readying commands to that

* Implement _FakeSlashMessage.from_interaction

* Rename normmal_command to message_command

* Add docs for added params

* Add slash_command_guilds to bot and decos

* Fix merge conflict

* Remove name from commands.Option, wasn't used

* Move slash command processing to BotBase.process_slash_commands

* Create slash_only.py

Basic example for slash commands

* Create slash_and_message.py

Basic example for mixed commands

* Fix slash_command and normal_command bools

* Add some basic error handling for registration

* Fixed converter upload errors

* Fix some logic and make an actual example

* Thanks Safety Jim

* docstrings, *args, and error changes

* Add proper literal support

* Add basic documentation on slash commands

* Fix non-slash command interactions

* Fix ctx.reply in slash command context

* Fix typing on Context.reply

* Fix multiple optional argument sorting

* Update ctx.message docs to mention error instead of warning

* Move slash command creation to BotBase

* Fix code style issues with Black

* Rearrange some stuff and add flag support

* Change some errors and fix interaction.channel fixing

* Fix slash command quoting for *args

Co-authored-by: iDutchy <42503862+iDutchy@users.noreply.github.com>
Co-authored-by: Lint Action <lint-action@samuelmeuli.com>
2021-09-19 01:28:11 +02:00
Lint Action
7513c2138f Fix code style issues with Black 2021-09-05 21:34:20 +00:00
Gnome
6e41bd2219 Remove intents.default and make intents a required parameter 2021-08-31 20:53:54 +01: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
SNVMK
169b61092a
Change reply example to use replies 2020-11-28 03:16:14 -05:00
Zomatree
4bce41f7aa
Add intents to examples 2020-10-01 04:42:08 -04:00
Xua
1fd87ad0ca Add example on subclassing commands.Context 2020-01-24 19:32:24 -05:00
Geroyuni
8db7b5eb19 Fix volume command in basic voice example
source.volume takes floating point percentages, e.g. 1.0 for 100%
2019-03-09 17:00:28 -05:00
Rapptz
03fdd81531 Remove outdated playlist.py example.
Fixes #1870
2019-03-08 20:04:21 -05:00
Rapptz
caf3d17d4a Rework entire cog system and partially document it and extensions. 2019-02-23 04:10:10 -05:00
Capn
dd5762d9ed Add missing asyncio imports from the examples 2018-11-24 22:17:58 -05:00
PikalaxALT
7891afcec8 Remove deprecated ffmpeg/avconv flag from basic_voice example 2018-08-22 21:06:09 -04:00
Modelmat
1436af3b18 Removes redundant asyncio import
Not much point importing asyncio when it's not being used, it was there for when @asyncio.coroutine was used previously
2018-08-22 21:06:09 -04:00
Rapptz
00ee7549c9 Update new member example to not be broken.
Took forever but better late than never.
2018-08-22 21:06:09 -04:00
Daniel
27063a91c7 Improve basic_voice example
Add stream option and command so we don't always have to download a file
Move repeated voice check code to before_invoke hook
Add typing indicators when making YTDLSources
2018-03-25 04:04:07 -04:00
Daniel
6f42a5f2ec Fixed broken code
I should have tested it.
2017-07-07 22:09:56 -04:00
Daniel
a037d469d7 Add basic rewrite voice example 2017-07-07 17:55:12 -04:00
Rapptz
e77012f4d9 Make all public is_ functions into methods instead of properties. 2017-01-29 20:53:17 -05:00
Rapptz
8c896e9fbc Re-add Client.wait_until_ready 2017-01-29 20:33:48 -05:00
Rapptz
1e09432c45 Update examples to use the new generic wait_for. 2017-01-26 04:30:47 -05:00
Rapptz
f8a5d890fe Update examples to match the new rewrite API. 2017-01-03 20:58:11 -05:00
Rapptz
d914c0a4e4 Clarify on_ready triggering more than twice.
On that note, fix the background_task example to use `Client.run`
instead of manual loop management. That way the task will be cleaned
up and cancelled inside `Client.run`.
2016-06-10 20:16:21 -04:00
Rapptz
493bffc685 Rework playlist example to work with multi-server voice. 2016-05-12 06:06:39 -04:00
Rapptz
72e84a1b47 Change all email/password pair examples to use token. 2016-04-08 22:02:38 -04:00
shrx
8c4f928684 Fix bug where playlist bot attempts to process replies in PMs. 2016-03-02 23:24:04 -05:00
Rapptz
8d76e7095e Basic bot example now shows documenting for the built-in help command. 2016-01-12 01:29:37 -05:00
Rapptz
2ebfbbe471 Examples now use Python 3.5. Remove echo.py example. 2016-01-06 11:34:49 -05:00
Rapptz
246698254f Add basic example bot showcasing the commands ext module. 2016-01-05 00:07:07 -05:00
Rapptz
ba3e00c3bf Add guessing game example to showcase wait_for_message. 2015-12-19 23:57:42 -05:00
Rapptz
9175b83387 Add voice playlist example code. 2015-12-19 23:06:22 -05:00
Rapptz
bee044629d Add background_task example to showcase background tasks. 2015-12-19 20:40:06 -05:00