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

Twir add-on #207

Merged
merged 9 commits into from
Mar 17, 2024
Merged

Twir add-on #207

merged 9 commits into from
Mar 17, 2024

Conversation

crashmax-dev
Copy link
Contributor

This add-on for https://twir.app adds a command suggestion.
image

@crashmax-dev crashmax-dev changed the title feat: twir addon Twir add-on Mar 16, 2024
Copy link
Collaborator

@SirStendec SirStendec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there! Thanks for submitting a new add-on.

The big thing here is that you need to set enabled to true in your manifest for the add-on to get built. Everything else is technically fine, but I suggest you change how you're handling when rooms are added/removed as discussed in my comments.

As an aside, I think this is super neat. I've always intended to eventually have a bot command tab-completion thing in FrankerFaceZ but I've never actually gotten around to it. I might have to see if I can mess with the command autocomplete provider to let us just specify a command uses something other than / in order to remove the need for a pre-send event here.

src/twir/index.js Outdated Show resolved Hide resolved
src/twir/index.js Outdated Show resolved Hide resolved
src/twir/manifest.json Outdated Show resolved Hide resolved
@SirStendec
Copy link
Collaborator

SirStendec commented Mar 17, 2024

Update: I added support for ! commands in FrankerFaceZ/FrankerFaceZ@8807e09

This should simplify your logic a lot, since you can just specify that your commands have prefix: '!' and they'll be displayed/inserted/completed that way.

Example:

ffz.on('chat:get-tab-commands', e => e.commands.push({
    prefix: '!',
    name: '8ball',
    description: 'oooooo spoookey',
    permissionLevel: 0,
    ffz_group: 'Quoteconut (Bot)',
    commandArgs: [
        {name: 'question', isRequired: true}
    ]
}));

image

@SirStendec SirStendec merged commit 227ac66 into FrankerFaceZ:master Mar 17, 2024
1 check passed
@MrPandir MrPandir deleted the twir-extension branch March 17, 2024 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants