Code Monkey home page Code Monkey logo

secret_messages_bot's Introduction

SecretMessagesBot

Discord bot that allows you to play certain 'pen and paper' games within a discord guild (server). The features are incredibly simple to allow users to play many different games, but note-taking and scores still will need to be done manually.

Note: I have deliberately not allowed this bot to be installed on your own server, while I iron out the bugs and write tests.

27/11/18 - Currently migrating the discord stuff over to nostrum instead of alchemy. Ideally want to make the code clearer and implement a message cache, but need a less opinionated framework for certain things (like for example, when the marker message is sent by the bot, I want to keep the most recent x messages in a cache until the ready command, then we stop caching messages and wait for everyone else to be ready.)

Commands

Command Usage
!!setup Begins a game, this command must be used before users can join.
!!join Joins a game that has been initialised. After using this command, a private channel will be created for you that others cannot see.
!!ready Used in your private channel to signal that you have typed your messages for the current round. The round will end when all players are ready.
!!finish Cleans up all the channels/roles when a game has ended. Currently this must be used manually.

Planned Changes

  • Refactor cleaning up into it's own module, so it's easier to trigger a clean-up when a game times out.
  • Clean up the GenServer code and create an implementation behaviour to allow for more reasonable testing.
  • Fix a bug where if a player types more than the field limit for a discord card in a round, the messages from that round is lost.
  • Change Supervisor to DynamicSupervisor
  • Potentially use a cache within the application for channels and users, so I can deal with the bad practice of using internal Alchemy code within my GenServer implementation. (Or do more work on my Alchemy fork).
  • Have a look at whether GenStageMachine is a more appropriate abstraction for the game state. (Maybe overkill, but it also solves important problems if I want to prevent players joining a game in progress for example, without reinventing the wheel.)

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.