Discord Modals via Views

I've wanted to improve on my bot to not only assign students based on the invite they use, but also ask them for their name (I haven't got around to OAuth2's, which I know would be more seamless and more secure). And I was happy that it was possible with Discord Views and Modals (I still don't understand why they're separate). For everyone that needs the same thing I needed, and stumbles upon my post here, this is the solution I found while using discord.py as the library (I also have my code in Cogs; if you use a single file, your mileage may vary) ...

September 27, 2023 · 4 min · Nevalicjus