get_chat_settings
Retrieve chat configuration for a Twitch channel to view moderation settings and chat rules.
Instructions
チャット設定を取得します
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| channelName | Yes | Twitchチャンネル名 |
Implementation Reference
- src/tools/handlers/channel.ts:30-43 (handler)The handler function that implements the core logic: retrieves the Twitch user by channel name, fetches chat settings using the API, and returns a formatted response with settings like emote-only mode, slow mode, etc.export async function handleGetChatSettings(apiClient: ApiClient, args: { channelName: string }) { const user = await getUserByName(apiClient, args.channelName); const settings = await apiClient.chat.getSettings(user.id); return formatResponse({ emoteOnlyModeEnabled: settings.emoteOnlyModeEnabled, followerOnlyModeEnabled: settings.followerOnlyModeEnabled, followerOnlyModeDelay: settings.followerOnlyModeDelay, slowModeEnabled: settings.slowModeEnabled, slowModeDelay: settings.slowModeDelay, subscriberOnlyModeEnabled: settings.subscriberOnlyModeEnabled, uniqueChatModeEnabled: settings.uniqueChatModeEnabled, }); }
- src/tools/definitions.ts:178-191 (schema)The tool definition including name, description, and input schema requiring a 'channelName' string parameter.{ name: 'get_chat_settings', description: 'チャット設定を取得します', inputSchema: { type: 'object', properties: { channelName: { type: 'string', description: 'Twitchチャンネル名', }, }, required: ['channelName'], }, },
- src/index.ts:142-145 (registration)The switch case in the CallToolRequest handler that routes 'get_chat_settings' calls to the handleGetChatSettings function.case 'get_chat_settings': return await handleGetChatSettings(this.apiClient, { channelName: args.channelName as string });
- src/index.ts:15-15 (registration)Import statement that brings the handler function into the main server file for use in tool dispatching.import { handleGetChannelInfo, handleGetChatSettings } from './tools/handlers/channel.js';