Skip to content

Commit

Permalink
Merge pull request #484 from jasonmidul/Fixed-bugs-and-setup-system
Browse files Browse the repository at this point in the history
Fixed bugs and setup system
  • Loading branch information
appujet authored Nov 7, 2023
2 parents 0d19cf0 + d2bcb50 commit 874cf60
Show file tree
Hide file tree
Showing 16 changed files with 32 additions and 31 deletions.
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@ LAVALINK_NAME="Blacky" # Your lavalink name

LAVALINK_SECURE= "true" # true for secure lavalink

EEP_ALIVE= "false" # true for keep alive in https://replit.com
KEEP_ALIVE= "false" # true for keep alive in https://replit.com

BOT_ACTIVITY_TYPE=0 # Activity type is a number from 0 to 5 see more here https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-types
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ LAVALINK_URL="localhost:2333" # Your lavalink url
LAVALINK_AUTH="youshallnotpass" # Your lavalink password
LAVALINK_NAME="Blacky" # Your lavalink name
LAVALINK_SECURE= "true" # true for secure lavalink
KEEP_ALIVE= "false" # true for keep alive in https://replit.com
BOT_ACTIVITY_TYPE=0 # Activity type is a number from 0 to 5 see more here https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-types

```
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lavamusic",
"version": "4.0.0",
"version": "4.0.1",
"description": "LavaMusic is a music bot for Discord, written in JavaScript using the Discord.js, Typescript, Shoukaku (Lavalink) library.",
"main": "dist/index.js",
"type": "module",
Expand Down Expand Up @@ -44,12 +44,12 @@
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-unicorn": "^48.0.1",
"prettier": "^3.0.3",
"prisma": "^5.4.2",
"prisma": "^5.5.2",
"ts-node": "^10.9.1",
"typescript": "^5.2.2"
},
"dependencies": {
"@prisma/client": "^5.4.2",
"@prisma/client": "^5.5.2",
"discord.js": "^14.12.1",
"dotenv": "^16.3.1",
"shoukaku": "^3.4.0",
Expand Down
4 changes: 2 additions & 2 deletions src/commands/filters/8d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ export default class _8d extends Command {
cooldown: 3,
args: false,
player: {
voice: false,
voice: true,
dj: true,
active: false,
active: true,
djPerm: null,
},
permissions: {
Expand Down
4 changes: 2 additions & 2 deletions src/commands/filters/BassBoost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ export default class BassBoost extends Command {
cooldown: 3,
args: false,
player: {
voice: false,
voice: true,
dj: true,
active: false,
active: true,
djPerm: null,
},
permissions: {
Expand Down
4 changes: 2 additions & 2 deletions src/commands/filters/Distorsion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ export default class Distorsion extends Command {
cooldown: 3,
args: false,
player: {
voice: false,
voice: true,
dj: true,
active: false,
active: true,
djPerm: null,
},
permissions: {
Expand Down
4 changes: 2 additions & 2 deletions src/commands/filters/Karaoke.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ export default class Karaoke extends Command {
cooldown: 3,
args: false,
player: {
voice: false,
voice: true,
dj: true,
active: false,
active: true,
djPerm: null,
},
permissions: {
Expand Down
4 changes: 2 additions & 2 deletions src/commands/filters/Pitch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ export default class Pitch extends Command {
cooldown: 3,
args: true,
player: {
voice: false,
voice: true,
dj: true,
active: false,
active: true,
djPerm: null,
},
permissions: {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/filters/Reset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default class Reset extends Command {
cooldown: 3,
args: false,
player: {
voice: false,
voice: true,
dj: true,
active: false,
djPerm: null,
Expand Down
4 changes: 2 additions & 2 deletions src/commands/filters/Rotation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ export default class Rotation extends Command {
cooldown: 3,
args: false,
player: {
voice: false,
voice: true,
dj: true,
active: false,
active: true,
djPerm: null,
},
permissions: {
Expand Down
4 changes: 2 additions & 2 deletions src/commands/filters/Speed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ export default class Speed extends Command {
cooldown: 3,
args: true,
player: {
voice: false,
voice: true,
dj: true,
active: false,
active: true,
djPerm: null,
},
permissions: {
Expand Down
4 changes: 2 additions & 2 deletions src/commands/filters/Tremolo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ export default class Tremolo extends Command {
cooldown: 3,
args: false,
player: {
voice: false,
voice: true,
dj: true,
active: false,
active: true,
djPerm: null,
},
permissions: {
Expand Down
4 changes: 2 additions & 2 deletions src/commands/filters/Vibrato.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ export default class Vibrato extends Command {
cooldown: 3,
args: false,
player: {
voice: false,
voice: true,
dj: true,
active: false,
active: true,
djPerm: null,
},
permissions: {
Expand Down
4 changes: 2 additions & 2 deletions src/commands/filters/lowPass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ export default class lowPass extends Command {
cooldown: 3,
args: false,
player: {
voice: false,
voice: true,
dj: true,
active: false,
active: true,
djPerm: null,
},
permissions: {
Expand Down
4 changes: 2 additions & 2 deletions src/events/client/InteractionCreate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,9 @@ export default class InteractionCreate extends Event {
}
if (
interaction.options.data.some(option =>
option.value.toString().includes('@everyone')
option.value && option.value.toString().includes('@everyone')
) ||
interaction.options.data.some(option => option.value.toString().includes('@here'))
interaction.options.data.some(option => option.value && option.value.toString().includes('@here'))
)
return await interaction.reply({
content: 'You can\'t mention everyone or here.',
Expand Down
7 changes: 3 additions & 4 deletions src/structures/Lavamusic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export default class Lavamusic extends Client {
this.on(
Events.InteractionCreate,
async (interaction: Interaction<'cached'>): Promise<void> => {
if (!interaction.isButton()) {
if (interaction.isButton()) {
const setup = await this.prisma.setup.findUnique({
where: {
guildId: interaction.guildId,
Expand All @@ -87,9 +87,8 @@ export default class Lavamusic extends Client {
.filter(file => file.endsWith('.js'));
commandFiles.forEach(async file => {
const cmd = (await import(`../commands/${dir}/${file}`)).default;
const command = new cmd(this, file);
const command = new cmd(this);
command.category = dir;
command.file = file;
this.commands.set(command.name, command);
if (command.aliases.length !== 0) {
command.aliases.forEach((alias: any) => {
Expand All @@ -106,7 +105,7 @@ export default class Lavamusic extends Client {
? command.nameLocalizations
: null,
description_localizations: command.descriptionLocalizations
? cmd.descriptionLocalizations
? command.descriptionLocalizations
: null,
default_member_permissions:
command.permissions.user.length > 0 ? command.permissions.user : null,
Expand Down

0 comments on commit 874cf60

Please sign in to comment.