Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hipperooni branch #688

Merged
merged 48 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
2fbf957
many changes
Hipperooni May 22, 2023
04e7888
Team Mindset Roles BETA
Hipperooni May 23, 2023
373913b
Update tents to use new voice category
Hipperooni May 23, 2023
5a316ef
I forgot 2 roles
Hipperooni May 23, 2023
fc96abb
Important Fixes
Hipperooni May 24, 2023
ee2d78e
Add "Busy" role to TTS mindsets
Hipperooni May 25, 2023
0afd136
Update futon ID
Hipperooni May 25, 2023
89ac409
Change how deleting tents works
Hipperooni May 25, 2023
6d93cd4
Add bot typing status to announcements
Hipperooni May 25, 2023
1bcac5d
Fix TTS access to donor colours
Hipperooni May 26, 2023
a4615fc
Make typing status 3 seconds
Hipperooni May 26, 2023
ab193ac
Small fixes / updates
Hipperooni May 29, 2023
4c83aa4
Merge main
LunaUrsa May 29, 2023
626a0a6
Merge and lint
LunaUrsa May 29, 2023
e5ec789
Update tents permission overwrites
Hipperooni Jun 2, 2023
1fa91da
Merge branch 'main' of https://github.com/tripsit/TripBot into hipper…
LunaUrsa Jun 8, 2023
54c6b62
belly button linting
LunaUrsa Jun 8, 2023
9d607d8
Bug in knex
LunaUrsa Jun 8, 2023
90ac92d
Merge branch 'main' of https://github.com/tripsit/TripBot into hipper…
LunaUrsa Jun 9, 2023
3d5bfd9
Merge branch 'main' of https://github.com/TripSit/TripBot into hipper…
LunaUrsa Jul 6, 2023
6c58bba
Merge branch 'main' of https://github.com/TripSit/TripBot into hipper…
LunaUrsa Jul 10, 2023
c14975e
Add /voice radio
Hipperooni Jul 30, 2023
61a03db
Add /voice bitrate
Hipperooni Jul 30, 2023
ec82f4b
Merge branch 'main' of https://github.com/tripsit/TripBot into hipper…
LunaUrsa Jul 30, 2023
54b7a0e
Lint that shit
LunaUrsa Jul 30, 2023
c6c0c07
One more lint
LunaUrsa Jul 30, 2023
43f4210
Merge branch 'main' of https://github.com/tripsit/TripBot into hipper…
LunaUrsa Aug 5, 2023
a93d234
Merge branch 'main' of https://github.com/tripsit/TripBot into hipper…
LunaUrsa Aug 10, 2023
16cdcfa
Finish up
LunaUrsa Aug 10, 2023
3db904c
Possible /voice radio fix
Hipperooni Aug 11, 2023
46de4a2
Make "user" entry for /timezone and /birthday required to speed up co…
Hipperooni Aug 11, 2023
e2230b6
Merge branch 'hipperooni-branch' of https://github.com/tripsit/TripBo…
LunaUrsa Aug 11, 2023
23d79a5
Merge branch 'main' of https://github.com/tripsit/TripBot into hipper…
LunaUrsa Aug 11, 2023
f66695f
Merge branch 'main' of https://github.com/tripsit/TripBot into hipper…
LunaUrsa Oct 1, 2023
38fef98
Merge branch 'main' into hipperooni-branch
Hipperooni Oct 1, 2023
768f2cf
Trivia, small fixes
Hipperooni Oct 2, 2023
279c52a
Merge branch 'hipperooni-branch' of https://github.com/tripsit/TripBo…
LunaUrsa Oct 5, 2023
e2448e1
Undo required
LunaUrsa Oct 6, 2023
a78e376
Linting
LunaUrsa Oct 6, 2023
083e375
Fixing actions
LunaUrsa Oct 6, 2023
f19f618
Merge branch 'main' into hipperooni-branch
Hipperooni Oct 28, 2023
3c5615e
New donator system
Hipperooni Oct 28, 2023
555d500
Update env.config.ts
Hipperooni Oct 28, 2023
47e9236
Add kofi link
Hipperooni Oct 28, 2023
c788772
Ignore donor roles in tripsit mode
Hipperooni Oct 30, 2023
ad7ca5b
Merge branch 'hipperooni-branch' of https://github.com/tripsit/TripBo…
LunaUrsa Oct 30, 2023
09e1c08
Update d.donate and a few minor things
LunaUrsa Nov 1, 2023
ab424ba
Add premium role add
LunaUrsa Nov 1, 2023
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
37 changes: 30 additions & 7 deletions src/discord/commands/global/d.donate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,37 @@
const donateInfo = await donate();
const embed = embedTemplate()
.setColor(Colors.Purple)
.setTitle('Donate to keep TripSit running and fund our future projects!')
.setTitle('🚀 **TripSit\'s Donation Info!** 🚀')
.setURL('https://tripsit.me/donate/')
.setDescription(
stripIndents`The best way to support us is to join the discord and help out people!
We run on volunteers and need your help to keep the org going
If you can donate, our preferred method is Patreon, and we're happy for all donation sizes!
You can get supporter benefits for as little as $1 a month!`,
);
.setDescription(stripIndents`
At TripSit, we're all about harm reduction, and we'll never charge for our services or hide information behind paywalls or annoying ads. Our mission is to help anyone who needs it, no strings attached. 🌟

Check warning on line 31 in src/discord/commands/global/d.donate.ts

View workflow job for this annotation

GitHub Actions / Lint

This line has a length of 209. Maximum allowed is 120

But we can't pay for servers with good intentions alone, so your support means the world to us.

There are two awesome ways to contribute:

1️⃣ **Patreon Subscription**
For as little as $1 a month, you can become a patron and keep supporting the good cause. 🌈

2️⃣ **Ko-Fi Donation**
If that isn't your style, you can give a one-time boost to our cause through Ko-Fi. ☕

🎁 What's in it for you? Well, we've got some fantastic benefits for our supporters:

- 📣 **Announcement**: We'll tell the guild you've made a difference in #vip-lounge.
- 🪙 **Gold Lounge Access**: Gain entry to our exclusive donor space, #gold-lounge.
- 🌈 **Special Donor Colors**: Deck out your Discord persona with unique colors.
- 💎 **Supporter Role (Patreon)**: Be shown at the top of the member list with a unique icon.
- 🎉 More surprises are in the works! Your suggestions are welcome.

These are **permanent** benefits, excluding the Supporter role, which is only for active Patreons.

No spare change? Boosting our server will also give you donor perks while your boost is active!

Your donations directly fuel our server costs, ensuring TripSit keeps doing what we do best. 🌐 With enough support, we can even expand and provide new services – who's up for a Minecraft server? 😎

Check warning on line 55 in src/discord/commands/global/d.donate.ts

View workflow job for this annotation

GitHub Actions / Lint

This line has a length of 202. Maximum allowed is 120

Thank you for being a part of our journey, and for helping make the world a safer place! 💕
`);
// for (const entry of donateInfo) {
donateInfo.forEach(entry => {
if (entry.value.length > 0) {
Expand Down
79 changes: 56 additions & 23 deletions src/discord/events/guildMemberUpdate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,18 +106,36 @@ const donorColorRoles = {
[key in DonorColorNames]: string;
};

type DonorNames =
| 'ROLE_BOOSTER'
| 'ROLE_PATRON'
| 'ROLE_TEAMTRIPSIT';

const donorRoles = {
ROLE_BOOSTER: env.ROLE_BOOSTER,
ROLE_PATRON: env.ROLE_PATRON,
ROLE_TEAMTRIPSIT: env.ROLE_TEAMTRIPSIT,
} as {
[key in DonorNames]: string;
};
// type DonorNames =
// | 'ROLE_BOOSTER'
// | 'ROLE_PATRON'
// | 'ROLE_TEAMTRIPSIT';

// const donorRoles = {
// ROLE_BOOSTER: env.ROLE_BOOSTER,
// ROLE_PATRON: env.ROLE_PATRON,
// ROLE_TEAMTRIPSIT: env.ROLE_TEAMTRIPSIT,
// } as {
// [key in DonorNames]: string;
// };

const thankYouPhrases = [
'A heartfelt thanks for their generous contribution. Your support is invaluable!',
"Big shout out for their donation. We couldn't do it without you!",
'Thank you for your incredible support. Your contribution makes a world of difference.',
'Our gratitude knows no bounds. Thank you for helping us grow and thrive.',
"We're over the moon with your donation. Your generosity warms our hearts.",
'A round of applause! Your donation keeps our mission alive and thriving.',
'A standing ovation! Your support illuminates our path forward.',
"With your donation, you've become a crucial part of our journey. Thank you!",
'Thank you for being a beacon of support. You light up our endeavors.',
"Our deepest gratitude for their contribution. Together, we'll reach new heights.",
];

const donationTagline = '*`/donate` to TripSit to access special username colors and the snazzy Gold Lounge!*';

const boostEmoji = env.NODE_ENV === 'production' ? '<:ts_boost:981799280396353596>' : '<:ts_boost:1168968973082185800>';
const donorEmoji = env.NODE_ENV === 'production' ? '<:ts_donor:1121625178774966272>' : '<:ts_donor:1168969578836144233>';

const F = f(__filename);

Expand All @@ -131,7 +149,7 @@ async function donorColorCheck(
// log.debug(F, `donor color role added: ${roleId}`);
// If it does, check if the user also has a donor role
if (oldMember.roles.cache.has(env.ROLE_BOOSTER)
|| oldMember.roles.cache.has(env.ROLE_PATRON)
|| oldMember.roles.cache.has(env.ROLE_PREMIUM)
|| oldMember.roles.cache.has(env.ROLE_TEAMTRIPSIT)) {
log.debug(F, 'Donor added a color role!');
} else {
Expand All @@ -153,8 +171,9 @@ async function donorColorRemove(
) {
// log.debug(F, `donor color role removed: ${roleId}`);
// log.debug(F, `${Object.keys(donorRoles)}`);
// Check if it's a donor role
if (Object.values(donorRoles).includes(roleId)) {
// Check if it's the booster role, if it is, remove colour role if they don't also have the premium role
if ((roleId === env.ROLE_BOOSTER && !newMember.roles.cache.has(env.ROLE_PREMIUM))
|| (roleId === env.ROLE_PREMIUM && !newMember.roles.cache.has(env.ROLE_BOOSTER))) {
// log.debug(F, `donor role removed: ${roleId}`);
// If it does, check if the user also has a role id matching a donorColorRole and if so, remove it
const donorColorRole = newMember.roles.cache.find(role => Object.values(donorColorRoles).includes(role.id));
Expand Down Expand Up @@ -354,21 +373,35 @@ async function addedBooster(
// Check if the role added was a donator role
if (roleId === env.ROLE_BOOSTER) {
// log.debug(F, `${newMember.displayName} boosted the server!`);
const channelGoldlounge = await discordClient.channels.fetch(env.CHANNEL_GOLDLOUNGE) as TextChannel;
await channelGoldlounge.send(`Hey @here, ${newMember} just boosted the server, give them a big thank you for helping to keep this place awesome!`); // eslint-disable-line max-len
const channelviplounge = await discordClient.channels.fetch(env.CHANNEL_VIPLOUNGE) as TextChannel;
await channelviplounge.send(stripIndents`
** ${boostEmoji} ${newMember.toString()} just boosted the server! ${boostEmoji} **

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

${donationTagline}`);
}
}

async function addedPatreon(
newMember: GuildMember,
roleId: string,
) {
// Check if the role added was a donator role
if (roleId === env.ROLE_PATRON) {
// log.debug(F, `${newMember.displayName} became a patron!`);
const channelGoldlounge = await discordClient.channels.fetch(env.CHANNEL_GOLDLOUNGE) as TextChannel;
const isProd = env.NODE_ENV === 'production';
await channelGoldlounge.send(`Hey ${isProd ? '@here' : 'here'}, ${newMember} just became a patron, give them a big thank you for helping us keep the lights on and expand!`); // eslint-disable-line max-len
if (roleId === env.ROLE_PATRON && !newMember.roles.cache.has(env.ROLE_PREMIUM)) {
// Check if the user already has the premium role
// If they don't add it, and send the message, remove the patreon role
const role = await newMember.guild.roles.fetch(env.ROLE_PREMIUM) as Role;
// log.debug(F, `Adding ${role.name} from ${newMember.displayName}`);
await newMember.roles.add(role);
// log.debug(F, `Added ${role.name} from ${newMember.displayName}`);

const channelviplounge = await discordClient.channels.fetch(env.CHANNEL_VIPLOUNGE) as TextChannel;
await channelviplounge.send(stripIndents`
** ${donorEmoji} ${newMember} just became a Premium Member by donating via [Patreon](<https://www.patreon.com/TripSit>) or [KoFi](<https://ko-fi.com/tripsit>)! ${donorEmoji} **

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

${donationTagline}`);
}
}

Expand Down
3 changes: 3 additions & 0 deletions src/discord/utils/tripsitme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ const mindsetRoles = [

const otherRoles = [
env.ROLE_VERIFIED,
env.ROLE_PREMIUM,
env.ROLE_BOOSTER,
env.ROLE_PATRON,
];

const ignoredRoles = `${teamRoles},${colorRoles},${mindsetRoles},${otherRoles}`;
Expand Down
10 changes: 5 additions & 5 deletions src/global/commands/g.donate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ export default donate;
export async function donate():Promise<DonateResource[]> {
const response = [
{
name: 'Patreon (Preferred)',
name: 'Patreon Subscription',
value: 'https://patreon.com/tripsit',
},
{
name: 'Discord Boosts',
value: 'http://discord.gg/TripSit',
name: 'KoFi Tips',
value: 'https://ko-fi.com/tripsit',
},
{
name: '\u200B',
value: '\u200B',
name: 'Discord Boosts',
value: 'http://discord.gg/TripSit',
},
{
name: 'Spreadshop',
Expand Down
6 changes: 2 additions & 4 deletions src/global/utils/env.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,8 @@ export const env = {
ROLE_VUTEUNDERBAN: isProd ? '991811318464139416' : '989287082222579792',

ROLE_PATRON: isProd ? '954133862601089095' : '1052644652349665310',
ROLE_TREE: isProd ? '954133862601089095' : '960606558050480148',
ROLE_SPROUT: isProd ? '955618510631993414' : '960606557622657033',
ROLE_SEEDLING: isProd ? '955618661274644491' : '960606557622657032',
ROLE_BOOSTER: isProd ? '853082033224024135' : '980116577846431774',
ROLE_BOOSTER: isProd ? '853082033224024135' : '1167725202302574642',
ROLE_PREMIUM: isProd ? '1139454371613122640' : '1167714206418735144',

ROLE_DRUNK: isProd ? '955485069294854154' : '1052644628639252500',
ROLE_HIGH: isProd ? '955482289335320626' : '1052644630912577586',
Expand Down
Loading