Code Monkey home page Code Monkey logo

borealisbot2's Introduction

BOREALISbot2

A discord bot built using discord.py, made to tie together an SS13 server and a discord chat server.

Dependencies

Check the requirements.txt file. The list is long, but distinguished.

A SQL database (sqlite is also usable).

Overview

BOREALISbot2 is made to provide extended functionality to people on the community's Discord channels. Anything from making information available upon request, to announcing round ends, new round starts, etcetera. Etcetera.

It has slowly, over the years, been improved with a large list of auxiliary features, including integration with the Aurorastation forums (Invision Community API), game server, and other APIs.

Usage

You need to have a Discord bot account connected to a specific server (you should read a guide on how to do that).

Once you have that copy the config.yml.example and paste it as config.yml next to the main.py

Do the same for the logging.yml.example.

Once you have both the config.yml and the logging.yml look through them and adapt them to your needs.

Migrations

Migrations are managed via alembic. To configure the migration settings, copy over alembic.ini.example to alembic.ini and modify the sqlalchemy.url string to what's appropriate. See alembic and sqlalchemy documentation to figure this out, thought with sqlite, the easiest is sqlite:///borealis.db.

Migrations are ran every time you boot the bot via main.py, but you can also exclusively run migrations by using the --migrate_only switch on main.py.

Creating Migrations

Important: make sure you have the previous migrations applied before generating a new one. The system diffs the current code versus the current database, and an outdated database will generate a duplicating migration!

Assuming you've got all of the dependencies installed. Creating migrations should be as easy as modifying/adding to the models present in core/subsystems/sql, and then executing:

alembic revision --autogenerate -m "Some migration message"

Then modify the output files in alembic/versions.

Updating Dependencies

requirements.txt is fun and all, but updating is annoying. Here's how:

> pip install pur
> pur -r requirements.txt

And then commit the new requirements.txt.

borealisbot2's People

Contributors

arrow768 avatar botborealis avatar karolis2011 avatar sindorman avatar skull132 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

borealisbot2's Issues

API request timeouts not handled properly

The commands that utilize requests to outside APIs do not handle timeouts properly. This probably extends to the core query_api function as well.

Easiest way to fix this is to do it along with implementing #6 and making sure timeouts are used properly

playernotes does odd things

Bot-BOREALISIIBOT - Today at 8:04 AM
Command execution failed. 'NoneType' object is not subscriptable

No stack trace available atm.

not working

hi there for some reason I can't get it to work

?serverstaff

This command is only usable by staff members at time of writing. I believe it would be very useful for this command to be available for all members of the Discord. It would allow them to contact relevant persons about issues when not able to access the server. (For instance: you need to ahelp for whatever reason but you're not able to connect to the server.)

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.