-
Notifications
You must be signed in to change notification settings - Fork 710
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 #470 from saiteja-madha/5.5.0
5.5.0 Release
- Loading branch information
Showing
24 changed files
with
1,232 additions
and
4,716 deletions.
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 |
---|---|---|
|
@@ -7,5 +7,6 @@ | |
"printWidth": 120, | ||
"bracketSpacing": true, | ||
"arrowParens": "always", | ||
"endOfLine": "crlf" | ||
"endOfLine": "lf" | ||
} | ||
|
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,77 +1,77 @@ | ||
const { musicValidations } = require("@helpers/BotUtils"); | ||
const { ApplicationCommandOptionType } = require("discord.js"); | ||
|
||
const levels = { | ||
none: 0.0, | ||
low: 0.1, | ||
medium: 0.15, | ||
high: 0.25, | ||
}; | ||
|
||
/** | ||
* @type {import("@structures/Command")} | ||
*/ | ||
module.exports = { | ||
name: "bassboost", | ||
description: "set bassboost level", | ||
category: "MUSIC", | ||
validations: musicValidations, | ||
command: { | ||
enabled: true, | ||
minArgsCount: 1, | ||
usage: "<none|low|medium|high>", | ||
}, | ||
slashCommand: { | ||
enabled: true, | ||
options: [ | ||
{ | ||
name: "level", | ||
description: "bassboost level", | ||
type: ApplicationCommandOptionType.String, | ||
required: true, | ||
choices: [ | ||
{ | ||
name: "none", | ||
value: "none", | ||
}, | ||
{ | ||
name: "low", | ||
value: "low", | ||
}, | ||
{ | ||
name: "medium", | ||
value: "medium", | ||
}, | ||
{ | ||
name: "high", | ||
value: "high", | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
|
||
async messageRun(message, args) { | ||
let level = "none"; | ||
if (args.length && args[0].toLowerCase() in levels) level = args[0].toLowerCase(); | ||
const response = setBassBoost(message, level); | ||
await message.safeReply(response); | ||
}, | ||
|
||
async interactionRun(interaction) { | ||
let level = interaction.options.getString("level"); | ||
const response = setBassBoost(interaction, level); | ||
await interaction.followUp(response); | ||
}, | ||
}; | ||
|
||
/** | ||
* @param {import("discord.js").CommandInteraction|import("discord.js").Message} arg0 | ||
* @param {number} level | ||
*/ | ||
function setBassBoost({ client, guildId }, level) { | ||
const player = client.musicManager.getPlayer(guildId); | ||
const bands = new Array(3).fill(null).map((_, i) => ({ band: i, gain: levels[level] })); | ||
player.setEqualizer(...bands); | ||
return `> Set the bassboost level to \`${level}\``; | ||
} | ||
const { musicValidations } = require("@helpers/BotUtils"); | ||
const { ApplicationCommandOptionType } = require("discord.js"); | ||
|
||
const levels = { | ||
none: 0.0, | ||
low: 0.1, | ||
medium: 0.15, | ||
high: 0.25, | ||
}; | ||
|
||
/** | ||
* @type {import("@structures/Command")} | ||
*/ | ||
module.exports = { | ||
name: "bassboost", | ||
description: "set bassboost level", | ||
category: "MUSIC", | ||
validations: musicValidations, | ||
command: { | ||
enabled: true, | ||
minArgsCount: 1, | ||
usage: "<none|low|medium|high>", | ||
}, | ||
slashCommand: { | ||
enabled: true, | ||
options: [ | ||
{ | ||
name: "level", | ||
description: "bassboost level", | ||
type: ApplicationCommandOptionType.String, | ||
required: true, | ||
choices: [ | ||
{ | ||
name: "none", | ||
value: "none", | ||
}, | ||
{ | ||
name: "low", | ||
value: "low", | ||
}, | ||
{ | ||
name: "medium", | ||
value: "medium", | ||
}, | ||
{ | ||
name: "high", | ||
value: "high", | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
|
||
async messageRun(message, args) { | ||
let level = "none"; | ||
if (args.length && args[0].toLowerCase() in levels) level = args[0].toLowerCase(); | ||
const response = setBassBoost(message, level); | ||
await message.safeReply(response); | ||
}, | ||
|
||
async interactionRun(interaction) { | ||
let level = interaction.options.getString("level"); | ||
const response = setBassBoost(interaction, level); | ||
await interaction.followUp(response); | ||
}, | ||
}; | ||
|
||
/** | ||
* @param {import("discord.js").CommandInteraction|import("discord.js").Message} arg0 | ||
* @param {number} level | ||
*/ | ||
function setBassBoost({ client, guildId }, level) { | ||
const player = client.musicManager.getPlayer(guildId); | ||
const bands = new Array(3).fill(null).map((_, i) => ({ band: i, gain: levels[level] })); | ||
player.setEqualizer(...bands); | ||
return `> Set the bassboost level to \`${level}\``; | ||
} |
Oops, something went wrong.