A helper module for discord.py
Project description
discord-helpers
A helper module for discord.py
Made by Clone#4457 on Discord
Current Features (v0.0.2)
- Per server custom prefixes using SQLite3
- Chatbot coroutine to get a reply from an AI (The Random Stuff API)
- A cycling status for your bot
- A coroutine to find a webhook from a channel and send a message via it
- Coroutines for using the GET and POST methods easily
Some Examples
Prefixes
from discord.ext import commands, helpers
bot = commands.Bot(command_prefix = helpers.Prefixes.custom_prefix("data.db", "!"))
@bot.event
async def on_message(message):
if client.user == message.mentions[0]:
await helpers.Prefixes.reply_with_prefix(bot, message)
@bot.command()
async def change_prefix(ctx, ,*, prefix):
await helpers.Prefixes.change_prefix("data.db", ctx.guild.id, prefix)
Chatbot
@bot.event
async def on_message(message):
if message.channel.id == my_chatbot_channel_id:
response = await helpers.chatbot(message.content, api_key=my_api_key)
await message.reply(response)
Webhooks
@bot.command()
async def send_webhook(ctx, *, text):
await helper.Webhooks.find_and_send(text, channel=ctx.channel, webhook_name="Test")
Status
bot.status = helpers.Status("status 1", "status 2")
@tasks.loop(seconds=12)
async def change_status():
await bot.change_presence(activity=discord.Game(bot.status.next()))
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
discord-helpers-0.0.2.tar.gz
(4.6 kB
view hashes)
Built Distribution
Close
Hashes for discord_helpers-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d8b193a747e6026bf4ed9bf397c498d134de28ffe8264e07d8c64c021680281 |
|
MD5 | dc0bf4422fc139a3d4988b9edbca2e42 |
|
BLAKE2b-256 | 32f3429665f6fa7142921769db7ebebce746afd553463614d6b8e65ed0c129d3 |