npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

discord_chatbots

v1.0.5

Published

github project manager chatbot

Downloads

26

Readme

AI-powered Discord Bot SDK

This SDK enables developers to easily create and manage AI-powered Discord bots with GitHub integration capabilities.

Features

  • Create GitHub issues from Discord messages
  • Update existing GitHub issues based on Discord activity
  • Cache messages for context-aware interactions
  • AI integration for natural language processing

Usage

To interact with GitHub issues directly from Discord, include specific keywords in your messages:

  • To create a new issue, use createissue.
  • To update an existing issue, use updateissue.

Note: The detection of these keywords is not case-sensitive, meaning you can use CREATEISSUE, createIssue, UPDATEISSUE, or any other case variations, and the bot will still recognize your command.

Prerequisites

  • An account with LLM Lab
  • A Discord bot token
    • your bot added to a Discord server with the necessary permissions.
  • a GitHub personal access token.

Quick Start

Installation

npm install discord_chatbots

To contribute

git clone https://github.com/intelligent-iterations/discord_chatbots.git

Configuring the Bot class

initialize your bot with these values

const discordBotConfig = [
    {
        name: 'One of your user facing bots',
        token: process.env.DISCORD_PM_TOKEN,
        agentId: '0a6cd647-5f9d-4c63-912a-82079ecda0ab', ///you'll have to get this from the llm lab (see: additional set-up),
        showOpenIssues: true ///he will see all the github issues which are open
    },
///other bots u want to interact with
];
const projectConfig = {
    githubOrg: 'your-org-name',
    discordToGithubUsernames: { 'your_discord_username.': 'your_github_username', },
    updateIssuesBotId: "9148cda6-e7e7-4c70-a660-58e505840997",///you'll have to get this from the llm lab (see: additional set-up)
    maxMessageCacheLength: 10,
    iiKEY: process.env.II_KEY,
    GITHUB_TOKEN: process.env.GITHUB_TOKEN,
}
const bots = discordBotConfig.map(config => new Bot(config, projectConfig));

bots.forEach(async bot => await bot.initialize());

AI Setup

To use this SDK, you'll need to provides at least 1 agentId and updateIssuesBotId necessary for the SDK's AI configutation.

Update Issues Agent

Important: This agent is responsible for formatting the data for the GitHub API. You can configure your agent with the following values in the lab:

  • Model: mistal-small

Prompt Configuration:

Update the issue now by replying with one of these fields:name, description, assignees, status (open, closed), projects
and the updated value next to it in JSON format

Example format for assistant reply for the github API:{“name”: “chat list out of order”}

be brief and abide exactly by the provided options for possible values.

the ID of this agent with be passed as the value for updateIssuesBotId

User facing agent

This will be the agent that will talk to your users, you can create however many you want and add them to the discordBotConfig list!

Just get the agent id from the agent lab and assign it as the value for agentId