casacloner 1.7.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- casacloner-1.7.3/LICENSE +21 -0
- casacloner-1.7.3/MANIFEST.in +4 -0
- casacloner-1.7.3/PKG-INFO +159 -0
- casacloner-1.7.3/README.rst +114 -0
- casacloner-1.7.3/casacloner.egg-info/PKG-INFO +159 -0
- casacloner-1.7.3/casacloner.egg-info/SOURCES.txt +81 -0
- casacloner-1.7.3/casacloner.egg-info/dependency_links.txt +1 -0
- casacloner-1.7.3/casacloner.egg-info/requires.txt +9 -0
- casacloner-1.7.3/casacloner.egg-info/top_level.txt +1 -0
- casacloner-1.7.3/discord/__init__.py +74 -0
- casacloner-1.7.3/discord/__main__.py +305 -0
- casacloner-1.7.3/discord/abc.py +1294 -0
- casacloner-1.7.3/discord/activity.py +773 -0
- casacloner-1.7.3/discord/appinfo.py +217 -0
- casacloner-1.7.3/discord/asset.py +262 -0
- casacloner-1.7.3/discord/audit_logs.py +382 -0
- casacloner-1.7.3/discord/automod.py +175 -0
- casacloner-1.7.3/discord/backoff.py +85 -0
- casacloner-1.7.3/discord/bin/libopus-0.x64.dll +0 -0
- casacloner-1.7.3/discord/bin/libopus-0.x86.dll +0 -0
- casacloner-1.7.3/discord/calls.py +176 -0
- casacloner-1.7.3/discord/channel.py +1569 -0
- casacloner-1.7.3/discord/client.py +1494 -0
- casacloner-1.7.3/discord/colour.py +269 -0
- casacloner-1.7.3/discord/context_managers.py +67 -0
- casacloner-1.7.3/discord/embeds.py +618 -0
- casacloner-1.7.3/discord/emoji.py +254 -0
- casacloner-1.7.3/discord/entitlement.py +98 -0
- casacloner-1.7.3/discord/enums.py +613 -0
- casacloner-1.7.3/discord/errors.py +201 -0
- casacloner-1.7.3/discord/ext/commands/__init__.py +20 -0
- casacloner-1.7.3/discord/ext/commands/_types.py +30 -0
- casacloner-1.7.3/discord/ext/commands/bot.py +1061 -0
- casacloner-1.7.3/discord/ext/commands/cog.py +451 -0
- casacloner-1.7.3/discord/ext/commands/context.py +340 -0
- casacloner-1.7.3/discord/ext/commands/converter.py +852 -0
- casacloner-1.7.3/discord/ext/commands/cooldowns.py +295 -0
- casacloner-1.7.3/discord/ext/commands/core.py +2070 -0
- casacloner-1.7.3/discord/ext/commands/errors.py +811 -0
- casacloner-1.7.3/discord/ext/commands/help.py +1343 -0
- casacloner-1.7.3/discord/ext/commands/view.py +194 -0
- casacloner-1.7.3/discord/ext/tasks/__init__.py +507 -0
- casacloner-1.7.3/discord/file.py +112 -0
- casacloner-1.7.3/discord/flags.py +940 -0
- casacloner-1.7.3/discord/gateway.py +902 -0
- casacloner-1.7.3/discord/guild.py +2644 -0
- casacloner-1.7.3/discord/http.py +1186 -0
- casacloner-1.7.3/discord/integrations.py +206 -0
- casacloner-1.7.3/discord/invite.py +399 -0
- casacloner-1.7.3/discord/iterators.py +655 -0
- casacloner-1.7.3/discord/member.py +822 -0
- casacloner-1.7.3/discord/mentions.py +127 -0
- casacloner-1.7.3/discord/message.py +1601 -0
- casacloner-1.7.3/discord/mixins.py +42 -0
- casacloner-1.7.3/discord/object.py +78 -0
- casacloner-1.7.3/discord/oggparse.py +98 -0
- casacloner-1.7.3/discord/opus.py +417 -0
- casacloner-1.7.3/discord/partial_emoji.py +191 -0
- casacloner-1.7.3/discord/permissions.py +619 -0
- casacloner-1.7.3/discord/player.py +660 -0
- casacloner-1.7.3/discord/poll.py +210 -0
- casacloner-1.7.3/discord/raw_models.py +217 -0
- casacloner-1.7.3/discord/reaction.py +199 -0
- casacloner-1.7.3/discord/relationship.py +87 -0
- casacloner-1.7.3/discord/role.py +373 -0
- casacloner-1.7.3/discord/scheduled_event.py +220 -0
- casacloner-1.7.3/discord/shard.py +544 -0
- casacloner-1.7.3/discord/sku.py +80 -0
- casacloner-1.7.3/discord/soundboard.py +136 -0
- casacloner-1.7.3/discord/stage_instance.py +110 -0
- casacloner-1.7.3/discord/state.py +1252 -0
- casacloner-1.7.3/discord/sticker.py +238 -0
- casacloner-1.7.3/discord/team.py +160 -0
- casacloner-1.7.3/discord/template.py +248 -0
- casacloner-1.7.3/discord/user.py +959 -0
- casacloner-1.7.3/discord/utils.py +595 -0
- casacloner-1.7.3/discord/voice_client.py +642 -0
- casacloner-1.7.3/discord/webhook.py +1105 -0
- casacloner-1.7.3/discord/widget.py +268 -0
- casacloner-1.7.3/requirements.txt +1 -0
- casacloner-1.7.3/setup.cfg +4 -0
- casacloner-1.7.3/setup.py +77 -0
casacloner-1.7.3/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2015-present Noritem
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a
|
|
6
|
+
copy of this software and associated documentation files (the "Software"),
|
|
7
|
+
to deal in the Software without restriction, including without limitation
|
|
8
|
+
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
9
|
+
and/or sell copies of the Software, and to permit persons to whom the
|
|
10
|
+
Software is furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
16
|
+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
20
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
21
|
+
DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: casacloner
|
|
3
|
+
Version: 1.7.3
|
|
4
|
+
Summary: A Python wrapper for the Discord API
|
|
5
|
+
Home-page: https://casacloner.com
|
|
6
|
+
Author: Noritem
|
|
7
|
+
License: MIT
|
|
8
|
+
Project-URL: Documentation, https://discordpy.readthedocs.io/en/latest/
|
|
9
|
+
Project-URL: Issue tracker, https://casacloner.com/issues
|
|
10
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Natural Language :: English
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.5
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.6
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
19
|
+
Classifier: Topic :: Internet
|
|
20
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
21
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
22
|
+
Classifier: Topic :: Utilities
|
|
23
|
+
Requires-Python: >=3.5.3
|
|
24
|
+
Description-Content-Type: text/x-rst
|
|
25
|
+
License-File: LICENSE
|
|
26
|
+
Requires-Dist: aiohttp<3.8.0,>=3.6.0
|
|
27
|
+
Provides-Extra: voice
|
|
28
|
+
Requires-Dist: PyNaCl<1.5,>=1.3.0; extra == "voice"
|
|
29
|
+
Provides-Extra: docs
|
|
30
|
+
Requires-Dist: sphinx==3.0.3; extra == "docs"
|
|
31
|
+
Requires-Dist: sphinxcontrib_trio==1.1.2; extra == "docs"
|
|
32
|
+
Requires-Dist: sphinxcontrib-websupport; extra == "docs"
|
|
33
|
+
Dynamic: author
|
|
34
|
+
Dynamic: classifier
|
|
35
|
+
Dynamic: description
|
|
36
|
+
Dynamic: description-content-type
|
|
37
|
+
Dynamic: home-page
|
|
38
|
+
Dynamic: license
|
|
39
|
+
Dynamic: license-file
|
|
40
|
+
Dynamic: project-url
|
|
41
|
+
Dynamic: provides-extra
|
|
42
|
+
Dynamic: requires-dist
|
|
43
|
+
Dynamic: requires-python
|
|
44
|
+
Dynamic: summary
|
|
45
|
+
|
|
46
|
+
casacloner
|
|
47
|
+
==========
|
|
48
|
+
|
|
49
|
+
.. image:: https://discord.com/api/guilds/336642139381301249/embed.png
|
|
50
|
+
:target: https://discord.gg/r3sSKJJ
|
|
51
|
+
:alt: Discord server invite
|
|
52
|
+
.. image:: https://img.shields.io/pypi/v/casacloner.svg
|
|
53
|
+
:target: https://pypi.python.org/pypi/casacloner
|
|
54
|
+
:alt: PyPI version info
|
|
55
|
+
.. image:: https://img.shields.io/pypi/pyversions/casacloner.svg
|
|
56
|
+
:target: https://pypi.python.org/pypi/casacloner
|
|
57
|
+
:alt: PyPI supported Python versions
|
|
58
|
+
|
|
59
|
+
A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python.
|
|
60
|
+
|
|
61
|
+
Key Features
|
|
62
|
+
-------------
|
|
63
|
+
|
|
64
|
+
- Modern Pythonic API using ``async`` and ``await``.
|
|
65
|
+
- Proper rate limit handling.
|
|
66
|
+
- 100% coverage of the supported Discord API.
|
|
67
|
+
- Optimised in both speed and memory.
|
|
68
|
+
|
|
69
|
+
Installing
|
|
70
|
+
----------
|
|
71
|
+
|
|
72
|
+
**Python 3.5.3 or higher is required**
|
|
73
|
+
|
|
74
|
+
To install the library without full voice support, you can just run the following command:
|
|
75
|
+
|
|
76
|
+
.. code:: sh
|
|
77
|
+
|
|
78
|
+
# Linux/macOS
|
|
79
|
+
python3 -m pip install -U casacloner
|
|
80
|
+
|
|
81
|
+
# Windows
|
|
82
|
+
py -3 -m pip install -U casacloner
|
|
83
|
+
|
|
84
|
+
Otherwise to get voice support you should run the following command:
|
|
85
|
+
|
|
86
|
+
.. code:: sh
|
|
87
|
+
|
|
88
|
+
# Linux/macOS
|
|
89
|
+
python3 -m pip install -U "casacloner[voice]"
|
|
90
|
+
|
|
91
|
+
# Windows
|
|
92
|
+
py -3 -m pip install -U casacloner[voice]
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
To install the development version, do the following:
|
|
96
|
+
|
|
97
|
+
.. code:: sh
|
|
98
|
+
|
|
99
|
+
$ git clone https://casacloner.com
|
|
100
|
+
$ cd casacloner
|
|
101
|
+
$ python3 -m pip install -U .[voice]
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
Optional Packages
|
|
105
|
+
~~~~~~~~~~~~~~~~~~
|
|
106
|
+
|
|
107
|
+
* PyNaCl (for voice support)
|
|
108
|
+
|
|
109
|
+
Please note that on Linux installing voice you must install the following packages via your favourite package manager (e.g. ``apt``, ``dnf``, etc) before running the above commands:
|
|
110
|
+
|
|
111
|
+
* libffi-dev (or ``libffi-devel`` on some systems)
|
|
112
|
+
* python-dev (e.g. ``python3.6-dev`` for Python 3.6)
|
|
113
|
+
|
|
114
|
+
Quick Example
|
|
115
|
+
--------------
|
|
116
|
+
|
|
117
|
+
.. code:: py
|
|
118
|
+
|
|
119
|
+
import discord
|
|
120
|
+
|
|
121
|
+
class MyClient(discord.Client):
|
|
122
|
+
async def on_ready(self):
|
|
123
|
+
print('Logged on as', self.user)
|
|
124
|
+
|
|
125
|
+
async def on_message(self, message):
|
|
126
|
+
# don't respond to ourselves
|
|
127
|
+
if message.author == self.user:
|
|
128
|
+
return
|
|
129
|
+
|
|
130
|
+
if message.content == 'ping':
|
|
131
|
+
await message.channel.send('pong')
|
|
132
|
+
|
|
133
|
+
client = MyClient()
|
|
134
|
+
client.run('token')
|
|
135
|
+
|
|
136
|
+
Bot Example
|
|
137
|
+
~~~~~~~~~~~~~
|
|
138
|
+
|
|
139
|
+
.. code:: py
|
|
140
|
+
|
|
141
|
+
import discord
|
|
142
|
+
from discord.ext import commands
|
|
143
|
+
|
|
144
|
+
bot = commands.Bot(command_prefix='>')
|
|
145
|
+
|
|
146
|
+
@bot.command()
|
|
147
|
+
async def ping(ctx):
|
|
148
|
+
await ctx.send('pong')
|
|
149
|
+
|
|
150
|
+
bot.run('token')
|
|
151
|
+
|
|
152
|
+
You can find more examples in the examples directory.
|
|
153
|
+
|
|
154
|
+
Links
|
|
155
|
+
------
|
|
156
|
+
|
|
157
|
+
- `Documentation <https://discordpy.readthedocs.io/en/latest/index.html>`_
|
|
158
|
+
- `Official Discord Server <https://discord.gg/r3sSKJJ>`_
|
|
159
|
+
- `Discord API <https://discord.gg/discord-api>`_
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
casacloner
|
|
2
|
+
==========
|
|
3
|
+
|
|
4
|
+
.. image:: https://discord.com/api/guilds/336642139381301249/embed.png
|
|
5
|
+
:target: https://discord.gg/r3sSKJJ
|
|
6
|
+
:alt: Discord server invite
|
|
7
|
+
.. image:: https://img.shields.io/pypi/v/casacloner.svg
|
|
8
|
+
:target: https://pypi.python.org/pypi/casacloner
|
|
9
|
+
:alt: PyPI version info
|
|
10
|
+
.. image:: https://img.shields.io/pypi/pyversions/casacloner.svg
|
|
11
|
+
:target: https://pypi.python.org/pypi/casacloner
|
|
12
|
+
:alt: PyPI supported Python versions
|
|
13
|
+
|
|
14
|
+
A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python.
|
|
15
|
+
|
|
16
|
+
Key Features
|
|
17
|
+
-------------
|
|
18
|
+
|
|
19
|
+
- Modern Pythonic API using ``async`` and ``await``.
|
|
20
|
+
- Proper rate limit handling.
|
|
21
|
+
- 100% coverage of the supported Discord API.
|
|
22
|
+
- Optimised in both speed and memory.
|
|
23
|
+
|
|
24
|
+
Installing
|
|
25
|
+
----------
|
|
26
|
+
|
|
27
|
+
**Python 3.5.3 or higher is required**
|
|
28
|
+
|
|
29
|
+
To install the library without full voice support, you can just run the following command:
|
|
30
|
+
|
|
31
|
+
.. code:: sh
|
|
32
|
+
|
|
33
|
+
# Linux/macOS
|
|
34
|
+
python3 -m pip install -U casacloner
|
|
35
|
+
|
|
36
|
+
# Windows
|
|
37
|
+
py -3 -m pip install -U casacloner
|
|
38
|
+
|
|
39
|
+
Otherwise to get voice support you should run the following command:
|
|
40
|
+
|
|
41
|
+
.. code:: sh
|
|
42
|
+
|
|
43
|
+
# Linux/macOS
|
|
44
|
+
python3 -m pip install -U "casacloner[voice]"
|
|
45
|
+
|
|
46
|
+
# Windows
|
|
47
|
+
py -3 -m pip install -U casacloner[voice]
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
To install the development version, do the following:
|
|
51
|
+
|
|
52
|
+
.. code:: sh
|
|
53
|
+
|
|
54
|
+
$ git clone https://casacloner.com
|
|
55
|
+
$ cd casacloner
|
|
56
|
+
$ python3 -m pip install -U .[voice]
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
Optional Packages
|
|
60
|
+
~~~~~~~~~~~~~~~~~~
|
|
61
|
+
|
|
62
|
+
* PyNaCl (for voice support)
|
|
63
|
+
|
|
64
|
+
Please note that on Linux installing voice you must install the following packages via your favourite package manager (e.g. ``apt``, ``dnf``, etc) before running the above commands:
|
|
65
|
+
|
|
66
|
+
* libffi-dev (or ``libffi-devel`` on some systems)
|
|
67
|
+
* python-dev (e.g. ``python3.6-dev`` for Python 3.6)
|
|
68
|
+
|
|
69
|
+
Quick Example
|
|
70
|
+
--------------
|
|
71
|
+
|
|
72
|
+
.. code:: py
|
|
73
|
+
|
|
74
|
+
import discord
|
|
75
|
+
|
|
76
|
+
class MyClient(discord.Client):
|
|
77
|
+
async def on_ready(self):
|
|
78
|
+
print('Logged on as', self.user)
|
|
79
|
+
|
|
80
|
+
async def on_message(self, message):
|
|
81
|
+
# don't respond to ourselves
|
|
82
|
+
if message.author == self.user:
|
|
83
|
+
return
|
|
84
|
+
|
|
85
|
+
if message.content == 'ping':
|
|
86
|
+
await message.channel.send('pong')
|
|
87
|
+
|
|
88
|
+
client = MyClient()
|
|
89
|
+
client.run('token')
|
|
90
|
+
|
|
91
|
+
Bot Example
|
|
92
|
+
~~~~~~~~~~~~~
|
|
93
|
+
|
|
94
|
+
.. code:: py
|
|
95
|
+
|
|
96
|
+
import discord
|
|
97
|
+
from discord.ext import commands
|
|
98
|
+
|
|
99
|
+
bot = commands.Bot(command_prefix='>')
|
|
100
|
+
|
|
101
|
+
@bot.command()
|
|
102
|
+
async def ping(ctx):
|
|
103
|
+
await ctx.send('pong')
|
|
104
|
+
|
|
105
|
+
bot.run('token')
|
|
106
|
+
|
|
107
|
+
You can find more examples in the examples directory.
|
|
108
|
+
|
|
109
|
+
Links
|
|
110
|
+
------
|
|
111
|
+
|
|
112
|
+
- `Documentation <https://discordpy.readthedocs.io/en/latest/index.html>`_
|
|
113
|
+
- `Official Discord Server <https://discord.gg/r3sSKJJ>`_
|
|
114
|
+
- `Discord API <https://discord.gg/discord-api>`_
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: casacloner
|
|
3
|
+
Version: 1.7.3
|
|
4
|
+
Summary: A Python wrapper for the Discord API
|
|
5
|
+
Home-page: https://casacloner.com
|
|
6
|
+
Author: Noritem
|
|
7
|
+
License: MIT
|
|
8
|
+
Project-URL: Documentation, https://discordpy.readthedocs.io/en/latest/
|
|
9
|
+
Project-URL: Issue tracker, https://casacloner.com/issues
|
|
10
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Natural Language :: English
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.5
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.6
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
19
|
+
Classifier: Topic :: Internet
|
|
20
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
21
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
22
|
+
Classifier: Topic :: Utilities
|
|
23
|
+
Requires-Python: >=3.5.3
|
|
24
|
+
Description-Content-Type: text/x-rst
|
|
25
|
+
License-File: LICENSE
|
|
26
|
+
Requires-Dist: aiohttp<3.8.0,>=3.6.0
|
|
27
|
+
Provides-Extra: voice
|
|
28
|
+
Requires-Dist: PyNaCl<1.5,>=1.3.0; extra == "voice"
|
|
29
|
+
Provides-Extra: docs
|
|
30
|
+
Requires-Dist: sphinx==3.0.3; extra == "docs"
|
|
31
|
+
Requires-Dist: sphinxcontrib_trio==1.1.2; extra == "docs"
|
|
32
|
+
Requires-Dist: sphinxcontrib-websupport; extra == "docs"
|
|
33
|
+
Dynamic: author
|
|
34
|
+
Dynamic: classifier
|
|
35
|
+
Dynamic: description
|
|
36
|
+
Dynamic: description-content-type
|
|
37
|
+
Dynamic: home-page
|
|
38
|
+
Dynamic: license
|
|
39
|
+
Dynamic: license-file
|
|
40
|
+
Dynamic: project-url
|
|
41
|
+
Dynamic: provides-extra
|
|
42
|
+
Dynamic: requires-dist
|
|
43
|
+
Dynamic: requires-python
|
|
44
|
+
Dynamic: summary
|
|
45
|
+
|
|
46
|
+
casacloner
|
|
47
|
+
==========
|
|
48
|
+
|
|
49
|
+
.. image:: https://discord.com/api/guilds/336642139381301249/embed.png
|
|
50
|
+
:target: https://discord.gg/r3sSKJJ
|
|
51
|
+
:alt: Discord server invite
|
|
52
|
+
.. image:: https://img.shields.io/pypi/v/casacloner.svg
|
|
53
|
+
:target: https://pypi.python.org/pypi/casacloner
|
|
54
|
+
:alt: PyPI version info
|
|
55
|
+
.. image:: https://img.shields.io/pypi/pyversions/casacloner.svg
|
|
56
|
+
:target: https://pypi.python.org/pypi/casacloner
|
|
57
|
+
:alt: PyPI supported Python versions
|
|
58
|
+
|
|
59
|
+
A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python.
|
|
60
|
+
|
|
61
|
+
Key Features
|
|
62
|
+
-------------
|
|
63
|
+
|
|
64
|
+
- Modern Pythonic API using ``async`` and ``await``.
|
|
65
|
+
- Proper rate limit handling.
|
|
66
|
+
- 100% coverage of the supported Discord API.
|
|
67
|
+
- Optimised in both speed and memory.
|
|
68
|
+
|
|
69
|
+
Installing
|
|
70
|
+
----------
|
|
71
|
+
|
|
72
|
+
**Python 3.5.3 or higher is required**
|
|
73
|
+
|
|
74
|
+
To install the library without full voice support, you can just run the following command:
|
|
75
|
+
|
|
76
|
+
.. code:: sh
|
|
77
|
+
|
|
78
|
+
# Linux/macOS
|
|
79
|
+
python3 -m pip install -U casacloner
|
|
80
|
+
|
|
81
|
+
# Windows
|
|
82
|
+
py -3 -m pip install -U casacloner
|
|
83
|
+
|
|
84
|
+
Otherwise to get voice support you should run the following command:
|
|
85
|
+
|
|
86
|
+
.. code:: sh
|
|
87
|
+
|
|
88
|
+
# Linux/macOS
|
|
89
|
+
python3 -m pip install -U "casacloner[voice]"
|
|
90
|
+
|
|
91
|
+
# Windows
|
|
92
|
+
py -3 -m pip install -U casacloner[voice]
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
To install the development version, do the following:
|
|
96
|
+
|
|
97
|
+
.. code:: sh
|
|
98
|
+
|
|
99
|
+
$ git clone https://casacloner.com
|
|
100
|
+
$ cd casacloner
|
|
101
|
+
$ python3 -m pip install -U .[voice]
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
Optional Packages
|
|
105
|
+
~~~~~~~~~~~~~~~~~~
|
|
106
|
+
|
|
107
|
+
* PyNaCl (for voice support)
|
|
108
|
+
|
|
109
|
+
Please note that on Linux installing voice you must install the following packages via your favourite package manager (e.g. ``apt``, ``dnf``, etc) before running the above commands:
|
|
110
|
+
|
|
111
|
+
* libffi-dev (or ``libffi-devel`` on some systems)
|
|
112
|
+
* python-dev (e.g. ``python3.6-dev`` for Python 3.6)
|
|
113
|
+
|
|
114
|
+
Quick Example
|
|
115
|
+
--------------
|
|
116
|
+
|
|
117
|
+
.. code:: py
|
|
118
|
+
|
|
119
|
+
import discord
|
|
120
|
+
|
|
121
|
+
class MyClient(discord.Client):
|
|
122
|
+
async def on_ready(self):
|
|
123
|
+
print('Logged on as', self.user)
|
|
124
|
+
|
|
125
|
+
async def on_message(self, message):
|
|
126
|
+
# don't respond to ourselves
|
|
127
|
+
if message.author == self.user:
|
|
128
|
+
return
|
|
129
|
+
|
|
130
|
+
if message.content == 'ping':
|
|
131
|
+
await message.channel.send('pong')
|
|
132
|
+
|
|
133
|
+
client = MyClient()
|
|
134
|
+
client.run('token')
|
|
135
|
+
|
|
136
|
+
Bot Example
|
|
137
|
+
~~~~~~~~~~~~~
|
|
138
|
+
|
|
139
|
+
.. code:: py
|
|
140
|
+
|
|
141
|
+
import discord
|
|
142
|
+
from discord.ext import commands
|
|
143
|
+
|
|
144
|
+
bot = commands.Bot(command_prefix='>')
|
|
145
|
+
|
|
146
|
+
@bot.command()
|
|
147
|
+
async def ping(ctx):
|
|
148
|
+
await ctx.send('pong')
|
|
149
|
+
|
|
150
|
+
bot.run('token')
|
|
151
|
+
|
|
152
|
+
You can find more examples in the examples directory.
|
|
153
|
+
|
|
154
|
+
Links
|
|
155
|
+
------
|
|
156
|
+
|
|
157
|
+
- `Documentation <https://discordpy.readthedocs.io/en/latest/index.html>`_
|
|
158
|
+
- `Official Discord Server <https://discord.gg/r3sSKJJ>`_
|
|
159
|
+
- `Discord API <https://discord.gg/discord-api>`_
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
MANIFEST.in
|
|
3
|
+
README.rst
|
|
4
|
+
requirements.txt
|
|
5
|
+
setup.cfg
|
|
6
|
+
setup.py
|
|
7
|
+
casacloner.egg-info/PKG-INFO
|
|
8
|
+
casacloner.egg-info/SOURCES.txt
|
|
9
|
+
casacloner.egg-info/dependency_links.txt
|
|
10
|
+
casacloner.egg-info/requires.txt
|
|
11
|
+
casacloner.egg-info/top_level.txt
|
|
12
|
+
discord/__init__.py
|
|
13
|
+
discord/__main__.py
|
|
14
|
+
discord/abc.py
|
|
15
|
+
discord/activity.py
|
|
16
|
+
discord/appinfo.py
|
|
17
|
+
discord/asset.py
|
|
18
|
+
discord/audit_logs.py
|
|
19
|
+
discord/automod.py
|
|
20
|
+
discord/backoff.py
|
|
21
|
+
discord/calls.py
|
|
22
|
+
discord/channel.py
|
|
23
|
+
discord/client.py
|
|
24
|
+
discord/colour.py
|
|
25
|
+
discord/context_managers.py
|
|
26
|
+
discord/embeds.py
|
|
27
|
+
discord/emoji.py
|
|
28
|
+
discord/entitlement.py
|
|
29
|
+
discord/enums.py
|
|
30
|
+
discord/errors.py
|
|
31
|
+
discord/file.py
|
|
32
|
+
discord/flags.py
|
|
33
|
+
discord/gateway.py
|
|
34
|
+
discord/guild.py
|
|
35
|
+
discord/http.py
|
|
36
|
+
discord/integrations.py
|
|
37
|
+
discord/invite.py
|
|
38
|
+
discord/iterators.py
|
|
39
|
+
discord/member.py
|
|
40
|
+
discord/mentions.py
|
|
41
|
+
discord/message.py
|
|
42
|
+
discord/mixins.py
|
|
43
|
+
discord/object.py
|
|
44
|
+
discord/oggparse.py
|
|
45
|
+
discord/opus.py
|
|
46
|
+
discord/partial_emoji.py
|
|
47
|
+
discord/permissions.py
|
|
48
|
+
discord/player.py
|
|
49
|
+
discord/poll.py
|
|
50
|
+
discord/raw_models.py
|
|
51
|
+
discord/reaction.py
|
|
52
|
+
discord/relationship.py
|
|
53
|
+
discord/role.py
|
|
54
|
+
discord/scheduled_event.py
|
|
55
|
+
discord/shard.py
|
|
56
|
+
discord/sku.py
|
|
57
|
+
discord/soundboard.py
|
|
58
|
+
discord/stage_instance.py
|
|
59
|
+
discord/state.py
|
|
60
|
+
discord/sticker.py
|
|
61
|
+
discord/team.py
|
|
62
|
+
discord/template.py
|
|
63
|
+
discord/user.py
|
|
64
|
+
discord/utils.py
|
|
65
|
+
discord/voice_client.py
|
|
66
|
+
discord/webhook.py
|
|
67
|
+
discord/widget.py
|
|
68
|
+
discord/bin/libopus-0.x64.dll
|
|
69
|
+
discord/bin/libopus-0.x86.dll
|
|
70
|
+
discord/ext/commands/__init__.py
|
|
71
|
+
discord/ext/commands/_types.py
|
|
72
|
+
discord/ext/commands/bot.py
|
|
73
|
+
discord/ext/commands/cog.py
|
|
74
|
+
discord/ext/commands/context.py
|
|
75
|
+
discord/ext/commands/converter.py
|
|
76
|
+
discord/ext/commands/cooldowns.py
|
|
77
|
+
discord/ext/commands/core.py
|
|
78
|
+
discord/ext/commands/errors.py
|
|
79
|
+
discord/ext/commands/help.py
|
|
80
|
+
discord/ext/commands/view.py
|
|
81
|
+
discord/ext/tasks/__init__.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
discord
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Discord API Wrapper
|
|
5
|
+
~~~~~~~~~~~~~~~~~~~
|
|
6
|
+
|
|
7
|
+
A basic wrapper for the Discord API.
|
|
8
|
+
|
|
9
|
+
:copyright: (c) 2015-present Noritem
|
|
10
|
+
:license: MIT, see LICENSE for more details.
|
|
11
|
+
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
__title__ = 'discord'
|
|
15
|
+
__author__ = 'Noritem'
|
|
16
|
+
__license__ = 'MIT'
|
|
17
|
+
__copyright__ = 'Copyright 2015-present Noritem'
|
|
18
|
+
__version__ = '1.7.3'
|
|
19
|
+
|
|
20
|
+
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
|
|
21
|
+
|
|
22
|
+
from collections import namedtuple
|
|
23
|
+
import logging
|
|
24
|
+
|
|
25
|
+
from .client import Client
|
|
26
|
+
from .appinfo import AppInfo
|
|
27
|
+
from .user import User, ClientUser, Profile
|
|
28
|
+
from .emoji import Emoji
|
|
29
|
+
from .partial_emoji import PartialEmoji
|
|
30
|
+
from .activity import *
|
|
31
|
+
from .channel import *
|
|
32
|
+
from .guild import Guild
|
|
33
|
+
from .flags import *
|
|
34
|
+
from .relationship import Relationship
|
|
35
|
+
from .member import Member, VoiceState
|
|
36
|
+
from .message import *
|
|
37
|
+
from .asset import Asset
|
|
38
|
+
from .errors import *
|
|
39
|
+
from .calls import CallMessage, GroupCall
|
|
40
|
+
from .permissions import Permissions, PermissionOverwrite
|
|
41
|
+
from .role import Role, RoleTags
|
|
42
|
+
from .file import File
|
|
43
|
+
from .colour import Color, Colour
|
|
44
|
+
from .integrations import Integration, IntegrationAccount
|
|
45
|
+
from .invite import Invite, PartialInviteChannel, PartialInviteGuild
|
|
46
|
+
from .template import Template
|
|
47
|
+
from .widget import Widget, WidgetMember, WidgetChannel
|
|
48
|
+
from .object import Object
|
|
49
|
+
from .reaction import Reaction
|
|
50
|
+
from . import utils, opus, abc
|
|
51
|
+
from .enums import *
|
|
52
|
+
from .embeds import Embed
|
|
53
|
+
from .mentions import AllowedMentions
|
|
54
|
+
from .shard import AutoShardedClient, ShardInfo
|
|
55
|
+
from .player import *
|
|
56
|
+
from .webhook import *
|
|
57
|
+
from .voice_client import VoiceClient, VoiceProtocol
|
|
58
|
+
from .audit_logs import AuditLogChanges, AuditLogEntry, AuditLogDiff
|
|
59
|
+
from .raw_models import *
|
|
60
|
+
from .team import *
|
|
61
|
+
from .sticker import Sticker, GuildSticker
|
|
62
|
+
from .stage_instance import StageInstance
|
|
63
|
+
from .soundboard import SoundboardSound
|
|
64
|
+
from .scheduled_event import ScheduledEvent, ScheduledEventUser
|
|
65
|
+
from .automod import AutoModRule, AutoModAction
|
|
66
|
+
from .poll import Poll, PollMedia, PollAnswer, PollResults, PollAnswerCount
|
|
67
|
+
from .sku import SKU
|
|
68
|
+
from .entitlement import Entitlement
|
|
69
|
+
|
|
70
|
+
VersionInfo = namedtuple('VersionInfo', 'major minor micro releaselevel serial')
|
|
71
|
+
|
|
72
|
+
version_info = VersionInfo(major=1, minor=7, micro=3, releaselevel='final', serial=0)
|
|
73
|
+
|
|
74
|
+
logging.getLogger(__name__).addHandler(logging.NullHandler())
|