![]() ![]() The bot then sends this response back to the Discord channel.įeel free to submit issues or pull requests if you find any problems or have suggestions for improvements. It sends the prompt to the OpenAI API and receives a response generated by the GPT-4 model. When a message is received, the generateResponse function is called with the message content as the prompt.Sending the AI-generated response to the Discord channel.More than 100 million people use GitHub to discover, fork, and contribute to over 330 million projects. Implementing the generateResponse function, which sends a message to the OpenAI API and processes the response. To associate your repository with the discord-bot-client topic, visit your repo's landing page and select 'manage topics.' GitHub is where people build software.Setting up event listeners for the ready and messageCreate events.Importing required libraries and initializing the Discord client and OpenAI API client.Once the bot is online, it will start listening to messages and respond using GPT-4. ':Clever/gitbot.git' the format of each value here must be passable to git clone repos : - :Clever/aviator.git Basepath to prepend temp directories. The config file is YAML of the following form: repos is a list of repositories to examine, e.g. Gitbot will likely be expanded in the future, for I feel that there are plenty of other capabilities within Github's API that could be integrated into Gitbot.Invite the bot to your Discord server using the invite link provided by the Discord Developer Portal. Usage gitbot takes in one argument: a path to a config file. This project helped me to learn more about Github's API, and how to use Github's API to find user information. Prior to this project, I've only worked with repository information when using Github's API. It showed me that some of my projects could actually be used efficiently, and it gave me a kick of confidence. I'm rather proud of actually utilising the discord.js starter kit that I myself had made earlier this week. Nonetheless, I overcame that challenge with some Googling and completed the project. Not to say that Github's API was bad, my abilities to process JSON information were getting rusty. To associate your repository with the discord-welcome-bot topic, visit your repo's landing page and select 'manage topics.' GitHub is where people build software. (Rapptz) which is distributed under MIT License. This project vendors package made by Danny Y. Artwork created by Sinlaire on Deviant Art for the Red Discord Bot Project. You can also view single repositories instead of a full list for a more descriptive view. Run python3 main.py or python main.py to start the bot. There were some problems working with Github's API. Red is named after the main character of 'Transistor', a video game by Super Giant Games. GitBot Discord Bot Described: GitBot is a serverless application (using Cloudflare Workers), allowing you to search specific GitHub information such as viewing the repository list from an organization or a specific user. Navigate to the directory where you installed the ChatGPT Discord bot. After some added features, Gitbot was done (for now). I then went onto Github's API docs, as well as some example code that I had used prior when working with Github's API. I utilised my discord.js starter kit from the Day 1 projects and used it as my starting code for Gitbot. It can also retrieve information about Github users, such as their name, bio, company, blog, location, email, Twitter, repository and gist count, as well as their followers and following count. For this one to work you will need to do three things: add a repository webhook link pointing to Install the bot on your discord server Subscribe to the events you would like to subscribe to. So far, it is capable of retrieving information about Github repositories, such as its description, language, license, fork count, star count, watch count, issue count, and clone size. This bot is great to subscribe to some GitHub notifications. ![]() Gitbot essentially functions as a Discord bot that sends HTTP requests to Github's API. Thus, I utilised Discord's bot API with Github's REST API and created this aptly named project, "Gitbot". The answer was Discord, for communication and messaging (and keeping up with the latest news on MLH), and Github, for all my coding, programming, and tinkering purposes. To associate your repository with the discord-raid-bot topic, visit your repo's landing page and select 'manage topics.' GitHub is where people build software. ![]() When given the task to connect 2 APIs together, I thought to myself, "What two applications do I use most?". ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |