Skip to content

Commit

Permalink
Fix issues for v1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
nbar1 committed Apr 30, 2020
1 parent 2935ac8 commit 331723a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ A library to create an easily pluggable slackbot for your Slack instance.
var pluggableSlackbot = require('pluggable-slackbot');

var bot = new pluggableSlackbot({
token: 'your-slack-api-token',
name: 'SlackBot',
token: 'your-slack-api-token', // requires legacy API token
name: 'MyBot',
iconUrl: 'url-to-bot-icon',
pluginPath: __dirname + '/plugins',
});
Expand Down Expand Up @@ -56,7 +56,7 @@ There are example plugins in the `example-plugins` folder.
* @param {object} [message]
* @returns {(object|bool)}
*/
run: (message) => {
run: function (message) {
return {
message: '',
options: {},
Expand All @@ -76,7 +76,7 @@ There are example plugins in the `example-plugins` folder.
*
* @returns {void}
*/
initialize: () => {
initialize: function () {
/**
* Anything that needs to be initialized when the plugin is
* first loaded goes here. This will only run when the bot
Expand Down
2 changes: 1 addition & 1 deletion example-plugins/flip-a-coin.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = {
* @param {object} [message]
* @returns {(object|bool)}
*/
run: () => {
run: function () {
return {
message: Math.floor(Math.random() * 2) === 0 ? 'Heads!' : 'Tails!',
options: {},
Expand Down
2 changes: 1 addition & 1 deletion example-plugins/probability.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = {
* @param {object} [message]
* @returns {(object|bool)}
*/
run: (message) => {
run: function (message) {
var probability = parseInt(this.matchRegex.exec(message.text)[1]);
var roll = Math.floor(Math.random() * 100) + 1;

Expand Down
2 changes: 1 addition & 1 deletion example-plugins/roll-die.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = {
* @param {object} [message]
* @returns {(object|bool)}
*/
run: (message) => {
run: function (message) {
var numberOfSides = this.matchRegex.exec(message.text)[1];

return {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pluggable-slackbot",
"version": "0.1",
"version": "1.0.0",
"description": "A pluggable SlackBot to easily interface with your Slack instance.",
"main": "lib/pluggable-slackbot.js",
"repository": "https://github.com/nbar1/pluggable-slackbot",
Expand Down

0 comments on commit 331723a

Please sign in to comment.