interactions.py icon indicating copy to clipboard operation
interactions.py copied to clipboard

fix(autocomplete dispatch): ID -> name

Open EepyElvyra opened this issue 3 years ago • 6 comments

This allows multi-guild usage when 2 or more scopes are used on a command since the command will have a different ID but the same name in different guilds. Reported here

About

This pull request is about (X), which does (Y).

Checklist

  • [x] I've ran pre-commit to format and lint the change(s) made.
  • [x] I've checked to make sure the change(s) work on 3.8.6 and higher.
  • [ ] This fixes/solves an Issue (If existent):.
    • resolves #
  • I've made this pull request for/as: (check all that apply)
    • [ ] Documentation
    • [ ] Breaking change
    • [ ] New feature/enhancement
    • [x] Bugfix

EepyElvyra avatar Aug 10 '22 12:08 EepyElvyra

In this case if i trigger autocomplete in first guild both funtions with different command ids will be called

image image

Damego avatar Aug 10 '22 13:08 Damego

In this case if i trigger autocomplete in first guild both funtions with different command ids will be called

image image

You want to have different responses for different guilds with the same command?

EepyElvyra avatar Aug 10 '22 13:08 EepyElvyra

You want to have different responses for different guilds with the same command?

Yes! /s I think it should call only command with equal command id

Damego avatar Aug 10 '22 13:08 Damego

You want to have different responses for different guilds with the same command?

Yes! /s I think it should call only command with equal command id

Is there a real need for that?

EepyElvyra avatar Aug 10 '22 13:08 EepyElvyra

Is there a real need for that? Honestly idk. Just found this.

Damego avatar Aug 10 '22 13:08 Damego

Is there a real need for that? Honestly idk. Just found this.

I think we should just keep it as it is rn

EepyElvyra avatar Aug 10 '22 13:08 EepyElvyra

It does make sense that the command with equivalent ID invokes only the autocomplete for it since the ID was given I can imagine some sort of tag system or something where the command names are the same but autocomplete differently in different guilds Would it be difficult to implement it? If it is, then I think it's fine

Toricane avatar Aug 15 '22 16:08 Toricane

It does make sense that the command with equivalent ID invokes only the autocomplete for it since the ID was given I can imagine some sort of tag system or something where the command names are the same but autocomplete differently in different guilds Would it be difficult to implement it? If it is, then I think it's fine

Yeah it's kinda hard to do it/it requires effort which is not really nessecary, especially considering the fact that you can just check ctx.guild_id inside autocomplete i think?

EepyElvyra avatar Aug 15 '22 16:08 EepyElvyra

Ok, makes sense

Toricane avatar Aug 15 '22 16:08 Toricane