CraftSpider / dpytest

A package that assists in writing tests for discord.py
MIT License
103 stars 24 forks source link

Support for AutoShardedClient (and Subclasses) in Testing #31

Open Mythologos opened 4 years ago

Mythologos commented 4 years ago

Hello! First, I want to say that I really like the work that you all have been doing with this library! When I found it, I figured it would be a great library to attach to my personal bot project, Smorg, so as to practice writing tests and save time in future bot development. I hadn't actually used pytest before this, so I went and learned about how it worked before approaching my bot's code. Unfortunately, I didn't realize that AutoShardedClient and its subclass of AutoShardedBot weren't supported yet. I certainly could get by without using them right now, but I was hoping to future-proof my work in the case that the bot becomes more public and popular.

With that said, my hope is to start discussion of this topic and to understand the obstacles that stand in the way of this library supporting AutoShardedClient and its subclasses. I briefly perused discord.py's source code and didn't find all that many mentions of functions or properties unique to automatic sharding, but I recognize that I am not terribly well-versed in the subject and could stand to learn more. Moreover, I'd be happy to try and contribute in some way to achieve the goal of using AutoShardedClient in testing should I feel that I can do so meaningfully.

Thanks again for your consideration! Let me know whether this is a reasonable feature for pursuit in the near future and if you have any thoughts on how it might come about in the project.