Browse Source

Mention user in question

Lessens confusion as to who got what question if multiple people use
the same command
pull/1/head
Abheek Dhawan 4 years ago
parent
commit
9aff8ebe2f
  1. 2
      bot/awesomescibo.mjs
  2. 2
      bot/package.json

2
bot/awesomescibo.mjs

@ -235,7 +235,7 @@ client.on('message', async message => {
.then(response => response.json()) .then(response => response.json())
.then(data => { .then(data => {
let filter = m => m.author.id === message.author.id; let filter = m => m.author.id === message.author.id;
message.channel.send(data.question.tossup_question).then(() => { message.reply(data.question.tossup_question).then(() => {
message.channel.awaitMessages(filter, { message.channel.awaitMessages(filter, {
max: 1, max: 1,
time: 30000, time: 30000,

2
bot/package.json

@ -5,7 +5,7 @@
"node-fetch": "^2.6.1" "node-fetch": "^2.6.1"
}, },
"name": "awscibo", "name": "awscibo",
"version": "0.0.7", "version": "0.0.8",
"main": "awesomescibo.mjs", "main": "awesomescibo.mjs",
"bin": { "bin": {
"awscibo": "./awesomescibo.mjs" "awscibo": "./awesomescibo.mjs"

Loading…
Cancel
Save