-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 423550f
Showing
10 changed files
with
2,172 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
env: | ||
browser: true | ||
es2021: true | ||
parser: '@typescript-eslint/parser' | ||
parserOptions: | ||
ecmaVersion: latest | ||
plugins: | ||
- '@typescript-eslint' | ||
rules: {} |
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,2 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto |
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,3 @@ | ||
src/token.ts | ||
node_modules/* | ||
dist/* |
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 Kashiwa | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,39 @@ | ||
# 支語警察 Discord 機器人 | ||
|
||
## 總覽 | ||
|
||
在 Discord 檢測支語並嘗試翻譯成台灣用語。 | ||
|
||
在使用該專案前,前先到 discord 的開發者網頁申請 Application: [Discord Developer Portal](https://discord.com/developers/applications) | ||
|
||
並且透過含有 `client id` 的連結邀請機器人 | ||
|
||
``` | ||
https://discord.com/api/oauth2/authorize?client_id=[[YOUR-CLIENT-ID]]&permissions=32&scope=bot%20applications.commands | ||
``` | ||
|
||
**注意:請先執行程式,再邀請機器人** | ||
|
||
|
||
## Develop | ||
|
||
### 編輯 token 檔 | ||
|
||
複製 `src/token.ts.template` 另存成 `src/token.ts` | ||
|
||
```ts | ||
export const token = "[YOUR-TOKEN]" | ||
``` | ||
|
||
### 初始化 npm 專案 | ||
|
||
```sh | ||
# initialize | ||
npm i | ||
|
||
# start the program by | ||
npm run start | ||
|
||
# please use lint before making a pull request | ||
npm run lint | ||
``` |
Oops, something went wrong.