Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a discord adapter #223

Merged
merged 23 commits into from
Jan 11, 2024
Merged

Adding a discord adapter #223

merged 23 commits into from
Jan 11, 2024

Conversation

bensontrinh
Copy link
Member

@bensontrinh bensontrinh commented Nov 10, 2023

Task:

Getting a discord adapter implemented.

I'm using the library from discljord to implement a lot of this.

Todo before merging:

  • Add some test coverage
  • Cleanup code
  • Implement reaction support

@@ -104,10 +104,12 @@
; chat protocols
[irclj "0.5.0-alpha4"]
;; use this fork which uses javax.websockets for compatability with Yetibot
[stylefruits/gniazdo-jsr356 "1.0.0"]
;; gniazdo 1.2.2 needed for discljord
[stylefruits/gniazdo "1.2.2"]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needed to update this for discord to work properly. I'm thinking this will end up breaking other things since this uses jetty's Websocket

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like your local yb is running just fine? I'll do some more testing but this upgrade might be good to go.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah locally it is fine. I didn't test any other connectors though.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to include this dep in the the yetibot/yetibotproject.clj as well to get it to run properly.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed slack still works with this upgrade.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sick. Thanks for checking that out.

Copy link
Member

@devth devth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for tackling this beefy task for your first contrib!

image

src/yetibot/core/adapters/discord.clj Show resolved Hide resolved
src/yetibot/core/adapters/discord.clj Outdated Show resolved Hide resolved
src/yetibot/core/adapters/discord.clj Outdated Show resolved Hide resolved
src/yetibot/core/adapters/discord.clj Outdated Show resolved Hide resolved
src/yetibot/core/adapters/discord.clj Outdated Show resolved Hide resolved
@@ -104,10 +104,12 @@
; chat protocols
[irclj "0.5.0-alpha4"]
;; use this fork which uses javax.websockets for compatability with Yetibot
[stylefruits/gniazdo-jsr356 "1.0.0"]
;; gniazdo 1.2.2 needed for discljord
[stylefruits/gniazdo "1.2.2"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like your local yb is running just fine? I'll do some more testing but this upgrade might be good to go.

config/config.sample.edn Outdated Show resolved Hide resolved
@devth
Copy link
Member

devth commented Dec 21, 2023

Note: adapters now pass the raw event in the chat-source so cmd handlers can optionally use platform-specific stuff, so we should do that for discord as well, e.g. https://github.com/yetibot/core/pull/224/files#diff-1a12310cc4d4bb44655929798120810eab79f8ad290cb8e65a3605d8fc3a34f0

config/config.sample.edn Outdated Show resolved Hide resolved
@bensontrinh bensontrinh changed the title initial discord adapter Adding a discord adapter Jan 2, 2024
Copy link
Member

@devth devth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:sick:

src/yetibot/core/adapters/discord.clj Outdated Show resolved Hide resolved
@bensontrinh bensontrinh marked this pull request as ready for review January 11, 2024 18:58
@bensontrinh bensontrinh merged commit 9c099fd into master Jan 11, 2024
2 checks passed
@bensontrinh bensontrinh deleted the discord branch January 11, 2024 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants