From 554a82a6e75e4a7f14560b5d36835456fe960f07 Mon Sep 17 00:00:00 2001 From: ECWireless Date: Thu, 21 Dec 2023 09:51:47 -0500 Subject: [PATCH] MC tip copy improvements --- src/index.ts | 13 ++++++------- src/interactions/cs/tipXp.ts | 4 ++-- src/interactions/cs/tipXpAttendance.ts | 2 +- src/interactions/cs/tipXpMc.ts | 8 ++++---- 4 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/index.ts b/src/index.ts index 61dd065..d3813be 100644 --- a/src/index.ts +++ b/src/index.ts @@ -29,7 +29,6 @@ import { DISCORD_ALLOWED_PARENT_CHANNEL_IDS, DISCORD_DM_TOKEN, EXPLORER_URL, - RAIDGUILD_GAME_ADDRESS, TIP_PROPOSAL_REACTION_THRESHOLD } from '@/utils/constants'; import { discordLogger } from '@/utils/logger'; @@ -145,7 +144,7 @@ export const setupDungeonMasterWorker = () => { if (Date.now() > proposalExpiration) { const embed = new EmbedBuilder() - .setTitle('MC XP Tipping Proposal Expired!') + .setTitle(':microphone2: MC XP Tipping Proposal Expired!') .setDescription( `The XP tipping proposal has expired. Please create a new proposal.` ) @@ -157,7 +156,7 @@ export const setupDungeonMasterWorker = () => { } let embed = new EmbedBuilder() - .setTitle('MC XP Tipping Pending...') + .setTitle(':microphone2: MC XP Tipping Pending...') .setColor('#ff3864') .setTimestamp(); @@ -194,7 +193,7 @@ export const setupDungeonMasterWorker = () => { const txHash = tx.hash; embed = new EmbedBuilder() - .setTitle('MC XP Tipping Transaction Pending...') + .setTitle(':microphone2: MC XP Tipping Transaction Pending...') .setURL(`${EXPLORER_URL}/tx/${txHash}`) .setDescription( `Transaction is pending. View your transaction here:\n${EXPLORER_URL}/tx/${txHash}` @@ -215,7 +214,7 @@ export const setupDungeonMasterWorker = () => { await updateLatestXpMcTip(client, 'latestXpMcTips', data); embed = new EmbedBuilder() - .setTitle('MC XP Tipping Transaction Failed!') + .setTitle(':microphone2: MC XP Tipping Transaction Failed!') .setURL(`${EXPLORER_URL}/tx/${txHash}`) .setDescription( `Transaction failed. View your transaction here:\n${EXPLORER_URL}/tx/${txHash}` @@ -227,10 +226,10 @@ export const setupDungeonMasterWorker = () => { return; } - const viewGameMessage = `\n---\nView the game at https://play.raidguild.org/games/gnosis/${RAIDGUILD_GAME_ADDRESS}`; + const viewGameMessage = `\n---\nView the game at https://play.raidguild.org`; embed = new EmbedBuilder() - .setTitle('MC XP Tipping Succeeded!') + .setTitle(':microphone2: MC XP Tipping Succeeded!') .setURL(`${EXPLORER_URL}/tx/${txHash}`) .setDescription( `<@${receivingDiscordId}>'s character received ${MC_XP_TIP_AMOUNT} XP for MC'ing this meeting.${viewGameMessage}` diff --git a/src/interactions/cs/tipXp.ts b/src/interactions/cs/tipXp.ts index c8721f6..91c806f 100644 --- a/src/interactions/cs/tipXp.ts +++ b/src/interactions/cs/tipXp.ts @@ -14,7 +14,7 @@ import { updateLatestXpTip } from '@/lib'; import { ClientWithCommands } from '@/types'; -import { EXPLORER_URL, RAIDGUILD_GAME_ADDRESS } from '@/utils/constants'; +import { EXPLORER_URL } from '@/utils/constants'; import { discordLogger } from '@/utils/logger'; export const tipXpInteraction = async ( @@ -199,7 +199,7 @@ export const tipXpInteraction = async ( const message = (interaction.options.get('message')?.value ?? '') as string; const reasonMessage = message ? `\n---\nReason: **${message}**` : ''; - const viewGameMessage = `\n---\nView the game at https://play.raidguild.org/games/gnosis/${RAIDGUILD_GAME_ADDRESS}`; + const viewGameMessage = `\n---\nView the game at https://play.raidguild.org`; const dmFailureMessage = discordIdsNotInDm.length > 0 diff --git a/src/interactions/cs/tipXpAttendance.ts b/src/interactions/cs/tipXpAttendance.ts index c50be2f..66adb1c 100644 --- a/src/interactions/cs/tipXpAttendance.ts +++ b/src/interactions/cs/tipXpAttendance.ts @@ -179,7 +179,7 @@ export const tipXpAttendanceInteraction = async ( return; } - const viewGameMessage = `\n---\nView the game at https://play.raidguild.org/games/gnosis/${RAIDGUILD_GAME_ADDRESS}`; + const viewGameMessage = `\n---\nView the game at https://play.raidguild.org`; const discordMembersSuccessfullyTipped = discordMembers.filter( m => diff --git a/src/interactions/cs/tipXpMc.ts b/src/interactions/cs/tipXpMc.ts index e7ef80f..a60ef9c 100644 --- a/src/interactions/cs/tipXpMc.ts +++ b/src/interactions/cs/tipXpMc.ts @@ -52,7 +52,7 @@ export const tipXpMcInteraction = async ( if (proposalActive) { const embed = new EmbedBuilder() - .setTitle('Meeting MC XP Tip Proposal') + .setTitle(':microphone2: Meeting MC XP Tip Proposal') .setDescription( `There is already a proposal to tip the MC for this meeting. However, that proposal will expire at ${new Date( proposalExpiration ?? 0 @@ -69,7 +69,7 @@ export const tipXpMcInteraction = async ( if (needsCooldown) { const embed = new EmbedBuilder() - .setTitle('Meeting MC XP Tipping Cooldown') + .setTitle(':microphone2: Meeting MC XP Tipping Cooldown') .setDescription( `All members must wait ${ endTime @@ -209,11 +209,11 @@ export const tipXpMcInteraction = async ( const newProposalExpiration = Date.now() + PROPOSAL_EXPIRATION_TIME; const embed = new EmbedBuilder() - .setTitle('Meeting MC XP Tip Proposal') + .setTitle(':microphone2: Meeting MC XP Tip Proposal') .setDescription( `<@${senderId}> is proposing to tip ${MC_XP_TIP_AMOUNT} XP to <@${ meetingMcDiscordMembers[0]?.id - }> for MC'ing this meeting.\n\nTo approve this tip, please react with an emoji. **${TIP_PROPOSAL_REACTION_THRESHOLD} emoji reactions are required for the tip to succeed**.\n\nThis proposal will expire at ${new Date( + }> for MC'ing this meeting.\n\n@here To approve this tip, please react with an emoji. **${TIP_PROPOSAL_REACTION_THRESHOLD} emoji reactions from unique users are required for the tip to succeed**.\n\nThis proposal will expire at ${new Date( newProposalExpiration ).toLocaleString()}.` )