Metadata-Version: 2.1
Name: discord-bridge
Version: 1.0.0a2
Summary: HTTP bridge for the Discord API
Home-page: https://gitlab.com/ErikKalkoken/discord-bridge
Author: Erik Kalkoken
Author-email: kalkoken87@gmail.com
License: MIT
Description: # discord-bridge
        
        > **THIS IS WORK-IN-PROGRESS** - Not released for production use yet
        
        HTTP bridge for the Discord API
        
        [![release](https://img.shields.io/pypi/v/discord-bridge?label=release)](https://pypi.org/project/discord-bridge/)
        [![python](https://img.shields.io/pypi/pyversions/discord-bridge)](https://pypi.org/project/discord-bridge/)
        [![pipeline](https://gitlab.com/ErikKalkoken/discord-bridge/badges/master/pipeline.svg)](https://gitlab.com/ErikKalkoken/discord-bridge/-/pipelines)
        [![coverage report](https://gitlab.com/ErikKalkoken/discord-bridge/badges/master/coverage.svg)](https://gitlab.com/ErikKalkoken/discord-bridge/-/commits/master)
        [![license](https://img.shields.io/badge/license-MIT-green)](https://gitlab.com/ErikKalkoken/discord-bridge/-/blob/master/LICENSE)
        [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
        [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
        [![chat](https://img.shields.io/discord/790364535294132234)](https://discord.gg/zmh52wnfvM)
        
        ## Contents
        
        - [Overview](#overview)
        - [Features](#key-features)
        - [Examples](#examples)
        - [Installation](#installation)
        - [Updating](#updating)
        - [Server configuration](#server-configuration)
        - [Change Log](CHANGELOG.md)
        
        ## Overview
        
        The current Discord API provides a way to send direct messages to users via Websockets.
        
        However, some applications do not directly support Websockets, which makes it difficult to implement a feature for sending direct messages. For example many Django sites only directly support the HTTP protocol.
        
        Django Bridge solves this problem by allowing applications to send direct messages to Discord users with an HTTP API. This is accomplished by providing two main components:
        
        - server: A micro server that talks to Discord via Websockets and exposes features like sending a direct message through a HTTP API
        - client: A client library, which provides easy access to the HTTP API through a wrapper class
        
        ## Features
        
        - HTTP API for sending direct messages to users and guild channels
        - Client class for easy access to the HTTP API
        - Micro server is fully configurable and has logging
        - Solid test coverage
        
        ## Examples
        
        Here is an example that shows how simple it is to send a direct message to a Discord user with the provided client library.
        
        ```python
        from discord_web_bridge.client import WebClient
        
        client = WebClient()
        client.send_direct_message(user_id=1234, content="Hello there!")
        ```
        
        ## Installation
        
        tbd
        
        ## Updating
        
        tbd
        
        ## Server configuration
        
        The server is supposed to run via supervisor and can be configured with the below arguments. It comes with sensible defaults and will in most cases only need the Discord bot token to operate. The bot token can be provided with argument or environment variable.
        
        ```text
        usage: server.py [-h] [--token TOKEN] [--host HOST] [--port PORT]
                         [--log-level {INFO,WARN,ERROR,CRITICAL}]
                         [--log-file-path LOG_FILE_PATH] [--version]
        
        Server with HTTP API for sending messages to Discord
        
        optional arguments:
          -h, --help            show this help message and exit
          --token TOKEN         Discord bot token. Can alternatively be specified as
                                environment variable DISCORD_BOT_TOKEN. (default:
                                None)
          --host HOST           server host address (default: 127.0.0.1)
          --port PORT           server port (default: 9100)
          --log-level {INFO,WARN,ERROR,CRITICAL}
                                Log level of log file (default: INFO)
          --log-file-path LOG_FILE_PATH
                                Path for storing the log file. If no path if provided,
                                the log file will be stored in the current working
                                folder (default: None)
          --version             show the program version and exit
        ```
        
Platform: UNKNOWN
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Requires-Python: ~=3.6
Description-Content-Type: text/markdown
