Skip to content

Commit

Permalink
rf: remove all imports of @discordjs/builders and replace with discor…
Browse files Browse the repository at this point in the history
…d.js
  • Loading branch information
Maximus7474 committed Dec 13, 2024
1 parent 697f70c commit 5bd0527
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 18 deletions.
2 changes: 1 addition & 1 deletion deploy/find_commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const fs = require('fs');
const path = require('path');
const log = new require('../src/utils/logger.js');
const logger = new log("Command loader");
const { SlashCommandBuilder } = require('@discordjs/builders');
const { SlashCommandBuilder } = require('discord.js');
const path_to_commands = path.join(__dirname, '/../src/commands/');

function getAllJsFiles(dirPath, arrayOfFiles) {
Expand Down
3 changes: 1 addition & 2 deletions src/commands/clanHandler.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const { SlashCommandBuilder } = require('@discordjs/builders');
const { PermissionsBitField, EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle, ModalBuilder, TextInputBuilder, TextInputStyle } = require('discord.js');
const { PermissionsBitField, EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle, ModalBuilder, TextInputBuilder, TextInputStyle, SlashCommandBuilder } = require('discord.js');

const { executeStatement, executeQuery } = require('../utils/database/sqliteHandler');

Expand Down
2 changes: 1 addition & 1 deletion src/commands/help.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// const { SlashCommandBuilder } = require('@discordjs/builders');
// const { SlashCommandBuilder } = require('discord.js');

// module.exports = {
// register_command: new SlashCommandBuilder()
Expand Down
3 changes: 1 addition & 2 deletions src/commands/inviteMe.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const { SlashCommandBuilder } = require('@discordjs/builders');
const { EmbedBuilder } = require('discord.js');
const { SlashCommandBuilder, EmbedBuilder } = require('discord.js');

module.exports = {
register_command: new SlashCommandBuilder()
Expand Down
3 changes: 1 addition & 2 deletions src/commands/patchnotes.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const { ButtonStyle } = require('discord.js');
const { SlashCommandBuilder, EmbedBuilder, ButtonBuilder, ActionRowBuilder } = require('@discordjs/builders');
const { ButtonStyle, SlashCommandBuilder, EmbedBuilder, ButtonBuilder, ActionRowBuilder } = require('discord.js');
const https = require('https');
const assert = require('assert');

Expand Down
3 changes: 1 addition & 2 deletions src/commands/serverSearch.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const { SlashCommandBuilder } = require('@discordjs/builders');
const { SlashCommandBuilder, EmbedBuilder } = require('discord.js');
const { queryBattleMetrics } = require('../utils/query/battlemetricsQuery');
const { EmbedBuilder } = require('discord.js');

const { getOrdinalSuffix, emojiForStatus, capitalizeFirstLetter } = require('../utils/functions');

Expand Down
3 changes: 1 addition & 2 deletions src/commands/serverStatus.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const { SlashCommandBuilder } = require('@discordjs/builders');
const { PermissionsBitField, EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle } = require('discord.js');
const { PermissionsBitField, EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle, SlashCommandBuilder } = require('discord.js');

const { executeStatement, executeQuery } = require('../utils/database/sqliteHandler');
const { queryBattleMetrics } = require('../utils/query/battlemetricsQuery');
Expand Down
3 changes: 1 addition & 2 deletions src/commands/serverStatusHandler.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const { SlashCommandBuilder } = require('@discordjs/builders');
const { PermissionsBitField, EmbedBuilder } = require('discord.js');
const { PermissionsBitField, EmbedBuilder, SlashCommandBuilder } = require('discord.js');

const { executeStatement, executeQuery } = require('../utils/database/sqliteHandler');

Expand Down
3 changes: 1 addition & 2 deletions src/commands/vehicleSearcher.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const { SlashCommandBuilder } = require('@discordjs/builders');
const { SlashCommandBuilder, EmbedBuilder } = require('discord.js');

const VehicleData = require('../../data/vehicleInfo.json');
const { EmbedBuilder } = require('discord.js');

const thumbnailImage = (team) => {
if (team === "Allies") return "https://r2.fivemanage.com/pub/ngxgy4wfhtv7.png";
Expand Down
2 changes: 1 addition & 1 deletion src/commands/viewClans.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { SlashCommandBuilder, EmbedBuilder, StringSelectMenuBuilder, StringSelectMenuOptionBuilder, ActionRowBuilder } = require('@discordjs/builders');
const { SlashCommandBuilder, EmbedBuilder, StringSelectMenuBuilder, StringSelectMenuOptionBuilder, ActionRowBuilder } = require('discord.js');

const { executeQuery } = require('../utils/database/sqliteHandler');
const log = require('../utils/logger');
Expand Down
2 changes: 1 addition & 1 deletion src/utils/initialisation/setup_commands.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const fs = require('fs')
const log = new require('../logger.js')
const logger = new log("Command loader")
const { SlashCommandBuilder } = require('@discordjs/builders');
const { SlashCommandBuilder } = require('discord.js');
const path_to_commands = __dirname + '/../../commands/'

module.exports = (client) => {
Expand Down

0 comments on commit 5bd0527

Please sign in to comment.