No project description provided
Project description
discord-interactions-flask
A Flask extension to support interacting with Discord Interactions.
Check out the quickstart or the examples directory for an idea of how to use it.
import os
from flask import Flask
from discord_interactions_flask import Discord
from discord_interactions_flask import helpers
from discord_interactions_flask.interactions ChatInteraction
app = Flask(__name__)
app.config['DISCORD_PUBLIC_KEY'] = os.environ['DISCORD_PUBLIC_KEY']
app.config['DISCORD_CLIENT_ID'] = os.environ['DISCORD_CLIENT_ID']
app.config['DISCORD_CLIENT_SECRET'] = os.environ['DISCORD_CLIENT_SECRET']
discord = Discord()
@discord.command("slash-example")
def chat_command(interaction: ChatInteraction) -> types.InteractionResponse:
return helpers.content_response("Hello, World!")
chat_command.description = "Say hello via a slash command"
discord.init_app(app)
Project details
Release history Release notifications | RSS feed
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
Close
Hashes for discord-interactions-flask-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0c049bc9f31098041aec7e2e0e1dbe47bd98371abc94686dd7abefdc6b7edd8 |
|
MD5 | 19176555a999e71f205df21a54004e8c |
|
BLAKE2b-256 | f628d351e3111c041649e2407e8c0c458583a469fc20686ff19a33849ee31c4a |
Close
Hashes for discord_interactions_flask-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8018cbadd680836eb83bea98f8b4062ed46ddd00a6123d241f452015affe40d1 |
|
MD5 | fa00d5ce1da43975fb68f62ffee50cf9 |
|
BLAKE2b-256 | 8239db06d973cc444f6e35cb23339acb539dbdbf891cf62154a8a3d9757cd11d |