Developer

The Developer workflow

From an empty project to a published, configurable product — step by step.

A complete run-through of the path most creators take.

1. Create the project

New bot → Code Editor → name it → Save & open builder. Bottly creates a project and seeds three files:

projects/{projectId}/
  src/index.js        ← your entry point
  package.json        ← dependencies and metadata
  bottly_config.json  ← the settings your buyers will see


2. Write the bot

Everything happens in the editor. A minimal welcome bot:

// src/index.js
import { Client, GatewayIntentBits } from "discord.js";
import config from "../bottly_config.values.js";

const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMembers] });

client.on("guildMemberAdd", (member) => {
  const channel = member.guild.channels.cache.get(config.welcome_channel);
  if (!channel) return;
  channel.send(config.welcome_message.replace("{user}", member.toString()));
});

client.login(process.env.DISCORD_TOKEN);


The token is injected by Bottly at runtime — never hard-code it and never put it in the config schema.

3. Expose settings

Anything a buyer should be able to change becomes a variable in bottly_config.json. Keep it small: five well-named settings beat twenty half-explained ones.

4. Test it

Connect your own bot token under My bots → Settings, start the runtime and watch Logs. Fix, save, restart.

5. Publish

Marketplace → Publish. The listing is linked to the project, and publishing is blocked until the schema validates. Set a price (or free), write a description, add screenshots.

6. After the sale

Buyers get their own copy of the settings form — never your source. Earnings land on your balance; Bottly keeps a 10% commission, and you request payouts in crypto.

Checklist before publishing
[ ] bottly_config.json validates and every editable setting has a label and description
[ ] no secrets, tokens or personal endpoints in the code or the schema
[ ] defaults produce a bot that works out of the box
[ ] the listing screenshots match what the bot actually does