Skip to content

Commit

Permalink
RPG updates
Browse files Browse the repository at this point in the history
* many changes

Added /message
Added roleAudits for donor colours in onboarding
Added typing status to /say

* Team Mindset Roles BETA

It works, but is kinda slow sometimes, probably some inefficient looping

* Update tents to use new voice category

Tents are now in their own category

* I forgot 2 roles

I am silly

* Important Fixes

Make AFK channel immune to deletion
Make TTS role count as donor for donor colours

* Add "Busy" role to TTS mindsets

* Update futon ID

Silly bot keeps deleting it

* Change how deleting tents works

Changed from checking explicit IDs to not delete to simply checking if a voice channel includes a tent emoji or not

* Add bot typing status to announcements

* Fix TTS access to donor colours

* Make typing status 3 seconds

* Small fixes / updates

Add 'busy' role to TTS mindsets
Make tripbot typing 3 seconds instead of 1.5
Add typing to announcements
Change how tent deletion works
Update IDs in env

* Merge and lint

* Update tents permission overwrites

* belly button linting

* Bug in knex

* Add /voice radio

First pass, needs work and add function of changing the tent name to signify the bot is being borrowed

* Add /voice bitrate

Allows editing of bitrate

* Lint that shit

* One more lint

* Finish up

* Possible /voice radio fix

No way to test in dev. Incorporated what was originally a separate function (checking if there is already a radio bot in the channel before moving a new one in), into the same part of the code that checks if the radio is available and pulls it in

* Make "user" entry for /timezone and /birthday required to speed up command entry

* Trivia, small fixes

Re-enabled Trivia
Stopped Verified role from being removed during tripsit session (stops welcome messages)
Added code for /voice add (disabled)
Removed /voice radio (just way too buggy)
Small edit to welcome message

* Undo required

* Linting

* Fixing actions

* New donator system

Becoming a patron sub now also gives the "Premium Member" role. This new role is what activates all the donator benefits. Supporter role now only acts as a cosmetic with as a hoisted role with gem icon.

Premium Member is permanent for Patreon or Kofi donations. Booster is unchanged and all donator perks for boosters is removed once they stop boosting.

* Update env.config.ts

* Add kofi link

* Ignore donor roles in tripsit mode

To prevent duplicate donation announcement messages

* Update d.donate and a few minor things

* Add premium role add

* Add 4 new backgrounds, remove multipliers

* Add premium and legacy icon to /profile and /levels

* Oops

* Better implementation

* Better implementation v2

* Update background URLs

* lint that belly button

* Commit of shame

* Incredible new icon slot system + medal colours

Future proof icon system, and added gold, silver and bronze colouring to top ranks in /levels

* [EXPERIMENTAL] Donation trigger system

Can differentiate between all types of donations and act accordingly.

* Making /levels actually modular

* Remove debug

* VoiceXP in levels fix & Basic code for flairs (inactive)

* Make total rank use actual total, not just text total

* /profile Pixel peep positioning fix

* Made /profile icons more intuitive

* Rooni needs to lint =P

* Update env.config with trigger role

* Fix for voice xp bar appearing even if level 0

* Big triptown backgrounds update + level icon fixes

A wonderful day

* Add link to background images to view easier

* Even more backgrounds

* Add Unequip and Sell options to rpgHome, and better button logic

* Linting =P

---------

Co-authored-by: Hipperooni <[email protected]>
  • Loading branch information
LunaUrsa and Hipperooni authored Nov 15, 2023
1 parent df91559 commit d517c5d
Show file tree
Hide file tree
Showing 6 changed files with 596 additions and 155 deletions.
24 changes: 12 additions & 12 deletions src/discord/commands/guild/d.levels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ export const dLevels: SlashCommand = {

// Default Progress Bars Calculate
// const progressText = levelData.TEXT.TOTAL.level_exp / levelData.TEXT.TOTAL.nextLevel;
const progressTotal = levelData.ALL.TOTAL.level_exp / levelData.TEXT.TOTAL.nextLevel;
const progressTotal = levelData.ALL.TOTAL.level_exp / levelData.ALL.TOTAL.nextLevel;
const progressGeneral = levelData.TEXT.GENERAL
? levelData.TEXT.GENERAL.level_exp / levelData.TEXT.GENERAL.nextLevel
: 0;
Expand Down Expand Up @@ -790,27 +790,27 @@ export const dLevels: SlashCommand = {

// Choose and Draw the Level Image
let LevelImagePath = '' as string;
if (levelData.TEXT.TOTAL.level < 10) {
if (levelData.ALL.TOTAL.level <= 9) {
LevelImagePath = 'badgeVip0';
} else if (levelData.TEXT.TOTAL.level < 20) {
} else if (levelData.ALL.TOTAL.level <= 19) {
LevelImagePath = 'badgeVip1';
} else if (levelData.TEXT.TOTAL.level < 30) {
} else if (levelData.ALL.TOTAL.level <= 29) {
LevelImagePath = 'badgeVip2';
} else if (levelData.TEXT.TOTAL.level < 40) {
} else if (levelData.ALL.TOTAL.level <= 39) {
LevelImagePath = 'badgeVip3';
} else if (levelData.TEXT.TOTAL.level < 50) {
} else if (levelData.ALL.TOTAL.level <= 49) {
LevelImagePath = 'badgeVip4';
} else if (levelData.TEXT.TOTAL.level < 60) {
} else if (levelData.ALL.TOTAL.level <= 59) {
LevelImagePath = 'badgeVip5';
} else if (levelData.TEXT.TOTAL.level < 70) {
} else if (levelData.ALL.TOTAL.level <= 69) {
LevelImagePath = 'badgeVip6';
} else if (levelData.TEXT.TOTAL.level < 80) {
} else if (levelData.ALL.TOTAL.level <= 79) {
LevelImagePath = 'badgeVip7';
} else if (levelData.TEXT.TOTAL.level < 90) {
} else if (levelData.ALL.TOTAL.level <= 89) {
LevelImagePath = 'badgeVip8';
} else if (levelData.TEXT.TOTAL.level < 100) {
} else if (levelData.ALL.TOTAL.level <= 99) {
LevelImagePath = 'badgeVip9';
} else if (levelData.TEXT.TOTAL.level >= 100) {
} else if (levelData.ALL.TOTAL.level >= 100) {
LevelImagePath = 'badgeVip10';
}
const LevelImage = await Canvas.loadImage(await imageGet(LevelImagePath));
Expand Down
22 changes: 11 additions & 11 deletions src/discord/commands/guild/d.profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -514,25 +514,25 @@ export const dProfile: SlashCommand = {

// Choose and Draw the Level Image
let LevelImagePath = '' as string;
if (totalTextData.level < 10) {
if (totalTextData.level <= 9) {
LevelImagePath = 'badgeVip0';
} else if (totalTextData.level < 20) {
} else if (totalTextData.level <= 19) {
LevelImagePath = 'badgeVip1';
} else if (totalTextData.level < 30) {
} else if (totalTextData.level <= 29) {
LevelImagePath = 'badgeVip2';
} else if (totalTextData.level < 40) {
} else if (totalTextData.level <= 39) {
LevelImagePath = 'badgeVip3';
} else if (totalTextData.level < 50) {
} else if (totalTextData.level <= 49) {
LevelImagePath = 'badgeVip4';
} else if (totalTextData.level < 60) {
} else if (totalTextData.level <= 59) {
LevelImagePath = 'badgeVip5';
} else if (totalTextData.level < 70) {
} else if (totalTextData.level <= 69) {
LevelImagePath = 'badgeVip6';
} else if (totalTextData.level < 80) {
} else if (totalTextData.level <= 79) {
LevelImagePath = 'badgeVip7';
} else if (totalTextData.level < 90) {
} else if (totalTextData.level <= 89) {
LevelImagePath = 'badgeVip8';
} else if (totalTextData.level < 100) {
} else if (totalTextData.level <= 99) {
LevelImagePath = 'badgeVip9';
} else if (totalTextData.level >= 100) {
LevelImagePath = 'badgeVip10';
Expand Down Expand Up @@ -681,7 +681,7 @@ export async function getProfilePreview(target: GuildMember, imagePath: string,
context.restore();
}

context.drawImage(Icons, 5, -2, 913, 292);
context.drawImage(Icons, 0, 0);

// Overly complicated avatar clip (STATUS CLIP COMMENTED OUT)
context.save();
Expand Down
Loading

0 comments on commit d517c5d

Please sign in to comment.