Skip to content

Commit b18768e

Browse files
authored
Merge pull request #24 from neilenns/neilenns/issue23
Add the bot reply text to the json file
2 parents 8d268f2 + d3e295d commit b18768e

File tree

4 files changed

+22
-8
lines changed

4 files changed

+22
-8
lines changed

src/commands/general/wiki.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,11 @@ module.exports = {
107107
});
108108
return;
109109
}
110+
110111
const link = hyperlink(selectedItem.description, selectedItem.href);
112+
const preamble =
113+
selectedItem.preamble ??
114+
"Check out the following link for more information:";
111115

112116
await replyOrEditReply(interaction, {
113117
content: `Link sent!`,
@@ -116,7 +120,7 @@ module.exports = {
116120
});
117121

118122
await interaction.channel.send({
119-
content: `Check out this wiki page for information: ${link}`,
123+
content: `${preamble} ${link}`,
120124
});
121125
} catch (error) {
122126
debug(`Unable to send wiki link: ${error}`);

src/commands/general/yt.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,11 @@ module.exports = {
105105
});
106106
return;
107107
}
108+
108109
const link = hyperlink(selectedItem.description, selectedItem.href);
110+
const preamble =
111+
selectedItem.preamble ??
112+
"Check out the following video for more information:";
109113

110114
await replyOrEditReply(interaction, {
111115
content: `Link sent!`,
@@ -114,7 +118,7 @@ module.exports = {
114118
});
115119

116120
await interaction.channel.send({
117-
content: `Check out this YouTube video for information: ${link}`,
121+
content: `${preamble} ${link}`,
118122
});
119123
} catch (error) {
120124
debug(`Unable to send YouTube link: ${error}`);

wikiMenuItems.json

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,35 @@
33
"label": "Honeycomb Bravo",
44
"description": "Using the selector knob on a Honeycomb Bravo",
55
"value": "honeycombbravo",
6-
"href": "https://github.com/MobiFlight/MobiFlight-Connector/wiki/Using-the-selector-knob-on-a-Honeycomb-Bravo"
6+
"href": "https://github.com/MobiFlight/MobiFlight-Connector/wiki/Using-the-selector-knob-on-a-Honeycomb-Bravo",
7+
"preamble": "Check out this wiki page for information on using the selector knob with the Honeycomb Bravo:"
78
},
89
{
910
"label": "Multiplexers",
1011
"description": "Beginner's guide to input multiplexers",
1112
"value": "multiplexers",
12-
"href": "https://github.com/MobiFlight/MobiFlight-Connector/wiki/Beginner%27s-guide-to-input-multiplexers"
13+
"href": "https://github.com/MobiFlight/MobiFlight-Connector/wiki/Beginner%27s-guide-to-input-multiplexers",
14+
"preamble": "Check out this wiki page for information on using multiplexers with MobiFlight:"
1315
},
1416
{
1517
"label": "Input shifters",
1618
"description": "Adding lots of buttons with an input shift register",
1719
"value": "inputshifters",
18-
"href": "https://github.com/MobiFlight/MobiFlight-Connector/wiki/Adding-lots-of-buttons-with-an-input-shift-register"
20+
"href": "https://github.com/MobiFlight/MobiFlight-Connector/wiki/Adding-lots-of-buttons-with-an-input-shift-register",
21+
"preamble": "Check out this wiki page for information on using input shifters with MobiFlight:"
1922
},
2023
{
2124
"label": "Output shifters",
2225
"description": "Controlling LEDs with an output shift register",
2326
"value": "outputshifters",
24-
"href": "https://github.com/MobiFlight/MobiFlight-Connector/wiki/Controlling-LEDs-with-an-output-shift-register"
27+
"href": "https://github.com/MobiFlight/MobiFlight-Connector/wiki/Controlling-LEDs-with-an-output-shift-register",
28+
"preamble": "Check out this wiki page for information on using output shifters with MobiFlight:"
2529
},
2630
{
2731
"label": "Logs",
2832
"description": "Providing logs from MobiFlight",
2933
"value": "logs",
30-
"href": "https://github.com/MobiFlight/MobiFlight-Connector/wiki/Providing-logs-from-MobiFlight"
34+
"href": "https://github.com/MobiFlight/MobiFlight-Connector/wiki/Providing-logs-from-MobiFlight",
35+
"preamble": "To help diagnose your problem we need to see your MobiFlight logs. Follow the steps in this wiki to get them:"
3136
}
3237
]

ytMenuItems.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"label": "Getting started 2023",
44
"description": "Getting Started 2023 - MobiFlight Tutorial",
55
"value": "gettingstarted",
6-
"href": "https://www.youtube.com/watch?v=pS8KGfYRNrY"
6+
"href": "https://www.youtube.com/watch?v=pS8KGfYRNrY",
7+
"preamble": "Check out this YouTube video for a good introduction on getting started with MobiFlight:"
78
}
89
]

0 commit comments

Comments
 (0)