Aethel Bot OSS repository! aethel.xyz
bot fun ai discord discord-bot aethel

Revert "idk what this is in my changes tab and idk what it is but yeah prolly works"

This reverts commit 9c34b64a1884dc95f5208cb8d8606da36e715aeb.

Changed files
+11 -9
src
commands
utilities
utils
+4 -2
src/commands/utilities/ai.ts
··· 242 242 243 243 Use the wikipedia search when you want to look for information outside of your knowledge, state it came from Wikipedia if used. 244 244 245 - When you use a tool, you'll receive a JSON response with the command results.`; 245 + When you use a tool, you'll receive a JSON response with the command results if needed. 246 + 247 + **IMPORTANT:** The {reaction:} and {newmessage:} tools are NOT available in slash commands. Only use the tools listed above.`; 246 248 247 249 const modelSpecificInstructions = usingDefaultKey 248 250 ? '\n\n**IMPORTANT:** Please keep your responses under 3000 characters. Be concise and to the point.' ··· 488 490 ): Promise<AIResponse | null> { 489 491 try { 490 492 const openAIClient = getOpenAIClient(config.finalApiKey!, config.finalApiUrl); 491 - const maxTokens = config.usingDefaultKey ? 1000 : 3000; 493 + const maxTokens = config.usingDefaultKey ? 5000 : 8000; 492 494 const currentConversation = [...conversation]; 493 495 let iteration = 0; 494 496 let finalResponse: AIResponse | null = null;
+7 -7
src/utils/voteManager.ts
··· 153 153 ); 154 154 } 155 155 } catch (error) { 156 - console.error(`Error processing guild ${guild.id}:`, error); 156 + logger.error(`Error processing guild ${guild.id}:`, error); 157 157 } 158 158 }), 159 159 ); 160 160 } 161 161 } catch (error) { 162 - console.error('Error in vote processing:', error); 162 + logger.error('Error in vote processing:', error); 163 163 } finally { 164 - clientBot.destroy().catch(console.error); 164 + clientBot.destroy().catch((err) => logger.error('Error destroying bot client:', err)); 165 165 } 166 166 167 167 logger.info(`User ${userId} voted - AI system will give +10 daily limit`); ··· 190 190 `\n` + 191 191 `Thank you for your support! ❤️`, 192 192 ) 193 - .catch(console.error); 193 + .catch((err) => logger.error('Failed to send vote DM:', err)); 194 194 } 195 195 196 - clientBot.destroy().catch(console.error); 196 + clientBot.destroy().catch((err) => logger.error('Error destroying bot client:', err)); 197 197 } catch (error) { 198 - console.error('Failed to send vote thank you DM:', error); 198 + logger.error('Failed to send vote thank you DM:', error); 199 199 } 200 200 201 201 await client.query('COMMIT'); ··· 207 207 }; 208 208 } catch (error) { 209 209 await client.query('ROLLBACK'); 210 - console.error('Error recording vote:', error); 210 + logger.error('Error recording vote:', error); 211 211 throw new Error('Failed to record your vote. Please try again later.'); 212 212 } finally { 213 213 client.release();