@@ -6,12 +6,8 @@ import { ModalMessage } from "@fire/lib/extensions/modalmessage";
66import { FireTextChannel } from "@fire/lib/extensions/textchannel" ;
77import { FireUser } from "@fire/lib/extensions/user" ;
88import { constants , titleCase } from "@fire/lib/util/constants" ;
9- import { getBranch } from "@fire/lib/util/gitUtils" ;
109import { GuildTagManager } from "@fire/lib/util/guildtagmanager" ;
1110import { 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" ;
1511import * as centra from "centra" ;
1612import { Snowflake } from "discord-api-types/globals" ;
1713import { 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" ;
4539import Anti from "../commands/Configuration/anti" ;
4640import Google from "../commands/Fun/google" ;
4741import 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 ,
0 commit comments