lukazbaum / discordjs-command-handler

A comprehensive TypeScript command handler for Discord.js, featuring slash commands, prefix commands, message commands, events, automatic intents, and more.
MIT License
5 stars 1 forks source link

add channel logging #8

Open jbasalone opened 2 months ago

jbasalone commented 2 months ago

Feature Description

Ability to set preference in each command file on a channel to log command usage and an embed template

Problem and Motivation

I have to add a line to each command if I want it logged to a discord channel that the command was ran. I attached a sample.

Screenshot 2024-07-23 at 10 52 29 AM

Additional Context

Add any other context or screenshots about the feature request here. If this feature is inspired by something else, please provide references.

lukazbaum commented 2 months ago

Do you mean a channel Id argument that will send an embed to the specified channel as a notification when the command is executed?

jbasalone commented 2 months ago

yes yes

lukazbaum commented 1 month ago

(still working on the new version but it will take a while.)

jbasalone commented 1 month ago

the other thing I was thinking would be cool is to have a master config list for commands and allowed servers/channels etc.

Like a YAML file or something. Would maybe have to implement some way of tracking the command with an id or something.

Guild - |_command-id |__channelwhitelist:

lukazbaum commented 1 month ago

Like this?:

guilds:
  - guild_id: 123456789012345678
    commands:
      - command_name: "ban" # Maybe id instead of name
        channel_whitelist:
          - 987654321098765432
          - 876543210987654321
      - command_name: "kick"
        channel_whitelist:
          - 123456789098765432
jbasalone commented 1 month ago

OOO yes. Then I dont have to manage each individual command file

lukazbaum commented 1 month ago

Alright, I'll try to add this as a "plugin/addon" since it can get messy with large bots.