Bolt is an extensible chatbot written entirely in Python, inspired by Errbot and Hubot projects. The goal of this project is to provide a simple to extend bot framework for Discord.
Batteries included:
I am open to feedback and suggestions. Feel free to submit a pull request or open an issue :)
Bolt originally started out as a simple Trivia Bot that used long polling and webhooks to read and write to chat channels. I became obsessed with making this bot more robust and at that time, no bots existed for Discord, so this bot evolved into a fully vetted framework that I could use to build functionality off of.
This project is a place I can experiment with design ideas and evolve a sense of personal code standards. I treat it as an academic project to learn about new libraries and tools available to me as Python continues to grow.
Coming soon...
from bolt import Plugin
from bolt import command
class SomePlugin(Plugin):
@command("hi")
def on_sayhi(self, event):
self.say(event.channel_id, f"Hello {event.sender.name}")
from bolt import Plugin
from bolt import subscriber
from bolt.discord import Events
class SomePlugin(Plugin):
@subscriber(Events.MESSAGE_REACTION_ADD)
def on_message_reaction_add(self, event):
# do stuff
from bolt import Plugin
from bolt import webhook
class SomePlugin(Plugin):
@webhook('/hookme', methods=['GET'])
def webhook(self, request):
# do stuff
from bolt import Plugin
from bolt import interval
class SomePlugin(Plugin):
@interval(60)
def updateathing(self, event):
# do stuff
from bolt import Plugin
from bolt import command
class SomePlugin(Plugin):
def activate(self):
self.users = self.bot.database_client['plugin-users']
@command("whoami")
def whoami(self, event):
author = self.users.find_one({"id": event.author.id})
Coming soon...
Coming soon...
Bolt is licensed under the MIT License