Skip to content

Commit

Permalink
Merge pull request #36 from FalloutStudios:v8
Browse files Browse the repository at this point in the history
Major Version Update
  • Loading branch information
catplvsplus authored Oct 23, 2023
2 parents 44727a3 + 003258b commit 4373486
Show file tree
Hide file tree
Showing 152 changed files with 4,824 additions and 4,867 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Generate Docs
on:
push:
branches: ['main']
paths:
- 'packages/*/src/**'
- 'packages/*/package.json'
Expand Down Expand Up @@ -50,18 +49,17 @@ jobs:
max-parallel: 1
fail-fast: false
matrix:
package: ['reciple', 'client', 'utils', 'npm-loader', 'update-checker', 'docgen']
package: ['core', 'reciple', 'docgen', 'update-checker', 'npm-loader', 'create-reciple']
steps:
- name: Checkout repository
uses: actions/checkout@v3
if: ${{github.ref_type != 'tag' || contains(matrix.package, github.ref_name) }}
with:
ref: ${{ github.ref_name || '' }}

- name: Install node.js v16
- name: Install node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20
cache: 'npm'
cache-dependency-path: package-lock.json

Expand Down
6 changes: 1 addition & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,8 @@ dist
# bin
bin

# testing
test/*.yml

# docs
docs/docs.json

# files
registry.json
test/extensions
test
20 changes: 17 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,36 @@
<a href="https://npmjs.org/package/reciple">
<img src="https://img.shields.io/npm/v/reciple?label=npm">
</a>
<a href="https://github.com/FalloutStudios/Reciple/blob/main/LICENSE">
<img src="https://img.shields.io/npm/dt/reciple.svg?maxAge=3600">
<a href="https://github.com/FalloutStudios/Reciple/tree/main/packages/reciple">
<img src="https://img.shields.io/npm/dt/reciple?maxAge=3600">
</a>
<a href="https://www.codefactor.io/repository/github/falloutstudios/reciple/overview/main">
<img src="https://www.codefactor.io/repository/github/falloutstudios/reciple/badge/main">
</a>
<br>
<div style="padding-top: 1rem">
<a href="https://discord.gg/VzP8qW7Z8d">
<img src="https://discord.com/api/guilds/993105237000855592/embed.png?style=banner2">
</a>
</div>
</h3>

---

## About

Reciple is a Discord.js command handler framework that provides extended features for developers.

## Installation

```bash
npm create reciple@latest
```

## Packages

- [@reciple/actions](./packages/actions/) - Used by our github workflow to generate docs.json
- [@reciple/client](./packages/client/) - Extends [discord.js](https://npmjs.com/package/discord.js) Client to simplify working with Discord API
- [@reciple/core](./packages/core/) - Extends [discord.js](https://npmjs.com/package/discord.js) Client to simplify working with Discord API
- [@reciple/docgen](./packages/docgen/) - Parses Typescript file to generate json file for documentation
- [@reciple/npm-loader](./packages/npm-loader) - A reciple module that loads Reciple modules from node_modules
- [@reciple/update-checker](./packages/update-checker) - Checks for an update for a given package name from npm registry
Expand Down
1 change: 0 additions & 1 deletion example/.env.example

This file was deleted.

File renamed without changes.
107 changes: 0 additions & 107 deletions example/config.yml

This file was deleted.

33 changes: 33 additions & 0 deletions example/modules/contextMenuCommand.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { CommandType, ContextMenuCommandBuilder } from 'reciple';
import { inlineCode } from 'discord.js';

/**
* @type {import('reciple').RecipleModuleData}
*/
export default {
versions: ['^8'],
commands: [
// Using builders
new ContextMenuCommandBuilder()
.setName('Avatar')
.setType('User')
.setExecute(async ({ interaction }) => {
if (!interaction.isUserContextMenuCommand()) return;

await interaction.reply(interaction.targetMember.displayAvatarURL());
}),

// Raw command data
{
command_type: CommandType.ContextMenuCommand,
name: 'Info',
type: 'User',
execute: async ({ interaction }) => {
if (!interaction.isUserContextMenuCommand()) return;

await interaction.reply(`${interaction.targetMember} ${inlineCode(interaction.targetMember.id)}`);
}
}
],
onStart: () => true
};
20 changes: 0 additions & 20 deletions example/modules/contextMenus.js

This file was deleted.

7 changes: 7 additions & 0 deletions example/modules/loader/npmLoader.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { RecipleNPMLoader } from '@reciple/npm-loader';
import path from 'path';

export default new RecipleNPMLoader({
nodeModulesFolder: path.join(process.cwd(), '../node_modules'),
// foldersPerWorker: 500
});
36 changes: 36 additions & 0 deletions example/modules/messageCommand.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { CommandType, MessageCommandBuilder } from 'reciple';

/**
* @type {import('reciple').RecipleModuleData}
*/
export default {
versions: ['^8'],
commands: [
// Using builders
new MessageCommandBuilder()
.setName('say')
.setDescription('Say something')
.addOption(option => option
.setName('text')
.setDescription('Your message')
.setRequired(true)
)
.setExecute(async ({ message, parserData }) => {
const text = parserData.args.join(' ');

await message.delete();
await message.channel.send(text);
}),

// Raw command data
{
command_type: CommandType.MessageCommand,
name: 'time',
description: 'Get current time',
execute: async ({ message }) => {
await message.reply((new Date()).toString());
}
}
],
onStart: () => true
};
20 changes: 0 additions & 20 deletions example/modules/messageCommands.js

This file was deleted.

28 changes: 0 additions & 28 deletions example/modules/npmLoader/npmLoader.js

This file was deleted.

Loading

0 comments on commit 4373486

Please sign in to comment.