Skip to content

Commit ca32242

Browse files
Merge pull request #470 from saiteja-madha/5.5.0
5.5.0 Release
2 parents bb0d574 + 3a98d2a commit ca32242

24 files changed

+1232
-4716
lines changed

.prettierrc.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
"printWidth": 120,
88
"bracketSpacing": true,
99
"arrowParens": "always",
10-
"endOfLine": "crlf"
10+
"endOfLine": "lf"
1111
}
12+

config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ module.exports = {
7777

7878
IMAGE: {
7979
ENABLED: false,
80-
BASE_API: "https://strangeapi.fun/api",
80+
BASE_API: "https://strangeapi.hostz.me/api",
8181
},
8282

8383
INVITE: {

dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Base image
2-
FROM node:16-alpine
2+
FROM node:18-alpine
33

44
# Set the working directory in the container
55
WORKDIR /usr/src/app

package-lock.json

+761-4,291
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+18-17
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
{
22
"name": "discord-js-bot",
3-
"version": "5.4.0",
3+
"version": "5.5.0",
44
"description": "An open-source, multipurpose discord bot built using discord-js",
55
"main": "bot.js",
66
"author": "Sai Teja M",
77
"license": "ISC",
88
"engines": {
9-
"node": ">=16.11.0"
9+
"node": ">=18.0.0"
1010
},
1111
"scripts": {
1212
"dev": "nodemon .",
1313
"start": "node .",
1414
"format": "prettier --write src",
15-
"docker:build": "docker build -t saitejamadha/discord-js-bot:5.4.0 ."
15+
"docker:package": "tar -cf discord-js-bot.tar dashboard logs src bot.js config.js dockerfile package.json package-lock.json",
16+
"docker:build": "docker build -t saitejamadha/discord-js-bot:5.5.0 ."
1617
},
1718
"homepage": "https://github.com/saiteja-madha/discord-js-bot#readme",
1819
"repository": {
@@ -29,7 +30,7 @@
2930
"ascii-table": "0.0.9",
3031
"btoa": "^1.2.1",
3132
"common-tags": "^1.8.2",
32-
"connect-mongo": "^5.0.0",
33+
"connect-mongo": "^5.1.0",
3334
"country-emoji-languages": "^1.0.0",
3435
"discord-giveaways": "^6.0.1",
3536
"discord-together": "^1.3.31",
@@ -38,18 +39,18 @@
3839
"ejs": "^3.1.9",
3940
"enhanced-ms": "^2.3.0",
4041
"express": "^4.18.2",
41-
"express-session": "^1.17.3",
42+
"express-session": "^1.18.0",
4243
"fixedsize-map": "^1.0.1",
43-
"iso-639-1": "^2.1.15",
44+
"iso-639-1": "^3.1.0",
4445
"lavaclient": "^4.1.1",
4546
"module-alias": "^2.2.3",
46-
"moment": "^2.29.4",
47-
"mongoose": "^7.3.4",
47+
"moment": "^2.30.1",
48+
"mongoose": "^8.1.1",
4849
"nekos.life": "^3.0.0",
49-
"node-fetch": "^2.6.12",
50+
"node-fetch": "^2.7.0",
5051
"os": "^0.1.2",
51-
"pino": "^8.14.1",
52-
"pino-pretty": "^10.0.1",
52+
"pino": "^8.18.0",
53+
"pino-pretty": "^10.3.1",
5354
"pretty-ms": "^7.0.1",
5455
"snakecord": "^1.0.9",
5556
"sourcebin_js": "^0.0.3-ignore",
@@ -59,17 +60,17 @@
5960
"twemoji-parser": "^14.0.0"
6061
},
6162
"optionalDependencies": {
62-
"bufferutil": "^4.0.7",
63+
"bufferutil": "^4.0.8",
6364
"erlpack": "^0.1.4",
6465
"utf-8-validate": "^6.0.3",
65-
"zlib-sync": "^0.1.8"
66+
"zlib-sync": "^0.1.9"
6667
},
6768
"devDependencies": {
68-
"eslint": "^8.45.0",
69+
"eslint": "^8.56.0",
6970
"eslint-plugin-jsdoc": "^46.4.3",
70-
"node": "^20.4.0",
71-
"nodemon": "^3.0.1",
72-
"prettier": "3.0.0"
71+
"node": "^18.18.2",
72+
"nodemon": "^3.0.3",
73+
"prettier": "3.2.5"
7374
},
7475
"keywords": [
7576
"discord",

src/commands/giveaways/giveaway.js

+1
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ module.exports = {
232232
//
233233
if (sub === "start") {
234234
const channel = interaction.options.getChannel("channel");
235+
await interaction.followUp("Starting Giveaway system...");
235236
return await runModalSetup(interaction, channel);
236237
}
237238

src/commands/invites/inviterank.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,10 @@ async function addInviteRank({ guild }, role, invites, settings) {
133133
if (exists) {
134134
exists.invites = invites;
135135
msg += "Previous configuration found for this role. Overwriting data\n";
136+
} else {
137+
settings.invite.ranks.push({ _id: role.id, invites });
136138
}
137139

138-
settings.invite.ranks.push({ _id: role.id, invites });
139140
await settings.save();
140141
return `${msg}Success! Configuration saved.`;
141142
}

src/commands/invites/inviteranks.js

+2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ async function getInviteRanks({ guild }, settings) {
3838
}
3939
});
4040

41+
if (!str) return "No invite ranks configured in this server";
42+
4143
const embed = new EmbedBuilder()
4244
.setAuthor({ name: "Invite Ranks" })
4345
.setColor(EMBED_COLORS.BOT_EMBED)

src/commands/moderation/message/move.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ module.exports = {
2020
const target = await message.guild.resolveMember(args[0], true);
2121
if (!target) return message.safeReply(`No user found matching ${args[0]}`);
2222

23-
const channels = message.guild.findMatchingChannels(args[1]);
23+
const channels = message.guild.findMatchingVoiceChannels(args[1]);
2424
if (!channels.length) return message.safeReply("No matching channels found");
2525
const targetChannel = channels.pop();
2626
if (!targetChannel.type === ChannelType.GuildVoice && !targetChannel.type === ChannelType.GuildStageVoice) {

src/commands/music/bassboost.js

+77-77
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,77 @@
1-
const { musicValidations } = require("@helpers/BotUtils");
2-
const { ApplicationCommandOptionType } = require("discord.js");
3-
4-
const levels = {
5-
none: 0.0,
6-
low: 0.1,
7-
medium: 0.15,
8-
high: 0.25,
9-
};
10-
11-
/**
12-
* @type {import("@structures/Command")}
13-
*/
14-
module.exports = {
15-
name: "bassboost",
16-
description: "set bassboost level",
17-
category: "MUSIC",
18-
validations: musicValidations,
19-
command: {
20-
enabled: true,
21-
minArgsCount: 1,
22-
usage: "<none|low|medium|high>",
23-
},
24-
slashCommand: {
25-
enabled: true,
26-
options: [
27-
{
28-
name: "level",
29-
description: "bassboost level",
30-
type: ApplicationCommandOptionType.String,
31-
required: true,
32-
choices: [
33-
{
34-
name: "none",
35-
value: "none",
36-
},
37-
{
38-
name: "low",
39-
value: "low",
40-
},
41-
{
42-
name: "medium",
43-
value: "medium",
44-
},
45-
{
46-
name: "high",
47-
value: "high",
48-
},
49-
],
50-
},
51-
],
52-
},
53-
54-
async messageRun(message, args) {
55-
let level = "none";
56-
if (args.length && args[0].toLowerCase() in levels) level = args[0].toLowerCase();
57-
const response = setBassBoost(message, level);
58-
await message.safeReply(response);
59-
},
60-
61-
async interactionRun(interaction) {
62-
let level = interaction.options.getString("level");
63-
const response = setBassBoost(interaction, level);
64-
await interaction.followUp(response);
65-
},
66-
};
67-
68-
/**
69-
* @param {import("discord.js").CommandInteraction|import("discord.js").Message} arg0
70-
* @param {number} level
71-
*/
72-
function setBassBoost({ client, guildId }, level) {
73-
const player = client.musicManager.getPlayer(guildId);
74-
const bands = new Array(3).fill(null).map((_, i) => ({ band: i, gain: levels[level] }));
75-
player.setEqualizer(...bands);
76-
return `> Set the bassboost level to \`${level}\``;
77-
}
1+
const { musicValidations } = require("@helpers/BotUtils");
2+
const { ApplicationCommandOptionType } = require("discord.js");
3+
4+
const levels = {
5+
none: 0.0,
6+
low: 0.1,
7+
medium: 0.15,
8+
high: 0.25,
9+
};
10+
11+
/**
12+
* @type {import("@structures/Command")}
13+
*/
14+
module.exports = {
15+
name: "bassboost",
16+
description: "set bassboost level",
17+
category: "MUSIC",
18+
validations: musicValidations,
19+
command: {
20+
enabled: true,
21+
minArgsCount: 1,
22+
usage: "<none|low|medium|high>",
23+
},
24+
slashCommand: {
25+
enabled: true,
26+
options: [
27+
{
28+
name: "level",
29+
description: "bassboost level",
30+
type: ApplicationCommandOptionType.String,
31+
required: true,
32+
choices: [
33+
{
34+
name: "none",
35+
value: "none",
36+
},
37+
{
38+
name: "low",
39+
value: "low",
40+
},
41+
{
42+
name: "medium",
43+
value: "medium",
44+
},
45+
{
46+
name: "high",
47+
value: "high",
48+
},
49+
],
50+
},
51+
],
52+
},
53+
54+
async messageRun(message, args) {
55+
let level = "none";
56+
if (args.length && args[0].toLowerCase() in levels) level = args[0].toLowerCase();
57+
const response = setBassBoost(message, level);
58+
await message.safeReply(response);
59+
},
60+
61+
async interactionRun(interaction) {
62+
let level = interaction.options.getString("level");
63+
const response = setBassBoost(interaction, level);
64+
await interaction.followUp(response);
65+
},
66+
};
67+
68+
/**
69+
* @param {import("discord.js").CommandInteraction|import("discord.js").Message} arg0
70+
* @param {number} level
71+
*/
72+
function setBassBoost({ client, guildId }, level) {
73+
const player = client.musicManager.getPlayer(guildId);
74+
const bands = new Array(3).fill(null).map((_, i) => ({ band: i, gain: levels[level] }));
75+
player.setEqualizer(...bands);
76+
return `> Set the bassboost level to \`${level}\``;
77+
}

0 commit comments

Comments
 (0)