scarletcafe / jishaku

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

Ctx and intents #116

Closed clari7744 closed 2 years ago

clari7744 commented 3 years ago

Rationale

Changing to ctx makes tracebacks work with Context subclasses Checking intents.presences skips the AttributeError on a message edit where the bot is given a User, and also just doesn't bother with is_on_mobile() if there's no presence intent in the first place

Summary of changes made

Changed the message argument in ReplResponseReactor to ctx, and fixed async with ReplResponseReactor(ctx.message)s accordingly Added a and ctx.bot.intents.presences check to the use_file_check so it doesn't error on message edit without presences

Checklist

clari7744 commented 3 years ago

Wait was this supposed to be closed? It says I closed it but I thought I closed a different pr... I still want to get those Context changes merged if there isn't a reason not to.

Edit: I figured it out, it's because i renamed the branch. I think that closed the PR for some reason.

scarletcafe commented 2 years ago

I don't remember exactly why I didn't just make this generically compatible with Messageable, but I definitely don't really want it to be further narrowed down to just Context. I figure there's a reason for it and I guess I'll find out by trying it at some point.

scarletcafe commented 2 years ago

I couldn't find any instance in which the use_file_check fix made any difference, but I've handled it separately in 4c6e9f8. I think I'll leave the response reactor as it is since I like it being not locked down to Context.