Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

discord-interactions-flask-0.1.1.tar.gz (16.7 kB view details)

Uploaded Source

Built Distribution

discord_interactions_flask-0.1.1-py3-none-any.whl (19.8 kB view details)

Uploaded Python 3

File details

Details for the file discord-interactions-flask-0.1.1.tar.gz.

File metadata

  • Download URL: discord-interactions-flask-0.1.1.tar.gz
  • Upload date:
  • Size: 16.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.5 Linux/5.18.12-arch1-1

File hashes

Hashes for discord-interactions-flask-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b0c049bc9f31098041aec7e2e0e1dbe47bd98371abc94686dd7abefdc6b7edd8
MD5 19176555a999e71f205df21a54004e8c
BLAKE2b-256 f628d351e3111c041649e2407e8c0c458583a469fc20686ff19a33849ee31c4a

See more details on using hashes here.

File details

Details for the file discord_interactions_flask-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for discord_interactions_flask-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8018cbadd680836eb83bea98f8b4062ed46ddd00a6123d241f452015affe40d1
MD5 fa00d5ce1da43975fb68f62ffee50cf9
BLAKE2b-256 8239db06d973cc444f6e35cb23339acb539dbdbf891cf62154a8a3d9757cd11d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page