-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from approvers/feat/message-limit-bypass
feat: 2000文字超過のレスポンスを返せるように
- Loading branch information
Showing
7 changed files
with
47 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
/target | ||
.env | ||
|
||
# 一時的なテキストファイルの生成に使用する | ||
/temp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ use events::event::Handler; | |
|
||
mod api; | ||
mod events; | ||
mod utils; | ||
|
||
#[tokio::main] | ||
async fn main() { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
use std::fs::{create_dir, File}; | ||
use std::io::Write; | ||
|
||
pub fn create_temp_file(content: String) { | ||
match create_dir("temp") { | ||
Ok(_) => { | ||
println!("一時フォルダを作成しました。"); | ||
|
||
let mut temp_file = | ||
File::create("temp/temp.txt").expect("一時ファイルの作成に失敗しました。"); | ||
temp_file | ||
.write_all(content.as_ref()) | ||
.expect("一時ファイルへの書き込みに失敗しました。"); | ||
|
||
println!("一時ファイルを作成しました。") | ||
} | ||
Err(_) => panic!("一時ディレクトリを作成できませんでした。"), | ||
} | ||
} |