Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions src/commands/Fun/doubt.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { CommandOptions, KlasaMessage } from 'klasa';
import { SteveCommand } from '@lib/structures/commands/SteveCommand';
import { Message, MessageReaction } from 'discord.js';
import { ApplyOptions } from '@skyra/decorators';

@ApplyOptions<CommandOptions>({
aliases: ['x'],
description: lang => lang.tget('commandDoubtDescription'),
extendedHelp: lang => lang.tget('commandDoubtExtended')
})
export default class extends SteveCommand {

public async run(msg: KlasaMessage): Promise<Message | MessageReaction> {
if (!msg.reference?.messageID) return msg.channel.send(msg.language.tget('commandDoubtExtended'));

const targetMessage = msg.channel.messages.cache.get(msg.reference.messageID);

if (!targetMessage) return msg.channel.send(msg.language.tget('commandDoubtFail'));

return targetMessage.react('805574339651043378');
}

}
3 changes: 3 additions & 0 deletions src/languages/en-US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,9 @@ export default class extends Language {
extendedHelp: 'The ability to search for a relevant XKCD is coming soon!'
}),
commandXkcdInvalid: 'I was unable to find that XKCD.',
commandDoubtDescription: 'React to a message with <:x2doubt:805574339651043378>.',
commandDoubtExtended: 'This command must be used when replying to a message.',
commandDoubtFail: 'Something went wrong and I couldn\'t find that message.',
/**
* ################################
* # MODERATION SYSTEM #
Expand Down
3 changes: 3 additions & 0 deletions src/lib/types/Languages.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,9 @@ declare module 'klasa' {
commandXkcdDescription: string;
commandXkcdExtended: string;
commandXkcdInvalid: string;
commandDoubtDescription: string;
commandDoubtExtended: string;
commandDoubtFail: string;
moderationNoDuration: string;
moderationNoReason: string;
moderationNoSteve: string;
Expand Down