|
1 | 1 | import { EmbedBuilder, ColorResolvable, Message } from 'discord.js' |
2 | 2 | import * as dotenv from 'dotenv' |
3 | | -import { artIndexerBot, projectConfig, triviaBot } from '..' |
| 3 | +import { artIndexerBot, projectConfig, triviaBot, insightsBot } from '..' |
4 | 4 | dotenv.config() |
5 | 5 | const fetch = require('node-fetch') |
6 | 6 |
|
@@ -162,6 +162,7 @@ const HELP_MESSAGE = new EmbedBuilder() |
162 | 162 | **staysafe?**: Tips on avoiding scams |
163 | 163 | **aliases?**: A handy list of aliases that can be used in \`#\` commands. |
164 | 164 | **hashtag?**: A handy list of all \`#\` functionalities |
| 165 | + **artBot**: Ask about Art Blocks artists and projects by tagging @artbot at the start of your question. This AI-powered feature is in beta. |
165 | 166 | ` |
166 | 167 | ) |
167 | 168 | // Custom message shown when someone asks about ArtBlocks |
@@ -308,6 +309,7 @@ export async function smartBotResponse( |
308 | 309 | } |
309 | 310 | return null |
310 | 311 | } |
| 312 | + |
311 | 313 | // Some shared helper variables. |
312 | 314 | const inHelpChannel: boolean = channelID == CHANNEL_HELP |
313 | 315 | const mentionedArtBot: boolean = |
@@ -398,6 +400,11 @@ export async function smartBotResponse( |
398 | 400 | ) |
399 | 401 | } |
400 | 402 |
|
| 403 | + if (channelID == CHANNEL_BLOCK_TALK && containsQuestion && mentionedArtBot) { |
| 404 | + // Handle messages to the Insights API for AI responses |
| 405 | + return insightsBot.getInsightsApiResponse(msg) |
| 406 | + } |
| 407 | + |
401 | 408 | if ( |
402 | 409 | (channelID == CHANNEL_FOR_SALE_LISTINGS || |
403 | 410 | channelID == CHANNEL_TRADE_SWAPS) && |
|
0 commit comments