Extra tools for discord.py developers
Project description
Discord Plus
This library is additional tools for python discord developers where they can reduce the effort they need to develop a bot.
This library contains tools, database and pre-made commands and events.
Note: This is still under development, But it is usable.
How to install
To install just use following command
pip install discordplus
This library will have dev/beta builds on the github, to install them you can use
pip install --upgrade git+https://github.com/Ashengaurd/DiscordPlus.git
By installing this library following libraries and their dependencies will be installed too.
Discord.py
Flask - Used for web API
Requests - Used for posting data on top.gg
Json & Yaml - Used as Not SQL Database managers
Simple Examples
BotPlus
extended class of Bot
Premessage
a message ready to be sent
from discordplus import BotPlus, PreMessage bot = BotPlus('!', log_channel_id=1234567890) ## Library which has several useful cogs and listeners and you can activate them bot.library.activate_prefix_send_on_ping() bot.library.activate_api(__name__, host='0.0.0.0', port=8080, vote_auth='It is valid') bot.library.activate_topgg_poster('TopGGLongAPITokenWhichYouNeverShareWithAnyIndividual') ## Load all extensions recursive bot.load_extensions('./cogs', './cogs_part_2') ## Vote event @bot.event async def vote(data): premessage = PreMessage(f'User {data["user"]} has voted!') await bot.log(premessage) ## Anything else you will do with a simple bot including run it :)
CogPlus
extended class of Cog with tags
from discordplus import CogPlus, BotPlus @CogPlus.beta class beta_cog(CogPlus): """A Beta cog which will be loaded""" pass @CogPlus.beta @CogPlus.disabled class disabled_beta_cog(CogPlus): """A Disabled Beta cog which will not be loaded""" pass @CogPlus.disabled class disabled_cog(CogPlus): """A Disabled cog which will not be loaded""" pass class cog(CogPlus): """A normal cog which will be loaded""" pass def setup(bot: BotPlus): bot.add_cog(beta_cog()) # Will warn and load bot.add_cog(disabled_cog()) # Will warn and skip bot.add_cog(disabled_beta_cog()) # Will warn and skip bot.add_cog(cog()) # Just loads ;)
Emoji library with all emojis in discord:
from discordplus.emotes import * ... async def bar(channel): await channel.send(People.get('smile')) # All categories of discord official emojis await channel.send(Emotes.grinning) # Emotes contains all useful emojis as variables for easier access await channel.send(Emotes.numbers[1]) # All 10 emojis of numbers accessible await channel.send(Emotes.letters['a']) # All 26 emojis of letters accessible
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for discordplus-1.4.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71cad3992ba3a52c3af96be900a86985c10ae42bb1195e4df6449e5092360960 |
|
MD5 | 7892a3a3a1f31daad010b2bec04cbe4c |
|
BLAKE2-256 | e8ed703583eb24a1c7fe54c46ef10b0dbfab9c4bc337e9b64dd67bf0fe9f9008 |