2021-11-21 22:11:10 -08:00
import config from "../config.ts" ;
export const constantCmds = {
apiDeleteFail : {
embeds : [ {
fields : [ {
name : "Failed to delete this guild from the database." ,
value : "If this issue persists, please report this to the developers."
} ]
} ]
} ,
apiGuildOnly : {
embeds : [ {
title : "API commands are only available in guilds."
} ]
} ,
apiHelp : {
embeds : [
{
fields : [
{
name : "The Artificer's API Details:" ,
value : ` The Artificer has a built in API that allows user to roll dice into Discord using third party programs.
2022-05-09 16:18:49 -07:00
By default , API rolls are blocked from being sent in your guild . The API warning is also enabled by default .
2021-11-21 22:11:10 -08:00
These commands may only be used by the Owner or Admins of your guild .
For information on how to use the API , please check the GitHub README for more information [ here ] ( https : //github.com/Burn-E99/TheArtificer).
You may enable and disable the API rolls for your guild as needed . `
}
]
} , {
title : "Available API Commands:" ,
fields : [
{
2022-05-04 23:19:19 -07:00
name : ` \` ${ config . prefix } api help \` ` ,
2021-11-21 22:11:10 -08:00
value : "This command" ,
inline : true
} , {
2022-05-04 23:19:19 -07:00
name : ` \` ${ config . prefix } api status \` ` ,
2022-05-09 16:18:49 -07:00
value : "Shows the current status of the API for the channel this was run in" ,
2021-11-21 22:11:10 -08:00
inline : true
} , {
2022-05-04 23:19:19 -07:00
name : ` \` ${ config . prefix } api allow/enable \` ` ,
2022-05-09 16:18:49 -07:00
value : "Allows API Rolls to be sent to the channel this was run in" ,
2021-11-21 22:11:10 -08:00
inline : true
} , {
2022-05-04 23:19:19 -07:00
name : ` \` ${ config . prefix } api block/disable \` ` ,
2022-05-09 16:18:49 -07:00
value : "Blocks API Rolls from being sent to the channel this was run in" ,
2021-11-21 22:11:10 -08:00
inline : true
} , {
2022-05-04 23:19:19 -07:00
name : ` \` ${ config . prefix } api delete \` ` ,
2022-05-09 16:18:49 -07:00
value : "Deletes this channel's settings from The Artificer's database" ,
inline : true
} , {
name : ` \` ${ config . prefix } api show-warn \` ` ,
value : "Shows the API warning on all rolls sent to the channel this was run in" ,
inline : true
} , {
name : ` \` ${ config . prefix } api hide-warn \` ` ,
value : "Hides the API warning on all rolls sent to the channel this was run in" ,
2021-11-21 22:11:10 -08:00
inline : true
}
]
}
]
} ,
apiPermError : {
embeds : [ {
fields : [ {
name : "API commands are powerful and can only be used by guild Owners and Admins." ,
value : "For information on how to use the API, please check the GitHub README for more information [here](https://github.com/Burn-E99/TheArtificer)."
} ]
} ]
} ,
apiRemoveGuild : {
embeds : [ {
title : "This guild's API setting has been removed from The Artifier's Database."
} ]
} ,
apiStatusFail : {
embeds : [ {
fields : [ {
name : "Failed to check API rolls status for this guild." ,
value : "If this issue persists, please report this to the developers."
} ]
} ]
} ,
help : {
embeds : [ {
title : "The Artificer's Available Commands:" ,
fields : [
{
2022-05-04 23:19:19 -07:00
name : ` \` ${ config . prefix } ? \` ` ,
2021-11-21 22:11:10 -08:00
value : "This command" ,
inline : true
} , {
2022-05-04 23:19:19 -07:00
name : ` \` ${ config . prefix } rollhelp \` or \` ${ config . prefix } ?? \` ` ,
value : ` Details on how to use the roll command, listed as \` ${ config . prefix } xdy... ${ config . postfix } \` below ` ,
2021-11-21 22:11:10 -08:00
inline : true
} , {
2022-05-04 23:19:19 -07:00
name : ` \` ${ config . prefix } api [subcommand] \` ` ,
value : ` Administrative tools for the bots's API, run \` ${ config . prefix } api help \` for more details ` ,
2021-11-21 22:11:10 -08:00
inline : true
} , {
2022-05-04 23:19:19 -07:00
name : ` \` ${ config . prefix } ping \` ` ,
2021-11-21 22:11:10 -08:00
value : "Pings the bot to check connectivity" ,
inline : true
} , {
2022-05-04 23:19:19 -07:00
name : ` \` ${ config . prefix } info \` ` ,
2021-11-21 22:11:10 -08:00
value : "Prints some information and links relating to the bot" ,
inline : true
} , {
2022-05-04 23:19:19 -07:00
name : ` \` ${ config . prefix } privacy \` ` ,
2021-11-21 22:11:10 -08:00
value : "Prints some information about the Privacy Policy" ,
inline : true
} , {
2022-05-04 23:19:19 -07:00
name : ` \` ${ config . prefix } version \` ` ,
2021-11-21 22:11:10 -08:00
value : "Prints the bots version" ,
inline : true
} , {
2022-05-04 23:19:19 -07:00
name : ` \` ${ config . prefix } popcat \` ` ,
2021-11-21 22:11:10 -08:00
value : "Popcat" ,
inline : true
} , {
2022-05-04 23:19:19 -07:00
name : ` \` ${ config . prefix } report [text] \` ` ,
2021-11-21 22:11:10 -08:00
value : "Report a command that failed to run" ,
inline : true
} , {
2022-05-04 23:19:19 -07:00
name : ` \` ${ config . prefix } stats \` ` ,
2021-11-21 22:11:10 -08:00
value : "Statistics on the bot" ,
inline : true
} , {
2022-05-04 23:19:19 -07:00
name : ` \` ${ config . prefix } xdydzracsq! ${ config . postfix } \` ... ` ,
value : ` Rolls all configs requested, you may repeat the command multiple times in the same message (just ensure you close each roll with \` ${ config . postfix } \` ), run \` ${ config . prefix } ?? \` for more details ` ,
2021-11-21 22:11:10 -08:00
inline : true
}
]
} ]
} ,
indev : {
embeds : [ {
title : "Command is in development, please try again later."
} ]
} ,
info : {
embeds : [ {
fields : [ {
name : "The Artificer, a Discord bot that specializing in rolling dice and calculating math" ,
value : ` The Artificer is developed by Ean AKA Burn_E99.
Additional information can be found on my website [ here ] ( https : //discord.burne99.com/TheArtificer/).
Want to check out my source code ? Check it out [ here ] ( https : //github.com/Burn-E99/TheArtificer).
Need help with this bot ? Join my support server [ here ] ( https : //discord.gg/peHASXMZYv).`
} ]
} ]
} ,
2022-05-05 20:08:30 -07:00
loadingStats : {
embeds : [ {
title : "Compiling latest statistics . . ."
} ]
} ,
2022-05-13 15:57:45 -07:00
mention : {
embeds : [ {
title : ` Hello! I am ${ config . name } ! ` ,
fields : [ {
name : "I am a bot that specializes in rolling dice and doing basic algebra" ,
value : ` To learn about my available commands, please run \` ${ config . prefix } help \` `
} ]
} ]
} ,
2021-11-21 22:11:10 -08:00
privacy : {
embeds : [ {
title : "Privacy Policy" ,
fields : [ {
name : "The Artificer does not track or collect user information via Discord." ,
2022-05-04 23:19:19 -07:00
value : ` The only user submitted information that is stored is submitted via the \` ${ config . prefix } report \` command. This information is only stored for a short period of time in a location that only the Developer of The Artificer can see.
2021-11-21 22:11:10 -08:00
For more details , please check out the Privacy Policy on the GitHub [ here ] ( https : //github.com/Burn-E99/TheArtificer/blob/master/PRIVACY.md).
Terms of Service can also be found on GitHub [ here ] ( https : //github.com/Burn-E99/TheArtificer/blob/master/TERMS.md).`
} ]
} ]
} ,
report : {
embeds : [ {
fields : [ {
name : "Failed command has been reported to my developer." ,
value : ` For more in depth support, and information about planned maintenance, please join the support server [here](https://discord.gg/peHASXMZYv). `
} ]
} ]
} ,
2022-05-04 22:46:47 -07:00
reportFail : {
embeds : [ {
fields : [ {
name : "Please provide a short description of what failed" ,
value : "Providing a short description helps my developer quickly diagnose what went wrong."
} ]
} ]
} ,
2021-11-21 22:11:10 -08:00
rip : {
embeds : [ {
fields : [ {
name : "The Artificer was built in memory of my Grandmother, Babka" ,
value : ` With much love, Ean
December 21 , 2020 `
} ]
} ]
} ,
rollHelp : {
embeds : [
{
title : "The Artificer's Roll Command Details:" ,
fields : [
{
name : "Details:" ,
value : ` You can chain as many of these options as you want, as long as the option does not disallow it.
2022-05-16 21:28:26 -07:00
This command also can fully solve math equations with parenthesis .
The Artificer supports most of the [ Roll20 formatting ] ( https : //artificer.eanm.dev/roll20). More details and examples can be found [here](https://artificer.eanm.dev/roll20).`
2021-11-21 22:11:10 -08:00
} , {
2022-05-04 23:19:19 -07:00
name : ` \` ${ config . prefix } xdydzracsq! ${ config . postfix } \` ... ` ,
2022-05-16 22:41:53 -07:00
value : ` Rolls all configs requested, you may repeat the command multiple times in the same message (just ensure you close each roll with \` ${ config . postfix } \` ) `
2021-11-21 22:11:10 -08:00
} , {
2022-05-04 23:19:19 -07:00
name : "`x` [Optional]" ,
2021-11-21 22:11:10 -08:00
value : "Number of dice to roll, if omitted, 1 is used" ,
inline : true
} , {
2022-05-04 23:19:19 -07:00
name : "`dy` [Required]" ,
value : "Size of dice to roll, `d20` = 20 sided die" ,
2021-11-21 22:11:10 -08:00
inline : true
} , {
2022-05-04 23:19:19 -07:00
name : "`dz` or `dlz` [Optional]" ,
value : "Drops the lowest `z` dice, cannot be used with `kz`" ,
2021-11-21 22:11:10 -08:00
inline : true
} , {
2022-05-04 23:19:19 -07:00
name : "`kz` or `khz` [Optional]" ,
value : "Keeps the highest `z` dice, cannot be used with `dz`" ,
2021-11-21 22:11:10 -08:00
inline : true
} , {
2022-05-04 23:19:19 -07:00
name : "`dhz` [Optional]" ,
value : "Drops the highest `z` dice, cannot be used with `kz`" ,
2021-11-21 22:11:10 -08:00
inline : true
} , {
2022-05-04 23:19:19 -07:00
name : "`klz` [Optional]" ,
value : "Keeps the lowest `z` dice, cannot be used with `dz`" ,
2021-11-21 22:11:10 -08:00
inline : true
} , {
2022-05-13 16:25:23 -07:00
name : "`ra` or `r=q` [Optional]" ,
2022-05-16 22:09:01 -07:00
value : "Rerolls any rolls that match `a`, `r3` will reroll every die that land on 3, throwing out old rolls, cannot be used with `ro`" ,
2021-11-21 22:11:10 -08:00
inline : true
2022-05-13 16:25:23 -07:00
} , {
name : "`r<q` [Optional]" ,
2022-05-16 22:09:01 -07:00
value : "Rerolls any rolls that are less than or equal to `a`, `r3` will reroll every die that land on 3, 2, or 1, throwing out old rolls, cannot be used with `ro`" ,
2022-05-13 16:25:23 -07:00
inline : true
} , {
name : "`r>q` [Optional]" ,
2022-05-16 22:09:01 -07:00
value : "Rerolls any rolls that are greater than or equal to `a`, `r3` will reroll every die that land on 3 or greater, throwing out old rolls, cannot be used with `ro`" ,
inline : true
} , {
name : "`roa` or `ro=q` [Optional]" ,
value : "Rerolls any rolls that match `a`, `ro3` will reroll each die that lands on 3 ONLY ONE TIME, throwing out old rolls, cannot be used with `r`" ,
inline : true
} , {
name : "`ro<q` [Optional]" ,
value : "Rerolls any rolls that are less than or equal to `a`, `ro3` will reroll each die that lands on 3, 2, or 1 ONLY ONE TIME, throwing out old rolls, cannot be used with `r`" ,
inline : true
} , {
name : "`ro>q` [Optional]" ,
value : "Rerolls any rolls that are greater than or equal to `a`, `ro3` will reroll each die that lands on 3 or greater ONLY ONE TIME, throwing out old rolls, cannot be used with `r`" ,
2022-05-13 16:25:23 -07:00
inline : true
2021-11-21 22:11:10 -08:00
} , {
2022-05-04 23:19:19 -07:00
name : "`csq` or `cs=q` [Optional]" ,
2022-05-04 21:57:34 -07:00
value : "Changes crit score to `q`" ,
2021-11-21 22:11:10 -08:00
inline : true
} , {
2022-05-04 23:19:19 -07:00
name : "`cs<q` [Optional]" ,
2022-05-04 21:57:34 -07:00
value : "Changes crit score to be less than or equal to `q`" ,
2021-11-21 22:11:10 -08:00
inline : true
} , {
2022-05-04 23:19:19 -07:00
name : "`cs>q` [Optional]" ,
2022-05-04 21:57:34 -07:00
value : "Changes crit score to be greater than or equal to `q`" ,
2021-11-21 22:11:10 -08:00
inline : true
} , {
2022-05-04 23:19:19 -07:00
name : "`cfq` or `cf=q` [Optional]" ,
2022-05-04 21:57:34 -07:00
value : "Changes crit fail to `q`" ,
2021-11-21 22:11:10 -08:00
inline : true
} , {
2022-05-04 23:19:19 -07:00
name : "`cf<q` [Optional]" ,
2022-05-04 21:57:34 -07:00
value : "Changes crit fail to be less than or equal to `q`" ,
2021-11-21 22:11:10 -08:00
inline : true
} , {
2022-05-04 23:19:19 -07:00
name : "`cf>q` [Optional]" ,
2022-05-04 21:57:34 -07:00
value : "Changes crit fail to be greater than or equal to `q`" ,
2021-11-21 22:11:10 -08:00
inline : true
} , {
2022-05-04 23:19:19 -07:00
name : "`!` [Optional]" ,
2021-11-21 22:11:10 -08:00
value : "Exploding, rolls another dy for every crit roll" ,
inline : true
}
]
} , {
2022-05-04 23:28:51 -07:00
title : "Roll Command Decorators:" ,
2021-11-21 22:11:10 -08:00
fields : [
{
2022-05-16 21:28:26 -07:00
name : "Details:" ,
2022-05-04 23:28:51 -07:00
value : ` This command also has some useful decorators that can used. These decorators simply need to be placed after all rolls in the message.
2021-11-21 22:11:10 -08:00
2022-05-04 23:19:19 -07:00
Examples : \ ` ${ config . prefix } d20 ${ config . postfix } -nd \` , \` ${ config . prefix } d20 ${ config . postfix } -nd -s \` `
2021-11-21 22:11:10 -08:00
} , {
2022-05-04 23:19:19 -07:00
name : "`-nd`" ,
2021-11-21 22:11:10 -08:00
value : "No Details - Suppresses all details of the requested roll" ,
inline : true
2022-05-05 21:10:21 -07:00
} , {
name : "`-snd`" ,
value : "Super No Details - Suppresses all details of the requested roll and hides no details message" ,
inline : true
2021-11-21 22:11:10 -08:00
} , {
2022-05-04 23:19:19 -07:00
name : "`-s`" ,
2021-11-21 22:11:10 -08:00
value : "Spoiler - Spoilers all details of the requested roll" ,
inline : true
} , {
2022-05-04 23:19:19 -07:00
name : "`-m`" ,
2021-11-21 22:11:10 -08:00
value : "Maximize Roll - Rolls the theoretical maximum roll, cannot be used with -n" ,
inline : true
} , {
2022-05-04 23:19:19 -07:00
name : "`-n`" ,
2021-11-21 22:11:10 -08:00
value : "Nominal Roll - Rolls the theoretical nominal roll, cannot be used with -m" ,
inline : true
} , {
2022-05-04 23:19:19 -07:00
name : "`-gm @user1 @user2 @usern`" ,
2021-11-21 22:11:10 -08:00
value : "GM Roll - Rolls the requested roll in GM mode, suppressing all publicly shown results and details and sending the results directly to the specified GMs" ,
inline : true
} , {
2022-05-04 23:19:19 -07:00
name : "`-o a` or `-o d`" ,
2021-11-21 22:11:10 -08:00
value : "Order Roll - Rolls the requested roll and orders the results in the requested direction" ,
inline : true
}
]
2022-05-16 21:28:26 -07:00
} , {
title : "Results Formatting:" ,
fields : [
{
name : "Details:" ,
value : "The results have some formatting applied on them to provide details on what happened during this roll."
} , {
name : "Bold" ,
value : "Critical successes will be **bolded**." ,
inline : true
} , {
name : "Underline" ,
value : "Critical fails will be __underlined__." ,
inline : true
} , {
name : "Strikethrough" ,
value : "Rolls that were dropped or rerolled ~~crossed out~~." ,
inline : true
}
]
2021-11-21 22:11:10 -08:00
}
]
} ,
rolling : {
embeds : [ {
2022-05-04 21:57:34 -07:00
title : "Rolling . . ."
2021-11-21 22:11:10 -08:00
} ]
} ,
version : {
embeds : [ {
title : ` My current version is ${ config . version } `
} ]
}
} ;
export const generatePing = ( time : number ) = > ( {
embeds : [ {
title : time === - 1 ? "Ping?" : ` Pong! Latency is ${ time } ms. `
} ]
} ) ;
export const generateReport = ( msg : string ) = > ( {
embeds : [ {
fields : [ {
name : "USER REPORT:" ,
value : msg || "No message"
} ]
} ]
} ) ;
export const generateStats = ( guildCount : number , channelCount : number , memberCount : number , rollCount : bigint , utilityCount : bigint ) = > ( {
embeds : [ {
title : "The Artificer's Statistics:" ,
fields : [
{
name : "Guilds:" ,
value : ` ${ guildCount } ` ,
inline : true
} , {
name : "Channels:" ,
value : ` ${ channelCount } ` ,
inline : true
} , {
name : "Active Members:" ,
value : ` ${ memberCount } ` ,
inline : true
} , {
name : "Roll Commands:" ,
value : ` ${ rollCount } ` ,
inline : true
} , {
name : "Utility Commands:" ,
value : ` ${ utilityCount } ` ,
inline : true
}
]
} ]
} ) ;
export const generateApiFailed = ( args : string ) = > ( {
embeds : [ {
fields : [ {
name : ` Failed to ${ args } API rolls for this guild. ` ,
value : "If this issue persists, please report this to the developers."
} ]
} ]
} ) ;
export const generateApiStatus = ( banned : boolean , active : boolean ) = > ( {
embeds : [ {
fields : [ {
name : ` The Artificer's API is ${ config . api . enable ? "currently enabled" : "currently disabled" } . ` ,
value : banned ? "API rolls are banned from being used in this guild.\n\nThis will not be reversed." : ` API rolls are ${ active ? "allowed" : "blocked from being used" } in this guild. `
} ]
} ]
} ) ;
export const generateApiSuccess = ( args : string ) = > ( {
embeds : [ {
2022-05-09 16:18:49 -07:00
title : ` API rolls have successfully been ${ args } for this guild. `
2021-11-21 22:11:10 -08:00
} ]
} ) ;
export const generateDMFailed = ( user : string ) = > ( {
embeds : [ {
fields : [ {
name : ` WARNING: ${ user } could not be messaged. ` ,
value : "If this issue persists, make sure direct messages are allowed from this server."
} ]
} ]
} ) ;
export const generateApiKeyEmail = ( email : string , key : string ) = > ( {
content : ` <@ ${ config . api . admin } > A USER HAS REQUESTED AN API KEY ` ,
embeds : [ {
fields : [
{
name : "Send to:" ,
value : email
} , {
name : "Subject:" ,
value : "Artificer API Key"
} , {
name : "Body:" ,
value : ` Hello Artificer API User,
Welcome aboard The Artificer ' s API . You can find full details about the API on the GitHub : https : //github.com/Burn-E99/TheArtificer
Your API Key is : $ { key }
Guard this well , as there is zero tolerance for API abuse .
Welcome aboard ,
The Artificer Developer - Ean Milligan `
}
]
} ]
} ) ;
export const generateApiDeleteEmail = ( email : string , deleteCode : string ) = > ( {
content : ` <@ ${ config . api . admin } > A USER HAS REQUESTED A DELETE CODE ` ,
embeds : [ {
fields : [
{
name : "Send to:" ,
value : email
} , {
name : "Subject:" ,
value : "Artificer API Delete Code"
} , {
name : "Body:" ,
value : ` Hello Artificer API User,
I am sorry to see you go . If you would like , please respond to this email detailing what I could have done better .
As requested , here is your delete code : $ { deleteCode }
Sorry to see you go ,
The Artificer Developer - Ean Milligan `
}
]
} ]
} ) ;
2022-05-04 22:46:47 -07:00
export const generateRollError = ( errorType : string , errorMsg : string ) = > ( {
embeds : [ {
title : "Roll command encountered the following error:" ,
fields : [ {
name : errorType ,
2022-05-04 23:19:19 -07:00
value : ` ${ errorMsg } \ n \ nPlease try again. If the error is repeated, please report the issue using the \` ${ config . prefix } report \` command. `
2022-05-04 22:46:47 -07:00
} ]
} ]
} ) ;