Skip to content

Commit b5c641c

Browse files
committed
Merge branch 'rewrite' into 'master'
Rewrite See merge request discord.py-components/discord.py-components!12
2 parents 2f03485 + aecea88 commit b5c641c

23 files changed

+1046
-740
lines changed

.github/ISSUE_TEMPLATE/addfeature.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,3 @@ labels: "add a feature"
77

88
## What feature
99
> What would you like to see added to this module? (Please add details)
10-
11-
## Advantages
12-
> What are the advantages of this feature?

.github/ISSUE_TEMPLATE/reportbug.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ labels: bug
2525
2626
## Check
2727
- [ ] Are you using the newest version?
28-
- [ ] Is this bug related to security issues?
28+
- [ ] Is this bug related to security issues?

.github/ISSUE_TEMPLATE/typo.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@ labels: typo
77

88
## Typo type
99
- [ ] Document
10-
- [ ] Markdowns or Templates
10+
- [ ] Markdown files or Templates
1111

1212
## Typo
1313
> Where is the typo? (line, file github URL) (Multiple possible)
14-
15-
## Check
16-
- [ ] Are you sure this is a typo?

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
- [ ] Other
77

88
## Required
9-
- [ ] Did you use the black formatter?
10-
- [ ] Did you test?
11-
- [ ] Did you use [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/)
9+
Just check if you followed the contents in the contributing file.
1210

1311
## Checks
14-
- [ ] Does this requires the users to change their code?
12+
- [ ] Is this a breaking change?

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ dmypy.json
130130

131131
# test
132132
test.*
133-
test/
133+
test/*
134134

135135
# idea
136136
.IDEA

README.md

Lines changed: 18 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -9,72 +9,43 @@
99
<a href="https://pypi.org/project/discord-components"><img src="https://img.shields.io/pypi/dm/discord-components" alt="PyPI downloads"></a>
1010
</div>
1111
<div>
12-
<h3>An unofficial library for discord components.</h3>
12+
<h3>An unofficial third party library of discord.py for discord components.</h3>
1313
</div>
1414
</div>
1515

1616
## Welcome!
17-
Discord components are cool, but discord.py will support it on version 2.0. It is hard to wait, so we made a third-party library for using components such as buttons or selects!
17+
18+
Discord components are cool, but discord.py will support it on version 2.0. It
19+
is hard to wait, so we made a third-party library for using components such as
20+
buttons or selects!
1821

1922
This project is open source ⭐.
2023

21-
Also, there is an [official discord server](https://discord.gg/pKM6stqPxS), so if you have any questions, feel free to ask it on this server.
24+
Also, there is an [official discord server](https://discord.gg/pKM6stqPxS), so
25+
if you have any questions, feel free to ask it on this server.
2226

2327
## Features
24-
+ You can use message components and handle component interactions easily!
25-
+ third-party of discord.py.
28+
29+
- You can use message components and handle component interactions easily!
30+
- Third-party of discord.py.
2631

2732
## Docs
28-
We are currently making a new docs! But you can use ([Gitbook version](https://devkiki7000.gitbook.io/discord-components) (up to date)
33+
- [Gitbook version](https://devkiki7000.gitbook.io/discord-components) (Up to
34+
date)
35+
- [Sphinx Version](https://discord-components.readthedocs.io/en/0.5.2.4)
36+
(Currently outdated)
2937

3038
## Install
39+
3140
```
3241
pip install --upgrade discord-components
3342
```
3443

3544
## Example
36-
```py
37-
from discord.ext.commands import Bot
38-
from discord_components import DiscordComponents, Button, Select, SelectOption
39-
40-
bot = Bot(command_prefix = "your prefix")
41-
42-
43-
@bot.event
44-
async def on_ready():
45-
DiscordComponents(bot)
46-
print(f"Logged in as {bot.user}!")
47-
48-
49-
@bot.command()
50-
async def button(ctx):
51-
await ctx.send(
52-
"Hello, World!",
53-
components = [
54-
Button(label = "WOW button!")
55-
]
56-
)
5745

58-
interaction = await bot.wait_for("button_click", check = lambda i: i.component.label.startswith("WOW"))
59-
await interaction.respond(content = "Button clicked!")
60-
61-
62-
@bot.command()
63-
async def select(ctx):
64-
await ctx.send(
65-
"Hello, World!",
66-
components = [
67-
Select(placeholder="select something!", options=[SelectOption(label="a", value="A"), SelectOption(label="b", value="B")])
68-
]
69-
)
70-
71-
interaction = await bot.wait_for("select_option", check = lambda i: i.component[0].value == "A")
72-
await interaction.respond(content = f"{interaction.component[0].label} selected!")
73-
74-
75-
bot.run("your token")
76-
```
77-
You can see more examples [here](https://gitlab.com/discord.py-components/discord.py-components/-/tree/master/examples).
46+
You can see many examples
47+
[here](https://gitlab.com/discord.py-components/discord.py-components/-/tree/master/examples).
7848

7949
## License
50+
8051
This project is under the MIT License.

discord_components/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from .client import *
22
from .interaction import *
33
from .component import *
4-
from .message import *
5-
6-
__version__ = "1.1.4"
4+
from .dpy_overrides import *
5+
from .http import *

0 commit comments

Comments
 (0)