Getting started

This guide takes an approved Weeble project from an empty folder to its first running command.

Install Weeble Workspace

Install Weeble Workspace from the VS Code Marketplace. Its extension ID is Weeble.weeble.

VS Code normally updates extensions automatically. If an update is waiting, open Extensions, select Weeble Workspace, and choose Update or Reload.

Connect a deployment

  1. Open an empty folder in VS Code.

  2. Open the Command Palette.

  3. Run Weeble: Sign In and approve the authorization in your browser.

  4. Run Weeble: Select Deployment.

  5. Choose the deployment you want to edit.

The extension downloads its source and creates local editor-support files. Selecting another deployment replaces only the files managed by the previous selection.

Write the first command

The Weeble SDK is available through the global discord and weeble namespaces.

const commands = discord.commands.create({ prefixes: ["!"] });

commands.prefix(
  {
    name: "ping",
    description: "Check whether the bot is online",
  },
  async (message) => {
    await message.reply("pong");
  },
);

Deploy

  1. Select the rocket button in the editor title bar or the Weeble sidebar.

  2. Enter a short release note, or leave it empty.

  3. Follow the progress in the notification and the status bar. Build errors appear in the Problems panel.

The Weeble output channel logs each stage:

Deploying main
Workspace changes · 1 added · 0 modified · 0 deleted
Building main…
Bundle completed in 1.2 s · 0 warnings
Publishing revision…
Published revision 1
Activating revision 1…
Done in 1.2 s
The Weeble output channel showing a successful build, publish and revision activation.

The output channel reports each deployment stage and the revision that became active.

Each successful publish creates an immutable revision. Activation makes that revision receive new Discord events.

Test and inspect

Run !ping in Discord. If the bot does not reply:

  1. Open Debugging and check the runtime logs.

  2. Confirm the deployment is active.

  3. Check that the bot can read the channel and send messages.

  4. For prefix commands, confirm the Message Content intent is enabled for the bot.

Continue with npm packages or deployments and revisions.