8062ba36c6
* separate dir * lint * config * log unhandled exceptions * refactor * refactor webhook check * cogs cannnot be loaded from another dir * fix * fix * use logger.exception * Update README.md * Update README.md * fix * Update README.md * Create README.md * rm basedir * cogs * Update README.md * bold
31 lines
1.1 KiB
Markdown
31 lines
1.1 KiB
Markdown
## Installation
|
|
|
|
`pip install -r requirements.txt`
|
|
|
|
## Usage
|
|
|
|
* Run `main.py` to generate `config.json`
|
|
|
|
* Edit `config.json`:
|
|
|
|
```
|
|
{
|
|
"homeserver": "https://matrix.org",
|
|
"username": "@name:matrix.org",
|
|
"password": "my-secret-password", # Matrix password.
|
|
"token": "my-secret-token", # Discord bot token.
|
|
"discord_cmd_prefix": "my-command-prefix",
|
|
"bridge": {
|
|
"channel_id": "room_id",
|
|
"channel_id2": "room_id2", # Bridge multiple rooms.
|
|
},
|
|
}
|
|
```
|
|
|
|
This bridge does not use databases for keeping track of bridged rooms to avoid a dependency on persistent storage. This makes it easy to host on something like Heroku with the free tier.
|
|
|
|
* Logs are saved to the `bridge.log` file in `$PWD`.
|
|
|
|
* Normal Discord bot functionality like commands can be added to the bot via [cogs](https://discordpy.readthedocs.io/en/latest/ext/commands/cogs.html), example [here](https://gist.github.com/EvieePy/d78c061a4798ae81be9825468fe146be).
|
|
|
|
NOTE: [Privileged Intents](https://discordpy.readthedocs.io/en/latest/intents.html#privileged-intents) must be enabled for your Discord bot.
|