Code Monkey home page Code Monkey logo

boby's Introduction

Build Coverage Test Lint Vet Go Report Card

boby

A configurable and flexible bot that can be used to make a unique bot with! What seperates two bots using this project is nothing more than some configuration files.

Servers this bot is used in

The primary implementation of this bot is known as FLD-Bot, which has been added to the following discord channels:

  1. Filipino learning and discussion
  2. Tagalog.com

And more!

Getting Started

To use to this project, the only required software is a working go environment. For installation instructions, see this page.

This project includes third party dependencies, so be sure to run go get -d -v ./.. to install those dependencies.

This repository contains additional scripts and files that can be used to aid testing or running a bot. This includes a python3 script, and dockerfiles (which can be loaded by using the python3 scripts). These aren't essential, but can help with ensuring that your contributions work outside your own environment.

Creating Configuration Files

To understand how to run the bot, first build it using go build src/main, then run the program to receive more instructions and examples on how to run the bot.

For properly understanding configuration files, make sure to view the files:

  1. goquery_scraper
  2. json_sender
  3. regexp_scraper

Any of these files can be ignored by replacing its contents with [].

Feel free to send a message if you are having issues running the bot. Unfortunately, this isn't an easy bot to configure.

Contributing

A pull request must have the following:

  1. New unit tests that are relavent to the commit
  2. No failing unit tests
  3. Documentation for everything with public scope

It would be desirable if your commit had the following:

  1. golint returns no issues.
  2. Tests coverage includes new and modified code. This repository is aiming for as high code coverage as possible, excluding the folders "service/discordservice" (because this code is coupled to a 3rd party library, making testing difficult), "utils" and "main" (because they include side effects).

Adding bot to discord

To add your bot to a discord server with all the necesssary permissions, use the following URL template:

https://discord.com/oauth2/authorize?client_id=<client_id>&permissions=0&scope=applications.commands%20bot

Logging TODOs and Issues

TODOs and issues are tracked using github's issue tracker.

boby's People

Contributors

supernova4422 avatar actions-user avatar

Stargazers

Christian Roy Seville avatar

Watchers

James Cloos avatar  avatar Christian Roy Seville avatar

boby's Issues

Allow modifying prefix

Often a bot can ocnflict with other bots, to solve this a prefix can be modified per bot.
fld-bot does not support this, and should. In the first implementation, this could be at load time, and a future implementation could do it while the bot is running (which would be worse).

Slash Commands

Add slash commands to boby. This feature will soon be added to discordgo.

This will provide a ton of challenges, and will likely require a rewrite of how bots work.

Proposed architecture is to eliminate the need for a 'bot' class.

Unit testing relies on internet connection.

The current implementation for unit testing relies on an internet connection for http get requests.

A proposed fix is to make a function/class which handles retrieving results from a URL, and have the live implementation simply use http get, but when testing load from a cache.

Example configs should NOT have the same name as a legitimate config

If a bot fails to load, then attempts to load, the bot will start thinking the example config is a legitimate config.

This is horrible awful no good. The bot should keep failing until the example has been replaced.

Instead, we should prefix the file with "example_" and keep returning errors until a user edits it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.