Skip to content

Developers

John Mazouri edited this page Oct 23, 2018 · 26 revisions

Below is a guide on how to start developing Modix. Depending on the nature of the features you want to add/work on, there's a few different workflows you might want to use, each of which have different requirements.

Prerequisites

To work on Modix, you need a few things:

The Core Bot

If you're working on a feature that involves Modix's core services, and only needs to work with the Discord bot frontend, then you can do all your development with your C# IDE of choice by opening Modix.sln. First, make sure you have some environment variables set, either through your Project properties -> Debug tab, or however you prefer.

Environment Variables

  • Required

    • MODIX_DB_CONNECTION - this is the connection string to your PostgreSQL instance. When developing locally, it'll probably be easiest to run Postgres in a container, or install it onto your development OS - whatever works.
    • DiscordToken - this is the bot token Modix should use to connect to the Discord API. If you don't have one, create an application here, make sure you add a bot to it, and copy the token from the page.
  • Optional

    • DiscordClientId - also taken from the Discord API page for your bot, this is needed for the web frontend's OAuth stuff to work properly. Can be ignored if you aren't working on/with the web frontend.
    • DiscordClientSecret - same as above.
    • log_webhook_id - The ID of the Discord webhook to log to. Only necessary if you want log messages to appear in a channel on the server.
      • https://discordapp.com/api/webhooks/[this part]/asda2ed2klkm5lkn42n34jk
    • log_webhook_token - Same as above, but the token of the webhook.
      • https://discordapp.com/api/webhooks/000000000000000000/[this part]
Clone this wiki locally