2.3 KiB
2.3 KiB
ZitateBot
Discord bot + web form for submitting quotes to different channels based on selected speaker.
Features
- Dark-mode animated webpage
- Discord login required for quote submissions
- Speaker dropdown loaded from config
- Quote submission endpoint
- Discord embed posting to channel configured per speaker
- Optional mirror posting to a global latest channel
- Creator attribution is always included on quotes
/create-quotecommand for Discord-side quote creation- Optional file upload from web form with a public URL added to the quote
Setup
- Install dependencies.
- In the Discord Developer Portal, set OAuth2 redirect URL to
http://localhost:3000/auth/discord/callback(or your hosted URL). - Copy
.env.exampleto.envand set bot + OAuth credentials. - Edit
config/quotes.config.jsonwith real channel IDs and allowed Discord user IDs. - Run config check and then start.
Set DISCORD_GUILD_ID in .env if you want /create-quote to appear quickly in one guild during setup.
npm install
Copy-Item .env.example .env
npm run check
npm start
Then open http://localhost:3000.
Config format
config/quotes.config.json
{
"allowedSubmitterDiscordIds": ["111111111111111111"],
"latestChannelId": "222222222222222222",
"createQuoteChannelId": "333333333333333333",
"users": [
{
"id": "alice",
"displayName": "Alice",
"channelId": "123456789012345678",
"accentColor": 5793266,
"avatarUrl": "https://...optional"
}
]
}
Notes
- Bot requires access to the configured channels.
- Only users in
allowedSubmitterDiscordIdscan submit quotes (web and/create-quote). - If
latestChannelIdis set, every quote is also posted there. - If
createQuoteChannelIdis set,/create-quotecan only be used in that channel. - Without
createQuoteChannelId,/create-quoteis allowed in channels namedcreate-quote. - Web form uploads are optional and stored in
uploads/(served from/uploads/<filename>). - Allowed web upload file types: images, video/audio files,
.txt,.pdf,.zip,.7z,.rar(max 100 MB).
Discord command quote creation
- Use
/create-quotein your create-quote channel. - Select
speakerfrom the dropdown choices. - Enter
quotetext in the command form. - The quote is posted like web submissions and includes who created it.