This repository has been archived by the owner on Sep 28, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from illusi0nary/feature/spooky_skeleton_sound
Feature: Halloween Bot Scare
- Loading branch information
Showing
20 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
const { prefix } = require('../../config.json') | ||
const { readdirSync } = require('fs') | ||
const { resolve } = require('path') | ||
|
||
module.exports = { | ||
config: { | ||
name: 'Boo Sound', | ||
usage: `${prefix}booh`, | ||
description: 'Display this menu', | ||
command: 'booh', | ||
aliases: ['buh', 'scare'], | ||
displayHelp: false, | ||
}, | ||
|
||
run: async (bot, message, args) => { | ||
if (message.member.voice.channel) { | ||
let soundPath = __dirname + `/../../sounds/` | ||
const connection = await message.member.voice.channel.join() | ||
const sounds = Array.from(readdirSync(resolve(__dirname, `../../sounds/`))) | ||
let playable = soundPath + sounds[Math.floor(Math.random() * sounds.length)] | ||
|
||
const dispatcher = connection.play(playable, { | ||
volume: 0.5, | ||
}) | ||
|
||
dispatcher.on('finish', () => { | ||
connection.voice.channel.leave() | ||
}) | ||
} else { | ||
message.reply('How can I scare your companions without you beeing present in the voice channel?') | ||
} | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.