scarletcafe / jishaku

A debugging and testing cog for discord.py rewrite bots.
https://jishaku.readthedocs.io/en/latest/
MIT License
543 stars 182 forks source link

jsk su as the bot doesn't work #16

Closed ioistired closed 5 years ago

ioistired commented 5 years ago

jsk su <@my_bots_id> some command here

Expected output

The output of some with arguments command and here

Actual output

Command "None" is not found

ioistired commented 5 years ago

Note: jsk su <@some_other_bot> some command here does work as expected

ioistired commented 5 years ago

Explanation:

デボン: https://github.com/Rapptz/discord.py/blob/24c0946/discord/ext/commands/bot.py#L845 \ デボン: https://github.com/Rapptz/discord.py/blob/24c0946/discord/ext/commands/bot.py#L166-L169 \ デボン: lib intentionally throws the handling away if it's the same user as the bot and not a selfbot \ デボン: i can't really argue with the logic but i don't know how i should handle this from my end \ デボン: this means that jsk su is also completely useless on a selfbot \ デボン: not that i'm that fussed about supporting selfbots

lambda: shouldn't the if message.author.bot check also be in get_context \ lambda: by dannos argument \ Danny: @‌lambda No \ Danny: Because that one you can opt-out of. \ Danny: The self-bot skip is a precondition of the entire bot class.

lambda: so is "jsk su" as bot WAI then \ デボン: i want jsk su \<own bot> to work but i'm not gonna rewrite get_context \ デボン: so i think i'm just gonna have to wrap it to say you can't

Danny: jsk su \<your self> makes no sense fundamentally to me \ Danny: The bot can't invoke their own command by the pre-condition set when you initialise the bot \ Danny: So what would that do?

See https://discordapp.com/channels/336642139381301249/336642776609456130/520339267357245441

ioistired commented 5 years ago

Closing due to the label on this issue.