Skip to content

Commit

Permalink
Merge branch 'master' into 'dev-steam'
Browse files Browse the repository at this point in the history
Conflicts:
	lib/modules/summaryhandler/index.js
	package.json
  • Loading branch information
MeLlamoPablo committed Dec 8, 2016
2 parents 530ebcb + 5cb8724 commit a580772
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 7 deletions.
13 changes: 11 additions & 2 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,17 @@ module.exports = {
// The bot's command prefix. The bot will recognize as command any message that begins with it.
// i.e: "-schedulebot foo" will trigger the command "foo",
// whereas "ScheduleBot foo" will do nothing at all.
prefix: "-schedulebot", // Tip: If you use "<@YOUR_BOT_USER_ID>", you can have the prefix
// be a mention to your bot.
prefix: "<@YOUR_BOT_USER_ID>",

// This is a readable version of the prefix. Generally, this is the same as prefix, but if
// you set prefix to be in the form of "<@YOUR_BOT_USER_ID>", you'd need to set readable_prefix
// to be "@ScheduleBot" (or however your bot user is named).
//
// This is because when you use the characters `` in Discord (to highlight a command, in
// ScheduleBot's case), the string "<@YOUR_BOT_USER_ID>" doesn't get parsed as a mention.
// So in order not to mislead the user, we have a separate option for a readable version of
// our prefix.
readable_prefix: "@YOUR_BOT_USER_NAME",

// Admin app settings
admin_app: {
Expand Down
3 changes: 2 additions & 1 deletion lib/commands/general/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ const cfg = require('../../../config');

module.exports = new Clapp.Command({
name: "create",
desc: "Creates a new event. Example: @ScheduleBot create \"My Event\" \"09/11/2001 09:00\"",
desc: "Creates a new event. Example: `" + cfg.readable_prefix
+ " create \"My Event\" \"09/11/2001 09:00\"`",
fn: (argv, context) => {
return new Promise((fulfill, reject) => {
let date;
Expand Down
8 changes: 5 additions & 3 deletions lib/modules/summaryhandler/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const cfg = require("../../../config");

"use strict";

class SummaryHandler {
Expand Down Expand Up @@ -133,9 +135,9 @@ class SummaryHandler {
}
}

summary += "\nTo confirm your attendance, type `@ScheduleBot confirm " + event.id
+ "`. To deny your attendance, type `@ScheduleBot confirm " +
event.id + " no`\n";
summary += "\nTo confirm your attendance, type `" + cfg.readable_prefix
+ " confirm " + event.id + "`. To deny your attendance, type `"
+ cfg.readable_prefix + " confirm " + event.id + " no`\n";

fulfill(summary);
}).catch(reject);
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": "schedulebot",
"version": "1.0.0",
"version": "1.0.1",
"description": "A Discord bot that makes scheduling easy",
"homepage": "https://github.com/mellamopablo/schedulebot#readme",
"author": "Pablo Rodríguez <pabloviolin8@gmail.com> (https://github.com/MeLlamoPablo)",
Expand Down

0 comments on commit a580772

Please sign in to comment.