Discord bot that generates AU prompts and shares Feedverse scenarios join links.
- Install deps:
npm install- Create a
.env(copy from.env.example) and fill:
DISCORD_TOKEN(bot token)DISCORD_CLIENT_ID(application client id)- (optional)
DISCORD_GUILD_ID(dev guild id) - (optional)
AU_DATA_PATH(defaults to./data/au_summaries_filled.json) - (optional)
OFFICIAL_GUILD_ID(guild where moderation commands are registered) - (optional)
FEEDVERSE_JOIN_URL_TEMPLATE(used by/share)- recommended:
https://feedverse.app/i/?code={CODE}(works even without host rewrites) - alternative (requires rewrites):
https://feedverse.app/i/{CODE}orhttps://feedverse.com/join/{CODE}
- recommended:
- (optional)
FEEDVERSE_WEB_BASE_URL(alternative to template;/sharelinks to{base}/join/{CODE}) - (optional)
FEEDVERSE_BRAND_ICON_URL(embed thumbnail icon for/share) - (optional)
FEEDVERSE_API_BASE_URL- required for
/prompt+ moderation commands,/setup daily, and favorites - also used for pulling approved prompts into
/generate+ daily - also used by
/shareto show scenario name/cover (if set)
- required for
- (required)
FEEDVERSE_BOT_API_SECRET(sent asx-bot-secretto the backend)
Only the person hosting/running the bot needs the .env file. Users who invite the bot to their server do not.
- Start:
npm start/generate- optional
universe(autocomplete) - optional
dynamic(autocomplete) - includes a Favorite button to save the prompt
- optional
Behavior:
-
both set: picks 1 of the 5 for that exact (universe, dynamic)
-
only one set: picks randomly across all matching packs, then 1 of the 5
-
none: picks randomly across all packs, then 1 of the 5
-
/share- required
invite_code(scenario invite code likeKPOP2024) - posts an embed with scenario info if
FEEDVERSE_API_BASE_URLis set - always includes the invite code (and optionally a join link if
FEEDVERSE_JOIN_URL_TEMPLATEorFEEDVERSE_WEB_BASE_URLis set)
- required
-
/prompt- required
setting(autocomplete) - required
dynamic(autocomplete) - required
prompt(text) - submits a prompt for moderator review (works in DMs or any server)
- required
-
/profile- optional
user - shows AU prompt stats (level + XP + accepted prompts)
- use the Newer/Older buttons to page through prompt history
- optional
-
/leaderboard- shows the top users in this server by accepted prompts (with level + XP)
-
/setup daily- required
channel - optional
time(interpreted in the bot host's local timezone)- examples:
21:30,9pm,9:30pm
- examples:
- posts 1 random prompt per day in that channel, and starts a thread for discussion (thread name is the prompt text, shortened if needed)
- configuration is stored in the backend database (safe for many servers)
- required
-
/view favorites- shows your favorited prompts (latest first)
Moderation (official guild only):
/prompt-queue/prompt-approve submission_id [note]/prompt-reject submission_id [note]
submission_id can be any of:
- a queue index like
3 - a short hex prefix like
a1b2c3d4 - a full UUID
- XP is global (per Discord user id) and only increases when a prompt submission is accepted.
- Current award: +25 XP per accepted prompt.
- Level curve ramps quadratically. Total XP required to reach level
$L$ is:
So level 1 starts at 0 XP, level 2 at 100 XP, level 3 at 300 XP, etc.
If FEEDVERSE_API_BASE_URL is set, /generate and daily will also include approved prompts from the backend (merged with the local JSON packs).
Use the Favorite button on a prompt message (from /generate or from the daily post). Favorites are stored in the backend database and keyed by Discord user id (not usernames).
On startup the bot registers slash commands:
- If
DISCORD_GUILD_IDis set (dev mode): registers ALL commands into that guild only (appears almost immediately). - Otherwise:
- registers public commands globally (
/generate,/share,/prompt) - registers moderation commands ONLY into
OFFICIAL_GUILD_ID(/prompt-queue,/prompt-approve,/prompt-reject)
- registers public commands globally (
If the same Discord application has global commands registered and you also set DISCORD_GUILD_ID, Discord will show duplicates in that dev guild (one global + one guild-scoped). This is expected.
If you want the bot to work in any server it’s invited to, leave DISCORD_GUILD_ID unset.