Browse Source

git subrepo pull discord-bot-core

subrepo:
  subdir:   "discord-bot-core"
  merged:   "81a8c67"
upstream:
  origin:   "git@github.com:benji7425/discord-bot-core.git"
  branch:   "master"
  commit:   "81a8c67"
git-subrepo:
  version:  "0.3.1"
  origin:   "???"
  commit:   "???"
master
benji7425 4 years ago
parent
commit
bcc24e5ac5
  1. 4
      discord-bot-core/.gitrepo
  2. 6
      discord-bot-core/client.js
  3. 2
      discord-bot-core/message-handler.js

4
discord-bot-core/.gitrepo

@ -6,7 +6,7 @@
[subrepo]
remote = git@github.com:benji7425/discord-bot-core.git
branch = master
commit = 8e6d6ce99e581f5ac5fb899112ef33bcf3e16a34
parent = 341964a90ddca9afc684fd9331fc4177b8b68c04
commit = 81a8c678cad14ed8162dd52475bff7ed02b6bc4e
parent = 052a0bf7e6a782290e50aa54f504be670dff776d
method = merge
cmdver = 0.3.1

6
discord-bot-core/client.js

@ -56,8 +56,10 @@ class CoreClient {
if (msg) message.reply(msg);
})
.catch(err => {
message.reply(err);
DiscordUtil.dateError(`Command error in guild ${message.guild.name}\n`, err.message || err);
if (err) {
message.reply(err);
DiscordUtil.dateError(`Command error in guild ${message.guild.name}\n`, err.message || err);
}
})
.then(() => this.writeFile());
});

2
discord-bot-core/message-handler.js

@ -41,7 +41,7 @@ function handleTextMessage(coreClient, message, guildsData) {
const invoke = coreClient.implementations[commandProp];
if (!command || !params || isNaN(expectedParamCount))
return reject(`'${message.content.split(" ")[1]}' is not a recognised command`);
return reject();
if (command === Config.commands.version)
resolve(`${ParentPackageJSON.name} v${ParentPackageJSON.version}`);

Loading…
Cancel
Save