Skip to content

Commit

Permalink
fix(deps): update dependency discord.js to v14.16.2 (#684)
Browse files Browse the repository at this point in the history
* fix(deps): update dependency discord.js to v14.16.2

* feat: resolve typing issues with new guards

* chore: switch from dmperms to contexts

* feat: resolve tests

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Naomi Carrigan <[email protected]>
  • Loading branch information
renovate[bot] and naomi-lgbt committed Sep 18, 2024
1 parent be375aa commit 90bdf3c
Show file tree
Hide file tree
Showing 25 changed files with 137 additions and 152 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@tryghost/admin-api": "1.13.12",
"deepl-node": "1.14.0",
"diff": "5.2.0",
"discord.js": "14.15.3",
"discord.js": "14.16.2",
"dotenv": "16.4.5",
"fastify": "4.28.1",
"highlight.js": "11.10.0",
Expand Down
138 changes: 83 additions & 55 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/commands/author.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// eslint-disable-next-line @typescript-eslint/naming-convention
import GhostAdminApi from "@tryghost/admin-api";
import { SlashCommandBuilder } from "discord.js";
import { InteractionContextType, SlashCommandBuilder } from "discord.js";
import { authorRoleId } from "../config/roles.js";
import { errorHandler } from "../utils/errorHandler.js";
import type { Command } from "../interfaces/command.js";
Expand All @@ -9,7 +9,7 @@ export const author: Command = {
data: new SlashCommandBuilder().
setName("author").
setDescription("Claim the author role.").
setDMPermission(false).
setContexts(InteractionContextType.Guild).
addStringOption((option) => {
return option.
setName("email").
Expand Down
6 changes: 4 additions & 2 deletions src/commands/community.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { SlashCommandBuilder, SlashCommandSubcommandBuilder } from "discord.js";
import { InteractionContextType,
SlashCommandBuilder,
SlashCommandSubcommandBuilder } from "discord.js";
import { errorHandler } from "../utils/errorHandler.js";
import { handleCodeOfConduct }
from "./subcommands/community/handleCodeOfConduct.js";
Expand Down Expand Up @@ -27,7 +29,7 @@ export const community: Command = {
data: new SlashCommandBuilder().
setName("community").
setDescription("Commands related to our community.").
setDMPermission(false).
setContexts(InteractionContextType.Guild).
addSubcommand(
new SlashCommandSubcommandBuilder().
setName("code-of-conduct").
Expand Down
6 changes: 4 additions & 2 deletions src/commands/github.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { SlashCommandBuilder, SlashCommandSubcommandBuilder } from "discord.js";
import { InteractionContextType,
SlashCommandBuilder,
SlashCommandSubcommandBuilder } from "discord.js";
import { pullComments } from "../config/pullComments.js";
import { errorHandler } from "../utils/errorHandler.js";
import { handleAddLabels } from "./subcommands/github/handleAddLabels.js";
Expand All @@ -21,7 +23,7 @@ export const github: Command = {
data: new SlashCommandBuilder().
setName("github").
setDescription("Commands related to managing github").
setDMPermission(false).
setContexts(InteractionContextType.Guild).
addSubcommand(
new SlashCommandSubcommandBuilder().
setName("close").
Expand Down
3 changes: 2 additions & 1 deletion src/commands/management.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {
ChannelType,
InteractionContextType,
SlashCommandBuilder,
SlashCommandSubcommandBuilder,
} from "discord.js";
Expand All @@ -20,7 +21,7 @@ export const management: Command = {
data: new SlashCommandBuilder().
setName("management").
setDescription("Commands related to server management.").
setDMPermission(false).
setContexts(InteractionContextType.Guild).
addSubcommand(
new SlashCommandSubcommandBuilder().
setName("private").
Expand Down
6 changes: 4 additions & 2 deletions src/commands/moderation.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { SlashCommandBuilder, SlashCommandSubcommandBuilder } from "discord.js";
import { InteractionContextType,
SlashCommandBuilder,
SlashCommandSubcommandBuilder } from "discord.js";
import { errorHandler } from "../utils/errorHandler.js";
import { handleBan } from "./subcommands/moderation/handleBan.js";
import { handleHistory } from "./subcommands/moderation/handleHistory.js";
Expand Down Expand Up @@ -26,7 +28,7 @@ export const moderation: Command = {
data: new SlashCommandBuilder().
setName("moderation").
setDescription("Moderation commands.").
setDMPermission(false).
setContexts(InteractionContextType.Guild).
addSubcommand(
new SlashCommandSubcommandBuilder().
setName("ban").
Expand Down
4 changes: 2 additions & 2 deletions src/commands/report.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { SlashCommandBuilder } from "discord.js";
import { InteractionContextType, SlashCommandBuilder } from "discord.js";
import { errorHandler } from "../utils/errorHandler.js";
import type { Command } from "../interfaces/command.js";

export const report: Command = {
data: new SlashCommandBuilder().
setName("report").
setDescription("Report inappropriate conduct in your voice channel.").
setDMPermission(false).
setContexts(InteractionContextType.Guild).
addUserOption((o) => {
return o.
setName("user").
Expand Down
Loading

0 comments on commit 90bdf3c

Please sign in to comment.