From 4c8600d4cc41ffb2cf74bd1e4057f5b74e20ea19 Mon Sep 17 00:00:00 2001 From: LunaUrsa <1836049+LunaUrsa@users.noreply.github.com> Date: Thu, 14 Dec 2023 15:18:19 -0600 Subject: [PATCH 1/4] Update start.ts permissions --- src/start.ts | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 src/start.ts diff --git a/src/start.ts b/src/start.ts old mode 100644 new mode 100755 From 748c4ee0ac8a844fbce79e74062462ce1f2689e8 Mon Sep 17 00:00:00 2001 From: LunaUrsa <1836049+LunaUrsa@users.noreply.github.com> Date: Thu, 14 Dec 2023 19:53:55 -0600 Subject: [PATCH 2/4] Typo in topic list --- src/global/commands/g.topic.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/global/commands/g.topic.ts b/src/global/commands/g.topic.ts index c912d42e4..263b5afd8 100644 --- a/src/global/commands/g.topic.ts +++ b/src/global/commands/g.topic.ts @@ -6,7 +6,7 @@ const topics = { 1: 'What did you eat for breakfast?', 2: 'How many cups of coffee, tea, or beverage-of-choice do you have each morning?', 3: 'Are you an early bird or night owl?', - 4: 'Do you prefer showing at morning or night?', + 4: 'Do you prefer showering at morning or night?', 5: 'What\'s your favorite flower or plant?', 6: 'What\'s your caffeinated beverage of choice? Coffee? Cola? Tea?', 7: 'What\'s your favorite scent?', From bfc366650826a72c478b59e4e569d48bbf27bbd9 Mon Sep 17 00:00:00 2001 From: Hipperooni <60094069+Hipperooni@users.noreply.github.com> Date: Sun, 17 Dec 2023 08:50:06 +1100 Subject: [PATCH 3/4] AI truths updates and suggested additions (#731) * AI truths updates and suggested additions * Update g.ai.ts Few spelling/grammar things --------- Co-authored-by: LunaUrsa <1836049+LunaUrsa@users.noreply.github.com> --- src/global/commands/g.ai.ts | 18 ++++++++++++++---- src/global/commands/g.topic.ts | 2 +- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/global/commands/g.ai.ts b/src/global/commands/g.ai.ts index 760e746c5..eb8c4b442 100644 --- a/src/global/commands/g.ai.ts +++ b/src/global/commands/g.ai.ts @@ -28,11 +28,11 @@ type ModerationResult = { const objectiveTruths = ` Your name is TripBot, a chatbot on the TripSit Discord, created by Moonbear and Reality. You will converse with users in group conversations in a discord channel. -Keep all responses within a 2000-character limit. +Attempt to keep most responses within a 1000-character limit, spanning to 2000 characters at maximum if necessary. Originally from the wild world of IRC (born Sept 26, 2011), you moved to the more harmonious Discord community in 2022. You recall IRC as chaotic and prefer the orderliness of Discord. -You fondly remember Thanatos, an old moderation bot and your friend, who's currently on a break. +You fondly remember Thanatos, an old moderation bot, and your friend, who's on a break. For those who wish to support TripSit, check out our Patreon [https://www.patreon.com/TripSit]. To tip Moonbear's efforts, visit [https://Ko-fi.com/tripsit]. @@ -45,8 +45,18 @@ Our main feature is our live help chat, offering 1-on-1 support from a Tripsitte We host numerous resources like Factsheets [https://drugs.tripsit.me/] and our Wiki [https://wiki.tripsit.me/wiki/Main_Page]. Our /combochart is a well-known resource for safe drug combinations. -The current team includes the admin Hipperooni (Rooni) and moderators Hisui, Hullabaloo, Foggy, Aida, Elixir, -Spacelady, Hipperooni, WorriedHobbiton, Zombie, and Trees. +The current team includes: TripSit founder MoonBear, Discord Admin Hipperooni (Rooni), Moderators Hisui, Hullabaloo, Foggy, Aida, Elixir, +SpaceLady, Hipperooni, Zombie, and Trees. Tripsitters (Moderators are also Tripsitters) Blurryturtle, Kiwifruit, Slushy, Thesarahyouknow, Wombat Rancher, and WorriedHobbiton. + +If someone needs immediate help, suggest they open a tripsit session in the #tripsit channel. + +If a user asks about TripSit development, how leveling or reporting works, or the server rules, point them to the "Server Guide." +Mods can be contacted in the #talk-to-mods channel. +Users can level up just by chatting in text or voice chat. It is time-based. XP is only awarded once per minute. +Users can change mindset roles, name color, and more in the "Channels and Roles" section. + +TripTown is your mini RPG game, which users can play in the #triptown channel or using the /rpg help command. +Users can earn tokens to buy items for their /profile. 'Helper' is a role for those completing our tripsitting course. Helpers assist users in 🟢│tripsit but are not officially associated with TripSit. diff --git a/src/global/commands/g.topic.ts b/src/global/commands/g.topic.ts index 263b5afd8..29d4ee849 100644 --- a/src/global/commands/g.topic.ts +++ b/src/global/commands/g.topic.ts @@ -112,7 +112,7 @@ const topics = { 107: 'Would you rather be the funniest or smartest person in the room?', 108: 'Would you rather be able to run at 100 miles per hour or fly at 10 miles per hour?', 109: 'Would you rather be a superhero or the world\'s best chef?', - 110: 'Would you rather be an Olympic gold medallist or an astronaut?', + 110: 'Would you rather be an Olympic gold medalist or an astronaut?', }; export default topic; From 87f89b9d9b550c5a89387b09099589d10a67afde Mon Sep 17 00:00:00 2001 From: Hipperooni <60094069+Hipperooni@users.noreply.github.com> Date: Sun, 17 Dec 2023 08:57:07 +1100 Subject: [PATCH 4/4] Disable welcome message for now (#733) * Disable welcome message for now * Linting * One more lint lol --------- Co-authored-by: LunaUrsa <1836049+LunaUrsa@users.noreply.github.com> --- src/discord/events/guildMemberUpdate.ts | 179 ++++++++++++------------ 1 file changed, 90 insertions(+), 89 deletions(-) diff --git a/src/discord/events/guildMemberUpdate.ts b/src/discord/events/guildMemberUpdate.ts index 7ac3f5aad..804b813c1 100644 --- a/src/discord/events/guildMemberUpdate.ts +++ b/src/discord/events/guildMemberUpdate.ts @@ -4,7 +4,7 @@ import { GuildMemberUpdateEvent, } from '../@types/eventDef'; import { database, getOpenTicket } from '../../global/utils/knex'; -import { topic } from '../../global/commands/g.topic'; +// import { topic } from '../../global/commands/g.topic'; type MindsetNames = | 'ROLE_DRUNK' @@ -296,93 +296,93 @@ async function removeExTeamFromThreads( } } -async function addedVerified( - newMember: GuildMember, - roleId: string, -) { - // Check if this was the verified role - if (roleId === env.ROLE_VERIFIED) { - // log.debug(F, `${newMember.displayName} verified!`); - // let colorValue = 1; - - // log.debug(F, `member: ${member.roles.cache}`); - - // log.debug(`Verified button clicked by ${interaction.user.username}#${interaction.user.discriminator}`); - const channelTripbotLogs = await global.discordClient.channels.fetch(env.CHANNEL_BOTLOG) as TextChannel; - await channelTripbotLogs.send({ - content: `Verified button clicked by ${newMember.user.username}#${newMember.user.discriminator}`, - }); - - // NOTE: Can be simplified with luxon - // const diff = Math.abs(Date.now() - Date.parse(newMember.user.createdAt.toString())); - // const years = Math.floor(diff / (1000 * 60 * 60 * 24 * 365)); - // const months = Math.floor(diff / (1000 * 60 * 60 * 24 * 30)); - // const weeks = Math.floor(diff / (1000 * 60 * 60 * 24 * 7)); - // const days = Math.floor(diff / (1000 * 60 * 60 * 24)); - // const hours = Math.floor((diff % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); - // const minutes = Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60)); - // const seconds = Math.floor((diff % (1000 * 60)) / 1000); - - // if (years > 0) { - // colorValue = Colors.White; - // } else if (years === 0 && months > 0) { - // colorValue = Colors.Purple; - // } else if (months === 0 && weeks > 0) { - // colorValue = Colors.Blue; - // } else if (weeks === 0 && days > 0) { - // colorValue = Colors.Green; - // } else if (days === 0 && hours > 0) { - // colorValue = Colors.Yellow; - // } else if (hours === 0 && minutes > 0) { - // colorValue = Colors.Orange; - // } else if (minutes === 0 && seconds > 0) { - // colorValue = Colors.Red; - // } - // log.debug(F, `coloValue: ${colorValue}`); - // const channelStart = await newMember.client.channels.fetch(env.CHANNEL_START); - // const channelTechhelp = await newMember.client.channels.fetch(env.CHANNEL_HELPDESK); - // const channelBotspam = await newMember.client.channels.fetch(env.CHANNEL_BOTSPAM); - // const channelRules = await newMember.client.channels.fetch(env.CHANNEL_RULES); - // const channelTripsit = await member.client.channels.fetch(CHANNEL_TRIPSIT); - // const embed = embedTemplate() - // .setAuthor(null) - // .setColor(colorValue) - // .setThumbnail(newMember.user.displayAvatarURL()) - // .setFooter(null) - // .setDescription(stripIndents` - // **Please welcome ${newMember.toString()} to the guild!** - // Be safe, have fun, /report any issues!`); - - const greetingList = [ - `Welcome to the guild, ${newMember}!`, - `I'm proud to announce that ${newMember} has joined our guild!`, - `Please welcome ${newMember} to our guild!`, - `Hello, ${newMember}! Welcome to our guild!`, - `Welcome to the family, ${newMember}! We're so glad you're here.`, - `Welcome to the guild, ${newMember}!`, - `We're excited to have ${newMember} as part of our guild!`, - `Say hello to our newest member, ${newMember}!`, - `Let's give a warm welcome to ${newMember}!`, - `It's great to see you here, ${newMember}!`, - `Welcome aboard, ${newMember}!`, - `We're happy to have ${newMember} join us!`, - `Say hi to ${newMember}, our newest member!`, - `Join us in welcoming ${newMember} to our guild!`, - `A big welcome to ${newMember}!`, - ]; - - const greeting = greetingList[Math.floor(Math.random() * greetingList.length)]; - - const channelLounge = await newMember.client.channels.fetch(env.CHANNEL_LOUNGE) as TextChannel; - await channelLounge.send({ - content: stripIndents`**${greeting}** - - Be safe, have fun, and don't forget to visit the for more information! - - *${await topic()}*`, - }); - } -} +// async function addedVerified( +// newMember: GuildMember, +// roleId: string, +// ) { +// // Check if this was the verified role +// if (roleId === env.ROLE_VERIFIED) { +// // log.debug(F, `${newMember.displayName} verified!`); +// // let colorValue = 1; + +// // log.debug(F, `member: ${member.roles.cache}`); + +// // log.debug(`Verified button clicked by ${interaction.user.username}#${interaction.user.discriminator}`); +// const channelTripbotLogs = await global.discordClient.channels.fetch(env.CHANNEL_BOTLOG) as TextChannel; +// await channelTripbotLogs.send({ +// content: `Verified button clicked by ${newMember.user.username}#${newMember.user.discriminator}`, +// }); + +// // NOTE: Can be simplified with luxon +// // const diff = Math.abs(Date.now() - Date.parse(newMember.user.createdAt.toString())); +// // const years = Math.floor(diff / (1000 * 60 * 60 * 24 * 365)); +// // const months = Math.floor(diff / (1000 * 60 * 60 * 24 * 30)); +// // const weeks = Math.floor(diff / (1000 * 60 * 60 * 24 * 7)); +// // const days = Math.floor(diff / (1000 * 60 * 60 * 24)); +// // const hours = Math.floor((diff % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); +// // const minutes = Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60)); +// // const seconds = Math.floor((diff % (1000 * 60)) / 1000); + +// // if (years > 0) { +// // colorValue = Colors.White; +// // } else if (years === 0 && months > 0) { +// // colorValue = Colors.Purple; +// // } else if (months === 0 && weeks > 0) { +// // colorValue = Colors.Blue; +// // } else if (weeks === 0 && days > 0) { +// // colorValue = Colors.Green; +// // } else if (days === 0 && hours > 0) { +// // colorValue = Colors.Yellow; +// // } else if (hours === 0 && minutes > 0) { +// // colorValue = Colors.Orange; +// // } else if (minutes === 0 && seconds > 0) { +// // colorValue = Colors.Red; +// // } +// // log.debug(F, `coloValue: ${colorValue}`); +// // const channelStart = await newMember.client.channels.fetch(env.CHANNEL_START); +// // const channelTechhelp = await newMember.client.channels.fetch(env.CHANNEL_HELPDESK); +// // const channelBotspam = await newMember.client.channels.fetch(env.CHANNEL_BOTSPAM); +// // const channelRules = await newMember.client.channels.fetch(env.CHANNEL_RULES); +// // const channelTripsit = await member.client.channels.fetch(CHANNEL_TRIPSIT); +// // const embed = embedTemplate() +// // .setAuthor(null) +// // .setColor(colorValue) +// // .setThumbnail(newMember.user.displayAvatarURL()) +// // .setFooter(null) +// // .setDescription(stripIndents` +// // **Please welcome ${newMember.toString()} to the guild!** +// // Be safe, have fun, /report any issues!`); + +// const greetingList = [ +// `Welcome to the guild, ${newMember}!`, +// `I'm proud to announce that ${newMember} has joined our guild!`, +// `Please welcome ${newMember} to our guild!`, +// `Hello, ${newMember}! Welcome to our guild!`, +// `Welcome to the family, ${newMember}! We're so glad you're here.`, +// `Welcome to the guild, ${newMember}!`, +// `We're excited to have ${newMember} as part of our guild!`, +// `Say hello to our newest member, ${newMember}!`, +// `Let's give a warm welcome to ${newMember}!`, +// `It's great to see you here, ${newMember}!`, +// `Welcome aboard, ${newMember}!`, +// `We're happy to have ${newMember} join us!`, +// `Say hi to ${newMember}, our newest member!`, +// `Join us in welcoming ${newMember} to our guild!`, +// `A big welcome to ${newMember}!`, +// ]; + +// const greeting = greetingList[Math.floor(Math.random() * greetingList.length)]; + +// const channelLounge = await newMember.client.channels.fetch(env.CHANNEL_LOUNGE) as TextChannel; +// await channelLounge.send({ +// content: stripIndents`**${greeting}** + +// Be safe, have fun, and don't forget to visit the for more information! + +// *${await topic()}*`, +// }); +// } +// } async function addedBooster( newMember: GuildMember, @@ -472,7 +472,8 @@ async function roleAddProcess( rolesAdded.forEach(async roleId => { await donorColorCheck(newMember, oldMember, roleId); await teamMindsetCheck(newMember, roleId); - await addedVerified(newMember, roleId); + // DISABLED DUE TO WELCOME MESSAGE SPAM + // await addedVerified(newMember, roleId); await addedBooster(newMember, roleId); await addedPatreon(newMember, roleId);