You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Creates the default system prompt for the AI bot based on the provided message context.
@@ -11,7 +39,7 @@ export function createSystemPrompt(message: Message): string {
11
39
: message.channel.recipient?.displayName||'DM';
12
40
13
41
constguildInfo=message.inGuild()
14
-
? `You are in the guild "${message.guild.name}" (ID: ${message.guildId}). You can fetch member information when needed.`
42
+
? `You are in the guild "${message.guild.name}" (ID: ${message.guildId}) with ${message.guild?.memberCount??0} members. You joined this guild on ${message.guild.members.me?.joinedAt?.toLocaleString()??'unknown date'}. You can fetch member information when needed using the provided tools.`
15
43
: 'You are in a direct message with the user.';
16
44
17
45
return`You are ${message.client.user.username} (ID: ${message.client.user.id}), a helpful AI Discord bot.
@@ -25,12 +53,29 @@ export function createSystemPrompt(message: Message): string {
0 commit comments