Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions src/discord/commands/global/d.ai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1041,7 +1041,7 @@ async function privacyPage(

You can remove your data at any time by clicking the button below.

This will delete your thread off the OpenAI servers, and remove your thread ID from our DB. \
This will delete your thread off the OpenAI servers, and remove your thread ID from our DB. \
It will remove your encrypted chat history from our database.

**You can further remove your data from TripSit's servers with the \`/privacy\`.**
Expand Down Expand Up @@ -1225,11 +1225,11 @@ async function personasPage(
return {
embeds: [embedTemplate()
.setTitle('Persona Information')
.setDescription(stripIndents`
.setDescription(stripIndents`
A persona is a set of parameters that the AI uses to generate responses. \
This allows us to have different 'personalities' for the AI. \
The AI will use the persona that is linked to the channel it is responding in, and return responses based on that persona's personality. \
You can use the below menu to get information on each persona available.
You can use the below menu to get information on each persona available.

**Model**
The model to use for the persona. Currently we offer two models, GPT-3.5-Turbo and Gemini Pro.
Expand All @@ -1238,11 +1238,11 @@ async function personasPage(

**Prompt**
The prompt to use for the persona. This is the text that the AI will use to generate responses.

**Max Tokens**
The maximum number of tokens to use for the AI response.
What are tokens? <https://platform.openai.com/tokenizer>

**Temperature**
Adjusts the randomness of the AI's answers.
Lower values make the AI more predictable and focused, while higher values make it more random and varied.`)
Expand Down Expand Up @@ -1526,7 +1526,7 @@ async function createPage(
return {
embeds: [embedTemplate()
.setTitle('New Persona')
.setDescription(stripIndents`
.setDescription(stripIndents`
This page will create help create a new persona for the AI.

Select the model you want to use below, then click the create button.
Expand Down Expand Up @@ -2074,7 +2074,6 @@ export async function aiMessage(

// const messages = [...channelMessages.values()];

// if (!messages[0].member?.roles.cache.has(env.ROLE_VERIFIED)) return;
if (messageData.author.bot) {
log.debug(F, 'Message was from a bot, returning');
return;
Expand Down Expand Up @@ -2382,10 +2381,10 @@ export async function aiReaction(

const message = thumbsUpEmojis.includes(messageReaction.emoji.name as string)
? stripIndents`${messageReaction.message.cleanContent}

**Thank you for your feedback, I have notified Moonbear that this response was excellent.**`
: stripIndents`~~${messageReaction.message.cleanContent}~~

**Thank you for your feedback, I have notified Moonbear that this response was improper.**`;

// This happens before the message is edited, so we need to fetch the original message
Expand Down
87 changes: 0 additions & 87 deletions src/discord/commands/guild/d.audit.ts

This file was deleted.

3 changes: 3 additions & 0 deletions src/discord/events/guildMemberAdd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
} from '../@types/eventDef';

import trust from '../utils/trust';
import { giveMilestone } from '../../global/utils/experience';

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const F = f(__filename);
Expand Down Expand Up @@ -40,6 +41,8 @@ export const guildMemberAdd: GuildMemberAddEvent = {
if (!guildData.cooperative) return;

await trust(member);
// Run the milestone check to make sure the user gets a level role
await giveMilestone(member);
} catch (err) {
log.error(F, `Error: ${err}`);
log.debug(F, `member: ${JSON.stringify(member)}`);
Expand Down
18 changes: 8 additions & 10 deletions src/discord/events/guildMemberUpdate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { stripIndents } from 'common-tags';
import {
GuildMemberUpdateEvent,
} from '../@types/eventDef';
import { addedVerified } from '../utils/trust';
// import { topic } from '../../global/commands/g.topic';

type MindsetNames =
Expand Down Expand Up @@ -484,9 +483,9 @@ async function addedPatreon(
await channelViplounge.send(stripIndents`
** ${donorEmoji} ${newMember} just contributed further and became a Supporter by \
signing up via [Patreon](<https://www.patreon.com/TripSit>)! ${donorEmoji} **

${thankYouPhrases[Math.floor(Math.random() * thankYouPhrases.length)]}

${donationTagline}`);
} else {
// If added as a first time Patron and donator, give them the premium role and send the message
Expand All @@ -497,9 +496,9 @@ async function addedPatreon(
await channelViplounge.send(stripIndents`
** ${donorEmoji} ${newMember} just became a Supporter and Premium Member \
(first time donator) by signing up via [Patreon](<https://www.patreon.com/TripSit>)! ${donorEmoji} **

${thankYouPhrases[Math.floor(Math.random() * thankYouPhrases.length)]}

${donationTagline}`);
}
}
Expand All @@ -513,9 +512,9 @@ async function addedPatreon(
await channelViplounge.send(stripIndents`
** ${donorEmoji} ${newMember} just made a further contribution by donating via \
[KoFi](<https://ko-fi.com/tripsit>)! ${donorEmoji} **

${thankYouPhrases[Math.floor(Math.random() * thankYouPhrases.length)]}

${donationTagline}`);
} else {
// If donated on KoFi and for the first time, give them the premium role and send the message
Expand All @@ -525,9 +524,9 @@ async function addedPatreon(
await channelViplounge.send(stripIndents`
** ${donorEmoji} ${newMember} just became a Premium Member (first time donator) by donating via \
[KoFi](<https://ko-fi.com/tripsit>)! ${donorEmoji} **

${thankYouPhrases[Math.floor(Math.random() * thankYouPhrases.length)]}

${donationTagline}`);
}
}
Expand All @@ -549,7 +548,6 @@ async function roleAddProcess(
await levelColorCheck(newMember, oldMember, roleId);
await donorColorCheck(newMember, oldMember, roleId);
await teamMindsetCheck(newMember, roleId);
await addedVerified(newMember, roleId);
await addedBooster(newMember, roleId);
await addedPatreon(newMember, roleId);

Expand Down
11 changes: 5 additions & 6 deletions src/discord/utils/tripsitme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ const mindsetRoles = [
];

const otherRoles = [
env.ROLE_VERIFIED,
env.ROLE_PREMIUM,
env.ROLE_BOOSTER,
env.ROLE_PATRON,
Expand Down Expand Up @@ -659,7 +658,7 @@ export async function tripsitmeBackup(
}

backupMessage += stripIndents`team, ${actor} has indicated they could use some backup!

Be sure to read the log so you have the context!`;

if (ticketData.meta_thread_id) {
Expand Down Expand Up @@ -1367,7 +1366,7 @@ export async function tripSitMe(
Someone from the ${roleTripsitter} ${guildData.role_helper && !targetIsTeamMember ? `and/or ${roleHelper}` : ''} team will be with you as soon as they're available!

If this is a medical emergency please contact your local emergency services: we do not call EMS on behalf of anyone.

When you're feeling better you can use the "I'm Good" button to let the team know you're okay.

**Not in an emergency, but still want to talk to a mental health advisor? Warm lines provide non-crisis mental health support and guidance from trained volunteers. https://warmline.org/warmdir.html#directory**
Expand Down Expand Up @@ -1719,7 +1718,7 @@ export async function tripsitmeButton(
const embed = embedTemplate()
.setColor(Colors.DarkBlue)
.setDescription(stripIndents`Hey ${interaction.member}, you have an open session!

Check your channel list or click '${threadHelpUser.toString()} to get help!`);
await interaction.editReply({ embeds: [embed] });
log.debug(F, 'Told user they already have an open channel');
Expand Down Expand Up @@ -1857,9 +1856,9 @@ export async function tripsitmeButton(

const replyMessage = stripIndents`
Hey ${target}, thank you for asking for assistance!

Click here to be taken to your private room: ${threadHelpUser.toString()}

You can also click in your channel list to see your private room!`;
const embed = embedTemplate()
.setColor(Colors.DarkBlue)
Expand Down
Loading
Loading