Browse Source

Add functionality for generating energy questions. (#6)

* Add functionality for generating energy questions. 

Adding 'do be training energy'.

* Add energy training to help text

Co-authored-by: Abheek <67982792+ADawesomeguy@users.noreply.github.com>
pull/8/head
Aldric Benalan 4 years ago
committed by GitHub
parent
commit
d9f99ea51d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      bot/awesomescibo.mjs

5
bot/awesomescibo.mjs

@ -47,7 +47,7 @@ client.on('message', async message => {
fs.writeFile('numhits.txt', hits.toString(), (error) => { if (error) { console.log(error); } }); fs.writeFile('numhits.txt', hits.toString(), (error) => { if (error) { console.log(error); } });
} }
if (message.content.toLowerCase() === ("do be helping")) { if (message.content.toLowerCase() === ("do be helping")) {
message.channel.send(new Discord.MessageEmbed().setTitle("Help").setDescription("`do be helping`: display this help message\n`do be roundgen html`: send a round to the channel\n`do be roundgen html dm`: dm a round to you\n`do be roundgen pdf`: send a pdf round to the channel\n`do be roundgen pdf dm`: dm a pdf round to you\n`do be scoring`: start a scoring session\n > `do be scoring (a/b)(4/10)`: add points to Team A or Team B\n > `do be scoring stop`: end scoring session and post final points\n`do be hits`: send the number of rounds generated\n`do be servers`: send the number of servers this bot is a part of\n`do be iss`: show the current location of the International Space Station\n`do be training`: send a quick practice problem (you **must** react to your answer, or the bot will yell at you)\n > subject options: astro, phys, chem, math, bio, ess\n`do be top`: list cross-server top 10 players\nSource Code: https://github.com/ADawesomeguy/AwesomeSciBo (don't forget to star!)")); message.channel.send(new Discord.MessageEmbed().setTitle("Help").setDescription("`do be helping`: display this help message\n`do be roundgen html`: send a round to the channel\n`do be roundgen html dm`: dm a round to you\n`do be roundgen pdf`: send a pdf round to the channel\n`do be roundgen pdf dm`: dm a pdf round to you\n`do be scoring`: start a scoring session\n > `do be scoring (a/b)(4/10)`: add points to Team A or Team B\n > `do be scoring stop`: end scoring session and post final points\n`do be hits`: send the number of rounds generated\n`do be servers`: send the number of servers this bot is a part of\n`do be iss`: show the current location of the International Space Station\n`do be training`: send a quick practice problem (you **must** react to your answer, or the bot will yell at you)\n > subject options: astro, phys, chem, math, bio, ess, energy\n`do be top`: list cross-server top 10 players\nSource Code: https://github.com/ADawesomeguy/AwesomeSciBo (don't forget to star!)"));
} }
if (message.content.toLowerCase() === ("do be roundgen html dm")) { if (message.content.toLowerCase() === ("do be roundgen html dm")) {
@ -327,6 +327,9 @@ client.on('message', async message => {
case 'math': case 'math':
subjectURL = `https://moose.lcsrc.org/subjects/math.json`; subjectURL = `https://moose.lcsrc.org/subjects/math.json`;
break; break;
case 'energy':
subjectURL = `https://moose.lcsrc.org/subjects/energy.json`;
break;
default: default:
subjectURL = `https://scibowldb.com/api/questions/random`; subjectURL = `https://scibowldb.com/api/questions/random`;
break; break;

Loading…
Cancel
Save