Bot-Enabled Messaging System
OpenAI interview questions · Medium · Coding round · reported 15× · 6 tests
Build a small in-memory chat application that stores per-channel history and can route messages through registered bots.
Interface
class ChatApp {
registerBot(name: 'echo' | 'help' | 'tally'): void;
send(channelId: string, userId: string, text: string): void;
getHistory(channelId: string): string[];
}Run your code with Ctrl+Enter to see results.