File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed
app/services/discord/modules/commands Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change 1+ import * as Discord from "discord.js" ;
2+ import { SlashCommand } from "@/extensions/discord.js" ;
3+ import { Shat } from "../shitposting.js" ;
4+
5+ export const SlashRandomImageCommand : SlashCommand = {
6+ options : {
7+ name : "randomimage" ,
8+ description : "post a random image from the time machine..." ,
9+ } ,
10+ execute : async ctx => {
11+ await ctx . deferReply ( ) ;
12+
13+ const res = await Shat ( { forceImage : true } ) ;
14+
15+ if ( res ) {
16+ await ctx . followUp ( res as Discord . InteractionReplyOptions ) ;
17+ } else {
18+ await ctx . deleteReply ( ) ;
19+ }
20+ } ,
21+ } ;
Original file line number Diff line number Diff line change @@ -17,12 +17,13 @@ import { SlashGservCommand } from "./developer/Gserv.js";
1717import { SlashKickCommand } from "./developer/Kick.js" ;
1818import { SlashLuaCommand } from "./developer/Lua.js" ;
1919import { SlashMarkovCommand } from "./Markov.js" ;
20+ import { SlashRandomImageCommand } from "./Shitposting.js" ;
2021import { SlashRconCommand } from "./developer/Rcon.js" ;
2122import { SlashRefreshLuaCommand } from "./developer/RefreshLua.js" ;
2223import { SlashRoleCommand } from "./Role.js" ;
2324import { SlashRuleCommand } from "./developer/Rules.js" ;
24- import { SlashSQLCommand } from "./developer/SQL.js" ;
2525import { SlashSpeechbubbleCommand } from "./Speechbubble.js" ;
26+ import { SlashSQLCommand } from "./developer/SQL.js" ;
2627import { SlashUnBanCommand } from "./developer/UnBan.js" ;
2728import { SlashVoiceCommand } from "./TempVoiceChannel.js" ;
2829import { SlashWhyBanCommand } from "./WhyBan.js" ;
@@ -46,6 +47,7 @@ export const slashCommands = [
4647 SlashDeeplCommand ,
4748 SlashMarkovCommand ,
4849 SlashRoleCommand ,
50+ SlashRandomImageCommand ,
4951 SlashSpeechbubbleCommand ,
5052 SlashVoiceCommand ,
5153 SlashWhyBanCommand ,
You can’t perform that action at this time.
0 commit comments