-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: add types to build referral list * refactor: move commands into slash and context menu command folders * refactor: rename date utils to utils/date * docs: update README about commands section
- Loading branch information
Showing
91 changed files
with
159 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import type { ContextMenuCommandBuilder, ContextMenuCommandInteraction } from 'discord.js'; | ||
|
||
export type ContextMenuCommandInteractionHandler = (interaction: ContextMenuCommandInteraction) => Promise<void>; | ||
|
||
export interface ContextMenuCommand { | ||
data: ContextMenuCommandBuilder; | ||
execute: ContextMenuCommandInteractionHandler; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import type { ContextMenuCommand } from './builder'; | ||
import pinMessageCommand from './pin-message'; | ||
|
||
export const commands: ContextMenuCommand[] = [pinMessageCommand]; |
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
...commands/contextMenuCommands/pin/index.ts → ...ontext-menu-commands/pin-message/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
src/commands/autobump-threads/add-thread.ts → ...h-commands/autobump-threads/add-thread.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
...ommands/autobump-threads/remove-thread.ts → ...ommands/autobump-threads/remove-thread.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,21 @@ | ||
import type { | ||
AutocompleteInteraction, | ||
ChatInputCommandInteraction, | ||
ContextMenuCommandBuilder, | ||
ContextMenuCommandInteraction, | ||
SlashCommandBuilder, | ||
SlashCommandSubcommandBuilder, | ||
SlashCommandSubcommandsOnlyBuilder, | ||
} from 'discord.js'; | ||
|
||
export type CommandHandler = (interaction: ChatInputCommandInteraction) => Promise<void>; | ||
export type SlashCommandHandler = (interaction: ChatInputCommandInteraction) => Promise<void>; | ||
export type AutocompleteHandler = (autocomplete: AutocompleteInteraction) => Promise<void>; | ||
export type ContextMenuCommandInteractionHandler = (interaction: ContextMenuCommandInteraction) => Promise<void>; | ||
|
||
export interface Command { | ||
export interface SlashCommand { | ||
data: Omit<SlashCommandBuilder, 'addSubcommandGroup' | 'addSubcommand'> | SlashCommandSubcommandsOnlyBuilder; | ||
execute: CommandHandler; | ||
execute: SlashCommandHandler; | ||
autocomplete?: AutocompleteHandler; | ||
} | ||
|
||
export interface Subcommand { | ||
data: SlashCommandSubcommandBuilder | ((subcommandGroup: SlashCommandSubcommandBuilder) => SlashCommandSubcommandBuilder); | ||
execute: CommandHandler; | ||
} | ||
|
||
export interface ContextMenuCommand { | ||
data: ContextMenuCommandBuilder; | ||
execute: ContextMenuCommandInteractionHandler; | ||
execute: SlashCommandHandler; | ||
} |
File renamed without changes.
Oops, something went wrong.