We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0fa8432 commit f729609Copy full SHA for f729609
packages/worker/src/worker.ts
@@ -220,9 +220,21 @@ export default {
220
}
221
222
case 'inline': {
223
+ const query = bot.update.inline_query?.query.toString() ?? '';
224
+
225
+ // Check if query ends with proper punctuation
226
+ if (!query.endsWith('.') && !query.endsWith('?')) {
227
+ await bot.replyInline(
228
+ "Please complete your sentence",
229
+ "End your sentence with a period (.) or question mark (?) to get an AI response",
230
+ 'HTML'
231
+ );
232
+ break;
233
+ }
234
235
const messages = [
236
{ role: 'system', content: SYSTEM_PROMPTS.TUX_ROBOT },
- { role: 'user', content: bot.update.inline_query?.query.toString() ?? '' },
237
+ { role: 'user', content: query },
238
];
239
240
try {
0 commit comments