Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
TheYande authored and github-actions[bot] committed Aug 26, 2024
1 parent 83b2533 commit a0ff08d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
16 changes: 7 additions & 9 deletions modules/ai/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,12 @@ const memory = new Database<{ content: string }>("aimem");
await memory.init();
defineEvent("messageCreate", async (m) => {
if (m.author.bot) return;
const forcedReply = (
!(
m.channel.isDMBased() ||
m.channelId == "1276365384542453790" ||
m.mentions.has(client.user)
)
)

const forcedReply = !(
m.channel.isDMBased() ||
m.channelId == "1276365384542453790" ||
m.mentions.has(client.user)
);

let result = [];
let intCount = 0;
const interval = setInterval(() => {
Expand Down Expand Up @@ -63,7 +61,7 @@ defineEvent("messageCreate", async (m) => {
"user",
"complex",
)
: await (forcedReply ? ai : ai2).send(
: await (forcedReply ? ai : ai2).send(
`${m.reference ? `\n(replying to ${reference?.author.displayName} : ${reference?.author.id}\n${reference?.content})\n` : ""}${m.author.displayName} : ${m.author.id} : ${m.channel.isDMBased() ? `${m.author.displayName}'s DMs` : m.channel.name}\n${m.content}`,
);
//[...m.attachments.filter((attachment) => attachment.contentType?.match(/^image\/(bmp|jpeg|png|bpm|webp)$/i)).map(v => v.url)]
Expand Down
14 changes: 7 additions & 7 deletions modules/ai/prompts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,16 +195,16 @@ Additional Notes:
];

export const prompts2 = [
prompts[2],
prompts[3],
prompts[4],
prompts[1] +
`
prompts[2],
prompts[3],
prompts[4],
prompts[1] +
`
VERY IMPORTANT!!!
you should only do anything if you are directly mentioned and you want to reply, if you are not a part of the convo, do not intervin, OR if a rule is being broken or is likely broken, also if someone misgenders you just correct them, also you can reply if you really think you need to.
do not break this rule.
if none of the previous requirements are hit just do [nothing]
`
]
`,
];

0 comments on commit a0ff08d

Please sign in to comment.