diff options
author | RaindropsSys <contact@minteck.org> | 2023-08-17 15:48:20 +0200 |
---|---|---|
committer | RaindropsSys <contact@minteck.org> | 2023-08-17 15:48:20 +0200 |
commit | b424507fbdf02ccfb69418fde0b6cb28e1f33af3 (patch) | |
tree | d49a312c5975878b30fc29051f49211ef150cf99 | |
parent | d9bbfa35698bc56c011f08b76d8352e79fca4cc6 (diff) | |
download | butterscotch-mane.tar.gz butterscotch-mane.tar.bz2 butterscotch-mane.zip |
-rw-r--r-- | commands/debug.js | 2 | ||||
-rw-r--r-- | commands/help.js | 2 | ||||
-rw-r--r-- | discord.js | 2 | ||||
-rw-r--r-- | handler.js | 9 | ||||
-rw-r--r-- | matrix.js | 2 | ||||
-rw-r--r-- | signal.js | 2 |
6 files changed, 15 insertions, 4 deletions
diff --git a/commands/debug.js b/commands/debug.js index 392d855..58ee2a7 100644 --- a/commands/debug.js +++ b/commands/debug.js @@ -3,6 +3,8 @@ const axios = require('axios'); module.exports = (parameter, wrapper) => { wrapper.send(` **Platform:** \`${wrapper.platform}\` +**${wrapper.lib} version:** \`${wrapper.version}\` +**Build ID:** \`${process.versions.butterscotch}\` **Channel ID:** \`${wrapper.id}\` **Sender ID:** \`${wrapper.sender}\` **Ping:** \`${wrapper.ping}\` diff --git a/commands/help.js b/commands/help.js index 834fb5e..a9f7d39 100644 --- a/commands/help.js +++ b/commands/help.js @@ -52,6 +52,6 @@ module.exports = (parameter, wrapper) => { list += categoryCommands.join(", ") + "\n"; } - wrapper.send("👋 Hey! Here are all the commands you can use:\n" + list + "\nUse `.help [command]` to get help for a specific command. Version " + process.versions.butterscotch + "."); + wrapper.send("👋 Hey! Here are all the commands you can use:\n" + list + "\nUse `.help [command]` to get help for a specific command."); } }
\ No newline at end of file @@ -22,7 +22,7 @@ function startDiscord() { let message = msg.content; - if (message.startsWith(".") && !message.startsWith("..") && message.trim() !== "." && message.trim() !== ".c.") { + if (message.startsWith(".") && !message.startsWith("..") && message.trim() !== "." && message.trim() !== ".c." && !message.trim().startsWith(".c.") && !message.trim().startsWith(".❤️")) { let command; try { @@ -16,6 +16,9 @@ module.exports = (config) => { let wrapper = {}; if (config['source'] === "matrix") { + wrapper.lib = "matrix-js-sdk"; + wrapper.version = require('./node_modules/matrix-js-sdk/package.json').version; + wrapper.send = (message) => { return new Promise((res) => { matrixSend(config['room'].roomId, message).then((msg) => { @@ -54,6 +57,9 @@ module.exports = (config) => { } if (config['source'] === "signal") { + wrapper.lib = "Signal.js"; + wrapper.version = require('./node_modules/@equestria.dev/signal.js/package.json').version; + wrapper.send = (message) => { return new Promise((res) => { signalSend(config['channel'], message).then((msg) => { @@ -89,6 +95,9 @@ module.exports = (config) => { } if (config['source'] === "discord") { + wrapper.lib = "discord.js"; + wrapper.version = require('./node_modules/discord.js/package.json').version; + wrapper.send = (message) => { config['channel'].send({ embeds: [ @@ -51,7 +51,7 @@ function startMatrix() { message = event.event.content.formatted_body.split("</mx-reply>")[1]; } - if (message.startsWith(".") && !message.startsWith("..") && message.trim() !== "." && message.trim() !== ".c.") { + if (message.startsWith(".") && !message.startsWith("..") && message.trim() !== "." && message.trim() !== ".c." && !message.trim().startsWith(".c.") && !message.trim().startsWith(".❤️")) { let command; try { @@ -21,7 +21,7 @@ function startSignal() { if (!require('./credentials.json').allowed.includes(msg.author.number)) return; let message = msg.content; - if (message.startsWith(".") && !message.startsWith("..") && message.trim() !== "." && message.trim() !== ".c.") { + if (message.startsWith(".") && !message.startsWith("..") && message.trim() !== "." && message.trim() !== ".c." && !message.trim().startsWith(".c.") && !message.trim().startsWith(".❤️")) { let command; msg.channel.setTyping(true); |