Code and Design Specifications

Requirements

We want to enable seamless communication between multiple discord users that each speak different languages.

Functional Requirements

Primary

  • Be able to send translations to users through DMs, that way they are private to the user.
  • Recipient:
    • Have the ability to automatically translate all incoming messages to the user’s preferred language. This setting can be enabled/disabled.
    • Have the ability to to use a command to translate a specific message
    • Register their preferred language so the bot will translate to that language when the user needs a translation.
  • Sender:
    • Be able to translate a message to a specific language and then automatically send it

Secondary

  • See a list of the different languages that a user can register as their preferred language.
  • Change the preferred language that they want translation in.
  • Get an alternative translation if the first translation does not make sense.

Technical Requirements

Primary

  • Keep track of users data, server data, and channel data within a database
  • Successfully use a 3rd party translator API
  • Send ephemeral messages and DMs to users
  • Enable/disable automatic translation for specific channels
  • Accept command to translate specific received message
  • Accept command to translate then send specific message

Secondary

  • User can manually dismiss ephemeral messages

Usability Requirements

Primary

  • The bot successfully detects the language of the original message
  • The bot’s translations are accurate and reliable
  • The bot should be able to translate messages and send these translations fast and efficiently.
  • The bot has a /help command that is a tutorial

Secondary

  • It should be easy to set up the bot in the server
  • It should be easy for users to learn how to use the bot and translate messages

Storyboard

Storyboard flow 1:

  1. Discord users have not set up their preferred language yet so they start off by seeing the list of languages that can be registered for. This is done with the /languages command.
  2. The user wants translations in Spanish so they register for Spanish using the /register spanish.
  3. Now that they are registered they want to translate a message from earlier in the chat that was in English which says “What’s up?”. They react to the message with the “T” emoji. The bot responds with “Que tal?” in the chat.
  4. The user understands the response but it doesn’t make that much sense in the current context. So, they decide to get an alternative message by reacting to the bot’s message using the “circular arrows” emoji which represents retrying. This results in a response that says “Qué pasa”. This makes more sense in the current context.

image

Storyboard flow 2:

  1. When a user has a registered language, they can interact with the bot, which will translate any messages the user selects and display the translation
  2. If the user wants to change their registered language, they can use the same command they used at the beginning (in flow 1) to update to a new language. Continuing from the scenario in flow 1, the user can run /register german to update their registered language to german. The bot will send a confirmation message indicating the change (Each user will only have one registered language).
  3. Then, when the user triggers the bot to translate a message, the translation will be in the new registered language.

image