Skip to content

Commit c5d7225

Browse files
committed
Remove old deploy code
1 parent ec00d71 commit c5d7225

3 files changed

Lines changed: 1 addition & 194 deletions

File tree

lib/ws/util/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export enum EventType {
1313
RESUME_CLIENT, // receive only
1414
HEARTBEAT, // send only
1515
HEARTBEAT_ACK, // receive only
16-
DEPLOY, // send & receive
16+
UNUSED1 = 8,
1717
SEND_STATS, // send only
1818
REQUEST_STATS, // receive only
1919
GET_EXTENDED_DISCOVERABLE, // send & receive

src/listeners/button.ts

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,8 @@ import { ModalMessage } from "@fire/lib/extensions/modalmessage";
66
import { FireTextChannel } from "@fire/lib/extensions/textchannel";
77
import { FireUser } from "@fire/lib/extensions/user";
88
import { constants, titleCase } from "@fire/lib/util/constants";
9-
import { getBranch } from "@fire/lib/util/gitUtils";
109
import { GuildTagManager } from "@fire/lib/util/guildtagmanager";
1110
import { Listener } from "@fire/lib/util/listener";
12-
import { Message } from "@fire/lib/ws/Message";
13-
import { MessageUtil } from "@fire/lib/ws/util/MessageUtil";
14-
import { EventType } from "@fire/lib/ws/util/constants";
1511
import * as centra from "centra";
1612
import { Snowflake } from "discord-api-types/globals";
1713
import { PermissionFlagsBits } from "discord-api-types/v9";
@@ -30,7 +26,6 @@ import {
3026
MessageSelectOptionData,
3127
Modal,
3228
ModalActionRowComponent,
33-
NewsChannel,
3429
SnowflakeUtil,
3530
TextDisplayComponent,
3631
TextInputComponent,
@@ -41,7 +36,6 @@ import {
4136
MessageComponentTypes,
4237
TextInputStyles,
4338
} from "discord.js/typings/enums";
44-
import { codeblockTypeCaster } from "../arguments/codeblock";
4539
import Anti from "../commands/Configuration/anti";
4640
import Google from "../commands/Fun/google";
4741
import Appeals, {
@@ -2284,55 +2278,6 @@ Please choose accurately as it will allow us to help you as quick as possible!
22842278
});
22852279
}
22862280

2287-
if (button.customId.startsWith("deploy:") && button.author.isSuperuser()) {
2288-
await button.channel.ack();
2289-
await button.delete("@original");
2290-
const commit = button.customId.slice(7);
2291-
// i should probably make this less jank
2292-
const commitMessage =
2293-
codeblockTypeCaster(
2294-
null,
2295-
(button.message as FireMessage).embeds[0].fields[0].value
2296-
)?.content.trim() ?? "Commit Message Unknown";
2297-
const branch = getBranch();
2298-
const githubChannel = this.client.channels.cache.get(
2299-
this.client.config.githubChannelId
2300-
) as NewsChannel;
2301-
let threadId: Snowflake;
2302-
if (githubChannel) {
2303-
const messages = await githubChannel.messages
2304-
.fetch({ limit: 10 })
2305-
.catch(() => {});
2306-
if (messages) {
2307-
const commitMsg = messages.find(
2308-
(m) =>
2309-
m.embeds.length && m.embeds[0].title.startsWith(`[bot:${branch}]`)
2310-
);
2311-
if (commitMsg)
2312-
if (commitMsg.hasThread) threadId = commitMsg.id;
2313-
else {
2314-
const thread = await commitMsg
2315-
.startThread({
2316-
name: "Deploy Log",
2317-
autoArchiveDuration: 1440,
2318-
})
2319-
.catch(() => {});
2320-
if (thread) threadId = thread?.id;
2321-
}
2322-
}
2323-
}
2324-
return this.client.manager.ws.send(
2325-
MessageUtil.encode(
2326-
new Message(EventType.DEPLOY, {
2327-
commit,
2328-
branch,
2329-
threadId,
2330-
message: commitMessage,
2331-
})
2332-
)
2333-
);
2334-
}
2335-
23362281
if (button.customId.startsWith("reminders-list-page:")) {
23372282
const [, userId, page] = button.customId.split(":") as [
23382283
string,

src/ws/events/DeployEvent.ts

Lines changed: 0 additions & 138 deletions
This file was deleted.

0 commit comments

Comments
 (0)