parent
2f6b76cdf7
commit
5a50f2a19f
|
@ -1,5 +1,5 @@
|
||||||
# The Artificer - A Dice Rolling Discord Bot
|
# 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).
|
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).
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
export const config = {
|
export const config = {
|
||||||
"name": "The Artificer", // Name of the bot
|
"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
|
"token": "the_bot_token", // Discord API Token for this bot
|
||||||
"prefix": "[[", // Prefix for all commands
|
"prefix": "[[", // Prefix for all commands
|
||||||
"postfix": "]]", // Postfix for rolling command
|
"postfix": "]]", // Postfix for rolling command
|
||||||
|
|
4
mod.ts
4
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 utils from "./src/utils.ts";
|
||||||
import solver from "./src/solver.ts";
|
import solver from "./src/solver.ts";
|
||||||
|
|
||||||
|
import { EmojiConf } from "./src/mod.d.ts";
|
||||||
|
|
||||||
import config from "./config.ts";
|
import config from "./config.ts";
|
||||||
|
|
||||||
const dbClient = await new Client().connect({
|
const dbClient = await new Client().connect({
|
||||||
|
@ -348,7 +350,7 @@ startBot({
|
||||||
// Check if the unhandled command is an emoji request
|
// Check if the unhandled command is an emoji request
|
||||||
else {
|
else {
|
||||||
// Start looping thru the possible emojis
|
// Start looping thru the possible emojis
|
||||||
config.emojis.some(e => {
|
config.emojis.some((e: EmojiConf) => {
|
||||||
// If a match gets found
|
// If a match gets found
|
||||||
if (e.aliases.indexOf(command || "") > -1) {
|
if (e.aliases.indexOf(command || "") > -1) {
|
||||||
// Send the needed emoji
|
// Send the needed emoji
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
// mod.d.ts custom types
|
||||||
|
|
||||||
|
export type EmojiConf = {
|
||||||
|
"name": string,
|
||||||
|
"aliases": Array<string>,
|
||||||
|
"id": string,
|
||||||
|
"animated": boolean,
|
||||||
|
"deleteSender": boolean
|
||||||
|
};
|
Loading…
Reference in New Issue