feat(bots): bot framework polish + store

- /ws/bot endpoint: bot token auth via query param, SHA-256 lookup
- Bot WS actions: SEND_MESSAGE + DELETE_MESSAGE handled in gateway
- Bot messages: bot_id on messages table, bot badge in chat (green + BOT tag)
- Bot store: /bots lists all bots with server count + add-to-server
- Bot manager moved to /bots/manage
- Fix: command routes were double-nested under /bots/{botID}/commands
- Fix: fetchServerCommands route corrected to /bots/servers/...
This commit is contained in:
2026-07-15 12:45:44 -04:00
parent 2674c254a1
commit 7c70082f37
13 changed files with 557 additions and 22 deletions
+6 -4
View File
@@ -216,12 +216,14 @@ const MessageItem = memo(({
)}
<span className="text-gb-fg-f">{formatTime(message.created_at)}</span>{' '}
{message.pinned && <span className="text-gb-orange font-bold mr-1">[PIN]</span>}
<span className="text-gb-aqua hover:text-gb-orange cursor-pointer" onClick={(e) => {
<span className={`${message.author_bot ? 'text-gb-green' : 'text-gb-aqua'} hover:text-gb-orange cursor-pointer`} onClick={(e) => {
e.stopPropagation();
onAuthorClick(message.author_id);
if (!message.author_bot) onAuthorClick(message.author_id);
}}>
&lt;{members.find((m) => m.id === message.author_id)?.nickname || message.author_username}&gt;
</span>{" "}
&lt;{message.author_bot ? (message.bot_name || message.author_username) : (members.find((m) => m.id === message.author_id)?.nickname || message.author_username)}&gt;
</span>
{message.author_bot && <span className="text-gb-bg bg-gb-green px-0.5 font-mono text-[10px] ml-0.5 align-middle">BOT</span>}
{" "}
<span className="text-gb-fg">{renderContent(message.content, memberUsernames)}</span>
{renderEmbeds(message.embeds)}
{message.poll && <PollDisplay poll={message.poll} channelId={message.channel_id} />}