Sejong-bot is a Korean language bot targeted towards Korean learners and enthusiats. It supports features such as word definitions in Korean and English, example sentences and neural machine translation. Users can also bookmark past searches to their DM's.
- Dictionary
- Example sentences
- Definitions and Word Info from a scraper I made
- Papago NMT
- Neural machine translation service supporting multiple languages
- Hanja database from dbravender/hanjadic
This command performs a dictionary search for a given parameter presents the results to the user in a precise manner. Results include the word-type, as well as the meanings of the word both in English and in Korean. Users can use reactions to switch the language of the meanings or bookmark the result.
Searches the hanja database for meanings of hanjas and related words that occur in the provided argument. Scans the word an returns all relevant results including meaning of single hanjas, meanings of single hanjas, as well as related words. Users can use reactions to browse pages of results or bookmark the result.Returns a list of Korean example sentences including a word given. Users can bookmark the result.
Uses Papago's Neural Machine Translation to translate a given text between two given languages. Translates from Korean to English by default but users can specify source and target language using ~papago en>ko
. Available language codes can be seen using ~help papago
.
- Node.js
- Generate a Discord token, a 한국어기초사전 OPEN API token, and a Papago NMT API client ID and secret.
- Create file
apiconfig.json
in the root directy and fill in the secrets from above. These values are used to fetch data for the various commands of Sejong-bot.
{
"discord_token": "",
"krdict_url": "https://krdict.korean.go.kr/api/",
"krdict_token": "",
"papago_url": "https://openapi.naver.com/v1/papago/n2mt",
"papago_client_id": "",
"papago_client_secret": ""
}
- Run
npm install
and once all packages have been installed, start the bot usingnpm start
.