Skip to content

extoci/v0-discord

Repository files navigation

v0 Discord Bot

This is a Discord bot that interacts with v0 via the v0 SDK through Discord.

This is only really a proof of concept (for now 👀) and is not meant to be used in production. This app is bootstrapped with create-discord-bot by the discord.js team.

Setup

Make sure you have Bun installed.

  1. Clone the repository
  2. Create a .env file in the root directory with the following content:
DISCORD_TOKEN=your-discord-token
APPLICATION_ID=your-application-id
V0_API_KEY=your-v0-api-key

Get a Discord token here. Get your v0 API key here.

  1. Run bun install to install the dependencies.
  2. Run bun run deploy to deploy commands to Discord.

Usage

Run bun run start to start the bot & send any message in the active channel to generate a v0 project.

The bot expects to have permissions to create chnanels, though it's recommended to give it Administrator just to not have to worry about specific permissions.

Run /init or create a category named v0 to initialize the bot.

Run /create to create a v0 project, then ask any follow ups in the channel it made. Ensure you do not change the channel's description/topic, it's used to store the chat ID to avoid setting up a DB for this proof of concept.

Todo

  • Add follow-up prompts
  • Show the model's output in Discord, not just the URL
  • Support attachments and image generation from v0

Shameless plug

Follow me on Twitter :)

About

A proof of concept integration of the v0 SDK into a Discord bot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published