Skip to content

Latest commit

 

History

History
113 lines (91 loc) · 5.95 KB

CONTRIBUTING.md

File metadata and controls

113 lines (91 loc) · 5.95 KB

Contributing to this repository

First, you will need to create a GitHub Account

Translating

If you're interested in helping translate this bot into a language other than English, either download this repository or the file from /languages/en-US.

Firstly, please do NOT use a translator like Google Translate, native speakers will notice. (They're not perfect)

I know it may be hard to know what to translate, so here's an example. How you'd find the translations for the help command in the file, in English:

    // Help Command
    COMMAND_HELP_HEADER: (prefix) => `= Command List =\n\n[Use ${prefix}help <commandname> for details]\n`,
    COMMAND_HELP_OUTPUT: (command, prefix) => `= ${command.help.name} = \n${command.help.description} \nAliases:: ${command.conf.aliases.join(", ")}\nUsage:: ${prefix}${command.help.usage}`,
    COMMAND_HELP_HELP: {
        description: "Displays info about available commands.",
        actions: [
            {
                action: "",
                actionDesc: '',
                usage: ';help [command]',
                args: {
                    "command": "The command you want to look up info on."
                }
            }
        ]
    },

And here's how it looks after it's been translated to German:

    // Help Command
    COMMAND_HELP_HEADER: (prefix) => `= Kommandoliste =\n\n[Benutze ${prefix}Help <Kommandoname> fuer Details]\n`,
    COMMAND_HELP_OUTPUT: (command, prefix) => `= ${command.help.name} = \n${command.help.description} \nAliases:: ${command.conf.aliases.join(", ")}\n Befehl:: ${prefix}${command.help.usage}`,
    COMMAND_HELP_HELP: {
        description: "Zeigt die verfuegbaren Kommandos an.",
        actions: [
            {
                action: "",
                actionDesc: '',
                usage: ';help [Kommando]',
                args: {
                    "Kommando": "Das Kommando, zu dem Du die Hilfe aufrufen willst."
                }
            }
        ]
    },

What to change and what not to

  • Anything fully capitalized like COMMAND_HELP_HEADER is the key/name I use to get the translated text to use elsewhere, and needs to stay as-is.
  • The (prefix) => needs to be left alone, as that's how I pass vairables through to the strings.
  • In the strings, anything inside ${stuff} is a variable and needs to be left alone as well. From the example above, in COMMAND_HELP_HEADER, the prefix is being passed into the header so it knows wht to put there, so since the default prefix is ;, Use ${prefix}help would show as Use ;help
  • Other than that, anything inside the various quotes, be it ` `, '', or "", should be safe to change.
  • In the COMMAND_HELP_HELP, anything before the : needs to stay the same, so the description, actions, etc.

Making a new command or updates to anything

  • If you are wanting to make a new command, there is a template at /templates/command.js for you to start off of.
  • If you're wanting to make changes to something, go for it, then upload them as described below. If you need help understanding something, feel free to stop by the support server and I'll do what I can to help

Uploading the changes

You can make a Pull Request, check here for more information on that as needed.

If you don't want to mess with that, or don't understand how to, feel free to stop by the support server for help or upload your translation in hastebin or Gist GitHub and send it to me on the support server.

Bug Reporting

If you find something that's breaking or needs to be fixed (Bad translation, command output not working correctly, or something else), come by the Support Server and let me know

Self-Hosting

While I'd recommend just using the one that I host, you can run a copy yourself, though it will not have all the features (Namely the Patreon unlockable ones

Requirements

Setup

Firstly, you'll need to set up the bot account, so you can get the token and such. https://github.com/reactiflux/discord-irc/wiki/Creating-a-discord-bot-&-getting-a-token

In a command prompt in your projects folder (wherever that may be) run the following: git clone https://github.com/jmiln/SWGoHBot.git

Once finished:

  • In the folder from where you ran the git command, run cd SWGoHBot and then run npm install
  • Rename config_example.json to config.json
  • Edit config.json and enter your bot's token and other details as indicated.

In order to get game data, you'll need to set up and use Comlink and SWGoH-Stats. These can be run as docker instances, with the setup described in each repo

If you want character images, you'll want to check out my image server to run alongside it, as well as swgoh-ae2

Starting the bot

To start the bot, in the command prompt, run the following command: node swgohbotShard.js

If at any point it says "cannot find module X" just run npm install X and try again.

If you are using PM2 to keep the bot running, run it like this: pm2 start swgohBotShard.js

Contributing to the website (swgohbot.com)

Head on over to the site's repo HERE