Added errorh andling, organized commands
This commit is contained in:
25
messages.js
25
messages.js
@ -1,12 +1,31 @@
|
||||
// Message to be sent in news channel for users to see to claim the game key
|
||||
export const NEWS_CHANNEL_MESSAGE = `# CLAIM YOUR SWORDCERY SECRET PLAYTEST STEAM KEY!
|
||||
Any additional playtests we run, can be accessed with this key as well.`;
|
||||
Any additional playtests we run can be accessed with this key as well.`;
|
||||
|
||||
// Message users will see if they are inelligible for the playtest
|
||||
export const INELLIGIBLE_MESSAGE = `**Sorry! You missed the cutoff date for this Swordcery Secret Playtest.**
|
||||
Please stay tuned though as you'll be eligible for any subsequent playtests we run!`;
|
||||
|
||||
export const KEY_DM_MESSAGE = `# Thanks so much for choosing to be part of the Swordcery Secret Playtest!
|
||||
// Message to be sent in logging channel if no more keys are available
|
||||
const NO_MORE_KEYS = `# **⚠️ WARNING - NO MORE DEMO KEYS ⚠️**
|
||||
User {user} tried to register for their game key, but there are none left. Please run \`/load\` to add more keys!`;
|
||||
export function formatNoKeysMessage(id, tag) {
|
||||
return NO_MORE_KEYS.replace('{user}', `${tag} (<@${id}>)`);
|
||||
}
|
||||
|
||||
// Message to be sent in DM to users when they successfully register for a key
|
||||
const KEY_DM_MESSAGE = `# Thanks so much for choosing to be part of the Swordcery Secret Playtest!
|
||||
|
||||
We're excited for you to try the game! Please note that the game is still a work in progress so you may run into some bugs, but we hope the experience is enjoyable.
|
||||
Thanks again for your support!
|
||||
|
||||
Redeem your key: {key}`;
|
||||
Redeem your key: {key}`;
|
||||
export function formatKeyMessage(key) {
|
||||
return KEY_DM_MESSAGE.replace('{key}', `https://store.steampowered.com/account/registerkey?key=${key} (Or enter manually: \`${key}\`)`);
|
||||
}
|
||||
|
||||
const KEY_DM_FAILED = `# ** ⚠️ WARNING - UNABLE TO SEND DM ⚠️**
|
||||
User {user} tried to register for their game key, but Swordcery Key Bot was unable to send them a DM.`
|
||||
export function formatFailedDMMessage(id, tag) {
|
||||
return KEY_DM_FAILED.replace('{user}', `${tag} (<@${id}>)`);
|
||||
}
|
||||
Reference in New Issue
Block a user