Skip to content

Commit

Permalink
chore: いくつかのミスを修正 (#197)
Browse files Browse the repository at this point in the history
  • Loading branch information
m1sk9 authored Sep 2, 2024
1 parent 7b74df6 commit 9085fff
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 78 deletions.
2 changes: 1 addition & 1 deletion .github/actions/publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ runs:
- name: Checkout
uses: actions/checkout@v4

- uses: docker/setup-buildx-action@v3.6.1
- uses: docker/setup-buildx-action@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy CommandReference
name: Deploy babyrite docs

on:
push:
Expand Down
1 change: 1 addition & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"recommendations": [
// Rust Language Server (rust-analyzer)
"rust-lang.rust-analyzer"
]
}
8 changes: 4 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"rust-analyzer.linkedProjects": [
"./Cargo.toml"
],
"cSpell.words": [
"Babyrite"
],
"markdown.extension.toc.levels": "2..6"
"rust-analyzer.restartServerOnConfigChange": true,
"editor.defaultFormatter": "rust-lang.rust-analyzer",
"editor.formatOnSave": true,
"rust-analyzer.check.command": "clippy"
}
44 changes: 27 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,44 @@
# babyrite

[![CI](https://github.com/m1sk9/babyrite/actions/workflows/ci.yaml/badge.svg)](https://github.com/m1sk9/babyrite/actions/workflows/ci.yaml)
[![Release babyrite](https://github.com/m1sk9/babyrite/actions/workflows/release.yaml/badge.svg)](https://github.com/m1sk9/babyrite/actions/workflows/release.yaml)
[![Build](https://github.com/m1sk9/babyrite/actions/workflows/ci.yaml/badge.svg)](https://github.com/m1sk9/babyrite/actions/workflows/ci.yaml)
[![Deploy babyrite docs](https://github.com/m1sk9/babyrite/actions/workflows/deploy.yaml/badge.svg)](https://github.com/m1sk9/babyrite/actions/workflows/deploy.yaml)

A citation message Discord bot
**babyrite** is a citation message Discord bot.

![babyrite example](docs/src/public/example.gif)

## Installation

Can get babyrite Docker Image from ghcr.io:

```shell
```sh
# latest version
docker pull ghcr.io/m1sk9/babyrite:latest

# Minor version (v0.x) - recommended
docker pull ghcr.io/m1sk9/babyrite:v0
```

You can start babyrite by providing environment variables for the Docker Image you have obtained.
[*API Support: requires Discord API v10*](https://discord.com/developers/docs/reference#api-versioning)

## Setup and Hosting

babyrite can be hosted using Docker Compose or k8s.

See [official guide](https://babyrite.m1sk9.dev/installation.html) for setup and hosting.

## Details

- babyrite is one of the Quote Bots that expands the message content of a sent message link into an embed.
- There are several such bots in the public, but none of them have been released as OSS. babyrite provides a way to host it yourself as well as to release it as OSS.

<img src="./docs/src/public/using-babyrite.png" alt="Using babyrite" width="70%" >

- babyrite can also extract attached image/GIF files.
- These attached files are sent using Discord's CDN and are not stored on the server side.

See [babyrite docs](https://babyrite.m1sk9.dev) for detailed setup instructions.
<img src="./docs/src/public/attachment.png" alt="babyrite attachment" width="70%" >

## Environment Variables
- In addition to `discord.com`, babyrite supports message links used by a limited number of builds, such as `canary.discord.com` and `ptb.discord.com`.
- *Not supported by `discordapp.com`. See [m1sk9/babyrite#172](https://github.com/m1sk9/babyrite/issues/172) for details.*

The following are environment variables used by babyrite.
## LICENSE

Key whose `Required` column is `Yes` must be specified. If not specified, babyrite will not start correctly.
babyrite is published under [MIT LIcense](./LICENSE).

| Key | Description | Required | Default |
| --- | ----------- | -------- | ------- |
| `DISCORD_API_TOKEN` | Discord API Token | Yes | --- |
<sub>© 2023-2024 m1sk9</sub>
3 changes: 1 addition & 2 deletions docs/src/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
```sh
DISCORD_API_TOKEN=your_discord_api_token
```

3. Copy configuration files:

```sh
Expand All @@ -82,7 +82,6 @@
>
> If you want to use it in binary format, you need to compile it yourself. To compile it, you need to have [Rust](https://www.rust-lang.org/tools/install) installed.


1. Clone the repository:

```sh
Expand Down
3 changes: 2 additions & 1 deletion docs/src/overview.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# babyrite

[![CI](https://github.com/m1sk9/babyrite/actions/workflows/ci.yaml/badge.svg)](https://github.com/m1sk9/babyrite/actions/workflows/ci.yaml)
[![Release babyrite](https://github.com/m1sk9/babyrite/actions/workflows/release.yaml/badge.svg)](https://github.com/m1sk9/babyrite/actions/workflows/release.yaml)
[![Build](https://github.com/m1sk9/babyrite/actions/workflows/ci.yaml/badge.svg)](https://github.com/m1sk9/babyrite/actions/workflows/ci.yaml)
[![Deploy babyrite docs](https://github.com/m1sk9/babyrite/actions/workflows/deploy.yaml/badge.svg)](https://github.com/m1sk9/babyrite/actions/workflows/deploy.yaml)

babyrite is a Discord Bot that can expand a message from a message link into an embed.

Expand Down
Binary file added docs/src/public/attachment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/public/using-babyrite.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
52 changes: 0 additions & 52 deletions rustfmt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ max_width = 100
hard_tabs = false
tab_spaces = 4
newline_style = "Auto"
indent_style = "Block"
use_small_heuristics = "Default"
fn_call_width = 60
attr_fn_like_width = 70
Expand All @@ -12,67 +11,16 @@ array_width = 60
chain_width = 60
single_line_if_else_max_width = 50
single_line_let_else_max_width = 50
wrap_comments = false
format_code_in_doc_comments = false
doc_comment_code_block_width = 100
comment_width = 80
normalize_comments = false
normalize_doc_attributes = false
format_strings = false
format_macro_matchers = false
format_macro_bodies = true
skip_macro_invocations = []
hex_literal_case = "Preserve"
empty_item_single_line = true
struct_lit_single_line = true
fn_single_line = false
where_single_line = false
imports_indent = "Block"
imports_layout = "Mixed"
imports_granularity = "Preserve"
group_imports = "Preserve"
reorder_imports = true
reorder_modules = true
reorder_impl_items = false
type_punctuation_density = "Wide"
space_before_colon = false
space_after_colon = true
spaces_around_ranges = false
binop_separator = "Front"
remove_nested_parens = true
combine_control_expr = true
short_array_element_width_threshold = 10
overflow_delimited_expr = false
struct_field_align_threshold = 0
enum_discrim_align_threshold = 0
match_arm_blocks = true
match_arm_leading_pipes = "Never"
force_multiline_blocks = false
fn_params_layout = "Tall"
brace_style = "SameLineWhere"
control_brace_style = "AlwaysSameLine"
trailing_semicolon = true
trailing_comma = "Vertical"
match_block_trailing_comma = false
blank_lines_upper_bound = 1
blank_lines_lower_bound = 0
edition = "2015"
version = "One"
inline_attribute_width = 0
format_generated_files = true
merge_derives = true
use_try_shorthand = false
use_field_init_shorthand = false
force_explicit_abi = true
condense_wildcard_suffixes = false
color = "Auto"
required_version = "1.7.0"
unstable_features = false
disable_all_formatting = false
skip_children = false
hide_parse_errors = false
error_on_line_overflow = false
error_on_unformatted = false
ignore = []
emit_mode = "Files"
make_backup = false

0 comments on commit 9085fff

Please sign in to comment.