boticordpy/README.md

87 lines
2.2 KiB
Markdown
Raw Normal View History

2022-02-17 19:14:39 +03:00
<p align="center">
2022-02-17 19:15:21 +03:00
<img width="520" src="https://media.discordapp.net/attachments/929108234709639208/943873379809787964/boticordpylogo.png" alt="">
2022-02-17 19:14:39 +03:00
</p>
2021-08-24 21:20:10 +03:00
2022-02-17 19:14:39 +03:00
<p align="center">
<b>
2022-02-26 10:09:26 +03:00
The easiest way to use BotiCord API in Python.
2022-02-17 19:14:39 +03:00
<span> · </span>
<a href="https://py.boticord.top/">Docs</a>
</b>
</p>
<p align="center">
<a href="https://pypi.org/project/boticordpy/"><img src="https://img.shields.io/pypi/dm/boticordpy?style=flat-square" alt=""></a>
<a href="https://pypi.org/project/boticordpy/"><img src="https://img.shields.io/pypi/v/boticordpy?style=flat-square" alt=""></a>
<a href="https://py.boticord.top/"><img src="https://img.shields.io/readthedocs/boticordpy?style=flat-square" alt=""></a>
</p>
<h2>Features</h2>
2022-02-17 19:16:17 +03:00
2022-02-17 19:14:39 +03:00
* Object-oriented
2022-02-26 10:09:26 +03:00
* Full BotiCord API Coverage
2022-02-17 19:14:39 +03:00
* Modern Pythonic API using `async`/`await` syntax
2022-02-26 10:09:26 +03:00
* BotiCord Webhooks
2022-02-17 19:14:39 +03:00
* It is not necessary to use any particular library to interact with the Discord API.
<h2>Installation</h2>
<b>Python 3.6 or newer is required.</b>
Enter one of these commands to install the library:
```
2022-02-26 10:09:26 +03:00
pip install boticordpy
2022-02-17 19:14:39 +03:00
```
```
2022-02-26 10:09:26 +03:00
python3 -m pip install boticordpy
2022-02-17 19:14:39 +03:00
```
Or just clone the repo: https://github.com/boticord/boticordpy
<h2>Examples</h2>
You can find other examples in an examples folder.
**Discord.py Autopost example**
```py
2022-02-26 10:09:26 +03:00
from discord.ext import commands
2022-02-17 19:14:39 +03:00
2022-02-26 10:09:26 +03:00
from boticordpy import BoticordClient
2022-02-17 19:14:39 +03:00
2022-02-26 10:09:26 +03:00
bot = commands.Bot(command_prefix="!")
2022-02-17 19:14:39 +03:00
2022-02-26 10:09:26 +03:00
async def get_stats():
return {"servers": len(bot.guilds), "shards": 0, "users": len(bot.users)}
2022-02-17 19:14:39 +03:00
2022-02-26 10:09:26 +03:00
async def on_success_posting():
print("stats posting successfully")
2022-02-17 19:14:39 +03:00
2022-02-26 10:09:26 +03:00
boticord_client = BoticordClient("your_api_token")
autopost = (
boticord_client.autopost()
.init_stats(get_stats)
.on_success(on_success_posting)
.start()
)
2022-02-17 19:14:39 +03:00
2022-02-26 10:09:26 +03:00
bot.run("bot token")
2022-02-17 19:14:39 +03:00
```
<h2>Links</h2>
* [PyPi](https://pypi.org/project/boticordpy)
* [Documentation](https://py.boticord.top)
* [Github](https://github.com/boticord/boticordpy)
2022-02-26 10:09:26 +03:00
* [BotiCord](https://boticord.top/)
2022-02-18 18:58:18 +03:00
* [Support](https://boticord.top/discord)
2022-02-17 19:14:39 +03:00
<h2>Help</h2>
2022-02-26 10:09:26 +03:00
If You need any help we recommend you to check the documentation. You can find us [here](https://bcord.cc/support). Main developer is **[Marakarka](https://boticord.top/profile/585766846268047370)**