Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge in security fixes #19

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Elbie (Landon Bot)

# 8 June 2020
> I have been made aware that someone seems to have got ahold of her API key and has abused it to post pretty heinously racist and transphobic messages. While I have regenerated her keys and taken her offline while I ensure future security, I want to apologize for anyone who had to deal with that in their servers. I appreciate everyone who immediately let me know so I could take appropriate action.

## Note!
> If you want to use Elbie for character tracking you MUST send me a message so I can set you up in my database! Otherwise she won't know who you are. We are nearing a 4.0 release which will make much of this way, way easier for me so I encourage you to watch this space for an updated readme. The #develop branch has more info.

An extensible [Discord](https://discordapp.com/) bot designed to facilitate running rules-lite [TTRPG](https://en.wikipedia.org/wiki/Tabletop_role-playing_game) systems, including [Dungeon World](http://dungeon-world.com/), [Fiasco](http://bullypulpitgames.com/games/fiasco/), and others, with rudimentary support for Dungeons & Dragons 3.5e.
What makes Elbie distinct from many of the conventionally available Discord bots is her tight RPG integrations, capable of handling skills, inventory, dice rolls, and creating character summaries on the fly. She also has rudimentary (and in-progress) audio capabiities, with built-in support for character theme songs.

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "elbie",
"version": "3.9.3",
"version": "3.9.4a",
"description": "discord bot designed to handle dungeon world and a few other ttrpgs",
"main": "elbie.js",
"engines": {
Expand All @@ -17,7 +17,7 @@
"fluent-ffmpeg": "^2.1.2",
"libsodium-wrappers": "^0.7.3",
"mongoose": "^5.7.5",
"node-fetch": "^2.1.2",
"node-fetch": "^2.6.1",
"node-opus": "^0.3.0",
"ytdl-core": "^0.20.4"
},
Expand Down
39 changes: 20 additions & 19 deletions src/bot_modules/rpg/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,25 +193,26 @@ const rpg = {
}
},
bind (Command) {
rpg.getCampaign(Command, function (campaign) {
if (!campaign) {
const newCampaign = new db.CampaignObject({
dm: Command.auth.id,
channel: Command.channel.id,
shtname: Command.args[0],
name: Command.args.slice(1).join(' ')
})
newCampaign.save(function (err, campaign) {
if (err) console.error(err)
else {
Command.channel.send(`Successfully created new campaign: ${campaign.name}
Please finish setup on the web interface [[link forthcoming]]`)
}
})
} else {
Command.channel.send('Already defined a campaign for this channel.')
}
})
Command.channel.send("This command isn't set up for use yet -- please email me at [email protected] if you want to make Elbie work in your campaign.")
// rpg.getCampaign(Command, function (campaign) {
// if (!campaign) {
// const newCampaign = new db.CampaignObject({
// dm: Command.auth.id,
// channel: Command.channel.id,
// shtname: Command.args[0],
// name: Command.args.slice(1).join(' ')
// })
// newCampaign.save(function (err, campaign) {
// if (err) console.error(err)
// else {
// Command.channel.send(`Successfully created new campaign: ${campaign.name}
// Please finish setup on the web interface [[link forthcoming]]`)
// }
// })
// } else {
// Command.channel.send('Already defined a campaign for this channel.')
// }
// })
},
statRoll (Command) {
Character.statRoll(Command, rpg.rollFormat)
Expand Down
2 changes: 1 addition & 1 deletion src/elbie.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ client.on('message', function (message) {
}
// commands
if (Command.command === '?' || Object.keys(commandList).includes(Command.command)) {
console.log(`Command: ${Command.auth.username}: ${Command.command} => ${Command.argument} `)
console.log(`Command: ${Command.auth.tag}: ${Command.command} => ${Command.argument} `)
handler(Command)
} else {
Command.channel.send('I couldn\'t understand that command.')
Expand Down
19 changes: 12 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -686,9 +686,9 @@ acorn-jsx@^5.1.0:
integrity sha512-tMUqwBWfLFbJbizRmEcWSLw6HnFzfdJs2sOJEOwwtVPMoH/0Ay+E703oZz78VSXZiiDcZrQ5XKjPIUQixhmgVw==

acorn@^7.1.0:
version "7.1.0"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.0.tgz#949d36f2c292535da602283586c2477c57eb2d6c"
integrity sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ==
version "7.1.1"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.1.tgz#e35668de0b402f359de515c5482a1ab9f89a69bf"
integrity sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==

after-all-results@^2.0.0:
version "2.0.0"
Expand Down Expand Up @@ -2515,9 +2515,9 @@ locate-path@^2.0.0:
path-exists "^3.0.0"

lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.4, lodash@^4.3.0:
version "4.17.15"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548"
integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==
version "4.17.19"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.19.tgz#e48ddedbe30b3321783c5b4301fbd353bc1e4a4b"
integrity sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==

log-symbols@^2.2.0:
version "2.2.0"
Expand Down Expand Up @@ -2767,11 +2767,16 @@ nice-try@^1.0.4:
resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366"
integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==

[email protected], node-fetch@^2.1.1, node-fetch@^2.1.2:
[email protected]:
version "2.6.0"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.0.tgz#e633456386d4aa55863f676a7ab0daa8fdecb0fd"
integrity sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==

node-fetch@^2.1.1, node-fetch@^2.6.1:
version "2.6.1"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052"
integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==

node-gyp-build@~3.7.0:
version "3.7.0"
resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-3.7.0.tgz#daa77a4f547b9aed3e2aac779eaf151afd60ec8d"
Expand Down