Skip to content

Commit 63f212b

Browse files
Add type hints and refactor LastFm cog
## **__LastFM Cog Update__** ### Basic Rundown of Update This update brings improved error handling, more robust server-wide commands, and a better developer experience for the LastFM cog! ``` Hey devs! This update makes your Last.fm Discord bot more reliable and user-friendly. Enjoy smoother server-wide stats and less crashing on API hiccups. Keep scrobblin'! 🎶 ``` ### Notable Changes to Big Commands - `.fmservertop` and `.fmleaderboard` now run much faster and handle errors gracefully. - All commands now provide clearer error messages for users. --- ### **Feature 1: Enhanced Error Handling** - All commands now catch and report Last.fm API/network errors. - Users get friendly feedback if something goes wrong, not just a traceback. ### **Feature 2: Async Server Stats** - Server-wide commands fetch data for all users in parallel (asyncio.gather). - Typing indicators show while stats are loading. ### **Feature 3: Rate Limit Friendly** - Small delays added to avoid hitting Last.fm API rate limits. --- ### __Bug Fixes__ - Fixed: Server-wide commands no longer fail silently if one user errors. - Fixed: All commands now check for missing accounts and handle gracefully. - Fixed: Emoji setting now checks for permission errors and invalid emojis.
1 parent d121a98 commit 63f212b

1 file changed

Lines changed: 224 additions & 182 deletions

File tree

0 commit comments

Comments
 (0)