diff --git a/README.md b/README.md index 94c14ca..1cb2e94 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # The Artificer - A Dice Rolling Discord Bot -Version 1.3.2 - 2020/01/27 +Version 1.3.3 - 2020/01/27 The Artificer is a Discord bot that specializes in rolling dice. The bot utilizes the compact [Roll20 formatting](https://roll20.zendesk.com/hc/en-us/articles/360037773133-Dice-Reference) for ease of use and will correctly perform any needed math on the roll (limited to basic algebra). diff --git a/config.example.ts b/config.example.ts index 5747e84..95e1294 100644 --- a/config.example.ts +++ b/config.example.ts @@ -1,6 +1,6 @@ export const config = { "name": "The Artificer", // Name of the bot - "version": "1.3.2", // Version of the bot + "version": "1.3.3", // Version of the bot "token": "the_bot_token", // Discord API Token for this bot "prefix": "[[", // Prefix for all commands "postfix": "]]", // Postfix for rolling command diff --git a/mod.ts b/mod.ts index aab4252..85a7192 100644 --- a/mod.ts +++ b/mod.ts @@ -27,6 +27,8 @@ import { nanoid } from "https://deno.land/x/nanoid@v3.0.0/mod.ts"; import utils from "./src/utils.ts"; import solver from "./src/solver.ts"; +import { EmojiConf } from "./src/mod.d.ts"; + import config from "./config.ts"; const dbClient = await new Client().connect({ @@ -348,7 +350,7 @@ startBot({ // Check if the unhandled command is an emoji request else { // Start looping thru the possible emojis - config.emojis.some(e => { + config.emojis.some((e: EmojiConf) => { // If a match gets found if (e.aliases.indexOf(command || "") > -1) { // Send the needed emoji diff --git a/src/mod.d.ts b/src/mod.d.ts new file mode 100644 index 0000000..5ebce5b --- /dev/null +++ b/src/mod.d.ts @@ -0,0 +1,9 @@ +// mod.d.ts custom types + +export type EmojiConf = { + "name": string, + "aliases": Array, + "id": string, + "animated": boolean, + "deleteSender": boolean +};