Skip to content

Language translation Command in Discord using Papago by Naver

License

Notifications You must be signed in to change notification settings

J-Hoplin/Papago-API-Translate-Bot

Repository files navigation

Papago Discord Command


  • This project is remaked with TypeScript and Discord.js!

  • Recommend to use this version, but if you want to use Python version, please refer to this link.(Python version will be deprecated in near future)


Prerequisite

Discord Keys

  • DISCORD_API

    • Get discord bot token in here.
    • Create application and go to tab Bot
  • APPLICATION_ID

    • Get discord bot token in here.
    • Create application and go to tab General Information
  • GUILD_ID

    • Make sure your discord's developer mode in active
    • Make right click on Guild's icon and click Copy ID
  • Make privileged gateway intent as active in here.(tab Bot) img

Naver Papago API Keys

  • Client ID & Client Secret
    • Enroll your application in Naver Developers and apply new application in here and get Client ID and Client Secret in My application tab

Before Using

After you get all of keys I described in above, you need to fill keys in .env file

# Discord API Client
DISCORD_API=
APPLICATION_ID=
GUILD_ID=

# Naver API Client
X_Naver_Client_Id=
X_Naver_Client_Secret=

Start Application


  1. git clone project

    git clone https://github.com/J-hoplin1/Papago-API-Translate-Bot.git && cd Papago-API-Translate-Bot 
  2. Build docker image

    docker build -t (image name) .
  3. Run image as container

    docker run -d --name (container name) -v (directory you want to connect with container):/app/dist/logfile (image name)

Commands

  • /ping : Check bot's ping

  • /translate : Translate your content

    • Required
      • from : Language to be translated
      • to : Translated language
      • content : Content to translate
    • Not required
      • private : Yes if you want to see result in private(but temporary).

    img img

Supported Languages

  • Korean
  • English
  • Japanese
  • Chinese
  • Vietnamese
  • French
  • Italian
  • Russian
  • Indonesian