aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app.js4
-rw-r--r--command_impls.js3
-rw-r--r--commands.js8
3 files changed, 3 insertions, 12 deletions
diff --git a/app.js b/app.js
index b4e8161..04071f2 100644
--- a/app.js
+++ b/app.js
@@ -52,9 +52,7 @@ function handle_application_command(state, data, channel_id) {
return fomx(state);
case "factcheck":
- if (options && options.length >= 1)
- return factcheck(state, options[0].value);
- else return factcheck(state, true);
+ return factcheck(state);
default:
console.error(`unknown command: ${name}`);
diff --git a/command_impls.js b/command_impls.js
index 5875e66..b95e472 100644
--- a/command_impls.js
+++ b/command_impls.js
@@ -75,7 +75,8 @@ export function fomx(state) {
});
}
-export function factcheck(state, truth) {
+export function factcheck(state) {
+ const truth = Math.random() > 0.5 ? true : false;
if (truth)
return send(state, {
content: "https://jjanzen.ca/images/true-boar.png",
diff --git a/commands.js b/commands.js
index ef7291a..a261d7b 100644
--- a/commands.js
+++ b/commands.js
@@ -42,14 +42,6 @@ const commands = [
name: "factcheck",
description: "check a fact",
type: 1,
- options: [
- {
- type: 5,
- name: "true",
- description: "truth value of fact check",
- required: false,
- },
- ],
integration_types: [0],
contexts: [0],
},