Browse Source

Convert numbers to strings

pull/1/head
Abheek Dhawan 4 years ago
parent
commit
878126b298
  1. 4
      bot/awesomescibo.mjs

4
bot/awesomescibo.mjs

@ -16,7 +16,7 @@ if (fs.existsSync('numhits.txt')) {
} }
}); });
} else { } else {
fs.writeFile('numhits.txt', hits, (error) => { if (error) { console.log(error); } }); fs.writeFile('numhits.txt', hits.toString(), (error) => { if (error) { console.log(error); } });
} }
@ -32,7 +32,7 @@ client.on('guildCreate', guild => {
client.on('message', async message => { client.on('message', async message => {
if (message.content.toLowerCase() === "do be hits") { if (message.content.toLowerCase() === "do be hits") {
message.channel.send(hits); message.channel.send(hits);
fs.writeFile('numhits.txt', hits, (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\nSource Code: https://github.com/ADawesomeguy/AwesomeSciBo")); 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\nSource Code: https://github.com/ADawesomeguy/AwesomeSciBo"));

Loading…
Cancel
Save