Closed dariagrudzien closed 1 year ago
I can't see anything wrong in the code. I'll have to try it out.
So it seems just instantiating ui.View()
touches the asyncio event loop 🤯 That means one cannot instantiate the object outside of event loop, which is what happens when you test the function. This would bite me too! I'm quite surprised they do this. It's quite annoying as that means the generate_intro_message()
isn't really that pure and testable as I thought 😢
Ah ha! Interesting. I'll refactor tomorrow and try to fix it.
@honzajavorek Would you mind writing a correct text snippet when you have a moment? No rush.
Hotfix here https://github.com/juniorguru/juniorguru-chick/pull/33
Would you mind writing a correct text snippet when you have a moment? No rush.
Sure, putting to my todo.
@honzajavorek This feature is ready to deploy, needs correct copy.
Message:
Vidím, že máš **profil na GitHubu**. Když si GitHub propojíš s Discordem, bude tvůj profil viditelnější. Do budoucna navíc chystáme pro lidi s propojeným GitHub profilem spoustu vychytávek <a:yayfrog:976193164471853097>
1. Jdi do [nastavení](https://discord.com/channels/@me)
2. Klikni na Propojení (_Connections_).
3. Přidej GitHub.
For start, I'd do it like this. If there's no mention of GitHub in the intro, then the message looks like this:
If there's a link to GitHub in the intro, then the message should be:
Dík, že se představuješ! Když o tobě víme víc, můžeme ti líp radit <:meowthumbsup:842730599906279494>
+ Vidím, že máš **profil na GitHubu**. Když si GitHub propojíš s Discordem, bude tvůj profil viditelnější. Do budoucna navíc chystáme pro lidi s propojeným GitHub profilem spoustu vychytávek <a:yayfrog:976193164471853097>
+
+ 1. Jdi do [nastavení](https://discord.com/channels/@me)
+ 2. Klikni na Propojení (_Connections_).
+ 3. Přidej GitHub.
Představení můžeš kdyžtak doplnit či změnit přes tři tečky a „Upravit zprávu“ 📝
...
I may fiddle with it later for better structuring or readability, but I wouldn't bother you with this now.
@honzajavorek I think that I've got it. Is this how you imagined it? Or should the GH version skip the tips at the end to make the message shorter?
I think this is awesome. It is indeed rather long message, but let's not fiddle with that. I'll merge this so that we have the feature in place. I'm curious how many people will trigger it, how they'll react to it, and then we can make changes based on observations.
Ouch 😂 So the dedent
wasn't unused 😂
🎉 Shipping! Unrelated Garfield attached.
I broke the event loop 💔
When running the new test I get:
I have a feeling this is the line that causes it: https://github.com/juniorguru/juniorguru-chick/blob/daria/github-connections/juniorguru_chick/bot.py#L85 but not really sure why?