Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add channel logging #8

Open
jbasalone opened this issue Jul 23, 2024 · 13 comments
Open

add channel logging #8

jbasalone opened this issue Jul 23, 2024 · 13 comments
Labels
enhancement New feature or request

Comments

@jbasalone
Copy link

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.

@jbasalone jbasalone added the enhancement New feature or request label Jul 23, 2024
@lukazbaum
Copy link
Owner

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
Copy link
Author

yes yes

@lukazbaum
Copy link
Owner

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

@jbasalone
Copy link
Author

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
Copy link
Owner

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

@lukazbaum lukazbaum reopened this Sep 2, 2024
@jbasalone
Copy link
Author

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

@lukazbaum
Copy link
Owner

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

@lukazbaum
Copy link
Owner

Hello again. The new version will release in 1-2 weeks. I'm currently rethinking how to handle components like buttons, select menus and modals. I find the current approach a bit confusing and not suitable for all use cases.

Could you share what aspects of the current component handling you didn't like?
Additionally, if you have any suggestions or ideas for a more intuitive design, I would greatly appreciate it. ^^

And also, should the XML file just be a display, or would you like to manage stuff in there?

@jbasalone
Copy link
Author

I thnk the button componets work fine. I havent started using the menu select but I want to very soon. I dont think I had issues with the button. I can let you know when I do the select menu if it is an issue.

Id like to manage it from the XML

@jbasalone
Copy link
Author

actually I did remember one issue and that is handling collectors with buttons. Like here is one area it gets a little confusing. We have in the export
type: ComponentTypes.Button,

But it gets called twice if I use a collector

   const collector = reply.createMessageComponentCollector({
                ComponentType: ComponentTypes.Button,
                filter,
            });

But thats only if I use a collector and not just a singular action for a button click

@jbasalone
Copy link
Author

oh and buttons if I use pagination dont work as components

@lukazbaum
Copy link
Owner

Okay I'll find a solution for this. Thanks for your feedback :)

@jbasalone
Copy link
Author

One thing would be nice if I could load the button modules by choice. So if I specify buttons in the chat.ts file, then I dont get errors that components are matching because they are not specified in the button folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants