Skip to content

Commit

Permalink
⚒️ Updated examples
Browse files Browse the repository at this point in the history
⚒️ Updated examples
  • Loading branch information
fsocietystudios authored May 28, 2022
1 parent 154b91c commit 06ee760
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,15 @@ To run this project, you will need to add the following environment variables to

Here's an example of creating a new slash command, (Under `commands` folder).
```typescript
import type { CommandInteraction } from "discord.js";
import type ExtendedClient from "../interfaces/ExtendedClient";
import type { ExtendedClient, CommandInteractionWithGuildMember } from "../interfaces/Interfaces";

export default {
name: "test",
description: "Testing command.",
type: 'CHAT_INPUT',
options: [],

run: async (client: ExtendedClient, interaction: CommandInteraction, args: any) => {
run: async (client: ExtendedClient, interaction: CommandInteractionWithGuildMember, args: any) => {
return await interaction.reply({ content: "Hello World!", ephemeral: true }).catch(e => console.log(e));
}
};
Expand All @@ -81,7 +80,7 @@ In case you'll want to add args to the command, simply just specify those inside
Here's an example of creating a new event callback, (Under `events` folder).\
This callback uses the same params as the event gives.
```typescript
import type ExtendedClient from "../interfaces/ExtendedClient";
import type { ExtendedClient } from "../interfaces/ExtendedClient";

async function ready(client: ExtendedClient) {
console.log(`Logged in as: ${client?.user?.tag}`);
Expand Down

0 comments on commit 06ee760

Please sign in to comment.