phidatahq / phidata

Build AI Agents with memory, knowledge, tools and reasoning. Chat with them using a beautiful Agent UI.
https://docs.phidata.com
Mozilla Public License 2.0
15.58k stars 2.14k forks source link

feat: add Discord integration tool #1337

Open vishkrish200 opened 1 month ago

vishkrish200 commented 1 month ago

Add Discord bot functionality to phi tools with async support. Includes basic channel and message management capabilities.

this fixes #1330

vishkrish200 commented 1 month ago

had some issues with the validate script. had to deal with the async nature of the discord.py library

vishkrish200 commented 1 month ago

@anuragts . just did some more testing of the tool and it looks like it will need a few more changes to work. the discord bot mechanisms are a bit tricky

discord.py is inherently asynchronous - it requires a running event loop. The discord bot needs to be properly started and connected before any operations. Apologies for the delay

vishkrish200 commented 1 month ago

hey the latest commits fix everything. switched the approach completely. using discord's http api instead of the discord bot system. updated cookbook with the appropriate steps. also included the changes @anuragts requested :)

vishkrish200 commented 3 weeks ago

hey @anuragts, the pr says changes are requested but those changes were marked as resolved by you. could you have a look at the updated code again?

manthanguptaa commented 3 weeks ago

Thanks @vishkrish200 for this amazing PR. I have tested it out and it's working perfectly!

manthanguptaa commented 3 weeks ago

@vishkrish200 can you also edit the doc strings for the function to add the function definition. Example https://github.com/phidatahq/phidata/blob/main/phi/tools/slack.py

vishkrish200 commented 3 weeks ago

@vishkrish200 can you also edit the doc strings for the function to add the function definition. Example https://github.com/phidatahq/phidata/blob/main/phi/tools/slack.py

hey just pushed a commit which fixes this @manthanguptaa . Let me know if there are any other changes needed. also i think i've unnecessarily requested a pr review from @anuragts.

vishkrish200 commented 1 week ago

@manthanguptaa any updates?