Skip to content

Commit

Permalink
Add static movelist files for testing json_directory service
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhijeetKrishnan committed Feb 16, 2024
1 parent d5ae240 commit bc60f61
Show file tree
Hide file tree
Showing 34 changed files with 73,536 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
**/**/config.json
json_movelist/
*.json
!**/static/**

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,18 @@ python3 -m pip install -r requirements.txt
```
### Config

The Heihachi bot is configured using the `src/resources/config.json` file. A sample file is provided in `src/resources/config.sample.json`. You should copy this file to `src/resources/config.json` and fill in the required fields.
The Heihachi bot is configured using a `config.json` file. A sample file is provided in `static/config.sample.json`.

```json
{
"DISCORD_TOKEN": "YOUR_DISCORD_TOKEN",
"FEEDBACK_CHANNEL_ID": "feedback_channel_id",
"ACTION_CHANNEL_ID": "action_channel_id"
"ACTION_CHANNEL_ID": "action_channel_id",
"BLACKLIST": ["user1", "user2"],
"ID_BLACKLIST": [0, 1]
}
```
You can obtain your own Discord token by creating a Discord bot ([instructions](https://github.com/reactiflux/discord-irc/wiki/Creating-a-discord-bot-&-getting-a-token)).
You can obtain your own Discord token by creating a Discord bot ([instructions](https://discordpy.readthedocs.io/en/stable/discord.html)).

The `FEEDBACK_CHANNEL_ID` is the channel where the bot will send feedback messages. The bot supports the slash command `/fd feedback <message>` to allow users to provide feedback on the bot's operation or frame data, and have the bot repost it in a dedicated channel for easier tracking.

Expand All @@ -34,14 +36,16 @@ The `ACTION_CHANNEL_ID` is the channel where the bot will send "actioned" messag

Channel IDs can be obtained by right-clicking on a channel and selecting "Copy Channel ID" at the very bottom.

### Running the bot
_The bot must have permission to read and send messages in the feedback and action channels._

The `BLACKLIST` and `ID_BLACKLIST` are lists of user IDs and channel IDs respectively, who are not allowed to use the bot. This is useful for blacklisting users who abuse the bot or are otherwise not welcome.

The executable is `src/main.py`. Don't forget to put this project into your `PYTHONPATH`!
### Running the bot

Execute the below command from the project's root directory -

```bash
PYTHONPATH=. python3 src/main.py
python3 src/main.py path/to/config.json --export_dir path/to/export/dir
```

## Commands
Expand Down
Loading

0 comments on commit bc60f61

Please sign in to comment.