Skip to content

Commit

Permalink
fix: CI/CD error
Browse files Browse the repository at this point in the history
  • Loading branch information
jerrycool123 committed Jul 7, 2024
1 parent cd9ac1e commit beccbab
Show file tree
Hide file tree
Showing 9 changed files with 194 additions and 316 deletions.
2 changes: 1 addition & 1 deletion apps/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"csv-writer": "^1.6.0",
"dayjs": "^1.11.11",
"dedent": "^1.5.3",
"discord.js": "14.14.1",
"discord.js": "^14.15.3",
"dotenv": "^16.4.5",
"mongoose": "^8.4.1",
"zod": "^3.23.8"
Expand Down
3 changes: 1 addition & 2 deletions apps/server/src/event-handlers/interaction-create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { Events, Interaction, PermissionsBitField } from 'discord.js';
import { VerifyCommand } from '../commands/verify.js';
import { ChatInputCommand } from '../structures/chat-input-command.js';
import { EventHandler } from '../structures/event-handler.js';
import { readablePermissionsMap } from '../utils/discord.js';
import { Utils } from '../utils/index.js';

export class InteractionCreateEventHandler extends EventHandler<Events.InteractionCreate> {
Expand Down Expand Up @@ -129,7 +128,7 @@ export class InteractionCreateEventHandler extends EventHandler<Events.Interacti
content: dedent`
I need the following permission to run this command:
${missingPermissions
.map((permission) => `- ${readablePermissionsMap[permission]}`)
.map((permission) => `- ${permission.replace(/([a-z])([A-Z])/g, '$1 $2')}`)
.join(', ')}
`,
ephemeral: true,
Expand Down
50 changes: 0 additions & 50 deletions apps/server/src/utils/discord.ts
Original file line number Diff line number Diff line change
@@ -1,55 +1,5 @@
import { DiscordBotAPI } from '@divine-bridge/common';
import { PermissionsString } from 'discord.js';

import { Env } from './env.js';

export const discordBotApi = new DiscordBotAPI(Env.DISCORD_BOT_TOKEN);

export const readablePermissionsMap: Record<PermissionsString, string> = {
AddReactions: 'Add Reactions',
Administrator: 'Administrator',
AttachFiles: 'Attach Files',
BanMembers: 'Ban Members',
ChangeNickname: 'Change Nickname',
Connect: 'Connect',
CreateInstantInvite: 'Create Instant Invite',
CreatePrivateThreads: 'Create Private Threads',
CreatePublicThreads: 'Create Public Threads',
DeafenMembers: 'Deafen Members',
EmbedLinks: 'Embed Links',
KickMembers: 'Kick Members',
ManageChannels: 'Manage Channels',
ManageEmojisAndStickers: 'Manage Emojis and Stickers',
ManageEvents: 'Manage Events',
ManageGuild: 'Manage Guild',
ManageGuildExpressions: 'Manage Guild Expressions',
ManageMessages: 'Manage Messages',
ManageNicknames: 'Manage Nicknames',
ManageRoles: 'Manage Roles',
ManageThreads: 'Manage Threads',
ManageWebhooks: 'Manage Webhooks',
MentionEveryone: 'Mention Everyone',
ModerateMembers: 'Moderate Members',
MoveMembers: 'Move Members',
MuteMembers: 'Mute Members',
PrioritySpeaker: 'Priority Speaker',
ReadMessageHistory: 'Read Message History',
RequestToSpeak: 'Request To Speak',
SendMessages: 'Send Messages',
SendMessagesInThreads: 'Send Messages in Threads',
SendTTSMessages: 'Send TTS Messages',
SendVoiceMessages: 'Send Voice Messages',
Stream: 'Stream',
Speak: 'Speak',
UseApplicationCommands: 'Use Application Commands',
UseEmbeddedActivities: 'Use Embedded Activities',
UseExternalEmojis: 'Use External Emojis',
UseExternalSounds: 'Use External Sounds',
UseExternalStickers: 'Use External Stickers',
UseSoundboard: 'Use Soundboard',
UseVAD: 'Use VAD',
ViewAuditLog: 'View Audit Log',
ViewChannel: 'View Channel',
ViewCreatorMonetizationAnalytics: 'View Creator Monetization Analytics',
ViewGuildInsights: 'View Guild Insights',
};
2 changes: 1 addition & 1 deletion apps/sls-backup/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"@divine-bridge/ocr-service": "workspace:^",
"@divine-bridge/serverless-offline-lambda-function-urls": "workspace:^",
"adm-zip": "^0.5.13",
"discord.js": "14.14.1",
"discord.js": "^14.15.3",
"esbuild": "^0.20.2",
"serverless-offline": "^13.6.0",
"zod": "^3.23.8"
Expand Down
4 changes: 2 additions & 2 deletions apps/sls-membership/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"name": "sls-membership",
"version": "0.0.1",
"dependencies": {
"@discordjs/rest": "2.2.0",
"@discordjs/rest": "^2.3.0",
"@divine-bridge/common": "workspace:^",
"@divine-bridge/serverless-offline-lambda-function-urls": "workspace:^",
"dayjs": "^1.11.11",
"dedent": "^1.5.3",
"discord-api-types": "^0.37.86",
"discord-api-types": "0.37.83",
"esbuild": "^0.20.2",
"mongoose": "^8.4.1",
"serverless-offline": "^13.6.0",
Expand Down
6 changes: 3 additions & 3 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@
"client-only": "^0.0.1",
"dayjs": "^1.11.11",
"dedent": "^1.5.3",
"discord-api-types": "^0.37.86",
"discord-api-types": "0.37.83",
"eslint": "^8.57.0",
"eslint-config-next": "14.2.3",
"eslint-config-next": "14.2.4",
"eslint-plugin-import": "^2.29.1",
"i18next": "^23.11.5",
"mongoose": "^8.4.1",
"negotiator": "^0.6.3",
"next": "14.2.3",
"next": "14.2.4",
"next-auth": "5.0.0-beta.18",
"next-safe-action": "^6.2.0",
"next-sitemap": "^4.2.3",
Expand Down
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
]
},
"packageManager": "[email protected]",
"pnpm": {
"overrides": {
"undici": "5.28.4"
}
},
"scripts": {
"build": "turbo run build",
"build:server": "turbo run build --filter server",
Expand Down
6 changes: 3 additions & 3 deletions packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
"name": "@divine-bridge/common",
"version": "0.0.1",
"dependencies": {
"@discordjs/builders": "^1.7.0",
"@discordjs/rest": "2.2.0",
"@discordjs/builders": "^1.8.2",
"@discordjs/rest": "^2.3.0",
"@divine-bridge/i18n": "workspace:^",
"@divine-bridge/ocr-service": "workspace:^",
"dayjs": "^1.11.11",
"dedent": "^1.5.3",
"discord-api-types": "^0.37.86",
"discord-api-types": "0.37.83",
"gaxios": "^6.2.0",
"google-auth-library": "^9.10.0",
"googleapis": "^137.1.0",
Expand Down
Loading

0 comments on commit beccbab

Please sign in to comment.