discord.py extension that adds reaction commands
Project description
Reaction Commands Extension
Extension to discord.py Bot that adds reaction based commands.
I'll finish this eventually and document it somewhere maybe.
# install with pip
python3 -m pip install ext-reactions
# or windows
py -3 -m pip install ext-reactions
# developement install
python3 -m pip install -U git+https://github.com/z03h/ext-reactions@master
# or windows
py -3 -m pip install -U git+https://github.com/z03h/ext-reactions@master
Example code
import asyncio
import discord
from discord.ext import commands, reactioncommands
intents = discord.Intents.default()
intents.members = True
bot = reactioncommands.ReactionBot(command_prefix='!',
command_emoji='🤔',
listening_emoji='👀',
intents=intents)
@bot.reaction_command('🏓')
async def ping(ctx):
await ctx.send('Pong!')
with open('definitely-not-my-token', 'r') as f:
token = f.read()
bot.run(token)
Why would you use this?
You wouldn't, but you can use/subclass ReactionBot
and it should behave
like a normal ext.commands.Bot
.
You can make Bot commands without message intent, so it has that going for it
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for ext_reactions-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16dfc03fdb07dbeb95ddf37deb0aaf7ff2e6cbd7e1017cd509231283f6b44206 |
|
MD5 | 3a0c77a2b899cc02a9c7be13bb1b702a |
|
BLAKE2b-256 | 6fc288e8a9584a5174fc783b38916a297837dc721653641f3cab58d6f2a13dab |