Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
2e0d9a2
Refactor file structure
Lapis256 Aug 1, 2024
b46cfed
Add message cache
Lapis256 Oct 17, 2024
df9914b
Add message edit/delete log
Lapis256 Oct 18, 2024
8c5561d
React when authenticated
Lapis256 Nov 2, 2024
778cbcf
Update workflow
Lapis256 Nov 2, 2024
814e870
.envから設定ファイルに以降
Lapis256 Nov 6, 2024
c3978b9
スレッドの開始時にメッセージを送信する機能を追加
Lapis256 Nov 6, 2024
a42a311
コンフィグのチェック機能を追加
Lapis256 Nov 11, 2024
6fa15cf
Fix #2
Lapis256 Dec 10, 2024
ea78279
Fix #1
Lapis256 Dec 10, 2024
df43993
Fix #3
Lapis256 Dec 10, 2024
0704e12
転送と返信を区別するように
Lapis256 Dec 12, 2024
2bb7227
Fix #4
Lapis256 Dec 12, 2024
d03bf34
スレッドの開始時に二度初期メッセージが送られるバグを修正
Lapis256 Dec 12, 2024
889297b
初期メッセージの投稿を待つように変更
Lapis256 Dec 16, 2024
30d49bd
スレッド主がピン留めできる機能を追加
Lapis256 Dec 19, 2024
1f37a2a
ピン留めをDMから実行できないように
Lapis256 Dec 19, 2024
2b55a50
合言葉をスラッシュコマンド化
Lapis256 Dec 19, 2024
125f61c
コンフィグの再読み込みを行うコマンドを追加
Lapis256 Dec 20, 2024
adccd27
合言葉にダミーのオートコンプリートを追加
Lapis256 Dec 20, 2024
342aaad
質問スレッドを作成する機能を追加
Lapis256 Dec 21, 2024
bd0f9a2
質問作成時にハングする事がある問題を修正
Lapis256 Dec 21, 2024
ef2ceb9
モーダルのタイトルを設定
Lapis256 Dec 21, 2024
87a6acd
オーナ専用コマンドを一般ユーザが実行した際のエラーを日本語化
Lapis256 Dec 21, 2024
11f9f9c
thread_create での初期メッセージ送信を待つ処理を関数化
Lapis256 Dec 21, 2024
cd9e598
スレッドの自動招待を実装
Lapis256 Dec 21, 2024
0df5908
コマンドのクールダウンメッセージを日本語化
Lapis256 Dec 21, 2024
7e904b1
dm_onlyに対応させるため、poiseをアップデート
Lapis256 Dec 21, 2024
da75749
コマンド実行時にロールの有無をチェックするように
Lapis256 Dec 21, 2024
d0ff071
質問スレッドでもピン留めコマンドが利用できるように
Lapis256 Dec 26, 2024
a21c5e8
過去メッセージのキャッシュ機能をスレッドに対応させる
Lapis256 Feb 12, 2025
b679237
合言葉の入力をモーダルで行うように
Lapis256 Feb 12, 2025
be2576f
自動キック機能を追加
Lapis256 Feb 13, 2025
72d9dec
toml のフォーマット設定を整える
Lapis256 Feb 13, 2025
ddedb5e
ピン留めコマンドを改良
Lapis256 Feb 14, 2025
4d1f221
キャッシュ取得の並列化をやめる
Lapis256 Feb 14, 2025
8c8201e
DMが送信されない問題を修正
Lapis256 Feb 14, 2025
fb0a4c0
メモリ使用量をアクティビティに表示するように
Lapis256 Feb 14, 2025
02ce304
キャッシュ取得を再度並列化
Lapis256 Feb 14, 2025
8576e84
invite_thread コマンドを追加
Lapis256 Feb 14, 2025
0d1295c
bump version
Lapis256 Feb 14, 2025
8e97357
Actions でのビルドにMold を使うように
Lapis256 Feb 14, 2025
598ed49
invite_thread が失敗したと表示される問題を修正
Lapis256 Feb 14, 2025
296ac7b
オーバーフローでクラッシュする問題を修正
Lapis256 Mar 7, 2025
258d298
bump version
Lapis256 Mar 7, 2025
2334cdb
エディションを2024に更新
Lapis256 Mar 7, 2025
fa1a79b
スレッドの招待機能を公開スレッドのみに限定する
Lapis256 Mar 7, 2025
acd86bb
bump version
Lapis256 Mar 7, 2025
46dc918
スレッドの自動招待がDiscordのロールあたりの制限を回避するように変更する
Lapis256 Apr 13, 2025
afbd742
Create LICENSE (#7)
Lapis256 May 5, 2025
47b10e8
メンバーが抜けたときにロールキャッシュを更新するように
Lapis256 Jun 1, 2025
1e4bd83
更新
Lapis256 Jun 1, 2025
b5e520d
Merge branch 'main' of github.com:Valine3gDev/valine_bot
Lapis256 Jun 1, 2025
53ecc45
コンテナイメージを作成するように (#12)
Lapis256 Jun 1, 2025
b8f432e
ベースイメージをDistrolessに変更
Lapis256 Jun 1, 2025
058708c
CMDをENTRYPOINTに変更
Lapis256 Jun 1, 2025
4dd565e
chore: Rust を更新
Lapis256 May 3, 2026
f4f7f53
chore: 依存ライブラリを更新
Lapis256 May 3, 2026
bf0d6e7
chore(ci): コミット毎ビルドを追加
Lapis256 May 3, 2026
e8b2d19
chore(ci): リリースワークフローの依存関係を更新
Lapis256 May 3, 2026
d822480
chore(ci): リリースにライセンス通知を追加
Lapis256 May 3, 2026
91cb7c9
chore(ci): Rustキャッシュの設定を追加
Lapis256 May 3, 2026
60a5661
refactor: 独自メンバーキャッシュを Serenity cache に置き換え
Lapis256 May 3, 2026
c8f9d6c
refactor: 招待ロール選択に HTTP API のロール人数を使う
Lapis256 May 3, 2026
9c3891b
chore: 不要な into_iter 呼び出しを削除
Lapis256 May 3, 2026
c02bc2d
fix(docker): バイナリ成果物のコピー対象を明確化
Lapis256 May 4, 2026
18a0936
chore: bump version
Lapis256 May 4, 2026
16679ee
chore(deploy): Podman Quadlet のデプロイ定義を追加
Lapis256 May 4, 2026
89ce081
fix(deploy): Quadlet の本番運用手順を修正
Lapis256 May 4, 2026
2b213b9
fix: ゲートウェイの再接続後にアクティビティが更新できない問題を修正
Lapis256 May 26, 2026
59fe27b
feat: 質問内容の項目を変更する
Lapis256 May 26, 2026
ce745ea
chore: bump version
Lapis256 May 26, 2026
9d37a03
feat: メッセージログを改善
Lapis256 Jun 12, 2026
57390b0
feat: ハニーポットを実装
Lapis256 Jun 12, 2026
91be0b0
chore: bump version
Lapis256 Jun 12, 2026
102264c
chore(ci): キャッシュを修正
Lapis256 Jun 12, 2026
7720300
chore: bump version
Lapis256 Jun 12, 2026
780a42c
chore: next ブランチに変更
Lapis256 Jun 12, 2026
fcde0e7
chore: SerenityとPoiseの依存バージョンを固定
Lapis256 Jun 12, 2026
217329c
refactor: イベント処理基盤を再構成
Lapis256 Jun 12, 2026
33a7466
refactor: app ディレクトリに移動
Lapis256 Jun 12, 2026
263eaa6
refactor: AppConfig を更新可能にする
Lapis256 Jun 12, 2026
bd4cdf2
refactor: reload_config を再実装
Lapis256 Jun 12, 2026
7caa62c
chore: rust toolchain を更新
Lapis256 Jun 12, 2026
7a0ec0b
chore: sysinfo を更新
Lapis256 Jun 12, 2026
2929f66
refactor: ハニーポットを再実装
Lapis256 Jun 12, 2026
f1e99c4
refactor: 自動 Kick を再実装
Lapis256 Jun 13, 2026
9a1d4de
feat!: スレッド作成時のメッセージ自動送信を削除
Lapis256 Jun 13, 2026
2fc3509
refactor: ピン留めコマンドを再実装
Lapis256 Jun 13, 2026
457634c
refactor: 合言葉の入力機能を再実装
Lapis256 Jun 13, 2026
086a95f
refactor: 書き方を微調整
Lapis256 Jun 13, 2026
fb7d344
chore: マクロクレートにライセンスを設定
Lapis256 Jun 13, 2026
bc57156
feat!: 合言葉の判定で正規表現を使わないようにする
Lapis256 Jun 13, 2026
65431b6
refactor: 合言葉認証のログを改善
Lapis256 Jun 13, 2026
2ae4a19
refactor: 編集・削除ログの再実装
Lapis256 Jun 14, 2026
ccf71b8
refactor!: 独自のメッセージキャッシュ削除
Lapis256 Jun 14, 2026
31ae77e
feat: 解決済みの質問スレッド名の先頭を変更できるように
Lapis256 Jun 14, 2026
ab0786d
chore: bump version
Lapis256 Jun 14, 2026
78c54c3
Merge branch 'main' into dev/serenity_next
Lapis256 Jun 14, 2026
cb8afd2
refactor: スレッド自動正体の再実装
Lapis256 Jun 14, 2026
e529e57
refactor: 質問機能を再実装
Lapis256 Jun 14, 2026
549b82e
feat: プレフィックスコマンドを無効化
Lapis256 Jun 14, 2026
9f69027
chore: clippy に従う
Lapis256 Jun 14, 2026
2282248
refactor: BotDataExt に変更
Lapis256 Jun 14, 2026
d06d744
refactor: スレッド作成時に初期メッセージを待機するのをやめる
Lapis256 Jun 14, 2026
63be492
refactor: メンバー一覧の取得を共通化
Lapis256 Jun 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .env.example

This file was deleted.

98 changes: 98 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: Build

permissions:
contents: write
packages: write

on:
push:
tags-ignore:
- "**"
branches:
- "**"
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

defaults:
run:
shell: bash

jobs:
build:
name: Release binary
strategy:
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
glibc: 2.17
- os: ubuntu-latest
target: aarch64-unknown-linux-gnu
glibc: 2.17

runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0

# Rustのpackage名を取得して環境変数に入れておく。(後のステップで使用)
- name: Extract crate information
shell: bash
run: |
echo "PROJECT_NAME=$(sed -n 's/^name = "\(.*\)"/\1/p' Cargo.toml | head -n1)" >> $GITHUB_ENV

# zigをインストール
- name: Install Zig
uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2.2.1

# rustをインストール
- name: Install Rust toolchain
uses: moonrepo/setup-rust@abb2d32350334249b178c401e5ec5836e0cd88d3 # v1.3.0
with:
cache-target: release
cache-extra-identifier: ${{ matrix.target }}
targets: ${{ matrix.target }}
bins: cargo-zigbuild,cargo-about
env:
GITHUB_TOKEN: ${{ github.token }}

# moldをインストール
- uses: rui314/setup-mold@9c9c13bf4c3f1adef0cc596abc155580bcb04444 # v1

# ビルド
- name: Build with glibc version
if: matrix.glibc != -1
run: |
cargo zigbuild --release --target ${{ matrix.target }}.${{ matrix.glibc }}

- name: Build without glibc version
if: matrix.glibc == -1
run: |
cargo build --release --target ${{ matrix.target }}

# ビルド済みバイナリをコピーしてリネーム
- name: Copy and rename artifacts
shell: bash
run: |
mkdir -p dist
cp target/${{ matrix.target }}/release/${{ env.PROJECT_NAME }} dist/${{ matrix.target }}
cp LICENSE dist/LICENSE

- name: Generate third-party license notices
run: |
cargo about generate about.hbs \
--locked \
--fail \
--target ${{ matrix.target }} \
-o dist/THIRD_PARTY_LICENSES-${{ matrix.target }}

- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: ${{ matrix.target }}
path: dist/*
110 changes: 94 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ name: Release

permissions:
contents: write
packages: write

on:
push:
tags:
- v*
release:
types:
- published

jobs:
build:
Expand All @@ -17,16 +18,16 @@ jobs:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
glibc: 2.17
extension: ""
- os: ubuntu-latest
target: aarch64-unknown-linux-gnu
glibc: 2.17
extension: ""

runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0

# Rustのpackage名を取得して環境変数に入れておく。(後のステップで使用)
- name: Extract crate information
Expand All @@ -36,14 +37,21 @@ jobs:

# zigをインストール
- name: Install Zig
uses: goto-bus-stop/setup-zig@v2
uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2.2.1

# rustをインストール
- name: Install Rust toolchain
uses: moonrepo/setup-rust@v1
uses: moonrepo/setup-rust@abb2d32350334249b178c401e5ec5836e0cd88d3 # v1.3.0
with:
cache-target: release
cache-extra-identifier: ${{ matrix.target }}
targets: ${{ matrix.target }}
bins: cargo-zigbuild
bins: cargo-zigbuild,cargo-about
env:
GITHUB_TOKEN: ${{ github.token }}

# moldをインストール
- uses: rui314/setup-mold@9c9c13bf4c3f1adef0cc596abc155580bcb04444 # v1

# ビルド
- name: Build with glibc version
Expand All @@ -56,17 +64,87 @@ jobs:
run: |
cargo build --release --target ${{ matrix.target }}

# ビルド済みバイナリをリネーム
- name: Rename artifacts
# ビルド済みバイナリをコピーしてリネーム
- name: Copy and rename artifacts
shell: bash
run: |
mv target/${{ matrix.target }}/release/${{ env.PROJECT_NAME }}{,-${{ github.ref_name }}-${{ matrix.target }}${{ matrix.extension }}}
mkdir -p dist
cp target/${{ matrix.target }}/release/${{ env.PROJECT_NAME }} dist/${{ env.PROJECT_NAME }}-${{ github.ref_name }}-${{ matrix.target }}
cp LICENSE dist/LICENSE

- name: Generate third-party license notices
run: |
cargo about generate about.hbs \
--locked \
--fail \
--target ${{ matrix.target }} \
-o dist/THIRD_PARTY_LICENSES-${{ matrix.target }}

- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: ${{ matrix.target }}
path: dist/*

# ビルド済みバイナリをReleasesに配置
- name: Release
uses: softprops/action-gh-release@v2
# ビルド済みバイナリとライセンス通知をReleasesに配置
- name: Release binary and target license notices
uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
target/${{ matrix.target }}/release/${{ env.PROJECT_NAME }}-${{ github.ref_name }}-${{ matrix.target }}${{ matrix.extension }}
dist/${{ env.PROJECT_NAME }}-${{ github.ref_name }}-${{ matrix.target }}
dist/THIRD_PARTY_LICENSES-${{ matrix.target }}

- name: Release project license
if: matrix.target == 'x86_64-unknown-linux-gnu'
uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: dist/LICENSE

docker:
runs-on: ubuntu-latest
needs: build
name: Build and push Docker image
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0

- name: Download artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
path: dist
merge-multiple: true

- name: Login to GitHub Container Registry
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6.0.0
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=sha,enable=false
type=semver,pattern={{version}}

- name: Build and push Docker image
id: push
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/target
/dist
/THIRD_PARTY_LICENSES*

.env
config.toml*
12 changes: 12 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"editor.formatOnSave": true,
"[rust]": {
"editor.defaultFormatter": "rust-lang.rust-analyzer"
},
"[toml]": {
"editor.defaultFormatter": "tamasfe.even-better-toml",
},
"evenBetterToml.formatter.compactArrays": false,
"evenBetterToml.formatter.compactInlineTables": false,
"evenBetterToml.formatter.compactEntries": false
}
Loading
Loading