Skip to content

Instantly share code, notes, and snippets.

@LGmatrix13
Last active January 6, 2026 13:07
Show Gist options
  • Select an option

  • Save LGmatrix13/97c52560a5c312bdf5dbbe46d0089550 to your computer and use it in GitHub Desktop.

Select an option

Save LGmatrix13/97c52560a5c312bdf5dbbe46d0089550 to your computer and use it in GitHub Desktop.

GSoC logo

ChatOps4s Discord Integration

Project Overview

Organization: Scala Center
Project: ChatOps4s Discord Integration (chatops4s-discord) Student: Liam Grossman
Mentor: Wojciech Pituła
Duration: May 2025 to September 2025 (Medium Project)

Objective

Build a simpler chat operations experience for the Scala ecosystem. More specifically, the project involved:

  1. Build flexible APIs that abstract over Discord's APIs.
  2. Implement data transfer objects/models.
  3. Implement unit testing.
  4. Implement examples in chatops4s-examples.
  5. Create documentation on using chatops4s-discord.

Progress

1. Build flexible APIs that abstract over Discord's APIs

  • Created core traits (OutboundGateway, InboundGateway, ButtonInteraction) for API implementation.
  • Implemented upon core traits to wrap Discord's APIs via DiscordInbound and DiscordOutbound.
  • Enable users of chatops4s-discord to pick their own tapir server intrepreter.
  • Enable users of chatops4s-discord to pick their own sttp backend.
  • Enable users of chatops4s-discord to execute their own logic when an Discord interaction occurs.
  • Enable users of chatops4s-discord to enable logging for observability.

2. Implement data transfer objects

  • Created a /models folder for representing data transfer objects.
  • Utilizied circe for serialization/deserialization.
  • Added logging for when serialization/deserialization failed.

3. Implement unit testing

  • Used scalatest for unit testing.
  • Executing unit testing during CI/CD in parallel.
  • 100% test converage over methods for DiscordInbound and DiscordOutbound

4. Implement examples in chatops4s-examples

  • Show usage of DiscordInbound.
  • Show usage of DiscordOutbound and each of its methods.
  • Show usage of Server and how a user can user their own interpreter.
  • Create examples for embeding within documentation.

5. Create documentation on using chatops4s-discord

  • Create installation instructions.
  • Create documentation on accept/decline.
  • Create documentation on sending a reply.
  • Create documentation on sending to a thread.
  • Utilize react, docusaurus, and mdx.
  • Match organization and design with other business4s projects.

Techinical Details

The chatops4s-discord was completed with the following:

Stack

  • Using the latest verison of Scala, circe, scalatest, sttp, tapir, and cats.

Design

  • Utilize functional programming to allow users to pass their own logic when a discord interaction is recieved.
  • Be sttp backend and tapir server interpreter agnostic.
  • Use effects paradigm to allow users to execute logic on an asynchronous runtime.
  • Isolated and independent unit testing with arrange, act, and assert paradigm.

Structure

chatops4s/
├── chatops4s-core/          # Core abstractions and interfaces
├── chatops4s-slack/         # Slack integration (parallel development)
├── chatops4s-examples/      # Examples for Slack and Discord 
├── chatops4s-discord/       # Discord integration
├── website/                 # Documentation
└── build.sbt                # Project metadata and dependencies 

Remaining Work and Improvements

1. Additional Features

  • Support customiziation for styling.
  • Support slash commands.
  • Support forms.

2. Enhance Documentation

  • Add guides or link resources for working with the Discord API.
  • Add guide for
  • Add "design decisions" section.

3. Enhance Internals

  • Have chatops4s-discord and chatops4s-slack both use chatops4s-core.
  • Have chatops4s-discord and chatops4s-slack use the same design decisions.
  • Have chatops4s-discord and chatops4s-slack implement the same test suites.

4. Enhance Developer Experience

  • Create custom exceptions for better debugging.
  • Add scaladoc comments for inline documentation

5. Ecosystem

  • CI/CD integration for deploying artifacts to maven.

Pull Requests History

Challenges

1. Effects paradigm

  • Using an "asynchronous runtime" was a new experience for me.
  • Understanding and appropriately using flatMap to sequence IO actions.

2. Discord API

  • To create a lean library, integration with the Discord API was done by scratch.
  • Documentation was confusing at times, particularly due to the lack of examples.

3. Pivoting from MS Teams Integration

  • Originally, I was expected to implement a MS Teams integration.
  • Due to restrictions around the MS Teams API, we had to pivot to Discord at the beginning of the coding period.

Learning Experience

1. Effects paradigm

  • cats and the IO monad.

2. API design

  • Using functional programing and traits to create a flexible and lean library

3. tapir and sttp

  • Deploying REST APIs in scala with tapir as well as making requests to external APIs in scala with sttp.

Project Links

Future Contributions & Continued Involvement

This GSoC experience has been transformative, and hope to continue contributing after program's conclusion.

Future Contributions

  • Provide maintenance and enhacements to chatops4s.
  • Have chatops4s-discord and chatops4s-slack reach parity.
  • Increase documentation for the chatops4s project.
  • Increasing testing converage for the chatops4s project.
  • Support other chat platforms like telegram.

Acknowledgments

A big thank you to my mentor, Wojciech Pituła, and the Scala Center for providing me this amazing opportunity. I'm deeply grateful for everything I've learned and hope to use these skills to continue contributing to opensource!

@azad2003-ai

azad2003-ai commented Jan 6, 2026 •

Copy link
Copy Markdown

Hello @wojciech Pitula sir and mentors,

My name is Azad Kumar, And I recently pursuing Bachelor's Degree in Computer Scince from Madhya Pradesh
MERN Stack
Java
Python
SQL
Blockchain
System Design (LLD & HLD)
Linux OS
Gen al
Backend development
Data structures & alogrithms

I am interested in contributing to the a highly scalable project is one that GSoC 2026
I have reviewed the project description and would like to begin contributing and understanding the expected the expected

deliverables.
Could you please guide me on:
where is the development repo/codebase for this project maintained?
Beginner-friendly tasks or areas I should explore first?

Are there any specific tools, datasets, or technologies I should set up before I start?
Looking forward to contributing meaningfully.

Thank you!
Azad kumar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment