mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-18 21:40:49 +02:00
Beep
This commit is contained in:
@@ -58,8 +58,7 @@ module.exports = class QuizCommand extends Command {
|
|||||||
await msg.say(stripIndents`
|
await msg.say(stripIndents`
|
||||||
**You have 15 seconds to answer this question.**
|
**You have 15 seconds to answer this question.**
|
||||||
_${decodeURIComponent(body.results[0].category)}:_ ${decodeURIComponent(body.results[0].question)}
|
_${decodeURIComponent(body.results[0].category)}:_ ${decodeURIComponent(body.results[0].question)}
|
||||||
|
${type === 'boolean' ? 'True or False?' : ''}${type === 'multiple' ? `${list(shuffle(answers), 'or')}?` : ''}
|
||||||
${type === 'boolean' ? 'True or False?' : ''}${type === 'multiple' ? list(shuffle(answers), 'or') : ''}
|
|
||||||
`);
|
`);
|
||||||
const msgs = await msg.channel.awaitMessages(res => res.author.id === msg.author.id, {
|
const msgs = await msg.channel.awaitMessages(res => res.author.id === msg.author.id, {
|
||||||
max: 1,
|
max: 1,
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ module.exports = class SoundboardCommand extends Command {
|
|||||||
key: 'sound',
|
key: 'sound',
|
||||||
prompt: `What sound would you like to play? Either ${list(sounds, 'or')}.`,
|
prompt: `What sound would you like to play? Either ${list(sounds, 'or')}.`,
|
||||||
type: 'string',
|
type: 'string',
|
||||||
default: sounds[Math.floor(Math.random() * sounds.length)],
|
default: '',
|
||||||
validate: sound => {
|
validate: sound => {
|
||||||
if (sounds.includes(sound.toLowerCase())) return true;
|
if (sounds.includes(sound.toLowerCase())) return true;
|
||||||
return `Invalid sound, please enter either ${list(sounds, 'or')}.`;
|
return `Invalid sound, please enter either ${list(sounds, 'or')}.`;
|
||||||
@@ -35,7 +35,7 @@ module.exports = class SoundboardCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async run(msg, args) {
|
async run(msg, args) {
|
||||||
const { sound } = args;
|
const sound = args.sound || sounds[Math.floor(Math.random() * sounds.length)];
|
||||||
const channel = msg.member.voiceChannel;
|
const channel = msg.member.voiceChannel;
|
||||||
if (!channel) return msg.say('Please enter a voice channel first.');
|
if (!channel) return msg.say('Please enter a voice channel first.');
|
||||||
if (!channel.permissionsFor(this.client.user).has(['CONNECT', 'SPEAK'])) {
|
if (!channel.permissionsFor(this.client.user).has(['CONNECT', 'SPEAK'])) {
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ module.exports = class StocksCommand extends Command {
|
|||||||
constructor(client) {
|
constructor(client) {
|
||||||
super(client, {
|
super(client, {
|
||||||
name: 'stocks',
|
name: 'stocks',
|
||||||
|
aliases: ['stock'],
|
||||||
group: 'random',
|
group: 'random',
|
||||||
memberName: 'stocks',
|
memberName: 'stocks',
|
||||||
description: 'Get the current stocks for a symbol.',
|
description: 'Get the current stocks for a symbol.',
|
||||||
|
|||||||
Reference in New Issue
Block a user